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 "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 kDecryptorRequested, | 60 kDecryptorRequested, |
61 kPendingDecoderInit, | 61 kPendingDecoderInit, |
62 kIdle, | 62 kIdle, |
63 kPendingDecode, | 63 kPendingDecode, |
64 kWaitingForKey, | 64 kWaitingForKey, |
65 kDecodeFinished, | 65 kDecodeFinished, |
66 kError | 66 kError |
67 }; | 67 }; |
68 | 68 |
69 // Callback for DecryptorHost::RequestDecryptor(). | 69 // Callback for DecryptorHost::RequestDecryptor(). |
70 void SetDecryptor(Decryptor* decryptor); | 70 void SetDecryptor(Decryptor* decryptor, base::Closure done_cb); |
71 | 71 |
72 // Initializes the audio decoder on the |decryptor_| with |config_|. | 72 // Initializes the audio decoder on the |decryptor_| with |config_|. |
73 void InitializeDecoder(); | 73 void InitializeDecoder(); |
74 | 74 |
75 // Callback for Decryptor::InitializeAudioDecoder() during initialization. | 75 // Callback for Decryptor::InitializeAudioDecoder() during initialization. |
76 void FinishInitialization(bool success); | 76 void FinishInitialization(bool success); |
77 | 77 |
78 void DecodePendingBuffer(); | 78 void DecodePendingBuffer(); |
79 | 79 |
80 // Callback for Decryptor::DecryptAndDecodeAudio(). | 80 // Callback for Decryptor::DecryptAndDecodeAudio(). |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // NOTE: Weak pointers must be invalidated before all other member variables. | 124 // NOTE: Weak pointers must be invalidated before all other member variables. |
125 base::WeakPtrFactory<DecryptingAudioDecoder> weak_factory_; | 125 base::WeakPtrFactory<DecryptingAudioDecoder> weak_factory_; |
126 base::WeakPtr<DecryptingAudioDecoder> weak_this_; | 126 base::WeakPtr<DecryptingAudioDecoder> weak_this_; |
127 | 127 |
128 DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder); | 128 DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder); |
129 }; | 129 }; |
130 | 130 |
131 } // namespace media | 131 } // namespace media |
132 | 132 |
133 #endif // MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ | 133 #endif // MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ |
OLD | NEW |