-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* SMPTE ST 2110-10:2022: TSDELAY shall be a positive number or zero SMPTE ST 2110-21:2022: TROFF shall be a positive number or zero * Add testSdpParametersVideoJpegXs and update other sdp parameters tests which are using the optional tsdelay and troff * Prevent GCC 4.8.4 compile error, cast data type for the bst::optional parameters * Bump up boost to 1.83.0 to match with cpprestsdk dependencies * Remove braces around sdp_parameters's bandwidth initializer * Bump cpprestsdk to 2.10.19 * Roll back boost and cpprestsdk, they will be bumped up from another PR * Apply suggestions from code review Co-authored-by: Gareth Sylvester-Bradley <[email protected]> * Update sdp unit tests with @garethsb suggestions * Remove trailing whitespace --------- Co-authored-by: Gareth Sylvester-Bradley <[email protected]>
- Loading branch information
Showing
9 changed files
with
403 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "nmos/test/sdp_test_utils.h" | ||
|
||
#include "bst/test/test.h" | ||
#include "nmos/sdp_utils.h" | ||
|
||
namespace nmos | ||
{ | ||
typedef std::multimap<utility::string_t, utility::string_t> comparable_fmtp_t; | ||
|
||
inline comparable_fmtp_t comparable_fmtp(const nmos::sdp_parameters::fmtp_t& fmtp) | ||
{ | ||
return comparable_fmtp_t{ fmtp.begin(), fmtp.end() }; | ||
} | ||
|
||
void check_sdp_parameters(const nmos::sdp_parameters& lhs, const nmos::sdp_parameters& rhs) | ||
{ | ||
BST_REQUIRE_EQUAL(lhs.session_name, rhs.session_name); | ||
BST_REQUIRE_EQUAL(lhs.rtpmap.payload_type, rhs.rtpmap.payload_type); | ||
BST_REQUIRE_EQUAL(lhs.rtpmap.encoding_name, rhs.rtpmap.encoding_name); | ||
BST_REQUIRE_EQUAL(lhs.rtpmap.clock_rate, rhs.rtpmap.clock_rate); | ||
if (0 != lhs.rtpmap.encoding_parameters) | ||
BST_REQUIRE_EQUAL(lhs.rtpmap.encoding_parameters, rhs.rtpmap.encoding_parameters); | ||
else | ||
BST_REQUIRE((0 == rhs.rtpmap.encoding_parameters || 1 == rhs.rtpmap.encoding_parameters)); | ||
BST_REQUIRE_EQUAL(comparable_fmtp(lhs.fmtp), comparable_fmtp(rhs.fmtp)); | ||
BST_REQUIRE_EQUAL(lhs.packet_time, rhs.packet_time); | ||
BST_REQUIRE_EQUAL(lhs.max_packet_time, rhs.max_packet_time); | ||
BST_REQUIRE_EQUAL(lhs.bandwidth.bandwidth_type, rhs.bandwidth.bandwidth_type); | ||
BST_REQUIRE_EQUAL(lhs.bandwidth.bandwidth, rhs.bandwidth.bandwidth); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef NMOS_SDP_TEST_UTILS_H | ||
#define NMOS_SDP_TEST_UTILS_H | ||
|
||
namespace nmos | ||
{ | ||
struct sdp_parameters; | ||
|
||
void check_sdp_parameters(const nmos::sdp_parameters& lhs, const nmos::sdp_parameters& rhs); | ||
} | ||
|
||
#endif |
Oops, something went wrong.