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

@ -13,16 +13,17 @@
#include <algorithm>
#include <utility>
#include "webrtc/base/criticalsection.h"
#include "webrtc/common_types.h"
#include "webrtc/common_video/include/video_bitrate_allocator.h"
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
#include "webrtc/base/criticalsection.h"
#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
#include "webrtc/modules/video_coding/encoded_frame.h"
#include "webrtc/modules/video_coding/include/video_codec_initializer.h"
#include "webrtc/modules/video_coding/include/video_codec_interface.h"
#include "webrtc/modules/video_coding/encoded_frame.h"
#include "webrtc/modules/video_coding/jitter_buffer.h"
#include "webrtc/modules/video_coding/packet.h"
#include "webrtc/modules/video_coding/timing.h"
#include "webrtc/system_wrappers/include/clock.h"
namespace webrtc {
@ -84,9 +85,11 @@ class VideoCodingModuleImpl : public VideoCodingModule {
EncodedImageCallback* pre_decode_image_callback)
: VideoCodingModule(),
sender_(clock, &post_encode_callback_, nullptr),
timing_(new VCMTiming(clock)),
receiver_(clock,
event_factory,
pre_decode_image_callback,
timing_.get(),
nack_sender,
keyframe_request_sender) {}
@ -277,6 +280,7 @@ class VideoCodingModuleImpl : public VideoCodingModule {
EncodedImageCallbackWrapper post_encode_callback_;
vcm::VideoSender sender_;
std::unique_ptr<VideoBitrateAllocator> rate_allocator_;
std::unique_ptr<VCMTiming> timing_;
vcm::VideoReceiver receiver_;
};
} // namespace