OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 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 CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_VIDEO_SINK_H_ | |
6 #define CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_VIDEO_SINK_H_ | |
7 | |
8 #include "base/compiler_specific.h" | |
9 #include "base/memory/ref_counted.h" | |
10 #include "content/common/content_export.h" | |
11 #include "content/public/renderer/media_stream_sink.h" | |
12 | |
13 namespace media { | |
14 class VideoFrame; | |
15 } | |
16 | |
17 namespace blink { | |
18 class WebMediaStreamTrack; | |
19 } | |
20 | |
21 namespace content { | |
22 | |
23 // MediaStreamVideoSink is an interface used for receiving video frames from a | |
24 // Video Stream Track or a Video Source. | |
25 // http://dev.w3.org/2011/webrtc/editor/getusermedia.html | |
26 // All methods calls will be done from the main render thread. | |
27 class CONTENT_EXPORT MediaStreamVideoSink : public MediaStreamSink { | |
jam
2013/12/03 00:48:20
nit: export not needed
perkj_chrome
2013/12/03 16:14:17
Done.
| |
28 public: | |
29 virtual void OnVideoFrame(const scoped_refptr<media::VideoFrame>& frame) = 0; | |
30 | |
31 protected: | |
32 virtual ~MediaStreamVideoSink() {} | |
33 }; | |
34 | |
35 // An implementation of MediaStreamVideoSink should call AddToVideoTrack when it | |
36 // is ready to receive data from a video track. Before the implementation is | |
37 // destroyed, RemoveFromVideoTrack must be called. | |
38 // Calls to these methods must be done on the main render thread. | |
39 CONTENT_EXPORT void AddToVideoTrack(MediaStreamVideoSink* sink, | |
40 const blink::WebMediaStreamTrack& track); | |
41 CONTENT_EXPORT void RemoveFromVideoTrack( | |
jam
2013/12/03 00:48:20
please move these two methods to be inside MediaSt
perkj_chrome
2013/12/03 16:14:17
Done.
| |
42 MediaStreamVideoSink* sink, | |
43 const blink::WebMediaStreamTrack& track); | |
44 | |
45 } // namespace content | |
46 | |
47 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_VIDEO_SINK_H_ | |
OLD | NEW |