OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef REMOTING_PROTOCOL_WEBRTC_DUMMY_VIDEO_CAPTURER_H_ |
| 6 #define REMOTING_PROTOCOL_WEBRTC_DUMMY_VIDEO_CAPTURER_H_ |
| 7 |
| 8 #include <memory> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/macros.h" |
| 12 #include "remoting/protocol/webrtc_frame_scheduler.h" |
| 13 #include "third_party/webrtc/media/base/videocapturer.h" |
| 14 |
| 15 namespace remoting { |
| 16 namespace protocol { |
| 17 |
| 18 // A dummy video capturer needed to create peer connection. We do not supply |
| 19 // captured frames throught this interface, but instead provide encoded |
| 20 // frames to WebRtc. We expect this requirement to go away once we have |
| 21 // proper support for providing encoded frames to WebRtc through |
| 22 // VideoSourceInterface |
| 23 class WebRtcDummyVideoCapturer : public cricket::VideoCapturer { |
| 24 public: |
| 25 explicit WebRtcDummyVideoCapturer( |
| 26 std::unique_ptr<WebRtcFrameScheduler> frame_scheduler); |
| 27 ~WebRtcDummyVideoCapturer() override; |
| 28 |
| 29 cricket::CaptureState Start( |
| 30 const cricket::VideoFormat& capture_format) override; |
| 31 void Stop() override; |
| 32 bool IsRunning() override; |
| 33 bool IsScreencast() const override; |
| 34 bool GetPreferredFourccs(std::vector<uint32_t>* fourccs) override; |
| 35 |
| 36 private: |
| 37 std::unique_ptr<WebRtcFrameScheduler> frame_scheduler_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(WebRtcDummyVideoCapturer); |
| 40 }; |
| 41 |
| 42 } // namespace protocol |
| 43 } // namespace remoting |
| 44 |
| 45 #endif // REMOTING_PROTOCOL_WEBRTC_DUMMY_VIDEO_CAPTURER_H_ |
OLD | NEW |