Skip to content

Commit

Permalink
Removed VCMTiming from RtpVideoStreamReceiver.
Browse files Browse the repository at this point in the history
Bug: webrtc:8909
Change-Id: Ib42e4cc4c2252f04ea5f7d440352546d36d2899f
Reviewed-on: https://webrtc-review.googlesource.com/58740
Reviewed-by: Stefan Holmer <[email protected]>
Commit-Queue: Philip Eliasson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#22224}
  • Loading branch information
Philipel-WebRTC authored and Commit Bot committed Feb 28, 2018
1 parent 7eef007 commit 0a9f6de
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 18 deletions.
4 changes: 4 additions & 0 deletions modules/video_coding/frame_buffer2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ void FrameBuffer::UpdatePlayoutDelays(const EncodedFrame& frame) {

if (playout_delay.max_ms >= 0)
timing_->set_max_playout_delay(playout_delay.max_ms);

if (!frame.delayed_by_retransmission())
timing_->IncomingTimestamp(frame.timestamp, frame.ReceivedTime());
}

int64_t FrameBuffer::InsertFrame(std::unique_ptr<EncodedFrame> frame) {
Expand Down Expand Up @@ -375,6 +378,7 @@ int64_t FrameBuffer::InsertFrame(std::unique_ptr<EncodedFrame> frame) {
if (!UpdateFrameInfoWithIncomingFrame(*frame, info))
return last_continuous_picture_id;
UpdatePlayoutDelays(*frame);

info->second.frame = std::move(frame);
++num_frames_buffered_;

Expand Down
6 changes: 1 addition & 5 deletions video/rtp_video_stream_receiver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ RtpVideoStreamReceiver::RtpVideoStreamReceiver(
ProcessThread* process_thread,
NackSender* nack_sender,
KeyFrameRequestSender* keyframe_request_sender,
video_coding::OnCompleteFrameCallback* complete_frame_callback,
VCMTiming* timing)
video_coding::OnCompleteFrameCallback* complete_frame_callback)
: clock_(Clock::GetRealTimeClock()),
config_(*config),
packet_router_(packet_router),
Expand All @@ -114,7 +113,6 @@ RtpVideoStreamReceiver::RtpVideoStreamReceiver(
packet_router)),
complete_frame_callback_(complete_frame_callback),
keyframe_request_sender_(keyframe_request_sender),
timing_(timing),
has_received_frame_(false) {
constexpr bool remb_candidate = true;
packet_router_->AddReceiveRtpModule(rtp_rtcp_.get(), remb_candidate);
Expand Down Expand Up @@ -389,8 +387,6 @@ void RtpVideoStreamReceiver::OnReceivedFrame(
keyframe_request_sender_->RequestKeyFrame();
}

if (!frame->delayed_by_retransmission())
timing_->IncomingTimestamp(frame->timestamp, clock_->TimeInMilliseconds());
reference_finder_->ManageFrame(std::move(frame));
}

Expand Down
5 changes: 1 addition & 4 deletions video/rtp_video_stream_receiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class RtpPacketReceived;
class RtpReceiver;
class Transport;
class UlpfecReceiver;
class VCMTiming;

namespace vcm {
class VideoReceiver;
Expand All @@ -74,8 +73,7 @@ class RtpVideoStreamReceiver : public RtpData,
ProcessThread* process_thread,
NackSender* nack_sender,
KeyFrameRequestSender* keyframe_request_sender,
video_coding::OnCompleteFrameCallback* complete_frame_callback,
VCMTiming* timing);
video_coding::OnCompleteFrameCallback* complete_frame_callback);
~RtpVideoStreamReceiver();

bool AddReceiveCodec(const VideoCodec& video_codec,
Expand Down Expand Up @@ -189,7 +187,6 @@ class RtpVideoStreamReceiver : public RtpData,
// Members for the new jitter buffer experiment.
video_coding::OnCompleteFrameCallback* complete_frame_callback_;
KeyFrameRequestSender* keyframe_request_sender_;
VCMTiming* timing_;
std::unique_ptr<NackModule> nack_module_;
rtc::scoped_refptr<video_coding::PacketBuffer> packet_buffer_;
std::unique_ptr<video_coding::RtpFrameReferenceFinder> reference_finder_;
Expand Down
6 changes: 1 addition & 5 deletions video/rtp_video_stream_receiver_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "modules/video_coding/include/video_coding_defines.h"
#include "modules/video_coding/packet.h"
#include "modules/video_coding/rtp_frame_reference_finder.h"
#include "modules/video_coding/timing.h"
#include "rtc_base/bytebuffer.h"
#include "rtc_base/logging.h"
#include "rtc_base/ptr_util.h"
Expand Down Expand Up @@ -122,7 +121,6 @@ class RtpVideoStreamReceiverTest : public testing::Test {
explicit RtpVideoStreamReceiverTest(std::string field_trials)
: override_field_trials_(field_trials),
config_(CreateConfig()),
timing_(Clock::GetRealTimeClock()),
process_thread_(ProcessThread::Create("TestThread")) {}

void SetUp() {
Expand All @@ -132,8 +130,7 @@ class RtpVideoStreamReceiverTest : public testing::Test {
&mock_transport_, nullptr, &packet_router_, &config_,
rtp_receive_statistics_.get(), nullptr, process_thread_.get(),
&mock_nack_sender_,
&mock_key_frame_request_sender_, &mock_on_complete_frame_callback_,
&timing_);
&mock_key_frame_request_sender_, &mock_on_complete_frame_callback_);
}

WebRtcRTPHeader GetDefaultPacket() {
Expand Down Expand Up @@ -196,7 +193,6 @@ class RtpVideoStreamReceiverTest : public testing::Test {
MockTransport mock_transport_;
MockOnCompleteFrameCallback mock_on_complete_frame_callback_;
PacketRouter packet_router_;
VCMTiming timing_;
std::unique_ptr<ProcessThread> process_thread_;
std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_;
std::unique_ptr<RtpVideoStreamReceiver> rtp_video_stream_receiver_;
Expand Down
7 changes: 3 additions & 4 deletions video/video_receive_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,9 @@ VideoReceiveStream::VideoReceiveStream(
rtp_receive_statistics_.get(),
&stats_proxy_,
process_thread_,
this, // NackSender
this, // KeyFrameRequestSender
this, // OnCompleteFrameCallback
timing_.get()),
this, // NackSender
this, // KeyFrameRequestSender
this), // OnCompleteFrameCallback
rtp_stream_sync_(this) {
RTC_LOG(LS_INFO) << "VideoReceiveStream: " << config_.ToString();

Expand Down

0 comments on commit 0a9f6de

Please sign in to comment.