| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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 |
| 11 #include "webrtc/test/video_capturer.h" | 11 #include "webrtc/test/video_capturer.h" |
| 12 | 12 |
| 13 #include "webrtc/base/basictypes.h" | 13 #include "webrtc/rtc_base/basictypes.h" |
| 14 #include "webrtc/base/constructormagic.h" | 14 #include "webrtc/rtc_base/constructormagic.h" |
| 15 | 15 |
| 16 namespace webrtc { | 16 namespace webrtc { |
| 17 namespace test { | 17 namespace test { |
| 18 VideoCapturer::VideoCapturer() : video_adapter_(new cricket::VideoAdapter()) {} | 18 VideoCapturer::VideoCapturer() : video_adapter_(new cricket::VideoAdapter()) {} |
| 19 VideoCapturer::~VideoCapturer() {} | 19 VideoCapturer::~VideoCapturer() {} |
| 20 | 20 |
| 21 rtc::Optional<VideoFrame> VideoCapturer::AdaptFrame(const VideoFrame& frame) { | 21 rtc::Optional<VideoFrame> VideoCapturer::AdaptFrame(const VideoFrame& frame) { |
| 22 int cropped_width = 0; | 22 int cropped_width = 0; |
| 23 int cropped_height = 0; | 23 int cropped_height = 0; |
| 24 int out_width = 0; | 24 int out_width = 0; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 49 } | 49 } |
| 50 | 50 |
| 51 void VideoCapturer::AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, | 51 void VideoCapturer::AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, |
| 52 const rtc::VideoSinkWants& wants) { | 52 const rtc::VideoSinkWants& wants) { |
| 53 video_adapter_->OnResolutionFramerateRequest( | 53 video_adapter_->OnResolutionFramerateRequest( |
| 54 wants.target_pixel_count, wants.max_pixel_count, wants.max_framerate_fps); | 54 wants.target_pixel_count, wants.max_pixel_count, wants.max_framerate_fps); |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace test | 57 } // namespace test |
| 58 } // namespace webrtc | 58 } // namespace webrtc |
| OLD | NEW |