From 467434d8392add1af93387ca9214ee966c673a63 Mon Sep 17 00:00:00 2001 From: "tomfinegan@chromium.org" Date: Fri, 12 Oct 2012 10:48:53 +0000 Subject: 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 --- ppapi/api/private/pp_content_decryptor.idl | 38 ++-------------------- .../api/private/ppp_content_decryptor_private.idl | 28 +++++++++------- 2 files changed, 18 insertions(+), 48 deletions(-) (limited to 'ppapi/api') 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 { }; /** - * PP_EncryptedVideoFrameInfo 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 PP_DecryptResult enum contains decryption and decoding * result constants. */ @@ -196,8 +162,8 @@ struct PP_DecryptedBlockInfo { /** * 4-byte padding to make the size of PP_DecryptedBlockInfo - * 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 - * DeliverFrame() method on the + * Decrypts encrypted_buffer, decodes it, and returns the unencrypted + * uncompressed (decoded) data to the browser via the + * DeliverFrame() or DeliverSamples() method on the * PPB_ContentDecryptor_Private interface. * - * @param[in] encrypted_video_frame A PP_Resource corresponding - * to a PPB_Buffer_Dev resource that contains an encrypted video - * frame. + * @param[in] decoder_type A PP_DecryptorStreamType that + * specifies the decoder to use after encrypted_buffer is + * decrypted. + * + * @param[in] encrypted_buffer A PP_Resource corresponding to a + * PPB_Buffer_Dev resource that contains encrypted media data. * - * @param[in] encrypted_video_frame_info A - * PP_EncryptedVideoFrameInfo that contains all information - * needed to decrypt and decode encrypted_video_frame. + * @param[in] encrypted_block_info A PP_EncryptedBlockInfo that + * contains all auxiliary information needed for decryption of the + * encrypted_block. */ - 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); }; -- cgit v1.1