Create VideoReceiver with external VCMTiming object.

In order for the VCMTiming object to be correctly updated with decoding timings
when running the WebRTC-NewVideoJitterBuffer experiment the VCMTiming object
has to be available in both the VideoReceiver and the video_coding::FrameBuffer
class. Therefore the VCMTiming object is created in VideoRecieveStream and
then passed to VideoReceiver/video_coding::FrameBuffer as they are constructed.

BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2575473004
Cr-Commit-Position: refs/heads/master@{#15638}
This commit is contained in:
philipel
2016-12-15 07:10:57 -08:00
committed by Commit bot
parent ac8d5164f0
commit 721d402d71
6 changed files with 28 additions and 18 deletions

View File

@ -15,6 +15,7 @@
#include "webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h"
#include "webrtc/modules/video_coding/include/video_coding.h"
#include "webrtc/modules/video_coding/test/test_util.h"
#include "webrtc/modules/video_coding/timing.h"
#include "webrtc/modules/video_coding/video_coding_impl.h"
#include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/test/gtest.h"
@ -33,7 +34,9 @@ class TestVideoReceiver : public ::testing::Test {
TestVideoReceiver() : clock_(0) {}
virtual void SetUp() {
receiver_.reset(new VideoReceiver(&clock_, &event_factory_, nullptr));
timing_.reset(new VCMTiming(&clock_));
receiver_.reset(
new VideoReceiver(&clock_, &event_factory_, nullptr, timing_.get()));
receiver_->RegisterExternalDecoder(&decoder_, kUnusedPayloadType);
const size_t kMaxNackListSize = 250;
const int kMaxPacketAgeToNack = 450;
@ -75,6 +78,7 @@ class TestVideoReceiver : public ::testing::Test {
NiceMock<MockVideoDecoder> decoder_;
NiceMock<MockPacketRequestCallback> packet_request_callback_;
std::unique_ptr<VCMTiming> timing_;
std::unique_ptr<VideoReceiver> receiver_;
};