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

H264RtpDepacketizer: De-packetize access units rather than individual NALUs #1135

Conversation

edmonds
Copy link
Contributor

@edmonds edmonds commented Mar 19, 2024

This commit updates the H264RtpDepacketizer to accumulate the NALUs for a particular RTP timestamp into a single output message, rather than returning each NALU as an individual message. This helps decoders which may want to see the non-VCL SPS/PPS/etc. NALUs in the same access unit as a VCL NALU rather than as standalone messages.

Each NALU in the access unit buffer is prepended with an H.264 Annex B start code 0x00, 0x00, 0x01.

@edmonds
Copy link
Contributor Author

edmonds commented Mar 19, 2024

@Sean-Der This should implement the change to the H264 de-packetizer you were asking for in #1134 (comment). I tested it with the Intel VPL encoder/decoder and packets produced with rtc::H264RtpPacketizer and it worked for me.

@Sean-Der
Copy link
Contributor

@paullouisageneau what do you think of this change? I am in big support of it!

@paullouisageneau
Copy link
Owner

@paullouisageneau what do you think of this change? I am in big support of it!

I think this is great, the change totally makes sense.

@edmonds edmonds force-pushed the h264-rtp-depacketize-access-units branch from faad80c to 27f238f Compare April 13, 2024 22:54
@edmonds
Copy link
Contributor Author

edmonds commented Apr 13, 2024

Re-based on master, made the start sequence configurable.

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 good, thanks!

@paullouisageneau
Copy link
Owner

@edmonds Could you please address conflicts here too?

@Sean-Der
Copy link
Contributor

@edmonds I would love to fix these merge conflicts for you! If you add me as a contributor to your fork I can fix them right now :)

@edmonds
Copy link
Contributor Author

edmonds commented Apr 19, 2024

@edmonds I would love to fix these merge conflicts for you! If you add me as a contributor to your fork I can fix them right now :)

OK, just sent you an invite.

@Sean-Der Sean-Der force-pushed the h264-rtp-depacketize-access-units branch from 27f238f to f085a25 Compare April 19, 2024 15:38
… NALUs

This commit updates the `H264RtpDepacketizer` to accumulate the NALUs
for a particular RTP timestamp into a single output message, rather
than returning each NALU as an individual message. This helps decoders
which may want to see the non-VCL SPS/PPS/etc. NALUs in the same access
unit as a VCL NALU rather than as standalone messages.

Each NALU in the access unit buffer is prepended with an configurable H.264
start code
@Sean-Der Sean-Der force-pushed the h264-rtp-depacketize-access-units branch from f085a25 to f5acd35 Compare April 19, 2024 17:24
@Sean-Der
Copy link
Contributor

@paullouisageneau done! can I get a review please?

@edmonds I changed the name of the member variable from seperator -> mSeperator and ran clang-format, beyond that no changes!

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 good, thank you.

@paullouisageneau paullouisageneau merged commit fd6cf71 into paullouisageneau:master Apr 25, 2024
12 checks passed
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.

3 participants