-
Notifications
You must be signed in to change notification settings - Fork 90
Add sender control example to node implementation #478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| const web::json::value touchpoint, | ||
| slog::base_gate & gate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const web::json::value touchpoint, | |
| slog::base_gate & gate) | |
| const web::json::value& touchpoints) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove gate, as it is unused. Rename touchpoint to touchpoints and use of reference
| role, | ||
| web::json::value(role), | ||
| U("Sender resource data"), | ||
| touchpoint, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| touchpoint, | |
| touchpoints, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename touchpoint to touchpoints.
| value_of({ { nmos::nc::details::make_touchpoint_nmos({nmos::ncp_touchpoint_resource_types::sender, sender_id}) } }), | ||
| gate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| value_of({ { nmos::nc::details::make_touchpoint_nmos({nmos::ncp_touchpoint_resource_types::sender, sender_id}) } }), | |
| gate); | |
| value_of({ { nmos::nc::details::make_touchpoint_nmos({nmos::ncp_touchpoint_resource_types::sender, sender_id}) } })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove gate in the earlier make_sender_control suggestion
| const auto sender_controls_block_oid = ++oid; | ||
| auto sender_controls_block = nmos::make_block(sender_controls_block_oid, nmos::root_block_oid, U("sender-controls"), U("Sender Controls"), U("Sender Controls")); | ||
|
|
||
| // example audio sender control(s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // example audio sender control(s) | |
| // example sender control(s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we are creating sender control for all senders, not just audio senders
| // only create audio sender controls for audio senders | ||
| //if (impl::ports::audio != port) continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // only create audio sender controls for audio senders | |
| //if (impl::ports::audio != port) continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented-out code
|
|
||
| utility::ostringstream_t role; | ||
| role << U("sender-control-") << ++count; | ||
| const auto& sender = nmos::find_resource(model.node_resources, sender_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const auto& sender = nmos::find_resource(model.node_resources, sender_id); | |
| const auto sender = nmos::find_resource(model.node_resources, sender_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevent danging reference
| sender_controls_block_oid, | ||
| value_of({ { nmos::nc::details::make_touchpoint_nmos({nmos::ncp_touchpoint_resource_types::sender, sender_id}) } }), | ||
| gate); | ||
| // add receiver-monitor to receivers-block |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // add receiver-monitor to receivers-block | |
| // add sender-control to sender-controls-block |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update comment
An example of a sender control class that represents a complete audio sender.