Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / webkit / media / filter_helpers.h
blob29a3e3817816aea6dad07e00a9bed6ab33d54c26
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
3 // found in the LICENSE file.
5 #ifndef WEBKIT_MEDIA_FILTER_HELPERS_H_
6 #define WEBKIT_MEDIA_FILTER_HELPERS_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_vector.h"
11 // TODO(fgalligan): Remove the dependency on FFmpeg.
12 #include "media/filters/ffmpeg_demuxer.h"
14 namespace base {
15 class MessageLoopProxy;
18 namespace media {
19 class AudioDecoder;
20 class ChunkDemuxer;
21 class DataSource;
22 class FilterCollection;
25 namespace webkit_media {
27 // Creates and adds the default set of audio decoders to |audio_decoders|.
28 void AddDefaultAudioDecoders(
29 const scoped_refptr<base::MessageLoopProxy>& message_loop,
30 ScopedVector<media::AudioDecoder>* audio_decoders);
32 // Builds the required filters for handling media source URLs, adds them to
33 // |filter_collection|.
34 void BuildMediaSourceCollection(
35 const scoped_refptr<media::ChunkDemuxer>& demuxer,
36 const scoped_refptr<base::MessageLoopProxy>& message_loop,
37 media::FilterCollection* filter_collection);
39 // Builds the required filters for handling regular URLs and adds them to
40 // |filter_collection| and fills |video_decoder| returning true if successful.
41 void BuildDefaultCollection(
42 const scoped_refptr<media::DataSource>& data_source,
43 const scoped_refptr<base::MessageLoopProxy>& message_loop,
44 media::FilterCollection* filter_collection,
45 const media::FFmpegNeedKeyCB& need_key_cb);
47 } // webkit_media
49 #endif // WEBKIT_MEDIA_FILTER_HELPERS_H_