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

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

Issue 11028087: Add decoder de-initialize and reset to the Pepper CDM API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments with the exception of renaming Deinit 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 | « webkit/media/crypto/ppapi/clear_key_cdm.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/crypto/ppapi/content_decryption_module.h
diff --git a/webkit/media/crypto/ppapi/content_decryption_module.h b/webkit/media/crypto/ppapi/content_decryption_module.h
index ad17512280f9601ec9bba001a644830730746d5c..ac33aaa04a873399d0ce7434d8269905dd46a1a8 100644
--- a/webkit/media/crypto/ppapi/content_decryption_module.h
+++ b/webkit/media/crypto/ppapi/content_decryption_module.h
@@ -157,6 +157,11 @@ struct VideoDecoderConfig {
int32_t extra_data_size;
};
+enum StreamType {
+ kStreamTypeAudio = 0,
+ kStreamTypeVideo = 1
+};
+
// ContentDecryptionModule interface that all CDMs need to implement.
// Note: ContentDecryptionModule implementations must use the allocator
// provided in CreateCdmInstance() to allocate any Buffer that needs to
@@ -231,6 +236,16 @@ class ContentDecryptionModule {
virtual Status InitializeVideoDecoder(
const VideoDecoderConfig& video_decoder_config) = 0;
+ // De-initializes the CDM decoder and sets it to an uninitialized state. The
+ // caller can initialize the decoder again after this call to re-initialize
+ // it. This can be used to reconfigure the decoder if the configuration
+ // changes.
+ virtual void DeinitializeDecoder(StreamType decoder_type) = 0;
+
+ // Resets the CDM decoder to an initialized clean state. All internal buffers
+ // MUST be flushed.
+ virtual void ResetDecoder(StreamType decoder_type) = 0;
+
// Decrypts the |encrypted_buffer| and decodes the decrypted buffer into a
// |video_frame|. Upon end-of-stream, the caller should call this function
// repeatedly with empty |encrypted_buffer| (|data| == NULL) until only empty
@@ -250,16 +265,6 @@ class ContentDecryptionModule {
virtual Status DecryptAndDecodeFrame(const InputBuffer& encrypted_buffer,
VideoFrame* video_frame) = 0;
- // Resets the CDM video decoder to an initialized clean state. All internal
- // buffers will be flushed.
- virtual void ResetVideoDecoder() = 0;
-
- // Stops the CDM video decoder and sets it to an uninitialized state. The
- // caller can call InitializeVideoDecoder() again after this call to
- // re-initialize the video decoder. This can be used to reconfigure the
- // video decoder if the config changes.
- virtual void StopVideoDecoder() = 0;
-
virtual ~ContentDecryptionModule() {}
};
« no previous file with comments | « webkit/media/crypto/ppapi/clear_key_cdm.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698