Chromium Code Reviews| Index: webkit/media/crypto/ppapi/clear_key_cdm.h |
| diff --git a/webkit/media/crypto/ppapi/clear_key_cdm.h b/webkit/media/crypto/ppapi/clear_key_cdm.h |
| index 09bc01b7ce353ce7b73c8b9293fda2bb4ef0e6ea..3b4ed74b011fdbafbaf33c44317f5fa6294ede05 100644 |
| --- a/webkit/media/crypto/ppapi/clear_key_cdm.h |
| +++ b/webkit/media/crypto/ppapi/clear_key_cdm.h |
| @@ -12,12 +12,19 @@ |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/synchronization/lock.h" |
| +#include "media/base/channel_layout.h" |
|
Tom Finegan
2012/10/24 02:27:19
What's this for?
xhwang
2012/10/24 16:40:39
Done.
|
| #include "media/base/decryptor_client.h" |
| #include "media/crypto/aes_decryptor.h" |
| #include "webkit/media/crypto/ppapi/content_decryption_module.h" |
| // Enable this to use the fake decoder for testing. |
| -// #define CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER |
| +#if 0 |
| +#define CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER |
| +#endif |
| + |
| +#if 0 |
| +#define CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER |
| +#endif |
| #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER) |
|
Tom Finegan
2012/10/24 02:27:19
|| defined (CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER)?
xhwang
2012/10/24 16:40:39
Hmm, for best testing coverage, I want to use the
Tom Finegan
2012/10/24 18:06:09
I'll define CLEAR_KEY_CDM_USE_FFMPEG_AUDIO_DECODER
ddorwin
2012/10/24 18:09:31
Please don't. I want to avoid polluting the gyp un
|
| #undef CLEAR_KEY_CDM_USE_FFMPEG_DECODER |
| @@ -125,6 +132,10 @@ class ClearKeyCdm : public cdm::ContentDecryptionModule { |
| const cdm::InputBuffer& encrypted_buffer, |
| scoped_refptr<media::DecoderBuffer>* decrypted_buffer); |
| +#if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER) |
| + void GenerateFakeAudioFrames(cdm::AudioFrames* audio_frames); |
| +#endif // CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER |
| + |
| #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER) |
| void GenerateFakeVideoFrame(base::TimeDelta timestamp, |
| cdm::VideoFrame* video_frame); |
| @@ -139,9 +150,17 @@ class ClearKeyCdm : public cdm::ContentDecryptionModule { |
| cdm::Allocator* const allocator_; |
| +#if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER) |
| + int channel_count_; |
| + int bits_per_channel_; |
| + int samples_per_second_; |
| + base::TimeDelta last_timestamp_; |
| + base::TimeDelta last_duration_; |
| +#endif // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER |
| + |
| #if defined(CLEAR_KEY_CDM_USE_FFMPEG_DECODER) |
| scoped_ptr<FFmpegCdmVideoDecoder> video_decoder_; |
| -#endif |
| +#endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER |
| #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER) |
| cdm::Size video_size_; |