Skip to content

Commit

Permalink
Adding more comments following code review with @lo-simon
Browse files Browse the repository at this point in the history
  • Loading branch information
garethsb committed Feb 7, 2022
1 parent 9b10dba commit 9d00c35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Development/nmos/components.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace nmos
make_component(component_names::B, frame_width, frame_height, bit_depth)
});
case YCbCr422:
return value_of({
return value_of({
make_component(component_names::Y, frame_width, frame_height, bit_depth),
make_component(component_names::Cb, frame_width / 2, frame_height, bit_depth),
make_component(component_names::Cr, frame_width / 2, frame_height, bit_depth)
Expand Down
9 changes: 7 additions & 2 deletions Development/nmos/test/sdp_utils_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,12 @@ BST_TEST_CASE(testValidateSdpParameters)
// omitting TCS should be treated as "SDR"
const sdp::transfer_characteristic_system omit_tcs;

// an unimplemented parameter constraint should be ignored
const utility::string_t unimplemented_parameter_constraint{ U("urn:x-nmos:cap:unimplemented") };

nmos::video_raw_parameters params{
1920, 1080, nmos::rates::rate29_97, true, false, sdp::samplings::YCbCr_4_2_2, 10,
omit_tcs, sdp::colorimetries::BT2020, sdp::type_parameters::type_N
omit_tcs, sdp::colorimetries::BT2020, sdp::type_parameters::type_N
};
auto sdp_params = nmos::make_video_raw_sdp_parameters(U("-"), params, nmos::details::payload_type_video_default);

Expand All @@ -114,7 +117,7 @@ BST_TEST_CASE(testValidateSdpParameters)
{ nmos::caps::format::transfer_characteristic, nmos::make_caps_string_constraint({ sdp::transfer_characteristic_systems::SDR.name }) },
{ nmos::caps::format::component_depth, nmos::make_caps_integer_constraint({}, 8, 12) },
{ nmos::caps::transport::st2110_21_sender_type, nmos::make_caps_string_constraint({ sdp::type_parameters::type_N.name }) },
{ U("urn:x-nmos:cap:unimplemented"), nmos::make_caps_string_constraint({ U("ignored") }) }
{ unimplemented_parameter_constraint, nmos::make_caps_string_constraint({ U("ignored") }) }
})
}) }
}) }
Expand Down Expand Up @@ -200,6 +203,8 @@ BST_TEST_CASE(testValidateSdpParameters)
}) }
});

// because the SDP parameters don't include 'maxptime', the 'max_packet_time' parameter constraint will be ignored

BST_REQUIRE_NO_THROW(nmos::validate_sdp_parameters(receiver, sdp_params));

params.channel_count = 16;
Expand Down

0 comments on commit 9d00c35

Please sign in to comment.