Chromium Code Reviews| Index: ppapi/api/dev/ppb_content_decryptor_dev.idl |
| diff --git a/ppapi/api/dev/ppb_content_decryptor_dev.idl b/ppapi/api/dev/ppb_content_decryptor_dev.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e19dc9c8bbce8352a1c46d016e503a5afc8b9985 |
| --- /dev/null |
| +++ b/ppapi/api/dev/ppb_content_decryptor_dev.idl |
| @@ -0,0 +1,95 @@ |
| +/* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +/** |
| + * This file defines the <code>PPP_ContentDecryptor_Dev</code> |
|
dmichael (off chromium)
2012/07/31 03:36:31
nit: PPB
Tom Finegan
2012/08/01 04:19:22
Done.
|
| + * interface. |
| + */ |
| +label Chrome { |
| + M22 = 0.1 |
| +}; |
| + |
| +/** |
| + * <code>PPB_ContentDecryptor_Dev</code> structure contains the function |
| + * pointers the browser may implement to support plugins implementing the |
|
dmichael (off chromium)
2012/07/31 03:36:31
why "may" implement? Can the browser choose to not
Tom Finegan
2012/08/01 04:19:22
That should have said MUST-- I missed an earlier c
|
| + * <code>PPP_ContentDecryptor_Dev</code> interface. |
|
dmichael (off chromium)
2012/07/31 03:36:31
Can you describe more about what this API is for?
Tom Finegan
2012/08/01 04:19:22
EME and PPAPI CDM design links sent offline.
dmichael (off chromium)
2012/08/08 03:38:10
I mean in the documentation :-)
I don't want othe
|
| + */ |
| +interface PPB_ContentDecryptor_Dev { |
| + |
| + /** |
| + * A key or license is needed to decrypt media data. |
|
dmichael (off chromium)
2012/07/31 03:36:31
Can you rephrase this to say what the method actua
Tom Finegan
2012/08/02 01:12:04
Done.
|
| + */ |
| + void NeedKey( |
| + [in] PP_Instance instance, |
| + [in] PP_Var key_system, /* String. */ |
| + [in] PP_Var session_id, /* String. */ |
| + [in] PP_Resource init_data); /* PPB_Buffer. */ |
| + |
| + /** |
| + * A key has been added as the result of a call to the <code>AddKey()</code> |
| + * method on the <code>PPP_ContentDecryptor_Dev</code> interface. |
|
dmichael (off chromium)
2012/07/31 03:36:31
If Chrome is calling AddKey first, why would the c
Tom Finegan
2012/08/02 01:12:04
AddKey is asynchronous, so all the browser will kn
|
| + */ |
| + void KeyAdded( |
| + [in] PP_Instance instance, |
| + [in] PP_Var key_system, /* String. */ |
| + [in] PP_Var session_id); /* String. */ |
| + |
| + /** |
| + * A message or request has been generated by or for key_system. For example, |
|
dmichael (off chromium)
2012/07/31 03:36:31
Again, I'd rather an active voice statement of wha
Tom Finegan
2012/08/02 01:12:04
I tweaked the comment to make this a little bit mo
|
| + * a key request has been generated as the result of call to the |
| + * <code>GenerateKeyRequest()</code> method on the |
| + * <code>PPP_ContentDecryptor_Dev</code> interface or another message |
| + * must be sent in response to an <code>AddKey()</code> call. Note that |
| + * <code>KeyMessage</code> can be used for purposes other than results to |
| + * <code>AddKey()</code> calls. |
| + */ |
| + void KeyMessage( |
| + [in] PP_Instance instance, |
| + [in] PP_Var key_system, /* String. */ |
| + [in] PP_Var session_id, /* String. */ |
| + [in] PP_Resource message, /* PPB_Buffer. */ |
| + [in] PP_Var default_url); /* String. */ |
| + |
| + /** |
| + * An error occured in a <code>PPP_ContentDecryptor_Dev</code> method, |
| + * or within the plugin implementing the interface. |
| + */ |
| + void KeyError( |
| + [in] PP_Instance instance, |
| + [in] PP_Var key_system, /* String. */ |
| + [in] PP_Var session_id, /* String. */ |
| + [in] uint16_t media_error, |
| + [in] uint16_t system_error); |
|
dmichael (off chromium)
2012/07/31 03:36:31
We tend to use int32_t for error codes... are the
Tom Finegan
2012/08/01 04:19:22
Done.
|
| + |
| + /** |
| + * Called after the <code>Decrypt</code> method on the |
| + * <code>PPP_ContentDecryptor_Dev</code> interface completes to |
| + * deliver decrypted_block to the media stack. |
| + */ |
| + void DeliverBlock( |
| + [in] PP_Instance instance, |
| + [in] PP_Resource decrypted_block, /* PPB_Buffer. */ |
| + [in] PP_CompletionCallback callback); |
| + |
| + /** |
| + * Called after the <code>DecryptAndDecode</code> method on the |
| + * <code>PPP_ContentDecryptor_Dev</code> interface completes to |
| + * deliver decrypted_frame to the media stack. |
| + */ |
| + void DeliverFrame( |
| + [in] PP_Instance instance, |
| + [in] PP_Resource decrypted_frame, /* PPB_Buffer. */ |
| + [in] PP_CompletionCallback callback); |
| + |
| + /** |
| + * Called after the <code>DecryptAndDecode</code> method on the |
| + * <code>PPP_ContentDecryptor_Dev</code> interface completes to |
| + * deliver decrypted_samples to the media stack. |
| + */ |
| + void DeliverSamples( |
| + [in] PP_Instance instance, |
| + [in] PP_Resource decrypted_samples, /* PPB_Buffer. */ |
| + [in] PP_CompletionCallback callback); |
| +}; |