VCMPacket: Set VCMNaluCompleteness for generic codecs

We previously always set VCMNaluCompleteness to kNaluComplete for
kVideoCodecGeneric, which seems wrong. This CL fixes that and also
cleans up the code a bit. The logic for VP8, VP9, and H264
should be exactly preserved. This CL also updates the test to use
kVideoCodecGeneric instead of kVideoCodecUnknown. kVideoCodecUnknown
has no purpose and should be removed.

Bug: webrtc:9516
Change-Id: Ib8d2bf6a04d41b91c5774531f3a669edce3c6cb2
Reviewed-on: https://webrtc-review.googlesource.com/88181
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23933}
This commit is contained in:
Magnus Jedvert
2018-07-11 14:27:49 +02:00
committed by Commit Bot
parent 02e3436a73
commit 2234121cfb
4 changed files with 17 additions and 83 deletions

View File

@ -242,7 +242,8 @@ class TestBasicJitterBuffer : public ::testing::TestWithParam<std::string>,
rtpHeader.header.timestamp = timestamp_;
rtpHeader.header.markerBit = true;
rtpHeader.frameType = kVideoFrameDelta;
rtpHeader.video_header().codec = kVideoCodecUnknown;
rtpHeader.video_header().codec = kVideoCodecGeneric;
rtpHeader.video_header().is_first_packet_in_frame = true;
packet_.reset(new VCMPacket(data_, size_, rtpHeader));
}
@ -800,7 +801,7 @@ TEST_F(TestBasicJitterBuffer, TestReorderingWithPadding) {
rtpHeader.header.sequenceNumber = seq_num_ + 2;
rtpHeader.header.timestamp = timestamp_ + (33 * 90);
rtpHeader.header.markerBit = false;
rtpHeader.video_header().codec = kVideoCodecUnknown;
rtpHeader.video_header().codec = kVideoCodecGeneric;
VCMPacket empty_packet(data_, 0, rtpHeader);
EXPECT_EQ(kOldPacket,
jitter_buffer_->InsertPacket(empty_packet, &retransmitted));
@ -2164,7 +2165,7 @@ TEST_F(TestBasicJitterBuffer, H264IncompleteNalu) {
timestamp_ += 33 * 90;
WebRtcRTPHeader rtpHeader;
memset(&rtpHeader, 0, sizeof(rtpHeader));
rtpHeader.video_header().codec = kVideoCodecUnknown;
rtpHeader.video_header().codec = kVideoCodecGeneric;
VCMPacket emptypacket(data_, 0, rtpHeader);
emptypacket.seqNum = seq_num_;
emptypacket.timestamp = timestamp_;