summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 07:02:25 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 07:02:25 +0000
commit741c28f9db1521cb02c6b89fe2966f67f4329dff (patch)
treef2374aebedd9c46a28d513b4b713a55d44f4a4e2 /ppapi
parent4eb2f2630d82f0ebd859092a99c7e900dc9360f5 (diff)
downloadchromium_src-741c28f9db1521cb02c6b89fe2966f67f4329dff.zip
chromium_src-741c28f9db1521cb02c6b89fe2966f67f4329dff.tar.gz
chromium_src-741c28f9db1521cb02c6b89fe2966f67f4329dff.tar.bz2
Update PluginInstance for decrypt-and-decode video.
- Hook up PpapiDecryptor and PluginInstance in terms of decrypt-and-decode calls. - Enable empty input buffer and empty video frame to be passed to/from the plugin. This is used for end-of-stream buffer/frames. - Add logs in DecryptingVideoDecoder. BUG=141780,141784 TEST=Decrypt-and-decode of video is working with a fake video decoder in clearkey CDM. Review URL: https://chromiumcodereview.appspot.com/11091005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162657 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/cpp/private/content_decryptor_private.h1
-rw-r--r--ppapi/proxy/ppp_content_decryptor_private_proxy.cc7
2 files changed, 8 insertions, 0 deletions
diff --git a/ppapi/cpp/private/content_decryptor_private.h b/ppapi/cpp/private/content_decryptor_private.h
index 0f5abe5..be70158 100644
--- a/ppapi/cpp/private/content_decryptor_private.h
+++ b/ppapi/cpp/private/content_decryptor_private.h
@@ -43,6 +43,7 @@ class ContentDecryptor_Private {
uint32_t request_id) = 0;
virtual void ResetDecoder(PP_DecryptorStreamType decoder_type,
uint32_t request_id) = 0;
+ // Null |encrypted_frame| means end-of-stream buffer.
virtual void DecryptAndDecode(
PP_DecryptorStreamType decoder_type,
pp::Buffer_Dev encrypted_buffer,
diff --git a/ppapi/proxy/ppp_content_decryptor_private_proxy.cc b/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
index 7608dfe..29190af 100644
--- a/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
+++ b/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
@@ -100,6 +100,13 @@ bool InitializePppDecryptorBuffer(PP_Instance instance,
return false;
}
+ if (resource == 0) {
+ buffer->resource = HostResource();
+ buffer->handle = base::SharedMemoryHandle();
+ buffer->size = 0;
+ return true;
+ }
+
if (!AddRefResourceForPlugin(dispatcher, resource))
return false;