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

Side by Side Diff: webrtc/video_engine/vie_sync_module.cc

Issue 1181653002: Base A/V synchronization on sync_labels. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | webrtc/video_receive_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 ViESyncModule::~ViESyncModule() { 62 ViESyncModule::~ViESyncModule() {
63 } 63 }
64 64
65 int ViESyncModule::ConfigureSync(int voe_channel_id, 65 int ViESyncModule::ConfigureSync(int voe_channel_id,
66 VoEVideoSync* voe_sync_interface, 66 VoEVideoSync* voe_sync_interface,
67 RtpRtcp* video_rtcp_module, 67 RtpRtcp* video_rtcp_module,
68 RtpReceiver* video_receiver) { 68 RtpReceiver* video_receiver) {
69 CriticalSectionScoped cs(data_cs_.get()); 69 CriticalSectionScoped cs(data_cs_.get());
70 // Prevent expensive no-ops.
71 if (voe_channel_id_ == voe_channel_id &&
72 voe_sync_interface_ == voe_sync_interface &&
73 video_receiver_ == video_receiver &&
74 video_rtp_rtcp_ == video_rtcp_module) {
75 return 0;
76 }
70 voe_channel_id_ = voe_channel_id; 77 voe_channel_id_ = voe_channel_id;
71 voe_sync_interface_ = voe_sync_interface; 78 voe_sync_interface_ = voe_sync_interface;
72 video_receiver_ = video_receiver; 79 video_receiver_ = video_receiver;
73 video_rtp_rtcp_ = video_rtcp_module; 80 video_rtp_rtcp_ = video_rtcp_module;
74 sync_.reset( 81 sync_.reset(
75 new StreamSynchronization(video_rtp_rtcp_->SSRC(), voe_channel_id)); 82 new StreamSynchronization(video_rtp_rtcp_->SSRC(), voe_channel_id));
76 83
77 if (!voe_sync_interface) { 84 if (!voe_sync_interface) {
78 voe_channel_id_ = -1; 85 voe_channel_id_ = -1;
79 if (voe_channel_id >= 0) { 86 if (voe_channel_id >= 0) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 179 }
173 sync_->SetTargetBufferingDelay(target_delay_ms); 180 sync_->SetTargetBufferingDelay(target_delay_ms);
174 // Setting initial playout delay to voice engine (video engine is updated via 181 // Setting initial playout delay to voice engine (video engine is updated via
175 // the VCM interface). 182 // the VCM interface).
176 voe_sync_interface_->SetInitialPlayoutDelay(voe_channel_id_, 183 voe_sync_interface_->SetInitialPlayoutDelay(voe_channel_id_,
177 target_delay_ms); 184 target_delay_ms);
178 return 0; 185 return 0;
179 } 186 }
180 187
181 } // namespace webrtc 188 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | webrtc/video_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698