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 { | |
23 class WebURL; | |
24 } | |
25 | |
26 namespace webkit_media { | 22 namespace webkit_media { |
27 | 23 |
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 | 24 // Builds the required filters for handling media source URLs, adds them to |
41 // |filter_collection|. | 25 // |filter_collection|. |
42 void BuildMediaSourceCollection( | 26 void BuildMediaSourceCollection( |
43 const scoped_refptr<media::ChunkDemuxer>& demuxer, | 27 const scoped_refptr<media::ChunkDemuxer>& demuxer, |
44 const scoped_refptr<base::MessageLoopProxy>& message_loop, | 28 const scoped_refptr<base::MessageLoopProxy>& message_loop, |
45 media::FilterCollection* filter_collection); | 29 media::FilterCollection* filter_collection); |
46 | 30 |
47 // Builds the required filters for handling regular URLs and adds them to | 31 // Builds the required filters for handling regular URLs and adds them to |
48 // |filter_collection| and fills |video_decoder| returning true if successful. | 32 // |filter_collection| and fills |video_decoder| returning true if successful. |
49 void BuildDefaultCollection( | 33 void BuildDefaultCollection( |
50 const scoped_refptr<media::DataSource>& data_source, | 34 const scoped_refptr<media::DataSource>& data_source, |
51 const scoped_refptr<base::MessageLoopProxy>& message_loop, | 35 const scoped_refptr<base::MessageLoopProxy>& message_loop, |
52 media::FilterCollection* filter_collection); | 36 media::FilterCollection* filter_collection); |
53 | 37 |
54 } // webkit_media | 38 } // webkit_media |
55 | 39 |
56 #endif // WEBKIT_MEDIA_FILTER_HELPERS_H_ | 40 #endif // WEBKIT_MEDIA_FILTER_HELPERS_H_ |
OLD | NEW |