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}diff --git a/modules/video_coding/video_packet_buffer_unittest.cc b/modules/video_coding/video_packet_buffer_unittest.cc
index b8d6a6b..72bb990 100644
--- a/modules/video_coding/video_packet_buffer_unittest.cc
+++ b/modules/video_coding/video_packet_buffer_unittest.cc
@@ -62,13 +62,13 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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, 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 @@
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, 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 @@
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_;