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

Side by Side Diff: media/filters/android/media_codec_audio_decoder.h

Issue 2572573007: Use passthrough decoder for (E)AC3 formats (Closed)
Patch Set: Sanity checks Created 3 years, 7 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
« no previous file with comments | « media/base/mime_util_unittest.cc ('k') | media/filters/android/media_codec_audio_decoder.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_FILTERS_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_
6 #define MEDIA_FILTERS_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_ 6 #define MEDIA_FILTERS_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // The queue of encoded (and maybe encrypted) buffers. The MediaCodec might 161 // The queue of encoded (and maybe encrypted) buffers. The MediaCodec might
162 // not be able to accept the input at the time of Decode(), thus all 162 // not be able to accept the input at the time of Decode(), thus all
163 // DecoderBuffers first go to |input_queue_|. 163 // DecoderBuffers first go to |input_queue_|.
164 using BufferCBPair = std::pair<scoped_refptr<DecoderBuffer>, DecodeCB>; 164 using BufferCBPair = std::pair<scoped_refptr<DecoderBuffer>, DecodeCB>;
165 using InputQueue = std::deque<BufferCBPair>; 165 using InputQueue = std::deque<BufferCBPair>;
166 InputQueue input_queue_; 166 InputQueue input_queue_;
167 167
168 // Cached decoder config. 168 // Cached decoder config.
169 AudioDecoderConfig config_; 169 AudioDecoderConfig config_;
170 170
171 // Indication to use passthrough decoder or not.
172 bool is_passthrough_;
173
174 // The audio sample format of the audio decoder output.
175 SampleFormat sample_format_;
176
171 // Actual channel count that comes from decoder may be different than config. 177 // Actual channel count that comes from decoder may be different than config.
172 int channel_count_; 178 int channel_count_;
173 ChannelLayout channel_layout_; 179 ChannelLayout channel_layout_;
174 180
175 // Actual sample rate that comes from the decoder, may be different than 181 // Actual sample rate that comes from the decoder, may be different than
176 // config. 182 // config.
177 int sample_rate_; 183 int sample_rate_;
178 184
179 // Callback that delivers output frames. 185 // Callback that delivers output frames.
180 OutputCB output_cb_; 186 OutputCB output_cb_;
(...skipping 20 matching lines...) Expand all
201 media::MediaDrmBridgeCdmContext::JavaObjectPtr media_crypto_; 207 media::MediaDrmBridgeCdmContext::JavaObjectPtr media_crypto_;
202 208
203 base::WeakPtrFactory<MediaCodecAudioDecoder> weak_factory_; 209 base::WeakPtrFactory<MediaCodecAudioDecoder> weak_factory_;
204 210
205 DISALLOW_COPY_AND_ASSIGN(MediaCodecAudioDecoder); 211 DISALLOW_COPY_AND_ASSIGN(MediaCodecAudioDecoder);
206 }; 212 };
207 213
208 } // namespace media 214 } // namespace media
209 215
210 #endif // MEDIA_FILTERS_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_ 216 #endif // MEDIA_FILTERS_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_
OLDNEW
« no previous file with comments | « media/base/mime_util_unittest.cc ('k') | media/filters/android/media_codec_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698