Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include payloadType in FrameInfo #1156

Merged

Conversation

singpolyma
Copy link
Contributor

So that consumers of onFrame can tell what codec the frame is in and know what decoder to use.

So that consumers of onFrame can tell what codec the frame is in and
know what decoder to use.
Copy link
Owner

@paullouisageneau paullouisageneau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks OK but examining the payload type after depacketization only works for audio because packetization is typically the same irrelevant of the codec. The trick does not work for video.

@paullouisageneau paullouisageneau merged commit 807722e into paullouisageneau:master Apr 17, 2024
12 checks passed
@singpolyma
Copy link
Contributor Author

I'm only using it for audio right now, but I'm not sure why it would be different for video? It's still going to be RtpHeader + payload, no? Or is video packets totally different RtpHeader sizes etc?

@paullouisageneau
Copy link
Owner

I'm only using it for audio right now, but I'm not sure why it would be different for video? It's still going to be RtpHeader + payload, no? Or is video packets totally different RtpHeader sizes etc?

It's fundamentally different for video. Of course RTP headers are the same, but a single video frame may be packetized over several RTP packets, and the method to fragment and reconstruct a frame requires parsing payloads which is codec-dependent.

edmonds added a commit to edmonds/vacon that referenced this pull request Apr 21, 2024
edmonds added a commit to edmonds/libdatachannel that referenced this pull request Oct 28, 2024
This follows the API change in paullouisageneau#1156 and is based on
the very similar change to H264RtpDepacketizer (commit
e9060bf).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants