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 CONTENT_RENDERER_MEDIA_STREAM_MEDIA_STREAM_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_STREAM_MEDIA_STREAM_IMPL_H_ |
6 #define CONTENT_RENDERER_MEDIA_STREAM_MEDIA_STREAM_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_STREAM_MEDIA_STREAM_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "webkit/media/media_stream_client.h" | 10 #include "webkit/media/media_stream_client.h" |
11 | 11 |
12 class VideoCaptureImplManager; | 12 class VideoCaptureImplManager; |
13 | 13 |
14 // A implementation of StreamClient to provide supporting functions, such as | 14 // A implementation of StreamClient to provide supporting functions, such as |
15 // GetVideoDecoder. | 15 // GetVideoDecoder. |
16 class MediaStreamImpl | 16 class MediaStreamImpl |
17 : public webkit_media::MediaStreamClient, | 17 : public webkit_media::MediaStreamClient, |
18 public base::RefCountedThreadSafe<MediaStreamImpl> { | 18 public base::RefCountedThreadSafe<MediaStreamImpl> { |
19 public: | 19 public: |
20 explicit MediaStreamImpl(VideoCaptureImplManager* vc_manager); | 20 explicit MediaStreamImpl(VideoCaptureImplManager* vc_manager); |
21 virtual ~MediaStreamImpl(); | 21 virtual ~MediaStreamImpl(); |
22 | 22 |
23 // Implement webkit_media::StreamClient. | 23 // Implement webkit_media::StreamClient. |
24 virtual scoped_refptr<media::VideoDecoder> GetVideoDecoder( | 24 virtual scoped_refptr<media::VideoDecoder> GetVideoDecoder( |
25 const GURL& url, media::MessageLoopFactory* message_loop_factory); | 25 const GURL& url, |
| 26 media::MessageLoopFactory* message_loop_factory) OVERRIDE; |
26 | 27 |
27 private: | 28 private: |
28 scoped_refptr<VideoCaptureImplManager> vc_manager_; | 29 scoped_refptr<VideoCaptureImplManager> vc_manager_; |
29 | 30 |
30 DISALLOW_COPY_AND_ASSIGN(MediaStreamImpl); | 31 DISALLOW_COPY_AND_ASSIGN(MediaStreamImpl); |
31 }; | 32 }; |
32 | 33 |
33 #endif // CONTENT_RENDERER_MEDIA_STREAM_MEDIA_STREAM_IMPL_H_ | 34 #endif // CONTENT_RENDERER_MEDIA_STREAM_MEDIA_STREAM_IMPL_H_ |
OLD | NEW |