diff --git a/webrtc/modules/video_coding/frame_buffer2.cc b/webrtc/modules/video_coding/frame_buffer2.cc index 8bb19ba003..daac7d5c2b 100644 --- a/webrtc/modules/video_coding/frame_buffer2.cc +++ b/webrtc/modules/video_coding/frame_buffer2.cc @@ -119,7 +119,7 @@ FrameBuffer::ReturnReason FrameBuffer::NextFrame( int64_t frame_delay; if (inter_frame_delay_.CalculateDelay(timestamp, &frame_delay, received_time)) { - jitter_estimator_->UpdateEstimate(frame_delay, frame->size); + jitter_estimator_->UpdateEstimate(frame_delay, frame->size()); } float rtt_mult = protection_mode_ == kProtectionNackFEC ? 0.0 : 1.0; timing_->SetJitterDelay(jitter_estimator_->GetJitterEstimate(rtt_mult)); diff --git a/webrtc/modules/video_coding/frame_object.cc b/webrtc/modules/video_coding/frame_object.cc index fe3b2b0295..acfb25d28d 100644 --- a/webrtc/modules/video_coding/frame_object.cc +++ b/webrtc/modules/video_coding/frame_object.cc @@ -33,7 +33,6 @@ RtpFrameObject::RtpFrameObject(PacketBuffer* packet_buffer, last_seq_num_(last_seq_num), received_time_(received_time), times_nacked_(times_nacked) { - size = frame_size; VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num); if (packet) { // TODO(philipel): Remove when encoded image is replaced by FrameObject. diff --git a/webrtc/modules/video_coding/frame_object.h b/webrtc/modules/video_coding/frame_object.h index a63ae996b8..542797226e 100644 --- a/webrtc/modules/video_coding/frame_object.h +++ b/webrtc/modules/video_coding/frame_object.h @@ -36,6 +36,7 @@ class FrameObject : public webrtc::VCMEncodedFrame { // When this frame should be rendered. virtual int64_t RenderTime() const = 0; + size_t size() { return _length; } // The tuple (|picture_id|, |spatial_layer|) uniquely identifies a frame // object. For codec types that don't necessarily have picture ids they @@ -47,8 +48,6 @@ class FrameObject : public webrtc::VCMEncodedFrame { size_t num_references; uint16_t references[kMaxFrameReferences]; bool inter_layer_predicted; - - size_t size; }; class PacketBuffer; diff --git a/webrtc/modules/video_coding/video_packet_buffer_unittest.cc b/webrtc/modules/video_coding/video_packet_buffer_unittest.cc index 7905e855b4..91ab11bf84 100644 --- a/webrtc/modules/video_coding/video_packet_buffer_unittest.cc +++ b/webrtc/modules/video_coding/video_packet_buffer_unittest.cc @@ -145,7 +145,7 @@ TEST_F(TestPacketBuffer, FrameSize) { InsertPacket(seq_num + 3, kKeyFrame, kNotFirst, kLast, 5, data); ASSERT_EQ(1UL, frames_from_callback_.size()); - EXPECT_EQ(20UL, frames_from_callback_.begin()->second->size); + EXPECT_EQ(20UL, frames_from_callback_.begin()->second->size()); } TEST_F(TestPacketBuffer, ExpandBuffer) {