Reland "Remove RTPVideoHeader::h264() accessors."
Downstream projects have been updated, so this can now be relanded.
This is a revert (and rebase) of: https://webrtc-review.googlesource.com/c/src/+/88820
Bug: none
Change-Id: I424664ddef7aeebd3c6c94ae67c7f70a342dc9a4
Reviewed-on: https://webrtc-review.googlesource.com/92082
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24181}
diff --git a/modules/video_coding/jitter_buffer_unittest.cc b/modules/video_coding/jitter_buffer_unittest.cc
index adb495d..756dc52 100644
--- a/modules/video_coding/jitter_buffer_unittest.cc
+++ b/modules/video_coding/jitter_buffer_unittest.cc
@@ -1155,17 +1155,19 @@
TEST_F(TestBasicJitterBuffer, SpsAndPpsHandling) {
jitter_buffer_->SetDecodeErrorMode(kNoErrors);
+ auto& h264_header =
+ packet_->video_header.video_type_header.emplace<RTPVideoHeaderH264>();
packet_->timestamp = timestamp_;
packet_->frameType = kVideoFrameKey;
packet_->is_first_packet_in_frame = true;
packet_->markerBit = true;
packet_->codec = kVideoCodecH264;
packet_->video_header.codec = kVideoCodecH264;
- packet_->video_header.h264().nalu_type = H264::NaluType::kIdr;
- packet_->video_header.h264().nalus[0].type = H264::NaluType::kIdr;
- packet_->video_header.h264().nalus[0].sps_id = -1;
- packet_->video_header.h264().nalus[0].pps_id = 0;
- packet_->video_header.h264().nalus_length = 1;
+ h264_header.nalu_type = H264::NaluType::kIdr;
+ h264_header.nalus[0].type = H264::NaluType::kIdr;
+ h264_header.nalus[0].sps_id = -1;
+ h264_header.nalus[0].pps_id = 0;
+ h264_header.nalus_length = 1;
bool retransmitted = false;
EXPECT_EQ(kCompleteSession,
jitter_buffer_->InsertPacket(*packet_, &retransmitted));
@@ -1181,14 +1183,14 @@
packet_->markerBit = false;
packet_->codec = kVideoCodecH264;
packet_->video_header.codec = kVideoCodecH264;
- packet_->video_header.h264().nalu_type = H264::NaluType::kStapA;
- packet_->video_header.h264().nalus[0].type = H264::NaluType::kSps;
- packet_->video_header.h264().nalus[0].sps_id = 0;
- packet_->video_header.h264().nalus[0].pps_id = -1;
- packet_->video_header.h264().nalus[1].type = H264::NaluType::kPps;
- packet_->video_header.h264().nalus[1].sps_id = 0;
- packet_->video_header.h264().nalus[1].pps_id = 0;
- packet_->video_header.h264().nalus_length = 2;
+ h264_header.nalu_type = H264::NaluType::kStapA;
+ h264_header.nalus[0].type = H264::NaluType::kSps;
+ h264_header.nalus[0].sps_id = 0;
+ h264_header.nalus[0].pps_id = -1;
+ h264_header.nalus[1].type = H264::NaluType::kPps;
+ h264_header.nalus[1].sps_id = 0;
+ h264_header.nalus[1].pps_id = 0;
+ h264_header.nalus_length = 2;
// Not complete since the marker bit hasn't been received.
EXPECT_EQ(kIncomplete,
jitter_buffer_->InsertPacket(*packet_, &retransmitted));
@@ -1200,11 +1202,11 @@
packet_->markerBit = true;
packet_->codec = kVideoCodecH264;
packet_->video_header.codec = kVideoCodecH264;
- packet_->video_header.h264().nalu_type = H264::NaluType::kIdr;
- packet_->video_header.h264().nalus[0].type = H264::NaluType::kIdr;
- packet_->video_header.h264().nalus[0].sps_id = -1;
- packet_->video_header.h264().nalus[0].pps_id = 0;
- packet_->video_header.h264().nalus_length = 1;
+ h264_header.nalu_type = H264::NaluType::kIdr;
+ h264_header.nalus[0].type = H264::NaluType::kIdr;
+ h264_header.nalus[0].sps_id = -1;
+ h264_header.nalus[0].pps_id = 0;
+ h264_header.nalus_length = 1;
// Complete and decodable since the pps and sps are received in the first
// packet of this frame.
EXPECT_EQ(kCompleteSession,
@@ -1222,11 +1224,11 @@
packet_->markerBit = true;
packet_->codec = kVideoCodecH264;
packet_->video_header.codec = kVideoCodecH264;
- packet_->video_header.h264().nalu_type = H264::NaluType::kSlice;
- packet_->video_header.h264().nalus[0].type = H264::NaluType::kSlice;
- packet_->video_header.h264().nalus[0].sps_id = -1;
- packet_->video_header.h264().nalus[0].pps_id = 0;
- packet_->video_header.h264().nalus_length = 1;
+ h264_header.nalu_type = H264::NaluType::kSlice;
+ h264_header.nalus[0].type = H264::NaluType::kSlice;
+ h264_header.nalus[0].sps_id = -1;
+ h264_header.nalus[0].pps_id = 0;
+ h264_header.nalus_length = 1;
// Complete and decodable since sps, pps and key frame has been received.
EXPECT_EQ(kCompleteSession,
jitter_buffer_->InsertPacket(*packet_, &retransmitted));