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

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: Renaming and generalizing done... 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
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 09a9a0b19b4962a3f93043add761d88b4607ea19..6559bcd122b326acdebb91aa3893567c4a09183e 100644
--- a/webkit/media/crypto/ppapi/content_decryption_module.h
+++ b/webkit/media/crypto/ppapi/content_decryption_module.h
@@ -154,6 +154,12 @@ struct VideoDecoderConfig {
int32_t extra_data_size;
};
+enum StreamType {
+ kStreamTypeUnknown = 0,
+ kStreamTypeAudio = 1,
+ kStreamTypeVideo = 2
+};
+
class ContentDecryptionModule {
public:
// Generates a |key_request| given the |init_data|.
@@ -242,15 +248,15 @@ 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;
+ // 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;
- // 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;
+ // Resets the CDM decoder to an initialized clean state. All internal buffers
+ // MUST be flushed.
+ virtual void ResetDecoder(StreamType decoder_type) = 0;
virtual ~ContentDecryptionModule() {}
};

Powered by Google App Engine
This is Rietveld 408576698