| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/protocol/webrtc_dummy_video_capturer.h" | 5 #include "remoting/protocol/webrtc_dummy_video_capturer.h" |
| 6 | 6 |
| 7 #include <vector> | |
| 8 | |
| 9 namespace remoting { | 7 namespace remoting { |
| 10 namespace protocol { | 8 namespace protocol { |
| 11 | 9 |
| 12 WebrtcDummyVideoCapturer::WebrtcDummyVideoCapturer( | 10 WebrtcDummyVideoCapturer::WebrtcDummyVideoCapturer() {} |
| 13 std::unique_ptr<WebrtcFrameScheduler> frame_scheduler) | |
| 14 : frame_scheduler_(std::move(frame_scheduler)) {} | |
| 15 | |
| 16 WebrtcDummyVideoCapturer::~WebrtcDummyVideoCapturer() {} | 11 WebrtcDummyVideoCapturer::~WebrtcDummyVideoCapturer() {} |
| 17 | 12 |
| 18 cricket::CaptureState WebrtcDummyVideoCapturer::Start( | 13 cricket::CaptureState WebrtcDummyVideoCapturer::Start( |
| 19 const cricket::VideoFormat& capture_format) { | 14 const cricket::VideoFormat& capture_format) { |
| 20 frame_scheduler_->Start(); | |
| 21 return cricket::CS_RUNNING; | 15 return cricket::CS_RUNNING; |
| 22 } | 16 } |
| 23 | 17 |
| 24 void WebrtcDummyVideoCapturer::Stop() { | 18 void WebrtcDummyVideoCapturer::Stop() { |
| 25 frame_scheduler_->Stop(); | |
| 26 SetCaptureState(cricket::CS_STOPPED); | 19 SetCaptureState(cricket::CS_STOPPED); |
| 27 } | 20 } |
| 28 | 21 |
| 29 bool WebrtcDummyVideoCapturer::IsRunning() { | 22 bool WebrtcDummyVideoCapturer::IsRunning() { |
| 30 return true; | 23 return true; |
| 31 } | 24 } |
| 32 | 25 |
| 33 bool WebrtcDummyVideoCapturer::IsScreencast() const { | 26 bool WebrtcDummyVideoCapturer::IsScreencast() const { |
| 34 return true; | 27 return true; |
| 35 } | 28 } |
| 36 | 29 |
| 37 bool WebrtcDummyVideoCapturer::GetPreferredFourccs( | 30 bool WebrtcDummyVideoCapturer::GetPreferredFourccs( |
| 38 std::vector<uint32_t>* fourccs) { | 31 std::vector<uint32_t>* fourccs) { |
| 39 return true; | 32 return true; |
| 40 } | 33 } |
| 41 | 34 |
| 42 } // namespace protocol | 35 } // namespace protocol |
| 43 } // namespace remoting | 36 } // namespace remoting |
| OLD | NEW |