| OLD | NEW |
| 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 Loading... |
| 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 17 matching lines...) Expand all Loading... |
| 198 media::MediaDrmBridgeCdmContext::JavaObjectPtr media_crypto_; | 204 media::MediaDrmBridgeCdmContext::JavaObjectPtr media_crypto_; |
| 199 | 205 |
| 200 base::WeakPtrFactory<MediaCodecAudioDecoder> weak_factory_; | 206 base::WeakPtrFactory<MediaCodecAudioDecoder> weak_factory_; |
| 201 | 207 |
| 202 DISALLOW_COPY_AND_ASSIGN(MediaCodecAudioDecoder); | 208 DISALLOW_COPY_AND_ASSIGN(MediaCodecAudioDecoder); |
| 203 }; | 209 }; |
| 204 | 210 |
| 205 } // namespace media | 211 } // namespace media |
| 206 | 212 |
| 207 #endif // MEDIA_FILTERS_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_ | 213 #endif // MEDIA_FILTERS_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_ |
| OLD | NEW |