Delete redundant members from VCMPacket.

The values are available as part of the RTPVideoHeader member.

Bug: None
Change-Id: I832fffc449929badec3796d7096c9cdc0d43d344
Reviewed-on: https://webrtc-review.googlesource.com/c/123234
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26773}
This commit is contained in:
Niels Möller
2019-02-20 13:12:21 +01:00
committed by Commit Bot
parent 4d2367a69e
commit d5e02f0b92
17 changed files with 220 additions and 218 deletions

View File

@ -62,13 +62,13 @@ class TestPacketBuffer : public ::testing::Test,
uint8_t* data = nullptr, // data pointer
uint32_t timestamp = 123u) { // rtp timestamp
VCMPacket packet;
packet.codec = kVideoCodecGeneric;
packet.video_header.codec = kVideoCodecGeneric;
packet.timestamp = timestamp;
packet.seqNum = seq_num;
packet.frameType =
keyframe == kKeyFrame ? kVideoFrameKey : kVideoFrameDelta;
packet.is_first_packet_in_frame = first == kFirst;
packet.is_last_packet_in_frame = last == kLast;
packet.video_header.is_first_packet_in_frame = first == kFirst;
packet.video_header.is_last_packet_in_frame = last == kLast;
packet.sizeBytes = data_size;
packet.dataPtr = data;
@ -161,17 +161,17 @@ TEST_F(TestPacketBuffer, NackCount) {
const uint16_t seq_num = Rand();
VCMPacket packet;
packet.codec = kVideoCodecGeneric;
packet.video_header.codec = kVideoCodecGeneric;
packet.seqNum = seq_num;
packet.frameType = kVideoFrameKey;
packet.is_first_packet_in_frame = true;
packet.is_last_packet_in_frame = false;
packet.video_header.is_first_packet_in_frame = true;
packet.video_header.is_last_packet_in_frame = false;
packet.timesNacked = 0;
packet_buffer_->InsertPacket(&packet);
packet.seqNum++;
packet.is_first_packet_in_frame = false;
packet.video_header.is_first_packet_in_frame = false;
packet.timesNacked = 1;
packet_buffer_->InsertPacket(&packet);
@ -180,7 +180,7 @@ TEST_F(TestPacketBuffer, NackCount) {
packet_buffer_->InsertPacket(&packet);
packet.seqNum++;
packet.is_last_packet_in_frame = true;
packet.video_header.is_last_packet_in_frame = true;
packet.timesNacked = 1;
packet_buffer_->InsertPacket(&packet);
@ -547,7 +547,7 @@ class TestPacketBufferH264 : public TestPacketBuffer {
int data_size = 0, // size of data
uint8_t* data = nullptr) { // data pointer
VCMPacket packet;
packet.codec = kVideoCodecH264;
packet.video_header.codec = kVideoCodecH264;
auto& h264_header =
packet.video_header.video_type_header.emplace<RTPVideoHeaderH264>();
packet.seqNum = seq_num;
@ -563,8 +563,8 @@ class TestPacketBufferH264 : public TestPacketBuffer {
h264_header.nalus_length = 1;
}
}
packet.is_first_packet_in_frame = first == kFirst;
packet.is_last_packet_in_frame = last == kLast;
packet.video_header.is_first_packet_in_frame = first == kFirst;
packet.video_header.is_last_packet_in_frame = last == kLast;
packet.sizeBytes = data_size;
packet.dataPtr = data;
@ -634,12 +634,12 @@ TEST_P(TestPacketBufferH264Parameterized, GetBitstreamBufferPadding) {
h264_header.nalus[0].type = H264::NaluType::kIdr;
h264_header.packetization_type = kH264SingleNalu;
packet.seqNum = seq_num;
packet.codec = kVideoCodecH264;
packet.video_header.codec = kVideoCodecH264;
packet.insertStartCode = true;
packet.dataPtr = data;
packet.sizeBytes = sizeof(data_data);
packet.is_first_packet_in_frame = true;
packet.is_last_packet_in_frame = true;
packet.video_header.is_first_packet_in_frame = true;
packet.video_header.is_last_packet_in_frame = true;
packet_buffer_->InsertPacket(&packet);
ASSERT_EQ(1UL, frames_from_callback_.size());
@ -779,18 +779,19 @@ TEST_F(TestPacketBuffer, PacketTimestamps) {
TEST_F(TestPacketBuffer, IncomingCodecChange) {
VCMPacket packet;
packet.is_first_packet_in_frame = true;
packet.is_last_packet_in_frame = true;
packet.video_header.is_first_packet_in_frame = true;
packet.video_header.is_last_packet_in_frame = true;
packet.sizeBytes = 0;
packet.dataPtr = nullptr;
packet.codec = kVideoCodecVP8;
packet.video_header.codec = kVideoCodecVP8;
packet.video_header.video_type_header.emplace<RTPVideoHeaderVP8>();
packet.timestamp = 1;
packet.seqNum = 1;
packet.frameType = kVideoFrameKey;
EXPECT_TRUE(packet_buffer_->InsertPacket(&packet));
packet.codec = kVideoCodecH264;
packet.video_header.codec = kVideoCodecH264;
auto& h264_header =
packet.video_header.video_type_header.emplace<RTPVideoHeaderH264>();
h264_header.nalus_length = 1;
@ -798,7 +799,8 @@ TEST_F(TestPacketBuffer, IncomingCodecChange) {
packet.seqNum = 3;
EXPECT_TRUE(packet_buffer_->InsertPacket(&packet));
packet.codec = kVideoCodecVP8;
packet.video_header.codec = kVideoCodecVP8;
packet.video_header.video_type_header.emplace<RTPVideoHeaderVP8>();
packet.timestamp = 2;
packet.seqNum = 2;
packet.frameType = kVideoFrameDelta;
@ -810,12 +812,12 @@ TEST_F(TestPacketBuffer, IncomingCodecChange) {
TEST_F(TestPacketBuffer, TooManyNalusInPacket) {
VCMPacket packet;
packet.codec = kVideoCodecH264;
packet.video_header.codec = kVideoCodecH264;
packet.timestamp = 1;
packet.seqNum = 1;
packet.frameType = kVideoFrameKey;
packet.is_first_packet_in_frame = true;
packet.is_last_packet_in_frame = true;
packet.video_header.is_first_packet_in_frame = true;
packet.video_header.is_last_packet_in_frame = true;
auto& h264_header =
packet.video_header.video_type_header.emplace<RTPVideoHeaderH264>();
h264_header.nalus_length = kMaxNalusPerPacket;
@ -895,11 +897,11 @@ class TestPacketBufferH264XIsKeyframe : public TestPacketBufferH264 {
explicit TestPacketBufferH264XIsKeyframe(bool sps_pps_idr_is_keyframe)
: TestPacketBufferH264(sps_pps_idr_is_keyframe) {
packet_.codec = kVideoCodecH264;
packet_.video_header.codec = kVideoCodecH264;
packet_.seqNum = kSeqNum;
packet_.is_first_packet_in_frame = true;
packet_.is_last_packet_in_frame = true;
packet_.video_header.is_first_packet_in_frame = true;
packet_.video_header.is_last_packet_in_frame = true;
}
VCMPacket packet_;