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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 kUninitialized = 0, | 59 kUninitialized = 0, |
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(). |insert_done_cb| is called |
ddorwin
2014/08/04 18:59:08
ditto on naming.
jrummell
2014/08/07 01:54:25
Done.
| |
70 void SetDecryptor(Decryptor* decryptor); | 70 // when the decryptor has been completely inserted into the pipeline. |
71 void SetDecryptor(Decryptor* decryptor, | |
72 const DecryptorInsertedCB& insert_done_cb); | |
71 | 73 |
72 // Initializes the audio decoder on the |decryptor_| with |config_|. | 74 // Initializes the audio decoder on the |decryptor_| with |config_|. |
73 void InitializeDecoder(); | 75 void InitializeDecoder(); |
74 | 76 |
75 // Callback for Decryptor::InitializeAudioDecoder() during initialization. | 77 // Callback for Decryptor::InitializeAudioDecoder() during initialization. |
76 void FinishInitialization(bool success); | 78 void FinishInitialization(bool success); |
77 | 79 |
78 void DecodePendingBuffer(); | 80 void DecodePendingBuffer(); |
79 | 81 |
80 // Callback for Decryptor::DecryptAndDecodeAudio(). | 82 // 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. | 126 // NOTE: Weak pointers must be invalidated before all other member variables. |
125 base::WeakPtrFactory<DecryptingAudioDecoder> weak_factory_; | 127 base::WeakPtrFactory<DecryptingAudioDecoder> weak_factory_; |
126 base::WeakPtr<DecryptingAudioDecoder> weak_this_; | 128 base::WeakPtr<DecryptingAudioDecoder> weak_this_; |
127 | 129 |
128 DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder); | 130 DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder); |
129 }; | 131 }; |
130 | 132 |
131 } // namespace media | 133 } // namespace media |
132 | 134 |
133 #endif // MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ | 135 #endif // MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ |
OLD | NEW |