| OLD | NEW |
| 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_FILTERS_DECRYPTING_AUDIO_DECODER_H_ | 5 #ifndef MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ |
| 6 #define MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ | 6 #define MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "media/base/audio_decoder.h" | 10 #include "media/base/audio_decoder.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 // Callback for Decryptor::InitializeAudioDecoder(). | 90 // Callback for Decryptor::InitializeAudioDecoder(). |
| 91 void FinishInitialization(bool success); | 91 void FinishInitialization(bool success); |
| 92 | 92 |
| 93 // Carries out the buffer reading operation scheduled by Read(). | 93 // Carries out the buffer reading operation scheduled by Read(). |
| 94 void DoRead(const ReadCB& read_cb); | 94 void DoRead(const ReadCB& read_cb); |
| 95 | 95 |
| 96 void ReadFromDemuxerStream(); | 96 void ReadFromDemuxerStream(); |
| 97 | 97 |
| 98 // Callback for DemuxerStream::Read(). | 98 // Callback for DemuxerStream::Read(). |
| 99 void DecryptAndDecodeBuffer(DemuxerStream::Status status, | |
| 100 const scoped_refptr<DecoderBuffer>& buffer); | |
| 101 | |
| 102 // Carries out the buffer decrypting/decoding operation scheduled by | |
| 103 // DecryptAndDecodeBuffer(). | |
| 104 void DoDecryptAndDecodeBuffer(DemuxerStream::Status status, | 99 void DoDecryptAndDecodeBuffer(DemuxerStream::Status status, |
| 105 const scoped_refptr<DecoderBuffer>& buffer); | 100 const scoped_refptr<DecoderBuffer>& buffer); |
| 106 | 101 |
| 107 void DecodePendingBuffer(); | 102 void DecodePendingBuffer(); |
| 108 | 103 |
| 109 // Callback for Decryptor::DecryptAndDecodeAudio(). | 104 // Callback for Decryptor::DecryptAndDecodeAudio(). |
| 110 void DeliverFrame(int buffer_size, | 105 void DeliverFrame(int buffer_size, |
| 111 Decryptor::Status status, | 106 Decryptor::Status status, |
| 112 const Decryptor::AudioBuffers& frames); | 107 const Decryptor::AudioBuffers& frames); |
| 113 | 108 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 166 |
| 172 base::TimeDelta output_timestamp_base_; | 167 base::TimeDelta output_timestamp_base_; |
| 173 int total_samples_decoded_; | 168 int total_samples_decoded_; |
| 174 | 169 |
| 175 DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder); | 170 DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder); |
| 176 }; | 171 }; |
| 177 | 172 |
| 178 } // namespace media | 173 } // namespace media |
| 179 | 174 |
| 180 #endif // MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ | 175 #endif // MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ |
| OLD | NEW |