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

Side by Side Diff: webrtc/video/video_receive_stream.cc

Issue 2452163004: Stop using VoEVideoSync in Call/VideoReceiveStream. (Closed)
Patch Set: Don't expose RtpRtcp module in Syncable Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 15 matching lines...) Expand all
26 #include "webrtc/modules/video_coding/frame_object.h" 26 #include "webrtc/modules/video_coding/frame_object.h"
27 #include "webrtc/modules/video_coding/include/video_coding.h" 27 #include "webrtc/modules/video_coding/include/video_coding.h"
28 #include "webrtc/modules/video_coding/jitter_estimator.h" 28 #include "webrtc/modules/video_coding/jitter_estimator.h"
29 #include "webrtc/modules/video_coding/timing.h" 29 #include "webrtc/modules/video_coding/timing.h"
30 #include "webrtc/modules/video_coding/utility/ivf_file_writer.h" 30 #include "webrtc/modules/video_coding/utility/ivf_file_writer.h"
31 #include "webrtc/system_wrappers/include/clock.h" 31 #include "webrtc/system_wrappers/include/clock.h"
32 #include "webrtc/system_wrappers/include/field_trial.h" 32 #include "webrtc/system_wrappers/include/field_trial.h"
33 #include "webrtc/video/call_stats.h" 33 #include "webrtc/video/call_stats.h"
34 #include "webrtc/video/receive_statistics_proxy.h" 34 #include "webrtc/video/receive_statistics_proxy.h"
35 #include "webrtc/video_receive_stream.h" 35 #include "webrtc/video_receive_stream.h"
36 #include "webrtc/voice_engine/include/voe_video_sync.h"
37 36
38 namespace webrtc { 37 namespace webrtc {
39 38
40 static bool UseSendSideBwe(const VideoReceiveStream::Config& config) { 39 static bool UseSendSideBwe(const VideoReceiveStream::Config& config) {
41 if (!config.rtp.transport_cc) 40 if (!config.rtp.transport_cc)
42 return false; 41 return false;
43 for (const auto& extension : config.rtp.extensions) { 42 for (const auto& extension : config.rtp.extensions) {
44 if (extension.uri == RtpExtension::kTransportSequenceNumberUri) 43 if (extension.uri == RtpExtension::kTransportSequenceNumberUri)
45 return true; 44 return true;
46 } 45 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 183 }
185 } // namespace 184 } // namespace
186 185
187 namespace internal { 186 namespace internal {
188 187
189 VideoReceiveStream::VideoReceiveStream( 188 VideoReceiveStream::VideoReceiveStream(
190 int num_cpu_cores, 189 int num_cpu_cores,
191 CongestionController* congestion_controller, 190 CongestionController* congestion_controller,
192 PacketRouter* packet_router, 191 PacketRouter* packet_router,
193 VideoReceiveStream::Config config, 192 VideoReceiveStream::Config config,
194 webrtc::VoiceEngine* voice_engine,
195 ProcessThread* process_thread, 193 ProcessThread* process_thread,
196 CallStats* call_stats, 194 CallStats* call_stats,
197 VieRemb* remb) 195 VieRemb* remb)
198 : transport_adapter_(config.rtcp_send_transport), 196 : transport_adapter_(config.rtcp_send_transport),
199 config_(std::move(config)), 197 config_(std::move(config)),
200 num_cpu_cores_(num_cpu_cores), 198 num_cpu_cores_(num_cpu_cores),
201 process_thread_(process_thread), 199 process_thread_(process_thread),
202 clock_(Clock::GetRealTimeClock()), 200 clock_(Clock::GetRealTimeClock()),
203 decode_thread_(DecodeThreadFunction, this, "DecodingThread"), 201 decode_thread_(DecodeThreadFunction, this, "DecodingThread"),
204 congestion_controller_(congestion_controller), 202 congestion_controller_(congestion_controller),
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 for (const Decoder& decoder : config_.decoders) 348 for (const Decoder& decoder : config_.decoders)
351 video_receiver_.RegisterExternalDecoder(nullptr, decoder.payload_type); 349 video_receiver_.RegisterExternalDecoder(nullptr, decoder.payload_type);
352 } 350 }
353 351
354 call_stats_->DeregisterStatsObserver(video_stream_decoder_.get()); 352 call_stats_->DeregisterStatsObserver(video_stream_decoder_.get());
355 video_stream_decoder_.reset(); 353 video_stream_decoder_.reset();
356 incoming_video_stream_.reset(); 354 incoming_video_stream_.reset();
357 transport_adapter_.Disable(); 355 transport_adapter_.Disable();
358 } 356 }
359 357
360 void VideoReceiveStream::SetSyncChannel(VoiceEngine* voice_engine, 358 void VideoReceiveStream::SetSync(Syncable* syncable) {
361 int audio_channel_id) { 359 rtp_stream_sync_.ConfigureSync(syncable);
362 if (voice_engine && audio_channel_id != -1) {
363 VoEVideoSync* voe_sync_interface = VoEVideoSync::GetInterface(voice_engine);
364 rtp_stream_sync_.ConfigureSync(audio_channel_id, voe_sync_interface);
365 voe_sync_interface->Release();
366 } else {
367 rtp_stream_sync_.ConfigureSync(-1, nullptr);
368 }
369 } 360 }
370 361
371 VideoReceiveStream::Stats VideoReceiveStream::GetStats() const { 362 VideoReceiveStream::Stats VideoReceiveStream::GetStats() const {
372 return stats_proxy_.GetStats(); 363 return stats_proxy_.GetStats();
373 } 364 }
374 365
375 // TODO(tommi): This method grabs a lock 6 times. 366 // TODO(tommi): This method grabs a lock 6 times.
376 void VideoReceiveStream::OnFrame(const VideoFrame& video_frame) { 367 void VideoReceiveStream::OnFrame(const VideoFrame& video_frame) {
377 // TODO(tommi): OnDecodedFrame grabs a lock, incidentally the same lock 368 // TODO(tommi): OnDecodedFrame grabs a lock, incidentally the same lock
378 // that OnSyncOffsetUpdated() and OnRenderedFrame() below grab. 369 // that OnSyncOffsetUpdated() and OnRenderedFrame() below grab.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 RequestKeyFrame(); 466 RequestKeyFrame();
476 } 467 }
477 } 468 }
478 469
479 void VideoReceiveStream::RequestKeyFrame() { 470 void VideoReceiveStream::RequestKeyFrame() {
480 rtp_stream_receiver_.RequestKeyFrame(); 471 rtp_stream_receiver_.RequestKeyFrame();
481 } 472 }
482 473
483 } // namespace internal 474 } // namespace internal
484 } // namespace webrtc 475 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698