OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 module media.interfaces; | 5 module media.interfaces; |
6 | 6 |
7 import "media/mojo/interfaces/demuxer_stream.mojom"; | 7 import "media/mojo/interfaces/demuxer_stream.mojom"; |
8 import "media/mojo/interfaces/media_types.mojom"; | 8 import "media/mojo/interfaces/media_types.mojom"; |
9 | 9 |
| 10 // TODO(xhwang): Add mojo types for AudioBuffer and VideoFrame. |
| 11 struct AudioBuffer {}; |
| 12 struct VideoFrame {}; |
| 13 |
10 // Interface for decrypting (and decoding) encrypted streams. | 14 // Interface for decrypting (and decoding) encrypted streams. |
11 // See media/base/decryptor.h for details. | 15 // See media/base/decryptor.h for details. |
12 interface Decryptor { | 16 interface Decryptor { |
13 // Status of a decrypt or decrypt-and-decode operation. The returned | 17 // Status of a decrypt or decrypt-and-decode operation. The returned |
14 // buffer/frame of such an operation is NOT null iff the status is SUCCESS. | 18 // buffer/frame of such an operation is NOT null iff the status is SUCCESS. |
15 enum Status { | 19 enum Status { |
16 SUCCESS, // Successfully completed. Decrypted buffer ready. | 20 SUCCESS, // Successfully completed. Decrypted buffer ready. |
17 NO_KEY, // No key is available to decrypt. | 21 NO_KEY, // No key is available to decrypt. |
18 NEED_MORE_DATA, // Decoder needs more data to produce an output. | 22 NEED_MORE_DATA, // Decoder needs more data to produce an output. |
19 ERROR // Key is available but an error occurred during decryption. | 23 ERROR // Key is available but an error occurred during decryption. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // After this operation, the decoder is set to an uninitialized state. | 64 // After this operation, the decoder is set to an uninitialized state. |
61 // The decoder can be reinitialized after it is deinitialized. | 65 // The decoder can be reinitialized after it is deinitialized. |
62 DeinitializeDecoder(DemuxerStream.Type stream_type); | 66 DeinitializeDecoder(DemuxerStream.Type stream_type); |
63 }; | 67 }; |
64 | 68 |
65 interface DecryptorClient { | 69 interface DecryptorClient { |
66 // Indicates that a new usable key is available in the CDM associated with the | 70 // Indicates that a new usable key is available in the CDM associated with the |
67 // Decryptor. | 71 // Decryptor. |
68 OnNewUsableKey(); | 72 OnNewUsableKey(); |
69 }; | 73 }; |
OLD | NEW |