Skip to content

Conversation

@maweit
Copy link

@maweit maweit commented Jan 22, 2026

An example of a sender control class that represents a complete audio sender.

Comment on lines +288 to +289
const web::json::value touchpoint,
slog::base_gate & gate)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const web::json::value touchpoint,
slog::base_gate & gate)
const web::json::value& touchpoints)

Copy link
Collaborator

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,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
touchpoint,
touchpoints,

Copy link
Collaborator

Choose a reason for hiding this comment

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

Rename touchpoint to touchpoints.

Comment on lines +1518 to +1519
value_of({ { nmos::nc::details::make_touchpoint_nmos({nmos::ncp_touchpoint_resource_types::sender, sender_id}) } }),
gate);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
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}) } }));

Copy link
Collaborator

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)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// example audio sender control(s)
// example sender control(s)

Copy link
Collaborator

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

Comment on lines +1506 to +1507
// only create audio sender controls for audio senders
//if (impl::ports::audio != port) continue;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// only create audio sender controls for audio senders
//if (impl::ports::audio != port) continue;

Copy link
Collaborator

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);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const auto& sender = nmos::find_resource(model.node_resources, sender_id);
const auto sender = nmos::find_resource(model.node_resources, sender_id);

Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// add receiver-monitor to receivers-block
// add sender-control to sender-controls-block

Copy link
Collaborator

Choose a reason for hiding this comment

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

Update comment

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