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...) 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 |
127 void FrameGeneratorCapturer::AddOrUpdateSink( | 132 void FrameGeneratorCapturer::AddOrUpdateSink( |
128 rtc::VideoSinkInterface<VideoFrame>* sink, | 133 rtc::VideoSinkInterface<VideoFrame>* sink, |
129 const rtc::VideoSinkWants& wants) { | 134 const rtc::VideoSinkWants& wants) { |
130 rtc::CritScope cs(&lock_); | 135 rtc::CritScope cs(&lock_); |
131 RTC_CHECK(!sink_); | 136 RTC_CHECK(!sink_); |
132 sink_ = sink; | 137 sink_ = sink; |
133 } | 138 } |
134 | 139 |
135 void FrameGeneratorCapturer::RemoveSink( | 140 void FrameGeneratorCapturer::RemoveSink( |
136 rtc::VideoSinkInterface<VideoFrame>* sink) { | 141 rtc::VideoSinkInterface<VideoFrame>* sink) { |
137 rtc::CritScope cs(&lock_); | 142 rtc::CritScope cs(&lock_); |
138 RTC_CHECK(sink_ == sink); | 143 RTC_CHECK(sink_ == sink); |
139 sink_ = nullptr; | 144 sink_ = nullptr; |
140 } | 145 } |
141 | 146 |
142 void FrameGeneratorCapturer::ForceFrame() { | 147 void FrameGeneratorCapturer::ForceFrame() { |
143 tick_->Set(); | 148 tick_->Set(); |
144 } | 149 } |
145 } // test | 150 } // test |
146 } // webrtc | 151 } // webrtc |
OLD | NEW |