Skip to content

More flexible make_<format>_sdp_parameters functions#205

Merged
jonathan-r-thorpe merged 7 commits into
sony:masterfrom
garethsb:sdp-tweaks
Oct 21, 2021
Merged

More flexible make_<format>_sdp_parameters functions#205
jonathan-r-thorpe merged 7 commits into
sony:masterfrom
garethsb:sdp-tweaks

Conversation

@garethsb
Copy link
Copy Markdown
Contributor

@aholzinger, would this resolve #202 to your satisfaction?

Copy link
Copy Markdown
Collaborator

@lo-simon lo-simon left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread Development/nmos/sdp_utils.h Outdated
Comment thread Development/nmos/sdp_utils.cpp Outdated
params.vpid_code = vpid_code ? *vpid_code : 0;

return{ sender.at(nmos::fields::label).as_string(), params, 100, media_stream_ids, details::make_ts_refclk(node, source, sender, ptp_domain) };
return{ sender.at(nmos::fields::label).as_string(), params, payload_type ? *payload_type : 100, media_stream_ids, details::make_ts_refclk(node, source, sender, ptp_domain) };
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.

Perhaps a comment explaining away the magic 100, similar to the comment in lines 220 and 221 below? Similarly for the the magic 96 and 97 above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea... Whereas ST 2022-8 recommends 98, I'm not sure where the 96, 97, 100, come from. Any idea, @jonathan-r-thorpe?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Well, they're all dynamic payload types and one as worth as the other. At the end it really doesn't matter. My point is that when a user of nmos-cpp library wants to specify a certain payload type the call to make_sdp_parameters shouldn't override the previously chosen default.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

How can it be "previously chosen"? This function returns a new sdp_parameters object.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There could be a default chosen by the user of the library. Now the payload would change because it is returned from make_sdp_parameters.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It couldn't change, as the user previously never communicated the default they chose to the library. 😕

Or at least only by setting the value into the sdp_parameters returned by make_sdp_parameters.

With this PR, they can now provide it up front, but really there's not a lot of difference.

@aholzinger
Copy link
Copy Markdown

Yes, this would help, although we currently use make_sdp_parameters and then afterwards set payload type and ptp domain. Weo would then need to use make_audio_sdp_parameters( instead, which is okay.

Adding optional parameters seems a good idea to me.

@garethsb
Copy link
Copy Markdown
Contributor Author

garethsb commented Oct 20, 2021

Relocated payload_type, added constants with comments to clarify the defaults, and added default for media_stream_ids.

Copy link
Copy Markdown
Contributor

@jonathan-r-thorpe jonathan-r-thorpe left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Collaborator

@lo-simon lo-simon left a comment

Choose a reason for hiding this comment

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

LGTM

@jonathan-r-thorpe jonathan-r-thorpe merged commit d43715b into sony:master Oct 21, 2021
@garethsb garethsb deleted the sdp-tweaks branch January 12, 2022 22:01
garethsb added a commit to garethsb/nmos-cpp that referenced this pull request Apr 28, 2022
* for build and dependencies, e.g. sony#197, sony#198, sony#207, sony#211, sony#215, sony#229, sony#230, sony#235, sony#243
* for SDP parser/generator, e.g. sony#201, sony#205, sony#219, sony#241, sony#242, sony#244
* for RQL, e.g. sony#224
* for CI tests, e.g. sony#218, sony#231, sony#239, sony#250
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.

nmos::details::make_sdp_parameters in sdp_utils in case of audio always reprting ptime 1 and payload id 97

4 participants