| 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 MEDIA_BASE_FILTER_COLLECTION_H_ | 5 #ifndef MEDIA_BASE_FILTER_COLLECTION_H_ |
| 6 #define MEDIA_BASE_FILTER_COLLECTION_H_ | 6 #define MEDIA_BASE_FILTER_COLLECTION_H_ |
| 7 | 7 |
| 8 #include <list> | |
| 9 | |
| 10 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 12 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
| 13 | 11 |
| 14 namespace media { | 12 namespace media { |
| 15 | 13 |
| 16 class AudioRenderer; | 14 class AudioRenderer; |
| 17 class Demuxer; | 15 class Demuxer; |
| 18 class VideoDecoder; | |
| 19 class VideoRenderer; | 16 class VideoRenderer; |
| 20 | 17 |
| 21 // Represents a set of uninitialized demuxer and audio/video decoders and | 18 // Represents a set of uninitialized demuxer and audio/video decoders and |
| 22 // renderers. Used to start a Pipeline object for media playback. | 19 // renderers. Used to start a Pipeline object for media playback. |
| 23 // | 20 // |
| 24 // TODO(scherkus): Replace FilterCollection with something sensible, see | 21 // TODO(scherkus): Replace FilterCollection with something sensible, see |
| 25 // http://crbug.com/110800 | 22 // http://crbug.com/110800 |
| 26 class MEDIA_EXPORT FilterCollection { | 23 class MEDIA_EXPORT FilterCollection { |
| 27 public: | 24 public: |
| 28 typedef std::list<scoped_refptr<VideoDecoder> > VideoDecoderList; | |
| 29 | |
| 30 FilterCollection(); | 25 FilterCollection(); |
| 31 ~FilterCollection(); | 26 ~FilterCollection(); |
| 32 | 27 |
| 33 void SetDemuxer(const scoped_refptr<Demuxer>& demuxer); | 28 void SetDemuxer(const scoped_refptr<Demuxer>& demuxer); |
| 34 const scoped_refptr<Demuxer>& GetDemuxer(); | 29 const scoped_refptr<Demuxer>& GetDemuxer(); |
| 35 | 30 |
| 36 void SetAudioRenderer(scoped_ptr<AudioRenderer> audio_renderer); | 31 void SetAudioRenderer(scoped_ptr<AudioRenderer> audio_renderer); |
| 37 scoped_ptr<AudioRenderer> GetAudioRenderer(); | 32 scoped_ptr<AudioRenderer> GetAudioRenderer(); |
| 38 | 33 |
| 39 void SetVideoRenderer(scoped_ptr<VideoRenderer> video_renderer); | 34 void SetVideoRenderer(scoped_ptr<VideoRenderer> video_renderer); |
| 40 scoped_ptr<VideoRenderer> GetVideoRenderer(); | 35 scoped_ptr<VideoRenderer> GetVideoRenderer(); |
| 41 | 36 |
| 42 VideoDecoderList* GetVideoDecoders(); | |
| 43 | |
| 44 private: | 37 private: |
| 45 scoped_refptr<Demuxer> demuxer_; | 38 scoped_refptr<Demuxer> demuxer_; |
| 46 VideoDecoderList video_decoders_; | |
| 47 scoped_ptr<AudioRenderer> audio_renderer_; | 39 scoped_ptr<AudioRenderer> audio_renderer_; |
| 48 scoped_ptr<VideoRenderer> video_renderer_; | 40 scoped_ptr<VideoRenderer> video_renderer_; |
| 49 | 41 |
| 50 DISALLOW_COPY_AND_ASSIGN(FilterCollection); | 42 DISALLOW_COPY_AND_ASSIGN(FilterCollection); |
| 51 }; | 43 }; |
| 52 | 44 |
| 53 } // namespace media | 45 } // namespace media |
| 54 | 46 |
| 55 #endif // MEDIA_BASE_FILTER_COLLECTION_H_ | 47 #endif // MEDIA_BASE_FILTER_COLLECTION_H_ |
| OLD | NEW |