-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
RTP H264/H265 de-packetization rule for lost fragments #1137
Comments
Cc @Sean-Der |
Good observations!
No, there is no check for transmission order currently. Depacketizers have only been recently added by @Sean-Der so they are still a bit incomplete. The depacketizer should indeed reorder packets by sequence (taking wrap-around into account) before processing for a given timestamp. However, this is not sufficient, proper re-ordering would require a jitter buffer, which would be another component in the media handler chain.
You are right, according to spec the depacketizer should stop reassembling the NAL unit when a fragment is missing and discard the trailing fragments. |
Perhaps we can frame based on the continuity of sequence numbers, referencing WebRTC. |
While working on #1134 and #1135 I noticed this text in RFC 6184 § 5.8:
And the corresponding text in RFC 7798 § 4.4.3
And "transmission order" means:
So, looking at the H264/H265 depacketizer:
incoming()
orbuildFrames()
. Is there anything else in libdatachannel that is enforcing that the RTP messages are being processed in transmission order (i.e. by RTP header sequence number) rather than by reception order by the time the messages get to the de-packetizer? For instance, if RTP messages are received out of order, then you could see fragments for RTP timestamps A and B ordered like this: [ A A A B A B B B ]. By only looking at the timestamps in message reception order I think that would get reassembled as four different (and incomplete) messages: [ A A A ], [ B ], [ A ], [ B B B ].The text was updated successfully, but these errors were encountered: