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

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

Issue 7867051: Introduce AudioDecoderConfig to migrate away from GetAVStream(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forgot files Created 9 years, 3 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
OLDNEW
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 // Filters are connected in a strongly typed manner, with downstream filters 5 // Filters are connected in a strongly typed manner, with downstream filters
6 // always reading data from upstream filters. Upstream filters have no clue 6 // always reading data from upstream filters. Upstream filters have no clue
7 // who is actually reading from them, and return the results via callbacks. 7 // who is actually reading from them, and return the results via callbacks.
8 // 8 //
9 // DemuxerStream(Video) <- VideoDecoder <- VideoRenderer 9 // DemuxerStream(Video) <- VideoDecoder <- VideoRenderer
10 // DataSource <- Demuxer < 10 // DataSource <- Demuxer <
(...skipping 22 matching lines...) Expand all
33 #include "base/time.h" 33 #include "base/time.h"
34 #include "media/base/channel_layout.h" 34 #include "media/base/channel_layout.h"
35 #include "media/base/media_export.h" 35 #include "media/base/media_export.h"
36 #include "media/base/pipeline_status.h" 36 #include "media/base/pipeline_status.h"
37 #include "media/base/video_frame.h" 37 #include "media/base/video_frame.h"
38 38
39 struct AVStream; 39 struct AVStream;
40 40
41 namespace media { 41 namespace media {
42 42
43 class AudioDecoderConfig;
43 class Buffer; 44 class Buffer;
44 class Decoder; 45 class Decoder;
45 class DemuxerStream; 46 class DemuxerStream;
46 class Filter; 47 class Filter;
47 class FilterHost; 48 class FilterHost;
48 49
49 struct PipelineStatistics; 50 struct PipelineStatistics;
50 51
51 // Used to specify video preload states. They are "hints" to the browser about 52 // Used to specify video preload states. They are "hints" to the browser about
52 // how aggressively the browser should load and buffer data. 53 // how aggressively the browser should load and buffer data.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 UNKNOWN, 170 UNKNOWN,
170 AUDIO, 171 AUDIO,
171 VIDEO, 172 VIDEO,
172 NUM_TYPES, // Always keep this entry as the last one! 173 NUM_TYPES, // Always keep this entry as the last one!
173 }; 174 };
174 175
175 // Schedules a read. When the |read_callback| is called, the downstream 176 // Schedules a read. When the |read_callback| is called, the downstream
176 // filter takes ownership of the buffer by AddRef()'ing the buffer. 177 // filter takes ownership of the buffer by AddRef()'ing the buffer.
177 virtual void Read(const ReadCallback& read_callback) = 0; 178 virtual void Read(const ReadCallback& read_callback) = 0;
178 179
179 // Returns an |AVStream*| if supported, or NULL. 180 // Returns an |AVStream*| if supported, or NULL.
Ami GONE FROM CHROMIUM 2011/09/12 20:54:21 Is there a chance to remove this at the same time?
scherkus (not reviewing) 2011/09/19 21:19:45 Not yet :\
Ami GONE FROM CHROMIUM 2011/09/29 18:16:35 How about now that AdaptiveDemuxer is dead? :)
180 virtual AVStream* GetAVStream(); 181 virtual AVStream* GetAVStream();
181 182
183 // Returns a weak reference to the audio decoder configuration if present,
Ami GONE FROM CHROMIUM 2011/09/12 20:54:21 "weak reference"??
184 // NULL otherwise.
185 virtual AudioDecoderConfig* audio_decoder_config() = 0;
186
182 // Returns the type of stream. 187 // Returns the type of stream.
183 virtual Type type() = 0; 188 virtual Type type() = 0;
184 189
185 virtual void EnableBitstreamConverter() = 0; 190 virtual void EnableBitstreamConverter() = 0;
186 191
187 protected: 192 protected:
188 friend class base::RefCountedThreadSafe<DemuxerStream>; 193 friend class base::RefCountedThreadSafe<DemuxerStream>;
189 virtual ~DemuxerStream(); 194 virtual ~DemuxerStream();
190 }; 195 };
191 196
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // buffer. 317 // buffer.
313 virtual bool HasEnded() = 0; 318 virtual bool HasEnded() = 0;
314 319
315 // Sets the output volume. 320 // Sets the output volume.
316 virtual void SetVolume(float volume) = 0; 321 virtual void SetVolume(float volume) = 0;
317 }; 322 };
318 323
319 } // namespace media 324 } // namespace media
320 325
321 #endif // MEDIA_BASE_FILTERS_H_ 326 #endif // MEDIA_BASE_FILTERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698