summaryrefslogtreecommitdiffstats
path: root/webkit/media
diff options
context:
space:
mode:
authortomfinegan@chromium.org <tomfinegan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-12 10:48:53 +0000
committertomfinegan@chromium.org <tomfinegan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-12 10:48:53 +0000
commit467434d8392add1af93387ca9214ee966c673a63 (patch)
tree9634b36adae96aca3aad1f8a5d82505f60306e94 /webkit/media
parente4486338b71884677a6b59e91aff0aeff769d092 (diff)
downloadchromium_src-467434d8392add1af93387ca9214ee966c673a63.zip
chromium_src-467434d8392add1af93387ca9214ee966c673a63.tar.gz
chromium_src-467434d8392add1af93387ca9214ee966c673a63.tar.bz2
Generalize Pepper CDM API decrypt and decode.
- Removes PP_EncryptedVideoFrameInfo. - Replaces PPP_ContentDecryptor_Private::DecryptAndDecodeFrame() with DecryptAndDecode(). BUG=141780 TEST= Review URL: https://chromiumcodereview.appspot.com/11087044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161551 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media')
-rw-r--r--webkit/media/crypto/ppapi/cdm_wrapper.cc25
1 files changed, 15 insertions, 10 deletions
diff --git a/webkit/media/crypto/ppapi/cdm_wrapper.cc b/webkit/media/crypto/ppapi/cdm_wrapper.cc
index 1852508..b082c49 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) {