Added is_last_packet_in_frame to match is_first_packet_in_frame.
Today we use |is_first_packet_in_frame| to know when a frame begins and the
|markerBit| to know when it ends, but the markerbit does not actually mark the
end of a frame, it marks the end of a picture.
Bug: webrtc:9361
Change-Id: Icc70e6075590cdc31e875a4eb9d489868adbb67c
Reviewed-on: https://webrtc-review.googlesource.com/100160
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24722}
diff --git a/modules/video_coding/video_packet_buffer_unittest.cc b/modules/video_coding/video_packet_buffer_unittest.cc
index f588026..50f5a5c 100644
--- a/modules/video_coding/video_packet_buffer_unittest.cc
+++ b/modules/video_coding/video_packet_buffer_unittest.cc
@@ -68,7 +68,7 @@
packet.frameType =
keyframe == kKeyFrame ? kVideoFrameKey : kVideoFrameDelta;
packet.is_first_packet_in_frame = first == kFirst;
- packet.markerBit = last == kLast;
+ packet.is_last_packet_in_frame = last == kLast;
packet.sizeBytes = data_size;
packet.dataPtr = data;
@@ -157,7 +157,7 @@
packet.seqNum = seq_num;
packet.frameType = kVideoFrameKey;
packet.is_first_packet_in_frame = true;
- packet.markerBit = false;
+ packet.is_last_packet_in_frame = false;
packet.timesNacked = 0;
packet_buffer_->InsertPacket(&packet);
@@ -172,7 +172,7 @@
packet_buffer_->InsertPacket(&packet);
packet.seqNum++;
- packet.markerBit = true;
+ packet.is_last_packet_in_frame = true;
packet.timesNacked = 1;
packet_buffer_->InsertPacket(&packet);
@@ -524,7 +524,7 @@
}
}
packet.is_first_packet_in_frame = first == kFirst;
- packet.markerBit = last == kLast;
+ packet.is_last_packet_in_frame = last == kLast;
packet.sizeBytes = data_size;
packet.dataPtr = data;
@@ -605,7 +605,7 @@
packet.dataPtr = data;
packet.sizeBytes = sizeof(data_data);
packet.is_first_packet_in_frame = true;
- packet.markerBit = true;
+ packet.is_last_packet_in_frame = true;
packet_buffer_->InsertPacket(&packet);
ASSERT_EQ(1UL, frames_from_callback_.size());
@@ -748,7 +748,7 @@
TEST_F(TestPacketBuffer, IncomingCodecChange) {
VCMPacket packet;
packet.is_first_packet_in_frame = true;
- packet.markerBit = true;
+ packet.is_last_packet_in_frame = true;
packet.sizeBytes = 0;
packet.dataPtr = nullptr;
@@ -783,7 +783,7 @@
packet.seqNum = 1;
packet.frameType = kVideoFrameKey;
packet.is_first_packet_in_frame = true;
- packet.markerBit = true;
+ packet.is_last_packet_in_frame = true;
auto& h264_header =
packet.video_header.video_type_header.emplace<RTPVideoHeaderH264>();
h264_header.nalus_length = kMaxNalusPerPacket;
@@ -867,7 +867,7 @@
packet_.seqNum = kSeqNum;
packet_.is_first_packet_in_frame = true;
- packet_.markerBit = true;
+ packet_.is_last_packet_in_frame = true;
}
VCMPacket packet_;