| 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 e490b9554c705f9bb7b5ea6217376ff6a94cab1f..d84f25e10fcb7d0cbbb9c940ce961fcebe152780 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"
|
| #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)
|
| #undef CLEAR_KEY_CDM_USE_FFMPEG_DECODER
|
| @@ -29,6 +36,7 @@ class DecoderBuffer;
|
|
|
| namespace webkit_media {
|
|
|
| +class FFmpegCdmAudioDecoder;
|
| class FFmpegCdmVideoDecoder;
|
|
|
| // Clear key implementation of the cdm::ContentDecryptionModule interface.
|
| @@ -64,7 +72,7 @@ class ClearKeyCdm : public cdm::ContentDecryptionModule {
|
| cdm::VideoFrame* video_frame) OVERRIDE;
|
| virtual cdm::Status DecryptAndDecodeSamples(
|
| const cdm::InputBuffer& encrypted_buffer,
|
| - cdm::Buffer* sample_buffer) OVERRIDE;
|
| + cdm::AudioFrames* audio_frames) OVERRIDE;
|
|
|
| private:
|
| class Client : public media::DecryptorClient {
|
| @@ -125,6 +133,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 +151,18 @@ 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<FFmpegCdmAudioDecoder> audio_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_;
|
|
|