OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_FILTER_HELPERS_H_ | 5 #ifndef WEBKIT_MEDIA_FILTER_HELPERS_H_ |
6 #define WEBKIT_MEDIA_FILTER_HELPERS_H_ | 6 #define WEBKIT_MEDIA_FILTER_HELPERS_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 | 10 |
11 namespace base { | 11 namespace base { |
12 class MessageLoopProxy; | 12 class MessageLoopProxy; |
13 } | 13 } |
14 | 14 |
15 namespace media { | 15 namespace media { |
16 class ChunkDemuxer; | 16 class ChunkDemuxer; |
17 class DataSource; | 17 class DataSource; |
18 class FFmpegVideoDecoder; | 18 class FFmpegVideoDecoder; |
19 class FilterCollection; | 19 class FilterCollection; |
20 } | 20 } |
21 | 21 |
22 namespace WebKit { | 22 namespace WebKit { |
23 class WebURL; | 23 class WebURL; |
24 } | 24 } |
25 | 25 |
26 namespace webkit_media { | 26 namespace webkit_media { |
27 | 27 |
28 class MediaStreamClient; | |
29 | |
30 // Builds the required filters for handling media stream URLs and adds them to | |
31 // |filter_collection| returning true if successful. | |
32 // | |
33 // |filter_collection| is not modified if this method returns false. | |
34 bool BuildMediaStreamCollection( | |
35 const WebKit::WebURL& url, | |
36 MediaStreamClient* client, | |
37 const scoped_refptr<base::MessageLoopProxy>& message_loop, | |
38 media::FilterCollection* filter_collection); | |
39 | |
40 // Builds the required filters for handling media source URLs, adds them to | 28 // Builds the required filters for handling media source URLs, adds them to |
41 // |filter_collection|. | 29 // |filter_collection|. |
42 void BuildMediaSourceCollection( | 30 void BuildMediaSourceCollection( |
43 const scoped_refptr<media::ChunkDemuxer>& demuxer, | 31 const scoped_refptr<media::ChunkDemuxer>& demuxer, |
44 const scoped_refptr<base::MessageLoopProxy>& message_loop, | 32 const scoped_refptr<base::MessageLoopProxy>& message_loop, |
45 media::FilterCollection* filter_collection); | 33 media::FilterCollection* filter_collection); |
46 | 34 |
47 // Builds the required filters for handling regular URLs and adds them to | 35 // Builds the required filters for handling regular URLs and adds them to |
48 // |filter_collection| and fills |video_decoder| returning true if successful. | 36 // |filter_collection| and fills |video_decoder| returning true if successful. |
49 void BuildDefaultCollection( | 37 void BuildDefaultCollection( |
50 const scoped_refptr<media::DataSource>& data_source, | 38 const scoped_refptr<media::DataSource>& data_source, |
51 const scoped_refptr<base::MessageLoopProxy>& message_loop, | 39 const scoped_refptr<base::MessageLoopProxy>& message_loop, |
52 media::FilterCollection* filter_collection); | 40 media::FilterCollection* filter_collection); |
53 | 41 |
54 } // webkit_media | 42 } // webkit_media |
55 | 43 |
56 #endif // WEBKIT_MEDIA_FILTER_HELPERS_H_ | 44 #endif // WEBKIT_MEDIA_FILTER_HELPERS_H_ |
OLD | NEW |