Chromium Code Reviews| 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_VIDEO_TRACK_SINK_H_ | |
| 6 #define CONTENT_PUBLIC_RENDERER_MEDIA_VIDEO_TRACK_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/media_track_sink.h" | |
| 12 | |
| 13 namespace media { | |
| 14 class VideoFrame; | |
| 15 } | |
| 16 | |
| 17 namespace blink { | |
| 18 class WebMediaStreamSource; | |
| 19 class WebMediaStreamTrack; | |
| 20 } | |
| 21 | |
| 22 namespace content { | |
| 23 | |
| 24 class CONTENT_EXPORT VideoTrackSink : public MediaTrackSink { | |
| 25 public: | |
| 26 virtual void OnVideoFrame(const scoped_refptr<media::VideoFrame>& frame) = 0; | |
| 27 | |
| 28 protected: | |
| 29 virtual ~VideoTrackSink() {} | |
| 30 | |
| 31 // An implementation should call Register when it is ready to receive | |
| 32 // data from a track. Before the implementation is destroyed, Unregister must | |
| 33 // be called. | |
| 34 void Register(const blink::WebMediaStreamTrack& track); | |
|
no longer working on chromium
2013/11/25 13:55:07
Can AddSink, RemoveSink better names than Register
Jói
2013/11/25 14:06:55
Registration and unregistration should be on the V
Alpha Left Google
2013/11/26 04:59:32
I'm not sure this is possible unless VideoTrack is
perkj_chrome
2013/11/26 09:16:38
Done.
perkj_chrome
2013/11/26 09:16:38
Joi? I use static functions at the moment. It seem
Jói
2013/11/26 10:18:15
Yeah, makes sense to have static functions on Vide
| |
| 35 void UnRegister(const blink::WebMediaStreamTrack& track); | |
| 36 }; | |
| 37 | |
| 38 } // namespace content | |
| 39 | |
| 40 #endif // CONTENT_PUBLIC_RENDERER_MEDIA_VIDEO_TRACK_SINK_H_ | |
| OLD | NEW |