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

Unified Diff: webkit/media/crypto/ppapi/cdm_wrapper.cc

Issue 11087044: Generalize Pepper CDM API decrypt and decode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. 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/proxy/ppp_content_decryptor_private_proxy.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.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 185250835b2f02f4d441e05a4d0867b7e577c011..b082c490b25a5da13be05be1de11c84aaf8530d0 100644
--- a/webkit/media/crypto/ppapi/cdm_wrapper.cc
+++ b/webkit/media/crypto/ppapi/cdm_wrapper.cc
@@ -411,9 +411,10 @@ class CdmWrapper : public pp::Instance,
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;
+ virtual void DecryptAndDecode(
+ PP_DecryptorStreamType decoder_type,
+ pp::Buffer_Dev encrypted_buffer,
+ const PP_EncryptedBlockInfo& encrypted_block_info) OVERRIDE;
// CdmHost methods.
virtual void SetTimer(int64 delay_ms) OVERRIDE;
@@ -623,16 +624,20 @@ void CdmWrapper::ResetDecoder(PP_DecryptorStreamType decoder_type,
request_id));
}
-void CdmWrapper::DecryptAndDecodeFrame(
- pp::Buffer_Dev encrypted_frame,
- const PP_EncryptedVideoFrameInfo& encrypted_video_frame_info) {
- PP_DCHECK(!encrypted_frame.is_null());
+void CdmWrapper::DecryptAndDecode(
+ PP_DecryptorStreamType decoder_type,
+ pp::Buffer_Dev encrypted_buffer,
+ const PP_EncryptedBlockInfo& encrypted_block_info) {
+ // TODO(tomfinegan): Remove this check when audio decoding is added.
+ PP_DCHECK(decoder_type == PP_DECRYPTORSTREAMTYPE_VIDEO);
+
+ PP_DCHECK(!encrypted_buffer.is_null());
PP_DCHECK(cdm_);
cdm::InputBuffer input_buffer;
std::vector<cdm::SubsampleEntry> subsamples;
- ConfigureInputBuffer(encrypted_frame,
- encrypted_video_frame_info.encryption_info,
+ ConfigureInputBuffer(encrypted_buffer,
+ encrypted_block_info,
&subsamples,
&input_buffer);
@@ -643,7 +648,7 @@ void CdmWrapper::DecryptAndDecodeFrame(
&CdmWrapper::DeliverFrame,
status,
video_frame,
- encrypted_video_frame_info.encryption_info.tracking_info));
+ encrypted_block_info.tracking_info));
}
void CdmWrapper::SetTimer(int64 delay_ms) {
« no previous file with comments | « ppapi/proxy/ppp_content_decryptor_private_proxy.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698