| Index: media/base/filter_collection.cc
|
| diff --git a/media/base/filter_collection.cc b/media/base/filter_collection.cc
|
| index 2a38f802409f0faf0bfc9a3336f2c1ff1d8edbc2..317139954ac9f28ac2c339a11dd5e1e6561da765 100644
|
| --- a/media/base/filter_collection.cc
|
| +++ b/media/base/filter_collection.cc
|
| @@ -22,24 +22,24 @@ DemuxerFactory* FilterCollection::GetDemuxerFactory() {
|
| return demuxer_factory_.get();
|
| }
|
|
|
| -void FilterCollection::AddVideoDecoder(VideoDecoder* filter) {
|
| - AddFilter(VIDEO_DECODER, filter);
|
| -}
|
| -
|
| void FilterCollection::AddAudioDecoder(AudioDecoder* audio_decoder) {
|
| audio_decoders_.push_back(audio_decoder);
|
| }
|
|
|
| -void FilterCollection::AddVideoRenderer(VideoRenderer* filter) {
|
| - AddFilter(VIDEO_RENDERER, filter);
|
| +void FilterCollection::AddVideoDecoder(VideoDecoder* video_decoder) {
|
| + video_decoders_.push_back(video_decoder);
|
| }
|
|
|
| void FilterCollection::AddAudioRenderer(AudioRenderer* filter) {
|
| AddFilter(AUDIO_RENDERER, filter);
|
| }
|
|
|
| +void FilterCollection::AddVideoRenderer(VideoRenderer* filter) {
|
| + AddFilter(VIDEO_RENDERER, filter);
|
| +}
|
| +
|
| bool FilterCollection::IsEmpty() const {
|
| - return filters_.empty() && audio_decoders_.empty();
|
| + return filters_.empty() && audio_decoders_.empty() && video_decoders_.empty();
|
| }
|
|
|
| void FilterCollection::Clear() {
|
| @@ -47,11 +47,6 @@ void FilterCollection::Clear() {
|
| audio_decoders_.clear();
|
| }
|
|
|
| -void FilterCollection::SelectVideoDecoder(
|
| - scoped_refptr<VideoDecoder>* filter_out) {
|
| - SelectFilter<VIDEO_DECODER>(filter_out);
|
| -}
|
| -
|
| void FilterCollection::SelectAudioDecoder(scoped_refptr<AudioDecoder>* out) {
|
| if (audio_decoders_.empty()) {
|
| *out = NULL;
|
| @@ -61,9 +56,13 @@ void FilterCollection::SelectAudioDecoder(scoped_refptr<AudioDecoder>* out) {
|
| audio_decoders_.pop_front();
|
| }
|
|
|
| -void FilterCollection::SelectVideoRenderer(
|
| - scoped_refptr<VideoRenderer>* filter_out) {
|
| - SelectFilter<VIDEO_RENDERER>(filter_out);
|
| +void FilterCollection::SelectVideoDecoder(scoped_refptr<VideoDecoder>* out) {
|
| + if (video_decoders_.empty()) {
|
| + *out = NULL;
|
| + return;
|
| + }
|
| + *out = video_decoders_.front();
|
| + video_decoders_.pop_front();
|
| }
|
|
|
| void FilterCollection::SelectAudioRenderer(
|
| @@ -71,6 +70,11 @@ void FilterCollection::SelectAudioRenderer(
|
| SelectFilter<AUDIO_RENDERER>(filter_out);
|
| }
|
|
|
| +void FilterCollection::SelectVideoRenderer(
|
| + scoped_refptr<VideoRenderer>* filter_out) {
|
| + SelectFilter<VIDEO_RENDERER>(filter_out);
|
| +}
|
| +
|
| void FilterCollection::AddFilter(FilterType filter_type,
|
| Filter* filter) {
|
| filters_.push_back(FilterListElement(filter_type, filter));
|
|
|