Skip to content

Support SMPTE 2022-7 temporal redundancy SDP#502

Open
thangldw wants to merge 1 commit into
sony:masterfrom
thangldw:fix/is05-temporal-redundancy
Open

Support SMPTE 2022-7 temporal redundancy SDP#502
thangldw wants to merge 1 commit into
sony:masterfrom
thangldw:fix/is05-temporal-redundancy

Conversation

@thangldw

Copy link
Copy Markdown

Summary

  • add structured SDP grammar for ssrc, ssrc-group, and duplication-delay
  • represent SSRC-level temporal redundancy explicitly in sdp_parameters, including SSRC IDs, CNAMEs, delay, and MID
  • generate the RFC 7104 single-media-description form from two identical IS-05 transport legs
  • parse the temporal form back into two receiver transport legs while preserving existing separate-source and separate-destination behavior
  • reject malformed SSRC attributes, unsupported leg counts, and non-identical temporal transport legs

Testing

  • exact IS-05 temporal redundancy example
  • SDP creation/parsing round trip
  • malformed grammar and inconsistent-leg negative cases
  • existing SMPTE 2022-7 variants
  • full suite: 2027 assertions in 161 test cases

This PR is independent of and complementary to #501, so the two remaining modes can be reviewed separately.

Refs #38

@garethsb garethsb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also looks pretty good, thank you. Just a few comments so far!

Comment thread Development/sdp/json.h
Comment on lines +185 to +186
const web::json::field_as_string ssrc_attribute{ U("ssrc_attribute") };
const web::json::field_as_value_or ssrc_attribute_value{ U("ssrc_attribute_value"), {} };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm wondering whether it would be possible/nice in the JSON model to represent the "source attribute" exactly the same as a top-level attribute is represented but nested here?

I.e. something like:

{ sdp::fields::ssrc_id, id },
{ sdp::fields::attribute, value_of({
    { sdp::fields::name, U("cname") },
    { sdp::fields::value, cname }
}) }

Comment on lines +460 to +463
return sdp::group_semantics::duplication == sdp::group_semantics_type{ sdp::fields::semantics(value) }
&& 2 == sdp::fields::ssrc_ids(value).size()
? 2
: 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not return the actual number of ssrc_ids here, and if necessary bail out higher up if it's not a supported number (0 or 2)?

Suggested change
return sdp::group_semantics::duplication == sdp::group_semantics_type{ sdp::fields::semantics(value) }
&& 2 == sdp::fields::ssrc_ids(value).size()
? 2
: 0;
return sdp::group_semantics::duplication == sdp::group_semantics_type{ sdp::fields::semantics(value) }
? sdp::fields::ssrc_ids(value).size()
: 0;

Comment on lines +1222 to +1224
const auto& ssrc_group_value = sdp::fields::value(*ssrc_group);
if (sdp::group_semantics::duplication != sdp::group_semantics_type{ sdp::fields::semantics(ssrc_group_value) }) continue;
if (2 != sdp::fields::ssrc_ids(ssrc_group_value).size()) continue;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This duplicates some of the logic of get_ssrc_duplication_count... but given that function isn't directly usable here, and that means get_ssrc_duplication_count is only used in one place, maybe better to drop that function and inline its code into the single call-site?

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