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