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

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

Issue 11242005: Fake clear key CDM audio decoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 | « no previous file | webkit/media/crypto/ppapi/clear_key_cdm.cc » ('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.h
diff --git a/webkit/media/crypto/ppapi/clear_key_cdm.h b/webkit/media/crypto/ppapi/clear_key_cdm.h
index 09bc01b7ce353ce7b73c8b9293fda2bb4ef0e6ea..433464f59ff0a37fa2ed91ba1f45f539a1bb922e 100644
--- a/webkit/media/crypto/ppapi/clear_key_cdm.h
+++ b/webkit/media/crypto/ppapi/clear_key_cdm.h
@@ -17,7 +17,13 @@
#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
@@ -125,7 +131,13 @@ 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)
+ // Generates fake video frames with |last_timestamp_| and |last_duration_|.
+ void GenerateFakeAudioFrames(cdm::AudioFrames* audio_frames);
+#endif // CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER
+
#if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER)
+ // Generate a fake video frame with |video_size_| and |timestamp|.
void GenerateFakeVideoFrame(base::TimeDelta timestamp,
cdm::VideoFrame* video_frame);
#endif // CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER
@@ -139,9 +151,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_;
« no previous file with comments | « no previous file | webkit/media/crypto/ppapi/clear_key_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698