Index: content/public/renderer/media_stream_video_sink.h |
diff --git a/content/public/renderer/media_stream_video_sink.h b/content/public/renderer/media_stream_video_sink.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..49de60b909e16c604fd0cfbf865a1eb8b834e086 |
--- /dev/null |
+++ b/content/public/renderer/media_stream_video_sink.h |
@@ -0,0 +1,42 @@ |
+// Copyright 2013 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. |
+ |
+#ifndef CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_VIDEO_SINK_H_ |
+#define CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_VIDEO_SINK_H_ |
+ |
+#include "base/compiler_specific.h" |
+#include "base/memory/ref_counted.h" |
+#include "content/common/content_export.h" |
+#include "content/public/renderer/media_stream_sink.h" |
+ |
+namespace media { |
+class VideoFrame; |
+} |
+ |
+namespace blink { |
+class WebMediaStreamTrack; |
+} |
+ |
+namespace content { |
+ |
+class CONTENT_EXPORT MediaStreamVideoSink : public MediaStreamSink { |
Alpha Left Google
2013/11/27 22:13:15
I think we should document the threading requireme
perkj_chrome
2013/11/28 13:32:45
Done.
|
+ public: |
+ virtual void OnVideoFrame(const scoped_refptr<media::VideoFrame>& frame) = 0; |
+ |
+ protected: |
+ virtual ~MediaStreamVideoSink() {} |
+}; |
+ |
+// An implementation of MediaStreamVideoSink should call AddToVideoTrack when it |
+// is ready to receive data from a video track. Before the implementation is |
+// destroyed, RemoveFromVideoTrack must be called. |
+CONTENT_EXPORT void AddToVideoTrack(MediaStreamVideoSink* sink, |
Alpha Left Google
2013/11/27 22:13:15
We should document the threading requirement of th
perkj_chrome
2013/11/28 13:32:45
Done.
|
+ const blink::WebMediaStreamTrack& track); |
no longer working on chromium
2013/11/28 15:12:34
nit, add and empty line.
|
+CONTENT_EXPORT void RemoveFromVideoTrack( |
+ MediaStreamVideoSink* sink, |
+ const blink::WebMediaStreamTrack& track); |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_VIDEO_SINK_H_ |