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

Refactor H264Payloader to allow the deactivation of STAP-A packets. #292

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

YannSc
Copy link
Contributor

@YannSc YannSc commented Feb 13, 2025

Description

This change adds a field* to disable the creation of STAP-A packets by the H264Payloader.

  • As per current behaviour, STAP-A packets are created by default.
  • If the creation of STAP-A packets is disabled, NALUs of type 7 (SPS) and type 8 (PPS) will be packed as Single NAL Units.

This change can be a step to support packetization-mode=0 (single NALUs) in compliance with RFC6184.

Reference issue

This change is related to bluenviron/gortsplib#585

Context and use case

The use case motivating this change is to simulate a proprietary piece of hardware. This hardware shows limited RTP packetization capabilities as it does not generate STAP-A packets (only single NALUs and FUas).

Thanks,

@Sean-Der
Copy link
Member

LGTM @YannSc! Mind exposing the field (instead of using a method) and we can get this merged :)

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.72%. Comparing base (3e1f46a) to head (50b323b).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #292      +/-   ##
==========================================
+ Coverage   84.69%   84.72%   +0.02%     
==========================================
  Files          24       24              
  Lines        2699     2703       +4     
==========================================
+ Hits         2286     2290       +4     
  Misses        354      354              
  Partials       59       59              
Flag Coverage Δ
go 84.72% <100.00%> (+0.02%) ⬆️
wasm 84.09% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@YannSc YannSc requested a review from Sean-Der February 13, 2025 22:45
@YannSc
Copy link
Contributor Author

YannSc commented Feb 13, 2025

Changed as requested. Thank you for the review !

…ALUs of type 7 (SPS) and type 8 (PPS) will be packed as Single NAL Units if STAP-A are disabled.

This change can  help to support packetization-mode=0 (single NALUs) in compliance with RFC6184.
@Sean-Der Sean-Der force-pushed the evol_h264_packet_stapa_disable branch from e2c3e61 to 50b323b Compare February 15, 2025 03:30
@Sean-Der Sean-Der merged commit 2cd23bd into pion:master Feb 15, 2025
12 of 13 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.

2 participants