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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 void FrameGeneratorCapturer::Start() { | 117 void FrameGeneratorCapturer::Start() { |
118 rtc::CritScope cs(&lock_); | 118 rtc::CritScope cs(&lock_); |
119 sending_ = true; | 119 sending_ = true; |
120 } | 120 } |
121 | 121 |
122 void FrameGeneratorCapturer::Stop() { | 122 void FrameGeneratorCapturer::Stop() { |
123 rtc::CritScope cs(&lock_); | 123 rtc::CritScope cs(&lock_); |
124 sending_ = false; | 124 sending_ = false; |
125 } | 125 } |
126 | 126 |
127 void FrameGeneratorCapturer::ChangeResolution(size_t width, size_t height) { | |
128 rtc::CritScope cs(&lock_); | |
129 frame_generator_->ChangeResolution(width, height); | |
130 } | |
131 | |
132 void FrameGeneratorCapturer::AddOrUpdateSink( | 127 void FrameGeneratorCapturer::AddOrUpdateSink( |
133 rtc::VideoSinkInterface<VideoFrame>* sink, | 128 rtc::VideoSinkInterface<VideoFrame>* sink, |
134 const rtc::VideoSinkWants& wants) { | 129 const rtc::VideoSinkWants& wants) { |
135 rtc::CritScope cs(&lock_); | 130 rtc::CritScope cs(&lock_); |
136 RTC_CHECK(!sink_); | 131 RTC_CHECK(!sink_); |
137 sink_ = sink; | 132 sink_ = sink; |
138 } | 133 } |
139 | 134 |
140 void FrameGeneratorCapturer::RemoveSink( | 135 void FrameGeneratorCapturer::RemoveSink( |
141 rtc::VideoSinkInterface<VideoFrame>* sink) { | 136 rtc::VideoSinkInterface<VideoFrame>* sink) { |
142 rtc::CritScope cs(&lock_); | 137 rtc::CritScope cs(&lock_); |
143 RTC_CHECK(sink_ == sink); | 138 RTC_CHECK(sink_ == sink); |
144 sink_ = nullptr; | 139 sink_ = nullptr; |
145 } | 140 } |
146 | 141 |
147 void FrameGeneratorCapturer::ForceFrame() { | 142 void FrameGeneratorCapturer::ForceFrame() { |
148 tick_->Set(); | 143 tick_->Set(); |
149 } | 144 } |
150 } // test | 145 } // test |
151 } // webrtc | 146 } // webrtc |
OLD | NEW |