Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(494)

Unified Diff: media/base/filter_collection.h

Issue 12262058: Revert r180578, r180591, and r180604 from 1410 branch. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1410/src/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/audio_renderer.h ('k') | media/base/filter_collection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/filter_collection.h
===================================================================
--- media/base/filter_collection.h (revision 182591)
+++ media/base/filter_collection.h (working copy)
@@ -8,7 +8,6 @@
#include <list>
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "media/base/media_export.h"
namespace media {
@@ -32,18 +31,25 @@
FilterCollection();
~FilterCollection();
+ // Demuxer accessor methods.
void SetDemuxer(const scoped_refptr<Demuxer>& demuxer);
const scoped_refptr<Demuxer>& GetDemuxer();
- void SetAudioRenderer(scoped_ptr<AudioRenderer> audio_renderer);
- scoped_ptr<AudioRenderer> GetAudioRenderer();
+ // Adds a filter to the collection.
+ void AddAudioDecoder(AudioDecoder* audio_decoder);
+ void AddAudioRenderer(AudioRenderer* audio_renderer);
+ void AddVideoRenderer(VideoRenderer* video_renderer);
- void SetVideoRenderer(scoped_ptr<VideoRenderer> video_renderer);
- scoped_ptr<VideoRenderer> GetVideoRenderer();
-
// Remove remaining filters.
void Clear();
+ // Selects a filter of the specified type from the collection.
+ // If the required filter cannot be found, NULL is returned.
+ // If a filter is returned it is removed from the collection.
+ // Filters are selected in FIFO order.
+ void SelectAudioRenderer(scoped_refptr<AudioRenderer>* out);
+ void SelectVideoRenderer(scoped_refptr<VideoRenderer>* out);
+
AudioDecoderList* GetAudioDecoders();
VideoDecoderList* GetVideoDecoders();
@@ -51,8 +57,8 @@
scoped_refptr<Demuxer> demuxer_;
AudioDecoderList audio_decoders_;
VideoDecoderList video_decoders_;
- scoped_ptr<AudioRenderer> audio_renderer_;
- scoped_ptr<VideoRenderer> video_renderer_;
+ std::list<scoped_refptr<AudioRenderer> > audio_renderers_;
+ std::list<scoped_refptr<VideoRenderer> > video_renderers_;
DISALLOW_COPY_AND_ASSIGN(FilterCollection);
};
« no previous file with comments | « media/base/audio_renderer.h ('k') | media/base/filter_collection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698