diff --git a/webrtc/modules/video_coding/jitter_buffer_unittest.cc b/webrtc/modules/video_coding/jitter_buffer_unittest.cc index e75d1771b3..f83c1ca399 100644 --- a/webrtc/modules/video_coding/jitter_buffer_unittest.cc +++ b/webrtc/modules/video_coding/jitter_buffer_unittest.cc @@ -35,10 +35,14 @@ const uint32_t kProcessIntervalSec = 60; class Vp9SsMapTest : public ::testing::Test { protected: - Vp9SsMapTest() : packet_(data_, 1400, 1234, 1, true) {} + Vp9SsMapTest() : packet_() {} virtual void SetUp() { packet_.isFirstPacket = true; + packet_.dataPtr = data_; + packet_.sizeBytes = 1400; + packet_.seqNum = 1234; + packet_.timestamp = 1; packet_.markerBit = true; packet_.frameType = kVideoFrameKey; packet_.codec = kVideoCodecVP9; @@ -242,7 +246,13 @@ class TestBasicJitterBuffer : public ::testing::TestWithParam, i += 3; } } - packet_.reset(new VCMPacket(data_, size_, seq_num_, timestamp_, true)); + WebRtcRTPHeader rtpHeader; + memset(&rtpHeader, 0, sizeof(rtpHeader)); + rtpHeader.header.sequenceNumber = seq_num_; + rtpHeader.header.timestamp = timestamp_; + rtpHeader.header.markerBit = true; + rtpHeader.frameType = kVideoFrameDelta; + packet_.reset(new VCMPacket(data_, size_, rtpHeader)); } VCMEncodedFrame* DecodeCompleteFrame() { @@ -810,7 +820,12 @@ TEST_P(TestBasicJitterBuffer, TestReorderingWithPadding) { // Add in the padding. These are empty packets (data length is 0) with no // marker bit and matching the timestamp of Frame B. - VCMPacket empty_packet(data_, 0, seq_num_ + 2, timestamp_ + (33 * 90), false); + WebRtcRTPHeader rtpHeader; + memset(&rtpHeader, 0, sizeof(rtpHeader)); + rtpHeader.header.sequenceNumber = seq_num_ + 2; + rtpHeader.header.timestamp = timestamp_ + (33 * 90); + rtpHeader.header.markerBit = false; + VCMPacket empty_packet(data_, 0, rtpHeader); EXPECT_EQ(kOldPacket, jitter_buffer_->InsertPacket(empty_packet, &retransmitted)); empty_packet.seqNum += 1; @@ -2088,7 +2103,9 @@ TEST_P(TestBasicJitterBuffer, H264IncompleteNalu) { // Test to insert empty packet. seq_num_++; timestamp_ += 33 * 90; - VCMPacket emptypacket(data_, 0, seq_num_, timestamp_, true); + WebRtcRTPHeader rtpHeader; + memset(&rtpHeader, 0, sizeof(rtpHeader)); + VCMPacket emptypacket(data_, 0, rtpHeader); emptypacket.seqNum = seq_num_; emptypacket.timestamp = timestamp_; emptypacket.frameType = kVideoFrameKey; diff --git a/webrtc/modules/video_coding/packet.cc b/webrtc/modules/video_coding/packet.cc index aa27c5da6b..643a10a346 100644 --- a/webrtc/modules/video_coding/packet.cc +++ b/webrtc/modules/video_coding/packet.cc @@ -68,28 +68,6 @@ VCMPacket::VCMPacket(const uint8_t* ptr, } } -VCMPacket::VCMPacket(const uint8_t* ptr, - size_t size, - uint16_t seq, - uint32_t ts, - bool mBit) - : payloadType(0), - timestamp(ts), - ntp_time_ms_(0), - seqNum(seq), - dataPtr(ptr), - sizeBytes(size), - markerBit(mBit), - timesNacked(-1), - frameType(kVideoFrameDelta), - codec(kVideoCodecUnknown), - isFirstPacket(false), - completeNALU(kNaluComplete), - insertStartCode(false), - width(0), - height(0), - video_header() {} - void VCMPacket::Reset() { payloadType = 0; timestamp = 0; diff --git a/webrtc/modules/video_coding/packet.h b/webrtc/modules/video_coding/packet.h index ea9cc869d0..16f568504e 100644 --- a/webrtc/modules/video_coding/packet.h +++ b/webrtc/modules/video_coding/packet.h @@ -23,11 +23,6 @@ class VCMPacket { VCMPacket(const uint8_t* ptr, const size_t size, const WebRtcRTPHeader& rtpHeader); - VCMPacket(const uint8_t* ptr, - size_t size, - uint16_t seqNum, - uint32_t timestamp, - bool markerBit); void Reset();