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 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // This method can be called any time after Initialize{Audio|Video}Decoder() | 154 // This method can be called any time after Initialize{Audio|Video}Decoder() |
155 // has been called (with the correct stream type). | 155 // has been called (with the correct stream type). |
156 // After this operation, the decoder is set to an uninitialized state. | 156 // After this operation, the decoder is set to an uninitialized state. |
157 // The decoder can be reinitialized after it is uninitialized. | 157 // The decoder can be reinitialized after it is uninitialized. |
158 virtual void DeinitializeDecoder(StreamType stream_type) = 0; | 158 virtual void DeinitializeDecoder(StreamType stream_type) = 0; |
159 | 159 |
160 private: | 160 private: |
161 DISALLOW_COPY_AND_ASSIGN(Decryptor); | 161 DISALLOW_COPY_AND_ASSIGN(Decryptor); |
162 }; | 162 }; |
163 | 163 |
164 // Callback to notify that a decryptor is ready. | 164 // Callback to notify that the decryptor has been completely attached into the |
165 typedef base::Callback<void(Decryptor*)> DecryptorReadyCB; | 165 // pipeline. Parameter indicates whether the operation succeeded. |
| 166 typedef base::Callback<void(bool)> DecryptorAttachedCB; |
| 167 |
| 168 // Callback to notify that a decryptor is ready. DecryptorAttachedCB is called |
| 169 // when the decryptor has been completely inserted into the pipeline. |
| 170 typedef base::Callback<void(Decryptor*, const DecryptorAttachedCB&)> |
| 171 DecryptorReadyCB; |
166 | 172 |
167 // Callback to set/cancel a DecryptorReadyCB. | 173 // Callback to set/cancel a DecryptorReadyCB. |
168 // Calling this callback with a non-null callback registers decryptor ready | 174 // Calling this callback with a non-null callback registers decryptor ready |
169 // notification. When the decryptor is ready, notification will be sent | 175 // notification. When the decryptor is ready, notification will be sent |
170 // through the provided callback. | 176 // through the provided callback. |
171 // Calling this callback with a null callback cancels previously registered | 177 // Calling this callback with a null callback cancels previously registered |
172 // decryptor ready notification. Any previously provided callback will be | 178 // decryptor ready notification. Any previously provided callback will be |
173 // fired immediately with NULL. | 179 // fired immediately with NULL. |
174 typedef base::Callback<void(const DecryptorReadyCB&)> SetDecryptorReadyCB; | 180 typedef base::Callback<void(const DecryptorReadyCB&)> SetDecryptorReadyCB; |
175 | 181 |
176 } // namespace media | 182 } // namespace media |
177 | 183 |
178 #endif // MEDIA_BASE_DECRYPTOR_H_ | 184 #endif // MEDIA_BASE_DECRYPTOR_H_ |
OLD | NEW |