Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Unified Diff: remoting/protocol/webrtc_dummy_video_capturer.cc

Issue 1846893002: Interface with webrtc through encoded frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed sergeyu comments and rebased Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/webrtc_dummy_video_capturer.cc
diff --git a/remoting/protocol/webrtc_dummy_video_capturer.cc b/remoting/protocol/webrtc_dummy_video_capturer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9aaee99ad3633e752a1dfc1893ef5b1eaf48f7e1
--- /dev/null
+++ b/remoting/protocol/webrtc_dummy_video_capturer.cc
@@ -0,0 +1,43 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "remoting/protocol/webrtc_dummy_video_capturer.h"
+
+#include <vector>
+
+namespace remoting {
+namespace protocol {
+
+WebRtcDummyVideoCapturer::WebRtcDummyVideoCapturer(
+ scoped_ptr<WebRtcFrameScheduler> frame_scheduler)
+ : frame_scheduler_(std::move(frame_scheduler)) {}
+
+WebRtcDummyVideoCapturer::~WebRtcDummyVideoCapturer() {}
+
+cricket::CaptureState WebRtcDummyVideoCapturer::Start(
+ const cricket::VideoFormat& capture_format) {
+ frame_scheduler_->Start();
+ return cricket::CS_RUNNING;
+}
+
+void WebRtcDummyVideoCapturer::Stop() {
+ frame_scheduler_->Stop();
+ SetCaptureState(cricket::CS_STOPPED);
+}
+
+bool WebRtcDummyVideoCapturer::IsRunning() {
+ return true;
+}
+
+bool WebRtcDummyVideoCapturer::IsScreencast() const {
+ return true;
+}
+
+bool WebRtcDummyVideoCapturer::GetPreferredFourccs(
+ std::vector<uint32_t>* fourccs) {
+ return true;
+}
+
+} // namespace protocol
+} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698