Support SMPTE 2022-7 temporal redundancy SDP#502
Conversation
garethsb
left a comment
There was a problem hiding this comment.
Also looks pretty good, thank you. Just a few comments so far!
| 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"), {} }; |
There was a problem hiding this comment.
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 }
}) }| return sdp::group_semantics::duplication == sdp::group_semantics_type{ sdp::fields::semantics(value) } | ||
| && 2 == sdp::fields::ssrc_ids(value).size() | ||
| ? 2 | ||
| : 0; |
There was a problem hiding this comment.
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)?
| 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; |
| 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; |
There was a problem hiding this comment.
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?
Summary
ssrc,ssrc-group, andduplication-delaysdp_parameters, including SSRC IDs, CNAMEs, delay, and MIDTesting
This PR is independent of and complementary to #501, so the two remaining modes can be reviewed separately.
Refs #38