Skip to content

Commit b3e3180

Browse files
Updates based on code review
1 parent 0f55ce3 commit b3e3180

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

Development/nmos/connection_api.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,6 @@ namespace nmos
580580
throw std::logic_error("matching IS-04 and IS-05 resources not found");
581581
}
582582

583-
const nmos::transport transport_subclassification(nmos::fields::transport(matching_resource->data));
584-
585583
// Merge this patch request into a *copy* of the current staged endpoint
586584
// so that the merged parameters can be validated against the constraints
587585
// before the current values are overwritten.
@@ -642,6 +640,7 @@ namespace nmos
642640

643641
slog::log<slog::severities::more_info>(gate, SLOG_FLF) << "Validating staged transport parameters against constraints";
644642

643+
const nmos::transport transport_subclassification(nmos::fields::transport(matching_resource->data));
645644
details::validate_staged_constraints(resource->type, nmos::fields::endpoint_constraints(resource->data), nmos::transport_base(transport_subclassification), merged);
646645

647646
// Perform any final validation

Development/nmos/node_resources.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ namespace nmos
421421
}
422422

423423
// See https://specs.amwa.tv/is-04/releases/v1.2.0/APIs/schemas/with-refs/flow_audio_coded.html
424+
// (media_type must *not* be nmos::media_types::audio_L(bit_depth); cf. nmos::make_raw_audio_flow)
424425
nmos::resource make_coded_audio_flow(const nmos::id& id, const nmos::id& source_id, const nmos::id& device_id, const nmos::rational& sample_rate, const nmos::media_type& media_type, const nmos::settings& settings)
425426
{
426427
using web::json::value;

Development/nmos/node_resources.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ namespace nmos
8484

8585
// See https://specs.amwa.tv/is-04/releases/v1.2.0/APIs/schemas/with-refs/flow_audio_raw.html
8686
nmos::resource make_raw_audio_flow(const nmos::id& id, const nmos::id& source_id, const nmos::id& device_id, const nmos::rational& sample_rate, unsigned int bit_depth, const nmos::settings& settings);
87-
// (media_type must *not* be nmos::media_types::audio_L(bit_depth); cf. the bit_depth overload)
8887
nmos::resource make_raw_audio_flow(const nmos::id& id, const nmos::id& source_id, const nmos::id& device_id, const nmos::rational& sample_rate, const nmos::media_type& media_type, unsigned int bit_depth, const nmos::settings& settings);
8988
nmos::resource make_raw_audio_flow(const nmos::id& id, const nmos::id& source_id, const nmos::id& device_id, const nmos::settings& settings);
9089

0 commit comments

Comments
 (0)