| 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 6d8436f82aef039e2eb3dff953bb8a4bb031a8dd..415180d53f45210a605b067f535c354562dfadbc 100644
|
| --- a/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
|
| +++ b/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
|
| @@ -238,6 +238,40 @@ void InitializeVideoDecoder(
|
| }
|
|
|
|
|
| +void DeinitializeDecoder(PP_Instance instance,
|
| + PP_DecryptorStreamType decoder_type,
|
| + uint32_t request_id) {
|
| + HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
|
| + if (!dispatcher) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
| +
|
| + dispatcher->Send(
|
| + new PpapiMsg_PPPContentDecryptor_DeinitializeDecoder(
|
| + API_ID_PPP_CONTENT_DECRYPTOR_PRIVATE,
|
| + instance,
|
| + decoder_type,
|
| + request_id));
|
| +}
|
| +
|
| +void ResetDecoder(PP_Instance instance,
|
| + PP_DecryptorStreamType decoder_type,
|
| + uint32_t request_id) {
|
| + HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
|
| + if (!dispatcher) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
| +
|
| + dispatcher->Send(
|
| + new PpapiMsg_PPPContentDecryptor_ResetDecoder(
|
| + API_ID_PPP_CONTENT_DECRYPTOR_PRIVATE,
|
| + instance,
|
| + decoder_type,
|
| + request_id));
|
| +}
|
| +
|
| void DecryptAndDecodeFrame(
|
| PP_Instance instance,
|
| PP_Resource encrypted_frame,
|
| @@ -278,6 +312,8 @@ static const PPP_ContentDecryptor_Private content_decryptor_interface = {
|
| &CancelKeyRequest,
|
| &Decrypt,
|
| &InitializeVideoDecoder,
|
| + &DeinitializeDecoder,
|
| + &ResetDecoder,
|
| &DecryptAndDecodeFrame
|
| };
|
|
|
| @@ -317,6 +353,10 @@ bool PPP_ContentDecryptor_Private_Proxy::OnMessageReceived(
|
| OnMsgDecrypt)
|
| IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_InitializeVideoDecoder,
|
| OnMsgInitializeVideoDecoder)
|
| + IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_DeinitializeDecoder,
|
| + OnMsgDeinitializeDecoder)
|
| + IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_ResetDecoder,
|
| + OnMsgResetDecoder)
|
| IPC_MESSAGE_HANDLER(PpapiMsg_PPPContentDecryptor_DecryptAndDecodeFrame,
|
| OnMsgDecryptAndDecodeFrame)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| @@ -406,6 +446,32 @@ void PPP_ContentDecryptor_Private_Proxy::OnMsgInitializeVideoDecoder(
|
| }
|
| }
|
|
|
| +void PPP_ContentDecryptor_Private_Proxy::OnMsgDeinitializeDecoder(
|
| + PP_Instance instance,
|
| + PP_DecryptorStreamType decoder_type,
|
| + uint32_t request_id) {
|
| + if (ppp_decryptor_impl_) {
|
| + CallWhileUnlocked(
|
| + ppp_decryptor_impl_->DeinitializeDecoder,
|
| + instance,
|
| + decoder_type,
|
| + request_id);
|
| + }
|
| +}
|
| +
|
| +void PPP_ContentDecryptor_Private_Proxy::OnMsgResetDecoder(
|
| + PP_Instance instance,
|
| + PP_DecryptorStreamType decoder_type,
|
| + uint32_t request_id) {
|
| + if (ppp_decryptor_impl_) {
|
| + CallWhileUnlocked(
|
| + ppp_decryptor_impl_->ResetDecoder,
|
| + instance,
|
| + decoder_type,
|
| + request_id);
|
| + }
|
| +}
|
| +
|
| void PPP_ContentDecryptor_Private_Proxy::OnMsgDecryptAndDecodeFrame(
|
| PP_Instance instance,
|
| const PPPDecryptor_Buffer& encrypted_frame,
|
|
|