Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_MEDIA_MEDIA_STREAM_CLIENT_H_ | 5 #ifndef WEBKIT_MEDIA_MEDIA_STREAM_CLIENT_H_ |
| 6 #define WEBKIT_MEDIA_MEDIA_STREAM_CLIENT_H_ | 6 #define WEBKIT_MEDIA_MEDIA_STREAM_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "webkit/media/video_frame_provider.h" | 10 #include "webkit/media/video_frame_provider.h" |
| 11 | 11 |
| 12 class GURL; | 12 class GURL; |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class MessageLoopProxy; | 15 class MessageLoopProxy; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace media { | 18 namespace media { |
| 19 class VideoDecoder; | 19 class VideoDecoder; |
|
wjia(left Chromium)
2013/02/27 02:43:54
nit: remove this.
wuchengli
2013/02/27 21:37:41
Done.
| |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace webkit_media { | 22 namespace webkit_media { |
| 23 | 23 |
| 24 class MediaStreamAudioRenderer; | 24 class MediaStreamAudioRenderer; |
| 25 | 25 |
| 26 // Define an interface for media stream client to get some information about | 26 // Define an interface for media stream client to get some information about |
| 27 // the media stream. | 27 // the media stream. |
| 28 class MediaStreamClient { | 28 class MediaStreamClient { |
| 29 public: | 29 public: |
| 30 // Check if the |url| is derived from a media stream object. | 30 // Check if the |url| is derived from a media stream object. |
| 31 virtual bool IsMediaStream(const GURL& url) = 0; | 31 virtual bool IsMediaStream(const GURL& url) = 0; |
| 32 | 32 |
| 33 virtual scoped_refptr<VideoFrameProvider> GetVideoFrameProvider( | 33 virtual scoped_refptr<VideoFrameProvider> GetVideoFrameProvider( |
| 34 const GURL& url, | 34 const GURL& url, |
| 35 const base::Closure& error_cb, | 35 const base::Closure& error_cb, |
| 36 const VideoFrameProvider::RepaintCB& repaint_cb) = 0; | 36 const VideoFrameProvider::RepaintCB& repaint_cb) = 0; |
| 37 | 37 |
| 38 virtual scoped_refptr<media::VideoDecoder> GetVideoDecoder( | |
| 39 const GURL& url, | |
| 40 const scoped_refptr<base::MessageLoopProxy>& message_loop) = 0; | |
| 41 | |
| 42 virtual scoped_refptr<MediaStreamAudioRenderer> GetAudioRenderer( | 38 virtual scoped_refptr<MediaStreamAudioRenderer> GetAudioRenderer( |
| 43 const GURL& url) = 0; | 39 const GURL& url) = 0; |
| 44 | 40 |
| 45 protected: | 41 protected: |
| 46 virtual ~MediaStreamClient() {} | 42 virtual ~MediaStreamClient() {} |
| 47 }; | 43 }; |
| 48 | 44 |
| 49 } // namespace webkit_media | 45 } // namespace webkit_media |
| 50 | 46 |
| 51 #endif // WEBKIT_MEDIA_MEDIA_STREAM_CLIENT_H_ | 47 #endif // WEBKIT_MEDIA_MEDIA_STREAM_CLIENT_H_ |
| OLD | NEW |