| Index: ppapi/proxy/ppp_content_decryptor_private_proxy.cc
|
| diff --git a/ppapi/proxy/ppp_content_decryptor_private_proxy.cc b/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
|
| index 91d81154a4658efd8ce0901ac3c3f1e6683a7ff6..aa39e8315226c6978a632be4744e573af503be63 100644
|
| --- a/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
|
| +++ b/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
|
| @@ -142,8 +142,8 @@ void CancelKeyRequest(PP_Instance instance, PP_Var session_id) {
|
| }
|
|
|
| void Decrypt(PP_Instance instance,
|
| - PP_Resource encrypted_block,
|
| - const PP_EncryptedBlockInfo* encrypted_block_info) {
|
| + PP_Resource encrypted_block,
|
| + const PP_EncryptedBlockInfo* encrypted_block_info) {
|
| HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
|
| if (!dispatcher) {
|
| NOTREACHED();
|
| @@ -185,6 +185,34 @@ void Decrypt(PP_Instance instance,
|
| serialized_block_info));
|
| }
|
|
|
| +void ResetVideoDecoder(PP_Instance instance, uint32_t request_id) {
|
| + HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
|
| + if (!dispatcher) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
| +
|
| + dispatcher->Send(
|
| + new PpapiMsg_PPPContentDecryptor_ResetVideoDecoder(
|
| + API_ID_PPP_CONTENT_DECRYPTOR_PRIVATE,
|
| + instance,
|
| + request_id));
|
| +}
|
| +
|
| +void StopVideoDecoder(PP_Instance instance, uint32_t request_id) {
|
| + HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
|
| + if (!dispatcher) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
| +
|
| + dispatcher->Send(
|
| + new PpapiMsg_PPPContentDecryptor_StopVideoDecoder(
|
| + API_ID_PPP_CONTENT_DECRYPTOR_PRIVATE,
|
| + instance,
|
| + request_id));
|
| +}
|
| +
|
| void DecryptAndDecodeFrame(
|
| PP_Instance instance,
|
| PP_Resource encrypted_frame,
|
| @@ -235,6 +263,8 @@ static const PPP_ContentDecryptor_Private content_decryptor_interface = {
|
| &AddKey,
|
| &CancelKeyRequest,
|
| &Decrypt,
|
| + &ResetVideoDecoder,
|
| + &StopVideoDecoder,
|
| &DecryptAndDecodeFrame
|
| };
|
|
|
| @@ -272,6 +302,10 @@ bool PPP_ContentDecryptor_Private_Proxy::OnMessageReceived(
|
| OnMsgCancelKeyRequest)
|
| IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_Decrypt,
|
| OnMsgDecrypt)
|
| + IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_ResetVideoDecoder,
|
| + OnMsgResetVideoDecoder)
|
| + IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_StopVideoDecoder,
|
| + OnMsgStopVideoDecoder)
|
| IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_DecryptAndDecodeFrame,
|
| OnMsgDecryptAndDecodeFrame)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| @@ -335,6 +369,28 @@ void PPP_ContentDecryptor_Private_Proxy::OnMsgDecrypt(
|
| }
|
| }
|
|
|
| +void PPP_ContentDecryptor_Private_Proxy::OnMsgResetVideoDecoder(
|
| + PP_Instance instance,
|
| + uint32_t request_id) {
|
| + if (ppp_decryptor_impl_) {
|
| + CallWhileUnlocked(
|
| + ppp_decryptor_impl_->ResetVideoDecoder,
|
| + instance,
|
| + request_id);
|
| + }
|
| +}
|
| +
|
| +void PPP_ContentDecryptor_Private_Proxy::OnMsgStopVideoDecoder(
|
| + PP_Instance instance,
|
| + uint32_t request_id) {
|
| + if (ppp_decryptor_impl_) {
|
| + CallWhileUnlocked(
|
| + ppp_decryptor_impl_->StopVideoDecoder,
|
| + instance,
|
| + request_id);
|
| + }
|
| +}
|
| +
|
| void PPP_ContentDecryptor_Private_Proxy::OnMsgDecryptAndDecodeFrame(
|
| PP_Instance instance,
|
| const PPPDecryptor_Buffer& encrypted_frame,
|
|
|