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

Side by Side Diff: media/base/filter_collection.h

Issue 14348007: Reland: Remove reference counting from media::VideoDecoder and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/base/filter_collection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_
OLDNEW
« no previous file with comments | « no previous file | media/base/filter_collection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698