| OLD | NEW |
| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 void VcmCapturer::Stop() { | 73 void VcmCapturer::Stop() { |
| 74 rtc::CritScope lock(&crit_); | 74 rtc::CritScope lock(&crit_); |
| 75 started_ = false; | 75 started_ = false; |
| 76 } | 76 } |
| 77 | 77 |
| 78 void VcmCapturer::AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, | 78 void VcmCapturer::AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, |
| 79 const rtc::VideoSinkWants& wants) { | 79 const rtc::VideoSinkWants& wants) { |
| 80 rtc::CritScope lock(&crit_); | 80 rtc::CritScope lock(&crit_); |
| 81 RTC_CHECK(!sink_); | 81 RTC_CHECK(!sink_ || sink_ == sink); |
| 82 sink_ = sink; | 82 sink_ = sink; |
| 83 } | 83 } |
| 84 | 84 |
| 85 void VcmCapturer::RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) { | 85 void VcmCapturer::RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) { |
| 86 rtc::CritScope lock(&crit_); | 86 rtc::CritScope lock(&crit_); |
| 87 RTC_CHECK(sink_ == sink); | 87 RTC_CHECK(sink_ == sink); |
| 88 sink_ = nullptr; | 88 sink_ = nullptr; |
| 89 } | 89 } |
| 90 | 90 |
| 91 void VcmCapturer::Destroy() { | 91 void VcmCapturer::Destroy() { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 104 const VideoFrame& frame) { | 104 const VideoFrame& frame) { |
| 105 rtc::CritScope lock(&crit_); | 105 rtc::CritScope lock(&crit_); |
| 106 if (started_ && sink_) | 106 if (started_ && sink_) |
| 107 sink_->OnFrame(frame); | 107 sink_->OnFrame(frame); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void VcmCapturer::OnCaptureDelayChanged(const int32_t id, const int32_t delay) { | 110 void VcmCapturer::OnCaptureDelayChanged(const int32_t id, const int32_t delay) { |
| 111 } | 111 } |
| 112 } // test | 112 } // test |
| 113 } // webrtc | 113 } // webrtc |
| OLD | NEW |