Skip to content

Support RFC 6364 and IS-05 SMPTE 2022-5 FEC SDP (alternative to #505) - #515

Merged
lo-simon merged 3 commits into
sony:masterfrom
garethsb:fix/is05-fec-alt
Oct 2, 2026
Merged

lo-simon merged 3 commits into
sony:masterfrom
garethsb:fix/is05-fec-alt

Conversation

@garethsb

@garethsb garethsb commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Alternative to #505, based on @thangldw's fix/is05-fec plus @garethsb's thangldw/nmos-cpp#1 trailing-field simplification. Rebased onto master after #514.

  • RFC 6364 SDP grammar for FEC/UDP, UDP/FEC, FEC-FR, fec-source-flow, fec-repair-flow, repair-window
  • optional trailing object_converter field so m= format lists may be omitted
  • IS-05-compatible SMPTE 2022-5 mapping in nmos/sdp*
  • require resolved fec_mode (1D/2D) when creating SDP; parse concrete mode from repair-flow count
  • resolve receiver staged fec_mode: auto from /constraints (highest enum value, or 2D when unconstrained)

Commits (this PR vs master)

  1. Implement RFC 6364 SDP grammar (@thangldw)
  2. Support IS-05 SMPTE 2022-5 FEC SDP (@thangldw / @garethsb)

Testing

Linux Release: all testSdp* / *Fec* (681 assertions in 37 cases).

Related to #38.

@garethsb
garethsb force-pushed the fix/is05-fec-alt branch 2 times, most recently from 9e15c7d to e2e845d Compare July 29, 2026 11:46
@garethsb
garethsb marked this pull request as draft July 29, 2026 12:16
thangldw and others added 2 commits July 29, 2026 14:33
Parse and generate fec-source-flow, fec-repair-flow, and repair-window.
Use digits_converter for DIGIT fields, and an optional trailing
object_converter field so m= format lists may be omitted.
Map FEC transport parameters to RFC 6364 SDP attributes.
Require resolved fec_mode ("1D"/"2D") when creating SDP.
Parse concrete fec_mode from repair-flow count; leave unused
fec2D_destination_port as "auto". Resolve receiver staged
fec_mode auto from /constraints as the highest available
number of dimensions.

Co-authored-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
@garethsb

Copy link
Copy Markdown
Contributor Author

@lo-simon, this #515 is fundamentally @thangldw's nice work from #505 rebased onto #512 and #514, with:

  • simpler digit/trailing-field grammar
  • stricter create/parse/auto handling aligned with resolved /active
  • cleaner constructors

This PR still needs a big review; there's a fair bit of complexity in the FEC SDP handling and conversion to/from IS-05 transport_params.

@garethsb
garethsb marked this pull request as ready for review July 29, 2026 15:08

@lo-simon lo-simon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For RFC6364, the tag-len and repair-window size require %x31-39 *DIGIT (with a non-zero first digit). I created a non_zero_digits_converter to replace the digits_converter in the fec_source_flow_converter and repair_window_converter. Additionally, I extended the unit tests accordingly. Please see the attached patch file.
enhance-sdp-grammer-for-non-zero-integer.patch

@garethsb

garethsb commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks @lo-simon. I don't want non_zero_digits_converter.

tag-len and repair-window size are %x31-39 *DIGIT, so the ABNF does ban zero and a leading zero, but that check does not belong in this grammar. digits_converter accepts both, as it does for the other 1*DIGIT fields, and the comment there says leading zeros are accepted and not round-tripped. The grammar turns text into JSON; limits such as encoding-id 0–255 stay above it.

Refusing tag-len=0 or repair-window:0ms in the parser means the session description never becomes JSON. Postel's law applies on the way in. A check that this node will not advertise a zero tag length or repair window belongs with the other IS-05 rules, not in the SDP parser.

So I have not taken the converter, or the tag-len=0 and repair-window:0ms rows. I also have not added tests that 0 and 01 parse; that would make non-conforming SDP look supported. I have taken the other tests from your patch — the fssi syntax failures and the IS-05 mapping cases — and pushed them with you as author.

Lock the fssi parse failures already enforced beside ss-fssi, and the
IS-05 transport-parameter cases for groups the mapper skips or rejects.

Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>

@lo-simon lo-simon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@lo-simon
lo-simon merged commit 192c2fc into sony:master Oct 2, 2026
10 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