Remove RTPVideoHeader::h264() accessors.

Bug: none
Change-Id: I043bcaf358575688b223bc3631506e148b47fd58
Reviewed-on: https://webrtc-review.googlesource.com/88220
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23971}
This commit is contained in:
philipel
2018-07-12 15:09:06 +02:00
committed by Commit Bot
parent 7258224c3b
commit dfbced6504
15 changed files with 227 additions and 205 deletions

View File

@ -1155,17 +1155,19 @@ TEST_F(TestBasicJitterBuffer, H264InsertStartCode) {
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 @@ TEST_F(TestBasicJitterBuffer, SpsAndPpsHandling) {
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 @@ TEST_F(TestBasicJitterBuffer, SpsAndPpsHandling) {
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 @@ TEST_F(TestBasicJitterBuffer, SpsAndPpsHandling) {
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));