Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: webrtc/modules/video_coding/h264_sps_pps_tracker_unittest.cc

Issue 2649113003: Revert of H264SpsPpsTracker.InsertSpsPpsNalus() should accept Nalus with header. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/video_coding/h264_sps_pps_tracker.cc ('k') | webrtc/video/rtp_stream_receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/h264_sps_pps_tracker_unittest.cc
diff --git a/webrtc/modules/video_coding/h264_sps_pps_tracker_unittest.cc b/webrtc/modules/video_coding/h264_sps_pps_tracker_unittest.cc
index fc9e87f66b90b38b3b6a6c40192e45e0c24562a3..83330b934ed9b9ebf1195f8c067197e672be25b5 100644
--- a/webrtc/modules/video_coding/h264_sps_pps_tracker_unittest.cc
+++ b/webrtc/modules/video_coding/h264_sps_pps_tracker_unittest.cc
@@ -261,65 +261,5 @@
delete[] packet.dataPtr;
}
-TEST_F(TestH264SpsPpsTracker, SpsPpsOutOfBand) {
- constexpr uint8_t kData[] = {1, 2, 3};
-
- // Generated by "ffmpeg -r 30 -f avfoundation -i "default" out.h264" on macos.
- const std::vector<uint8_t> sps(
- {0x67, 0x7a, 0x00, 0x0d, 0xbc, 0xd9, 0x41, 0x41, 0xfa, 0x10, 0x00, 0x00,
- 0x03, 0x00, 0x10, 0x00, 0x00, 0x03, 0x03, 0xc0, 0xf1, 0x42, 0x99, 0x60});
- const std::vector<uint8_t> pps({0x68, 0xeb, 0xe3, 0xcb, 0x22, 0xc0});
- tracker_.InsertSpsPpsNalus(sps, pps);
-
- // Insert first packet of the IDR.
- VCMPacket idr_packet = GetDefaultPacket();
- idr_packet.video_header.is_first_packet_in_frame = true;
- AddIdr(&idr_packet, 0);
- idr_packet.dataPtr = kData;
- idr_packet.sizeBytes = sizeof(kData);
- EXPECT_EQ(H264SpsPpsTracker::kInsert,
- tracker_.CopyAndFixBitstream(&idr_packet));
-}
-
-TEST_F(TestH264SpsPpsTracker, SpsPpsOutOfBandWrongNaluHeader) {
- constexpr uint8_t kData[] = {1, 2, 3};
-
- // Generated by "ffmpeg -r 30 -f avfoundation -i "default" out.h264" on macos.
- // Nalu headers manupilated afterwards.
- const std::vector<uint8_t> sps(
- {0xff, 0x7a, 0x00, 0x0d, 0xbc, 0xd9, 0x41, 0x41, 0xfa, 0x10, 0x00, 0x00,
- 0x03, 0x00, 0x10, 0x00, 0x00, 0x03, 0x03, 0xc0, 0xf1, 0x42, 0x99, 0x60});
- const std::vector<uint8_t> pps({0xff, 0xeb, 0xe3, 0xcb, 0x22, 0xc0});
- tracker_.InsertSpsPpsNalus(sps, pps);
-
- // Insert first packet of the IDR.
- VCMPacket idr_packet = GetDefaultPacket();
- idr_packet.video_header.is_first_packet_in_frame = true;
- AddIdr(&idr_packet, 0);
- idr_packet.dataPtr = kData;
- idr_packet.sizeBytes = sizeof(kData);
- EXPECT_EQ(H264SpsPpsTracker::kRequestKeyframe,
- tracker_.CopyAndFixBitstream(&idr_packet));
-}
-
-TEST_F(TestH264SpsPpsTracker, SpsPpsOutOfBandIncompleteNalu) {
- constexpr uint8_t kData[] = {1, 2, 3};
-
- // Generated by "ffmpeg -r 30 -f avfoundation -i "default" out.h264" on macos.
- // Nalus damaged afterwards.
- const std::vector<uint8_t> sps({0x67, 0x7a, 0x00, 0x0d, 0xbc, 0xd9});
- const std::vector<uint8_t> pps({0x68, 0xeb, 0xe3, 0xcb, 0x22, 0xc0});
- tracker_.InsertSpsPpsNalus(sps, pps);
-
- // Insert first packet of the IDR.
- VCMPacket idr_packet = GetDefaultPacket();
- idr_packet.video_header.is_first_packet_in_frame = true;
- AddIdr(&idr_packet, 0);
- idr_packet.dataPtr = kData;
- idr_packet.sizeBytes = sizeof(kData);
- EXPECT_EQ(H264SpsPpsTracker::kRequestKeyframe,
- tracker_.CopyAndFixBitstream(&idr_packet));
-}
-
} // namespace video_coding
} // namespace webrtc
« no previous file with comments | « webrtc/modules/video_coding/h264_sps_pps_tracker.cc ('k') | webrtc/video/rtp_stream_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698