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_BASE_DECRYPTOR_H_ | 5 #ifndef MEDIA_BASE_DECRYPTOR_H_ |
6 #define MEDIA_BASE_DECRYPTOR_H_ | 6 #define MEDIA_BASE_DECRYPTOR_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 // This method can be called any time after Initialize{Audio|Video}Decoder() | 197 // This method can be called any time after Initialize{Audio|Video}Decoder() |
198 // has been called (with the correct stream type). | 198 // has been called (with the correct stream type). |
199 // After this operation, the decoder is set to an uninitialized state. | 199 // After this operation, the decoder is set to an uninitialized state. |
200 // The decoder can be reinitialized after it is uninitialized. | 200 // The decoder can be reinitialized after it is uninitialized. |
201 virtual void DeinitializeDecoder(StreamType stream_type) = 0; | 201 virtual void DeinitializeDecoder(StreamType stream_type) = 0; |
202 | 202 |
203 private: | 203 private: |
204 DISALLOW_COPY_AND_ASSIGN(Decryptor); | 204 DISALLOW_COPY_AND_ASSIGN(Decryptor); |
205 }; | 205 }; |
206 | 206 |
| 207 // Callback to notify that a decryptor is ready. |
| 208 typedef base::Callback<void(Decryptor*)> DecryptorReadyCB; |
| 209 // Callback to request/cancel notification that a decryptor is ready. |
| 210 // Calling this callback with a non-null callback registers decryptor ready |
| 211 // notification. When the decryptor is ready, notification will be sent |
| 212 // through the provided callback. |
| 213 // Calling this callback with a null callback cancels previously registered |
| 214 // decryptor ready notification. Any previously provided callback will be |
| 215 // fired immediately with NULL. |
| 216 typedef base::Callback<void(const DecryptorReadyCB&)> SetDecryptorReadyCB; |
| 217 |
207 } // namespace media | 218 } // namespace media |
208 | 219 |
209 #endif // MEDIA_BASE_DECRYPTOR_H_ | 220 #endif // MEDIA_BASE_DECRYPTOR_H_ |
OLD | NEW |