Skip to content

Support passing RTP extensions when writing samples.#3391

Open
fancycode wants to merge 1 commit intopion:mainfrom
fancycode:writesample-extensions
Open

Support passing RTP extensions when writing samples.#3391
fancycode wants to merge 1 commit intopion:mainfrom
fancycode:writesample-extensions

Conversation

@fancycode
Copy link
Copy Markdown

This is needed to set the sdp.SDESMidURI and sdp.SDESRTPStreamIDURI RTP header extensions when sending samples to the different layers of simulcast tracks. At least I didn't find another way to do this.

I considered reusing rtp.Extension but that doesn't expose the internal data, so additional accessors and a NewExtension(id uint8, payload []byte) *Extension function would have been required in rtp.

@fancycode fancycode force-pushed the writesample-extensions branch from f448d0a to 14cb039 Compare March 5, 2026 20:03
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.20%. Comparing base (c36cb6e) to head (7466116).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3391      +/-   ##
==========================================
- Coverage   85.34%   85.20%   -0.15%     
==========================================
  Files          81       81              
  Lines        9746     9751       +5     
==========================================
- Hits         8318     8308      -10     
- Misses       1006     1018      +12     
- Partials      422      425       +3     
Flag Coverage Δ
go 85.20% <100.00%> (-0.15%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fancycode fancycode force-pushed the writesample-extensions branch 2 times, most recently from c5fbb48 to 6b1ae1d Compare March 7, 2026 20:28
@fancycode
Copy link
Copy Markdown
Author

Improved test coverage and rebased to current master.

Not sure about the API test failure, the new parameters to WriteSample are optional, so existing callers will still work as before.

@JoTurk
Copy link
Copy Markdown
Member

JoTurk commented Mar 8, 2026

Not sure about the API test failure, the new parameters to WriteSample are optional, so existing callers will still work as before.

it's still a breaking change, please refer to Adding to a function

does this #1841 solve your issue?

@fancycode fancycode force-pushed the writesample-extensions branch from 6b1ae1d to 7466116 Compare March 10, 2026 19:56
@fancycode
Copy link
Copy Markdown
Author

it's still a breaking change, please refer to Adding to a function

Right, I didn't think about this - introduced a new function.

does this #1841 solve your issue?

Yes, copying most of the existing TrackLocalStaticSample code into my project obviously works (and this is what I'm doing right now), but I assumed this is something others might also need to send simulcast streams from files, which is the reason for my PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants