Skip to content

Commit

Permalink
Updating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ross-newman committed May 13, 2024
1 parent ba74c34 commit 3852f26
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/rtp_h264_gst_open_depayloader_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ TEST(RtpH264OpenDepayloaderTest, UnicastOk) {
GTEST_SKIP();
#endif

std::array<uint8_t, 1280 * 720 * 3> rgb_test;
std::array<uint8_t, 1280 * 720 * 4> rgb_test;
mediax::video::ColourSpaceCpu colourspace;
mediax::rtp::h264::gst::open::RtpH264GstOpenDepayloader rtp;

Expand All @@ -95,6 +95,7 @@ TEST(RtpH264OpenDepayloaderTest, UnicastOk) {
rtp.Start();
mediax::rtp::RtpFrameData data;
data.cpu_buffer = rgb_test.data();
// Expect timeout as no data is being sent
EXPECT_FALSE(rtp.Receive(&data, 80));
rtp.Stop();
rtp.Close();
Expand Down Expand Up @@ -134,6 +135,7 @@ TEST(RtpH264OpenDepayloaderTest, UnicastOkSetStreamInfo) {
rtp.Start();
mediax::rtp::RtpFrameData data;
data.cpu_buffer = rgb_test.data();
// Expect timeout as no data is being sent
EXPECT_FALSE(rtp.Receive(&data, 80));
rtp.Stop();
rtp.Close();
Expand Down Expand Up @@ -173,6 +175,7 @@ TEST(RtpH264OpenDepayloaderTest, UnicastOkSetStreamInfoPtr) {
rtp->Start();
mediax::rtp::RtpFrameData data;
data.cpu_buffer = rgb_test.data();
// Expect timeout as no data is being sent
EXPECT_FALSE(rtp->Receive(&data, 80));
rtp->Stop();
rtp->Close();
Expand Down Expand Up @@ -303,6 +306,7 @@ TEST(RtpH264OpenDepayloaderTest, StartSwitchManyPayloaders) {
EXPECT_FALSE(rtp[current_stream].Receive(&data, 1));
EXPECT_EQ(data.resolution.height, 0);
EXPECT_EQ(data.resolution.width, 0);
EXPECT_EQ(data.encoding, ::mediax::rtp::ColourspaceType::kColourspaceRgba);
last_stream = current_stream;
}
rtp[current_stream].Stop();
Expand Down

0 comments on commit 3852f26

Please sign in to comment.