Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(644)

Unified Diff: ppapi/cpp/private/content_decryptor_private.cc

Issue 11028087: Add decoder de-initialize and reset to the Pepper CDM API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renaming and generalizing done... Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/cpp/private/content_decryptor_private.cc
diff --git a/ppapi/cpp/private/content_decryptor_private.cc b/ppapi/cpp/private/content_decryptor_private.cc
index 7dbce34d6edd45da8fe101a2a2928e754f98d61e..8890da6ddcb3f463a20a00d9c791a6da95ecd7ee 100644
--- a/ppapi/cpp/private/content_decryptor_private.cc
+++ b/ppapi/cpp/private/content_decryptor_private.cc
@@ -105,6 +105,29 @@ void Decrypt(PP_Instance instance,
*encrypted_block_info);
}
+void DeinitializeDecoder(PP_Instance instance,
+ PP_StreamType decoder_type,
+ uint32_t request_id) {
+ void* object =
+ Instance::GetPerInstanceObject(instance, kPPPContentDecryptorInterface);
+ if (!object)
+ return;
+ static_cast<ContentDecryptor_Private*>(object)->DeinitializeDecoder(
+ decoder_type,
+ request_id);
+}
+
+void ResetDecoder(PP_Instance instance,
+ PP_StreamType decoder_type,
+ uint32_t request_id) {
+ void* object =
+ Instance::GetPerInstanceObject(instance, kPPPContentDecryptorInterface);
+ if (!object)
+ return;
+ static_cast<ContentDecryptor_Private*>(object)->ResetDecoder(decoder_type,
+ request_id);
+}
+
void DecryptAndDecodeFrame(
PP_Instance instance,
PP_Resource encrypted_resource,
@@ -126,6 +149,8 @@ const PPP_ContentDecryptor_Private ppp_content_decryptor = {
&AddKey,
&CancelKeyRequest,
&Decrypt,
+ &DeinitializeDecoder,
+ &ResetDecoder,
&DecryptAndDecodeFrame
};
@@ -220,6 +245,27 @@ void ContentDecryptor_Private::DeliverBlock(
}
}
+void ContentDecryptor_Private::DecoderDeinitializeDone(
+ PP_StreamType decoder_type,
+ uint32_t request_id) {
+ if (has_interface<PPB_ContentDecryptor_Private>()) {
+ get_interface<PPB_ContentDecryptor_Private>()->DecoderDeinitializeDone(
+ associated_instance_.pp_instance(),
+ decoder_type,
+ request_id);
+ }
+}
+
+void ContentDecryptor_Private::DecoderResetDone(PP_StreamType decoder_type,
+ uint32_t request_id) {
+ if (has_interface<PPB_ContentDecryptor_Private>()) {
+ get_interface<PPB_ContentDecryptor_Private>()->DecoderResetDone(
+ associated_instance_.pp_instance(),
+ decoder_type,
+ request_id);
+ }
+}
+
void ContentDecryptor_Private::DeliverFrame(
pp::Buffer_Dev decrypted_frame,
const PP_DecryptedFrameInfo& decrypted_frame_info) {

Powered by Google App Engine
This is Rietveld 408576698