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

Side by Side Diff: content/public/renderer/media_stream_video_sink.h

Issue 83023005: Add VideoTrackSink interface to content/public (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Tommis comments. Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 to this implementation will be done from the main render
tommi (sloooow) - chröme 2013/11/28 14:32:21 s/methods/method remove "to this implementation" s
perkj_chrome 2013/11/29 13:29:48 to this class will be done....
perkj_chrome 2013/11/29 13:29:48 Done.
27 // thread.
28 class CONTENT_EXPORT MediaStreamVideoSink : public MediaStreamSink {
29 public:
30 virtual void OnVideoFrame(const scoped_refptr<media::VideoFrame>& frame) = 0;
31
32 protected:
33 virtual ~MediaStreamVideoSink() {}
34 };
35
36 // An implementation of MediaStreamVideoSink should call AddToVideoTrack when it
37 // is ready to receive data from a video track. Before the implementation is
38 // destroyed, RemoveFromVideoTrack must be called.
39 // Calls to these methods must be done on the main render thread.
40 CONTENT_EXPORT void AddToVideoTrack(MediaStreamVideoSink* sink,
41 const blink::WebMediaStreamTrack& track);
42 CONTENT_EXPORT void RemoveFromVideoTrack(
43 MediaStreamVideoSink* sink,
44 const blink::WebMediaStreamTrack& track);
45
46 } // namespace content
47
48 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_STREAM_VIDEO_SINK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698