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 #include "webkit/media/filter_helpers.h" | 5 #include "webkit/media/filter_helpers.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "media/base/filter_collection.h" | 9 #include "media/base/filter_collection.h" |
10 #include "media/base/media_switches.h" | 10 #include "media/base/media_switches.h" |
11 #include "media/filters/chunk_demuxer.h" | 11 #include "media/filters/chunk_demuxer.h" |
12 #include "media/filters/dummy_demuxer.h" | 12 #include "media/filters/dummy_demuxer.h" |
13 #include "media/filters/ffmpeg_audio_decoder.h" | 13 #include "media/filters/ffmpeg_audio_decoder.h" |
14 #include "media/filters/ffmpeg_demuxer.h" | 14 #include "media/filters/ffmpeg_demuxer.h" |
15 #include "media/filters/ffmpeg_video_decoder.h" | 15 #include "media/filters/ffmpeg_video_decoder.h" |
16 #include "media/filters/opus_audio_decoder.h" | 16 #include "media/filters/opus_audio_decoder.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" | 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" |
18 #include "webkit/media/media_stream_client.h" | 18 #include "webkit/media/media_stream_client.h" |
19 | 19 |
20 namespace webkit_media { | 20 namespace webkit_media { |
21 | 21 |
22 // Constructs and adds the default audio/video decoders to |filter_collection|. | 22 // Constructs and adds the default audio/video decoders to |filter_collection|. |
23 // Note that decoders in the |filter_collection| are ordered. The first | 23 // Note that decoders in the |filter_collection| are ordered. The first |
24 // audio/video decoder in the |filter_collection| that supports the input | 24 // audio/video decoder in the |filter_collection| that supports the input |
25 // audio/video stream will be selected as the audio/video decoder in the media | 25 // audio/video stream will be selected as the audio/video decoder in the media |
26 // pipeline. This is done by trying to initialize the decoder with the input | 26 // pipeline. This is done by trying to initialize the decoder with the input |
27 // stream. Some decoder may only accept certain types of streams. | 27 // stream. Some decoder may only accept certain types of streams. |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 const scoped_refptr<media::DataSource>& data_source, | 88 const scoped_refptr<media::DataSource>& data_source, |
89 const scoped_refptr<base::MessageLoopProxy>& message_loop, | 89 const scoped_refptr<base::MessageLoopProxy>& message_loop, |
90 media::FilterCollection* filter_collection) { | 90 media::FilterCollection* filter_collection) { |
91 filter_collection->SetDemuxer(new media::FFmpegDemuxer( | 91 filter_collection->SetDemuxer(new media::FFmpegDemuxer( |
92 message_loop, data_source)); | 92 message_loop, data_source)); |
93 | 93 |
94 AddDefaultDecodersToCollection(message_loop, filter_collection); | 94 AddDefaultDecodersToCollection(message_loop, filter_collection); |
95 } | 95 } |
96 | 96 |
97 } // webkit_media | 97 } // webkit_media |
OLD | NEW |