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

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

Issue 2452163004: Stop using VoEVideoSync in Call/VideoReceiveStream. (Closed)
Patch Set: fixed build error 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 for (const Decoder& decoder : config_.decoders) 355 for (const Decoder& decoder : config_.decoders)
358 video_receiver_.RegisterExternalDecoder(nullptr, decoder.payload_type); 356 video_receiver_.RegisterExternalDecoder(nullptr, decoder.payload_type);
359 } 357 }
360 358
361 call_stats_->DeregisterStatsObserver(video_stream_decoder_.get()); 359 call_stats_->DeregisterStatsObserver(video_stream_decoder_.get());
362 video_stream_decoder_.reset(); 360 video_stream_decoder_.reset();
363 incoming_video_stream_.reset(); 361 incoming_video_stream_.reset();
364 transport_adapter_.Disable(); 362 transport_adapter_.Disable();
365 } 363 }
366 364
367 void VideoReceiveStream::SetSyncChannel(VoiceEngine* voice_engine, 365 void VideoReceiveStream::SetSync(Syncable* syncable) {
368 int audio_channel_id) { 366 rtp_stream_sync_.ConfigureSync(syncable);
369 if (voice_engine && audio_channel_id != -1) {
370 VoEVideoSync* voe_sync_interface = VoEVideoSync::GetInterface(voice_engine);
371 rtp_stream_sync_.ConfigureSync(audio_channel_id, voe_sync_interface);
372 voe_sync_interface->Release();
373 } else {
374 rtp_stream_sync_.ConfigureSync(-1, nullptr);
375 }
376 } 367 }
377 368
378 VideoReceiveStream::Stats VideoReceiveStream::GetStats() const { 369 VideoReceiveStream::Stats VideoReceiveStream::GetStats() const {
379 return stats_proxy_.GetStats(); 370 return stats_proxy_.GetStats();
380 } 371 }
381 372
382 // TODO(tommi): This method grabs a lock 6 times. 373 // TODO(tommi): This method grabs a lock 6 times.
383 void VideoReceiveStream::OnFrame(const VideoFrame& video_frame) { 374 void VideoReceiveStream::OnFrame(const VideoFrame& video_frame) {
384 // TODO(tommi): OnDecodedFrame grabs a lock, incidentally the same lock 375 // TODO(tommi): OnDecodedFrame grabs a lock, incidentally the same lock
385 // that OnSyncOffsetUpdated() and OnRenderedFrame() below grab. 376 // that OnSyncOffsetUpdated() and OnRenderedFrame() below grab.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 RequestKeyFrame(); 478 RequestKeyFrame();
488 } 479 }
489 } 480 }
490 481
491 void VideoReceiveStream::RequestKeyFrame() { 482 void VideoReceiveStream::RequestKeyFrame() {
492 rtp_stream_receiver_.RequestKeyFrame(); 483 rtp_stream_receiver_.RequestKeyFrame();
493 } 484 }
494 485
495 } // namespace internal 486 } // namespace internal
496 } // namespace webrtc 487 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698