Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: media/mojo/interfaces/decryptor.mojom

Issue 1004623009: media: Hook up ContentDecryptionModuleClient in mojo CDM service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 mojo; 5 module mojo;
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. 10 // TODO(xhwang): Add mojo types for AudioBuffer and VideoFrame.
11 struct AudioBuffer {}; 11 struct AudioBuffer {};
12 struct VideoFrame {}; 12 struct VideoFrame {};
13 13
14 // TODO(xhwang): Client syntax has been removed, so a new mechanism for client
15 // discovery must be added to this interface. See http://crbug.com/451321.
16
17 // Interface for decrypting (and decoding) encrypted streams. 14 // Interface for decrypting (and decoding) encrypted streams.
18 // See media/base/decryptor.h for details. 15 // See media/base/decryptor.h for details.
19 interface Decryptor { 16 interface Decryptor {
20 // Status of a decrypt or decrypt-and-decode operation. The returned 17 // Status of a decrypt or decrypt-and-decode operation. The returned
21 // 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.
22 enum Status { 19 enum Status {
23 SUCCESS, // Successfully completed. Decrypted buffer ready. 20 SUCCESS, // Successfully completed. Decrypted buffer ready.
24 NO_KEY, // No key is available to decrypt. 21 NO_KEY, // No key is available to decrypt.
25 NEED_MORE_DATA, // Decoder needs more data to produce an output. 22 NEED_MORE_DATA, // Decoder needs more data to produce an output.
26 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
67 // After this operation, the decoder is set to an uninitialized state. 64 // After this operation, the decoder is set to an uninitialized state.
68 // The decoder can be reinitialized after it is deinitialized. 65 // The decoder can be reinitialized after it is deinitialized.
69 DeinitializeDecoder(DemuxerStream.Type stream_type); 66 DeinitializeDecoder(DemuxerStream.Type stream_type);
70 }; 67 };
71 68
72 interface DecryptorClient { 69 interface DecryptorClient {
73 // 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
74 // Decryptor. 71 // Decryptor.
75 OnNewUsableKey(); 72 OnNewUsableKey();
76 }; 73 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698