| 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 media { | 14 namespace media { |
| 15 class VideoDecoder; | 15 class VideoDecoder; |
| 16 class MessageLoopFactory; | 16 class MessageLoopFactory; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace webkit_media { | 19 namespace webkit_media { |
| 20 | 20 |
| 21 class MediaStreamAudioRenderer; |
| 22 |
| 21 // Define an interface for media stream client to get some information about | 23 // Define an interface for media stream client to get some information about |
| 22 // the media stream. | 24 // the media stream. |
| 23 class MediaStreamClient { | 25 class MediaStreamClient { |
| 24 public: | 26 public: |
| 25 // Check if the |url| is derived from a media stream object. | 27 // Check if the |url| is derived from a media stream object. |
| 26 virtual bool IsMediaStream(const GURL& url) = 0; | 28 virtual bool IsMediaStream(const GURL& url) = 0; |
| 27 | 29 |
| 28 virtual scoped_refptr<VideoFrameProvider> GetVideoFrameProvider( | 30 virtual scoped_refptr<VideoFrameProvider> GetVideoFrameProvider( |
| 29 const GURL& url, | 31 const GURL& url, |
| 30 const base::Closure& error_cb, | 32 const base::Closure& error_cb, |
| 31 const VideoFrameProvider::RepaintCB& repaint_cb) = 0; | 33 const VideoFrameProvider::RepaintCB& repaint_cb) = 0; |
| 32 | 34 |
| 33 virtual scoped_refptr<media::VideoDecoder> GetVideoDecoder( | 35 virtual scoped_refptr<media::VideoDecoder> GetVideoDecoder( |
| 34 const GURL& url, | 36 const GURL& url, |
| 35 media::MessageLoopFactory* message_loop_factory) = 0; | 37 media::MessageLoopFactory* message_loop_factory) = 0; |
| 36 | 38 |
| 39 virtual scoped_refptr<MediaStreamAudioRenderer> GetAudioRenderer( |
| 40 const GURL& url) = 0; |
| 41 |
| 37 protected: | 42 protected: |
| 38 virtual ~MediaStreamClient() {} | 43 virtual ~MediaStreamClient() {} |
| 39 }; | 44 }; |
| 40 | 45 |
| 41 } // namespace webkit_media | 46 } // namespace webkit_media |
| 42 | 47 |
| 43 #endif // WEBKIT_MEDIA_MEDIA_STREAM_CLIENT_H_ | 48 #endif // WEBKIT_MEDIA_MEDIA_STREAM_CLIENT_H_ |
| OLD | NEW |