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

Unified Diff: webrtc/video/vie_sync_module.cc

Issue 1698183002: Extract ViESyncModule outside ViEChannel. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: feedback 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/vie_sync_module.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/vie_sync_module.cc
diff --git a/webrtc/video/vie_sync_module.cc b/webrtc/video/vie_sync_module.cc
index 0a6bc8e9c729173a5e1a10170efadb39c72c8dbc..dc924fb62fa7e4badbf8285e74ba7af7bcf7987a 100644
--- a/webrtc/video/vie_sync_module.cc
+++ b/webrtc/video/vie_sync_module.cc
@@ -10,6 +10,7 @@
#include "webrtc/video/vie_sync_module.h"
+#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/trace_event.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h"
@@ -60,17 +61,19 @@ ViESyncModule::ViESyncModule(VideoCodingModule* vcm)
ViESyncModule::~ViESyncModule() {
}
-int ViESyncModule::ConfigureSync(int voe_channel_id,
- VoEVideoSync* voe_sync_interface,
- RtpRtcp* video_rtcp_module,
- RtpReceiver* video_receiver) {
+void ViESyncModule::ConfigureSync(int voe_channel_id,
+ VoEVideoSync* voe_sync_interface,
+ RtpRtcp* video_rtcp_module,
+ RtpReceiver* video_receiver) {
+ if (voe_channel_id != -1)
+ RTC_DCHECK(voe_sync_interface);
rtc::CritScope lock(&data_cs_);
// Prevent expensive no-ops.
if (voe_channel_id_ == voe_channel_id &&
voe_sync_interface_ == voe_sync_interface &&
video_receiver_ == video_receiver &&
video_rtp_rtcp_ == video_rtcp_module) {
- return 0;
+ return;
}
voe_channel_id_ = voe_channel_id;
voe_sync_interface_ = voe_sync_interface;
@@ -78,20 +81,6 @@ int ViESyncModule::ConfigureSync(int voe_channel_id,
video_rtp_rtcp_ = video_rtcp_module;
sync_.reset(
new StreamSynchronization(video_rtp_rtcp_->SSRC(), voe_channel_id));
-
- if (!voe_sync_interface) {
- voe_channel_id_ = -1;
- if (voe_channel_id >= 0) {
- // Trying to set a voice channel but no interface exist.
- return -1;
- }
- return 0;
- }
- return 0;
-}
-
-int ViESyncModule::VoiceChannel() {
- return voe_channel_id_;
}
int64_t ViESyncModule::TimeUntilNextProcess() {
« no previous file with comments | « webrtc/video/vie_sync_module.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698