Chromium Code Reviews| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 void SetDecryptor(Decryptor* decryptor); | 88 void SetDecryptor(Decryptor* decryptor); |
| 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(). | |
| 99 void DecryptAndDecodeBuffer(DemuxerStream::Status status, | |
| 100 const scoped_refptr<DecoderBuffer>& buffer); | |
| 101 | |
| 102 // Carries out the buffer decrypting/decoding operation scheduled by | 98 // Carries out the buffer decrypting/decoding operation scheduled by |
| 103 // DecryptAndDecodeBuffer(). | 99 // DecryptAndDecodeBuffer(). |
|
xhwang
2012/11/20 17:54:34
update this comment.
scherkus (not reviewing)
2012/11/20 19:16:07
Done.
| |
| 104 void DoDecryptAndDecodeBuffer(DemuxerStream::Status status, | 100 void DoDecryptAndDecodeBuffer(DemuxerStream::Status status, |
| 105 const scoped_refptr<DecoderBuffer>& buffer); | 101 const scoped_refptr<DecoderBuffer>& buffer); |
| 106 | 102 |
| 107 void DecodePendingBuffer(); | 103 void DecodePendingBuffer(); |
| 108 | 104 |
| 109 // Callback for Decryptor::DecryptAndDecodeAudio(). | 105 // Callback for Decryptor::DecryptAndDecodeAudio(). |
| 110 void DeliverFrame(int buffer_size, | 106 void DeliverFrame(int buffer_size, |
| 111 Decryptor::Status status, | 107 Decryptor::Status status, |
| 112 const Decryptor::AudioBuffers& frames); | 108 const Decryptor::AudioBuffers& frames); |
| 113 | 109 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 171 | 167 |
| 172 base::TimeDelta output_timestamp_base_; | 168 base::TimeDelta output_timestamp_base_; |
| 173 int total_samples_decoded_; | 169 int total_samples_decoded_; |
| 174 | 170 |
| 175 DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder); | 171 DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder); |
| 176 }; | 172 }; |
| 177 | 173 |
| 178 } // namespace media | 174 } // namespace media |
| 179 | 175 |
| 180 #endif // MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ | 176 #endif // MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ |
| OLD | NEW |