diff options
author | tomfinegan@chromium.org <tomfinegan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-12 10:48:53 +0000 |
---|---|---|
committer | tomfinegan@chromium.org <tomfinegan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-12 10:48:53 +0000 |
commit | 467434d8392add1af93387ca9214ee966c673a63 (patch) | |
tree | 9634b36adae96aca3aad1f8a5d82505f60306e94 /ppapi/api | |
parent | e4486338b71884677a6b59e91aff0aeff769d092 (diff) | |
download | chromium_src-467434d8392add1af93387ca9214ee966c673a63.zip chromium_src-467434d8392add1af93387ca9214ee966c673a63.tar.gz chromium_src-467434d8392add1af93387ca9214ee966c673a63.tar.bz2 |
Generalize Pepper CDM API decrypt and decode.
- Removes PP_EncryptedVideoFrameInfo.
- Replaces PPP_ContentDecryptor_Private::DecryptAndDecodeFrame()
with DecryptAndDecode().
BUG=141780
TEST=
Review URL: https://chromiumcodereview.appspot.com/11087044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161551 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/api')
-rw-r--r-- | ppapi/api/private/pp_content_decryptor.idl | 38 | ||||
-rw-r--r-- | ppapi/api/private/ppp_content_decryptor_private.idl | 28 |
2 files changed, 18 insertions, 48 deletions
diff --git a/ppapi/api/private/pp_content_decryptor.idl b/ppapi/api/private/pp_content_decryptor.idl index ea05965..24059d42 100644 --- a/ppapi/api/private/pp_content_decryptor.idl +++ b/ppapi/api/private/pp_content_decryptor.idl @@ -134,40 +134,6 @@ enum PP_VideoCodec { }; /** - * <code>PP_EncryptedVideoFrameInfo</code> contains the information required - * to decrypt and decode a video frame. - * TODO(tomfinegan): Revisit necessity of including format information in this - * struct once we decide how to implement video decoder initialization. - */ -[assert_size(256)] -struct PP_EncryptedVideoFrameInfo { - /** - * The decoded video frame format. - */ - PP_DecryptedFrameFormat format; - - /** - * The video frame codec type. - */ - PP_VideoCodec codec; - - /** - * Video frame width in pixels. - */ - int32_t width; - - /** - * Video frame height in pixels. - */ - int32_t height; - - /** - * Information required to decrypt the frame. - */ - PP_EncryptedBlockInfo encryption_info; -}; - -/** * The <code>PP_DecryptResult</code> enum contains decryption and decoding * result constants. */ @@ -196,8 +162,8 @@ struct PP_DecryptedBlockInfo { /** * 4-byte padding to make the size of <code>PP_DecryptedBlockInfo</code> - * a multiple of 8 bytes and make sure |tracking_info| starts on an 8-byte - * boundary. The value of this field should not be used. + * a multiple of 8 bytes, and ensure consistent size on all targets. This + * value should never be used. */ uint32_t padding; diff --git a/ppapi/api/private/ppp_content_decryptor_private.idl b/ppapi/api/private/ppp_content_decryptor_private.idl index 7f490bc..1e9c4d2 100644 --- a/ppapi/api/private/ppp_content_decryptor_private.idl +++ b/ppapi/api/private/ppp_content_decryptor_private.idl @@ -168,21 +168,25 @@ interface PPP_ContentDecryptor_Private { [in] uint32_t request_id); /** - * Decrypts encrypted_video_frame, decodes it, and returns the unencrypted - * uncompressed (decoded) video frame to the browser via the - * <code>DeliverFrame()</code> method on the + * Decrypts encrypted_buffer, decodes it, and returns the unencrypted + * uncompressed (decoded) data to the browser via the + * <code>DeliverFrame()</code> or <code>DeliverSamples()</code> method on the * <code>PPB_ContentDecryptor_Private</code> interface. * - * @param[in] encrypted_video_frame A <code>PP_Resource</code> corresponding - * to a <code>PPB_Buffer_Dev</code> resource that contains an encrypted video - * frame. + * @param[in] decoder_type A <code>PP_DecryptorStreamType</code> that + * specifies the decoder to use after <code>encrypted_buffer</code> is + * decrypted. + * + * @param[in] encrypted_buffer A <code>PP_Resource</code> corresponding to a + * <code>PPB_Buffer_Dev</code> resource that contains encrypted media data. * - * @param[in] encrypted_video_frame_info A - * <code>PP_EncryptedVideoFrameInfo</code> that contains all information - * needed to decrypt and decode <code>encrypted_video_frame</code>. + * @param[in] encrypted_block_info A <code>PP_EncryptedBlockInfo</code> that + * contains all auxiliary information needed for decryption of the + * <code>encrypted_block</code>. */ - void DecryptAndDecodeFrame( + void DecryptAndDecode( [in] PP_Instance instance, - [in] PP_Resource encrypted_video_frame, - [in] PP_EncryptedVideoFrameInfo encrypted_video_frame_info); + [in] PP_DecryptorStreamType decoder_type, + [in] PP_Resource encrypted_buffer, + [in] PP_EncryptedBlockInfo encrypted_block_info); }; |