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 #include "webrtc/test/frame_generator.h" | 10 #include "webrtc/test/frame_generator.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 size_t current_frame_num_; | 242 size_t current_frame_num_; |
243 VideoFrame* current_source_frame_; | 243 VideoFrame* current_source_frame_; |
244 rtc::Optional<VideoFrame> current_frame_; | 244 rtc::Optional<VideoFrame> current_frame_; |
245 YuvFileGenerator file_generator_; | 245 YuvFileGenerator file_generator_; |
246 }; | 246 }; |
247 | 247 |
248 } // namespace | 248 } // namespace |
249 | 249 |
250 FrameForwarder::FrameForwarder() : sink_(nullptr) {} | 250 FrameForwarder::FrameForwarder() : sink_(nullptr) {} |
| 251 FrameForwarder::~FrameForwarder() {} |
251 | 252 |
252 void FrameForwarder::IncomingCapturedFrame(const VideoFrame& video_frame) { | 253 void FrameForwarder::IncomingCapturedFrame(const VideoFrame& video_frame) { |
253 rtc::CritScope lock(&crit_); | 254 rtc::CritScope lock(&crit_); |
254 if (sink_) | 255 if (sink_) |
255 sink_->OnFrame(video_frame); | 256 sink_->OnFrame(video_frame); |
256 } | 257 } |
257 | 258 |
258 void FrameForwarder::AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, | 259 void FrameForwarder::AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, |
259 const rtc::VideoSinkWants& wants) { | 260 const rtc::VideoSinkWants& wants) { |
260 rtc::CritScope lock(&crit_); | 261 rtc::CritScope lock(&crit_); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 files.push_back(file); | 318 files.push_back(file); |
318 } | 319 } |
319 | 320 |
320 return new ScrollingImageFrameGenerator( | 321 return new ScrollingImageFrameGenerator( |
321 clock, files, source_width, source_height, target_width, target_height, | 322 clock, files, source_width, source_height, target_width, target_height, |
322 scroll_time_ms, pause_time_ms); | 323 scroll_time_ms, pause_time_ms); |
323 } | 324 } |
324 | 325 |
325 } // namespace test | 326 } // namespace test |
326 } // namespace webrtc | 327 } // namespace webrtc |
OLD | NEW |