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

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

Issue 11144036: Update Decryptor interface to support audio decoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove leftover unretained 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 | « media/filters/ffmpeg_video_decoder_unittest.cc ('k') | webkit/media/crypto/ppapi_decryptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/crypto/ppapi/clear_key_cdm.cc
diff --git a/webkit/media/crypto/ppapi/clear_key_cdm.cc b/webkit/media/crypto/ppapi/clear_key_cdm.cc
index af526c962543540304045897c5e19f981f98fe2f..b007e94175bd019af17989f3de5359a926bfec59 100644
--- a/webkit/media/crypto/ppapi/clear_key_cdm.cc
+++ b/webkit/media/crypto/ppapi/clear_key_cdm.cc
@@ -213,7 +213,9 @@ cdm::Status ClearKeyCdm::Decrypt(
// Callback is called synchronously, so we can use variables on the stack.
media::Decryptor::Status status;
scoped_refptr<media::DecoderBuffer> buffer;
- decryptor_.Decrypt(decoder_buffer,
+ // We don't care what stream type it is here. So just pick video.
+ decryptor_.Decrypt(media::Decryptor::kVideo,
+ decoder_buffer,
base::Bind(&CopyDecryptResults, &status, &buffer));
if (status == media::Decryptor::kError)
@@ -267,7 +269,8 @@ cdm::Status ClearKeyCdm::DecryptAndDecodeFrame(
// Callback is called synchronously, so we can use variables on the stack.
media::Decryptor::Status status;
scoped_refptr<media::DecoderBuffer> buffer;
- decryptor_.Decrypt(decoder_buffer,
+ decryptor_.Decrypt(media::Decryptor::kVideo,
+ decoder_buffer,
base::Bind(&CopyDecryptResults, &status, &buffer));
if (status == media::Decryptor::kError)
@@ -295,8 +298,8 @@ void ClearKeyCdm::GenerateFakeVideoFrame(base::TimeDelta timestamp,
int width = video_size_.width;
int height = video_size_.height;
- DCHECK(width % 2 == 0);
- DCHECK(height % 2 == 0);
+ DCHECK_EQ(width % 2, 0);
+ DCHECK_EQ(height % 2, 0);
int y_stride = (width + kAlignment - 1) / kAlignment * kAlignment + kPadding;
int uv_stride =
« no previous file with comments | « media/filters/ffmpeg_video_decoder_unittest.cc ('k') | webkit/media/crypto/ppapi_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698