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

Unified Diff: webkit/media/crypto/ppapi/cdm_wrapper.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: Address comments with the exception of renaming Deinit 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
« no previous file with comments | « ppapi/thunk/ppb_instance_api.h ('k') | webkit/media/crypto/ppapi/clear_key_cdm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/crypto/ppapi/cdm_wrapper.cc
diff --git a/webkit/media/crypto/ppapi/cdm_wrapper.cc b/webkit/media/crypto/ppapi/cdm_wrapper.cc
index 77dae7ddcb7b687542e47147cac1bb7321b1b5f7..185250835b2f02f4d441e05a4d0867b7e577c011 100644
--- a/webkit/media/crypto/ppapi/cdm_wrapper.cc
+++ b/webkit/media/crypto/ppapi/cdm_wrapper.cc
@@ -407,6 +407,10 @@ class CdmWrapper : public pp::Instance,
virtual void InitializeVideoDecoder(
const PP_VideoDecoderConfig& decoder_config,
pp::Buffer_Dev extra_data_buffer) OVERRIDE;
+ virtual void DeinitializeDecoder(PP_DecryptorStreamType decoder_type,
+ uint32_t request_id) OVERRIDE;
+ virtual void ResetDecoder(PP_DecryptorStreamType decoder_type,
+ uint32_t request_id) OVERRIDE;
virtual void DecryptAndDecodeFrame(
pp::Buffer_Dev encrypted_frame,
const PP_EncryptedVideoFrameInfo& encrypted_video_frame_info) OVERRIDE;
@@ -433,6 +437,12 @@ class CdmWrapper : public pp::Instance,
void DecoderInitialized(int32_t result,
bool success,
uint32_t request_id);
+ void DecoderDeinitializeDone(int32_t result,
+ PP_DecryptorStreamType decoder_type,
+ uint32_t request_id);
+ void DecoderResetDone(int32_t result,
+ PP_DecryptorStreamType decoder_type,
+ uint32_t request_id);
void DeliverFrame(int32_t result,
const cdm::Status& status,
const LinkedVideoFrame& video_frame,
@@ -594,6 +604,25 @@ void CdmWrapper::InitializeVideoDecoder(
}
+void CdmWrapper::DeinitializeDecoder(PP_DecryptorStreamType decoder_type,
+ uint32_t request_id) {
+ // TODO(tomfinegan): Implement DeinitializeDecoder in clear key CDM, and call
+ // it here.
+ CallOnMain(callback_factory_.NewCallback(
+ &CdmWrapper::DecoderDeinitializeDone,
+ decoder_type,
+ request_id));
+}
+
+void CdmWrapper::ResetDecoder(PP_DecryptorStreamType decoder_type,
+ uint32_t request_id) {
+ // TODO(tomfinegan): Implement ResetDecoder in clear key CDM, and call it
+ // here.
+ CallOnMain(callback_factory_.NewCallback(&CdmWrapper::DecoderResetDone,
+ decoder_type,
+ request_id));
+}
+
void CdmWrapper::DecryptAndDecodeFrame(
pp::Buffer_Dev encrypted_frame,
const PP_EncryptedVideoFrameInfo& encrypted_video_frame_info) {
@@ -712,6 +741,19 @@ void CdmWrapper::DecoderInitialized(int32_t result,
pp::ContentDecryptor_Private::DecoderInitialized(success, request_id);
}
+void CdmWrapper::DecoderDeinitializeDone(int32_t result,
+ PP_DecryptorStreamType decoder_type,
+ uint32_t request_id) {
+ pp::ContentDecryptor_Private::DecoderDeinitializeDone(decoder_type,
+ request_id);
+}
+
+void CdmWrapper::DecoderResetDone(int32_t result,
+ PP_DecryptorStreamType decoder_type,
+ uint32_t request_id) {
+ pp::ContentDecryptor_Private::DecoderResetDone(decoder_type, request_id);
+}
+
void CdmWrapper::DeliverFrame(
int32_t result,
const cdm::Status& status,
« no previous file with comments | « ppapi/thunk/ppb_instance_api.h ('k') | webkit/media/crypto/ppapi/clear_key_cdm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698