OLD | NEW |
---|---|
(Empty) | |
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 | |
3 * found in the LICENSE file. | |
4 */ | |
5 | |
6 /** | |
7 * 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.
| |
8 * interface. | |
9 */ | |
10 label Chrome { | |
11 M22 = 0.1 | |
12 }; | |
13 | |
14 /** | |
15 * <code>PPB_ContentDecryptor_Dev</code> structure contains the function | |
16 * 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
| |
17 * <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
| |
18 */ | |
19 interface PPB_ContentDecryptor_Dev { | |
20 | |
21 /** | |
22 * 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.
| |
23 */ | |
24 void NeedKey( | |
25 [in] PP_Instance instance, | |
26 [in] PP_Var key_system, /* String. */ | |
27 [in] PP_Var session_id, /* String. */ | |
28 [in] PP_Resource init_data); /* PPB_Buffer. */ | |
29 | |
30 /** | |
31 * A key has been added as the result of a call to the <code>AddKey()</code> | |
32 * 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
| |
33 */ | |
34 void KeyAdded( | |
35 [in] PP_Instance instance, | |
36 [in] PP_Var key_system, /* String. */ | |
37 [in] PP_Var session_id); /* String. */ | |
38 | |
39 /** | |
40 * 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
| |
41 * a key request has been generated as the result of call to the | |
42 * <code>GenerateKeyRequest()</code> method on the | |
43 * <code>PPP_ContentDecryptor_Dev</code> interface or another message | |
44 * must be sent in response to an <code>AddKey()</code> call. Note that | |
45 * <code>KeyMessage</code> can be used for purposes other than results to | |
46 * <code>AddKey()</code> calls. | |
47 */ | |
48 void KeyMessage( | |
49 [in] PP_Instance instance, | |
50 [in] PP_Var key_system, /* String. */ | |
51 [in] PP_Var session_id, /* String. */ | |
52 [in] PP_Resource message, /* PPB_Buffer. */ | |
53 [in] PP_Var default_url); /* String. */ | |
54 | |
55 /** | |
56 * An error occured in a <code>PPP_ContentDecryptor_Dev</code> method, | |
57 * or within the plugin implementing the interface. | |
58 */ | |
59 void KeyError( | |
60 [in] PP_Instance instance, | |
61 [in] PP_Var key_system, /* String. */ | |
62 [in] PP_Var session_id, /* String. */ | |
63 [in] uint16_t media_error, | |
64 [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.
| |
65 | |
66 /** | |
67 * Called after the <code>Decrypt</code> method on the | |
68 * <code>PPP_ContentDecryptor_Dev</code> interface completes to | |
69 * deliver decrypted_block to the media stack. | |
70 */ | |
71 void DeliverBlock( | |
72 [in] PP_Instance instance, | |
73 [in] PP_Resource decrypted_block, /* PPB_Buffer. */ | |
74 [in] PP_CompletionCallback callback); | |
75 | |
76 /** | |
77 * Called after the <code>DecryptAndDecode</code> method on the | |
78 * <code>PPP_ContentDecryptor_Dev</code> interface completes to | |
79 * deliver decrypted_frame to the media stack. | |
80 */ | |
81 void DeliverFrame( | |
82 [in] PP_Instance instance, | |
83 [in] PP_Resource decrypted_frame, /* PPB_Buffer. */ | |
84 [in] PP_CompletionCallback callback); | |
85 | |
86 /** | |
87 * Called after the <code>DecryptAndDecode</code> method on the | |
88 * <code>PPP_ContentDecryptor_Dev</code> interface completes to | |
89 * deliver decrypted_samples to the media stack. | |
90 */ | |
91 void DeliverSamples( | |
92 [in] PP_Instance instance, | |
93 [in] PP_Resource decrypted_samples, /* PPB_Buffer. */ | |
94 [in] PP_CompletionCallback callback); | |
95 }; | |
OLD | NEW |