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

Side by Side Diff: webrtc/api/videosource.cc

Issue 1758223002: Change webrtc::VideoSourceInterface to inherit rtc::VideoSourceInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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/api/videosource.h ('k') | webrtc/api/videosource_unittest.cc » ('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 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 } 387 }
388 if (!worker_thread_->Invoke<bool>( 388 if (!worker_thread_->Invoke<bool>(
389 rtc::Bind(&cricket::VideoCapturer::StartCapturing, 389 rtc::Bind(&cricket::VideoCapturer::StartCapturing,
390 video_capturer_.get(), format_))) { 390 video_capturer_.get(), format_))) {
391 SetState(kEnded); 391 SetState(kEnded);
392 return; 392 return;
393 } 393 }
394 started_ = true; 394 started_ = true;
395 } 395 }
396 396
397 void VideoSource::AddSink( 397 void VideoSource::AddOrUpdateSink(
398 rtc::VideoSinkInterface<cricket::VideoFrame>* output) { 398 rtc::VideoSinkInterface<cricket::VideoFrame>* sink,
399 // TODO(perkj): Use fake rtc::VideoSinkWants for now. This will change once 399 const rtc::VideoSinkWants& wants) {
400 // webrtc::VideoSourceInterface inherit rtc::VideoSourceInterface.
401 worker_thread_->Invoke<void>( 400 worker_thread_->Invoke<void>(
402 rtc::Bind(&cricket::VideoCapturer::AddOrUpdateSink, 401 rtc::Bind(&cricket::VideoCapturer::AddOrUpdateSink,
403 video_capturer_.get(), output, rtc::VideoSinkWants())); 402 video_capturer_.get(), sink, wants));
404 } 403 }
405 404
406 void VideoSource::RemoveSink( 405 void VideoSource::RemoveSink(
407 rtc::VideoSinkInterface<cricket::VideoFrame>* output) { 406 rtc::VideoSinkInterface<cricket::VideoFrame>* output) {
408 worker_thread_->Invoke<void>( 407 worker_thread_->Invoke<void>(
409 rtc::Bind(&cricket::VideoCapturer::RemoveSink, 408 rtc::Bind(&cricket::VideoCapturer::RemoveSink,
410 video_capturer_.get(), output)); 409 video_capturer_.get(), output));
411 } 410 }
412 411
413 // OnStateChange listens to the cricket::VideoCapturer::SignalStateChange. 412 // OnStateChange listens to the cricket::VideoCapturer::SignalStateChange.
(...skipping 12 matching lines...) Expand all
426 } 425 }
427 426
428 void VideoSource::SetState(SourceState new_state) { 427 void VideoSource::SetState(SourceState new_state) {
429 if (state_ != new_state) { 428 if (state_ != new_state) {
430 state_ = new_state; 429 state_ = new_state;
431 FireOnChanged(); 430 FireOnChanged();
432 } 431 }
433 } 432 }
434 433
435 } // namespace webrtc 434 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/videosource.h ('k') | webrtc/api/videosource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698