Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1079)

Unified Diff: webrtc/video/video_receive_stream.cc

Issue 1698183002: Extract ViESyncModule outside ViEChannel. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/video_receive_stream.h ('k') | webrtc/video/vie_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_receive_stream.cc
diff --git a/webrtc/video/video_receive_stream.cc b/webrtc/video/video_receive_stream.cc
index 4546ab7a869eceecdd285d1856bc69fca46f704c..41cdd89d4063e9ae9297d0200676786a746aed27 100644
--- a/webrtc/video/video_receive_stream.cc
+++ b/webrtc/video/video_receive_stream.cc
@@ -178,6 +178,7 @@ VideoReceiveStream::VideoReceiveStream(
1,
false),
vie_receiver_(vie_channel_.vie_receiver()),
+ vie_sync_(vcm_.get()),
rtp_rtcp_(vie_channel_.rtp_rtcp()) {
LOG(LS_INFO) << "VideoReceiveStream: " << config_.ToString();
@@ -302,12 +303,14 @@ VideoReceiveStream::VideoReceiveStream(
vie_channel_.RegisterPreRenderCallback(this);
process_thread_->RegisterModule(vcm_.get());
+ process_thread_->RegisterModule(&vie_sync_);
}
VideoReceiveStream::~VideoReceiveStream() {
LOG(LS_INFO) << "~VideoReceiveStream: " << config_.ToString();
Stop();
+ process_thread_->DeRegisterModule(&vie_sync_);
process_thread_->DeRegisterModule(vcm_.get());
// Deregister external decoders so that they are no longer running during
@@ -349,13 +352,16 @@ void VideoReceiveStream::Stop() {
void VideoReceiveStream::SetSyncChannel(VoiceEngine* voice_engine,
int audio_channel_id) {
+ VoEVideoSync* voe_sync_interface = nullptr;
if (voice_engine != nullptr && audio_channel_id != -1) {
danilchap 2016/02/16 08:54:06 Probably better to leave old way of branching to c
pbos-webrtc 2016/02/16 10:10:23 Done.
- VoEVideoSync* voe_sync_interface = VoEVideoSync::GetInterface(voice_engine);
- vie_channel_.SetVoiceChannel(audio_channel_id, voe_sync_interface);
- voe_sync_interface->Release();
+ voe_sync_interface = VoEVideoSync::GetInterface(voice_engine);
} else {
- vie_channel_.SetVoiceChannel(-1, nullptr);
+ audio_channel_id = -1;
}
+ vie_sync_.ConfigureSync(audio_channel_id, voe_sync_interface, rtp_rtcp_,
+ vie_receiver_->GetRtpReceiver());
+ if (voe_sync_interface)
+ voe_sync_interface->Release();
}
VideoReceiveStream::Stats VideoReceiveStream::GetStats() const {
« no previous file with comments | « webrtc/video/video_receive_stream.h ('k') | webrtc/video/vie_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698