Index: webrtc/api/remotevideocapturer.h |
diff --git a/webrtc/api/remotevideocapturer.h b/webrtc/api/remotevideocapturer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..14d09154aecb8040904cc8e05e843e9133ffc65a |
--- /dev/null |
+++ b/webrtc/api/remotevideocapturer.h |
@@ -0,0 +1,48 @@ |
+/* |
+ * Copyright 2013 The WebRTC project authors. All Rights Reserved. |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#ifndef WEBRTC_API_REMOTEVIDEOCAPTURER_H_ |
+#define WEBRTC_API_REMOTEVIDEOCAPTURER_H_ |
+ |
+#include <vector> |
+ |
+#include "talk/media/base/videocapturer.h" |
+#include "talk/media/base/videorenderer.h" |
+#include "webrtc/api/mediastreaminterface.h" |
+ |
+namespace webrtc { |
+ |
+// RemoteVideoCapturer implements a simple cricket::VideoCapturer which |
+// gets decoded remote video frames from media channel. |
+// It's used as the remote video source's VideoCapturer so that the remote video |
+// can be used as a cricket::VideoCapturer and in that way a remote video stream |
+// can implement the MediaStreamSourceInterface. |
+class RemoteVideoCapturer : public cricket::VideoCapturer { |
+ public: |
+ RemoteVideoCapturer(); |
+ virtual ~RemoteVideoCapturer(); |
+ |
+ // cricket::VideoCapturer implementation. |
+ cricket::CaptureState Start( |
+ const cricket::VideoFormat& capture_format) override; |
+ void Stop() override; |
+ bool IsRunning() override; |
+ bool GetPreferredFourccs(std::vector<uint32_t>* fourccs) override; |
+ bool GetBestCaptureFormat(const cricket::VideoFormat& desired, |
+ cricket::VideoFormat* best_format) override; |
+ bool IsScreencast() const override; |
+ |
+ private: |
+ RTC_DISALLOW_COPY_AND_ASSIGN(RemoteVideoCapturer); |
+}; |
+ |
+} // namespace webrtc |
+ |
+#endif // WEBRTC_API_REMOTEVIDEOCAPTURER_H_ |