| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "media/base/filters.h" | 11 #include "media/base/filters.h" |
| 12 #include "media/base/filter_factories.h" | 12 #include "media/base/filter_factories.h" |
| 13 | 13 |
| 14 namespace media { | 14 namespace media { |
| 15 | 15 |
| 16 // This is a collection of Filter objects used to form a media playback | 16 // This is a collection of Filter objects used to form a media playback |
| 17 // pipeline. See src/media/base/pipeline.h for more information. | 17 // pipeline. See src/media/base/pipeline.h for more information. |
| 18 class MEDIA_EXPORT FilterCollection { | 18 class MEDIA_EXPORT FilterCollection { |
| 19 public: | 19 public: |
| 20 FilterCollection(); | 20 FilterCollection(); |
| 21 ~FilterCollection(); | 21 ~FilterCollection(); |
| 22 | 22 |
| 23 // DemuxerFactory accessor methods. | 23 // DemuxerFactory accessor methods. |
| 24 // FilterCollection takes ownership of the factory here. | 24 void SetDemuxerFactory(scoped_ptr<DemuxerFactory> factory); |
| 25 void SetDemuxerFactory(DemuxerFactory* factory); | |
| 26 DemuxerFactory* GetDemuxerFactory(); | 25 DemuxerFactory* GetDemuxerFactory(); |
| 27 | 26 |
| 28 // Adds a filter to the collection. | 27 // Adds a filter to the collection. |
| 29 void AddVideoDecoder(VideoDecoder* filter); | 28 void AddVideoDecoder(VideoDecoder* filter); |
| 30 void AddAudioDecoder(AudioDecoder* filter); | 29 void AddAudioDecoder(AudioDecoder* filter); |
| 31 void AddVideoRenderer(VideoRenderer* filter); | 30 void AddVideoRenderer(VideoRenderer* filter); |
| 32 void AddAudioRenderer(AudioRenderer* filter); | 31 void AddAudioRenderer(AudioRenderer* filter); |
| 33 | 32 |
| 34 // Is the collection empty? | 33 // Is the collection empty? |
| 35 bool IsEmpty() const; | 34 bool IsEmpty() const; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 72 |
| 74 // Helper function that searches the filters list for a specific filter type. | 73 // Helper function that searches the filters list for a specific filter type. |
| 75 void SelectFilter(FilterType filter_type, scoped_refptr<Filter>* filter_out); | 74 void SelectFilter(FilterType filter_type, scoped_refptr<Filter>* filter_out); |
| 76 | 75 |
| 77 DISALLOW_COPY_AND_ASSIGN(FilterCollection); | 76 DISALLOW_COPY_AND_ASSIGN(FilterCollection); |
| 78 }; | 77 }; |
| 79 | 78 |
| 80 } // namespace media | 79 } // namespace media |
| 81 | 80 |
| 82 #endif // MEDIA_BASE_FILTER_COLLECTION_H_ | 81 #endif // MEDIA_BASE_FILTER_COLLECTION_H_ |
| OLD | NEW |