| 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 4fd2ed97690bc6e62b8a73f166583837656c91a0..4893c44ec07eb1ee5c623b6e10de887cac723ae1 100644
|
| --- a/webkit/media/crypto/ppapi/content_decryption_module.h
|
| +++ b/webkit/media/crypto/ppapi/content_decryption_module.h
|
| @@ -18,12 +18,8 @@ typedef __int64 int64_t;
|
|
|
| namespace cdm {
|
| class Allocator;
|
| -class Buffer;
|
| class CdmHost;
|
| class ContentDecryptionModule;
|
| -class DecryptedBlock;
|
| -class KeyMessage;
|
| -class VideoFrame;
|
| }
|
|
|
| extern "C" {
|
| @@ -37,6 +33,12 @@ CDM_EXPORT const char* GetCdmVersion();
|
|
|
| namespace cdm {
|
|
|
| +class AudioFrames;
|
| +class Buffer;
|
| +class DecryptedBlock;
|
| +class KeyMessage;
|
| +class VideoFrame;
|
| +
|
| enum Status {
|
| kSuccess = 0,
|
| kNeedMoreData, // Decoder needs more data to produce a decoded frame/sample.
|
| @@ -316,20 +318,8 @@ class ContentDecryptionModule {
|
| // Returns kDecodeError if any decoding error happened.
|
| // If the return value is not kSuccess, |sample_buffer| should be ignored by
|
| // the caller.
|
| - //
|
| - // |audio_frames| can contain multiple audio output buffers. Each buffer must
|
| - // be serialized in this format:
|
| - //
|
| - // |<------------------- serialized audio buffer ------------------->|
|
| - // | int64_t timestamp | int64_t length | length bytes of audio data |
|
| - //
|
| - // For example, with three audio output buffers, |audio_frames| will look
|
| - // like this:
|
| - //
|
| - // |<---------------- audio_frames ------------------>|
|
| - // | audio buffer 0 | audio buffer 1 | audio buffer 2 |
|
| virtual Status DecryptAndDecodeSamples(const InputBuffer& encrypted_buffer,
|
| - Buffer* audio_frames) = 0;
|
| + AudioFrames* audio_frames) = 0;
|
|
|
| virtual ~ContentDecryptionModule() {}
|
| };
|
| @@ -445,6 +435,27 @@ class VideoFrame {
|
| virtual ~VideoFrame() {}
|
| };
|
|
|
| +// Represents decrypted and decoded audio frames. AudioFrames can contain
|
| +// multiple audio output buffers, which are serialized into this format:
|
| +//
|
| +// |<------------------- serialized audio buffer ------------------->|
|
| +// | int64_t timestamp | int64_t length | length bytes of audio data |
|
| +//
|
| +// For example, with three audio output buffers, the AudioFrames will look
|
| +// like this:
|
| +//
|
| +// |<----------------- AudioFrames ------------------>|
|
| +// | audio buffer 0 | audio buffer 1 | audio buffer 2 |
|
| +class AudioFrames {
|
| + public:
|
| + virtual void set_buffer(Buffer* buffer) = 0;
|
| + virtual Buffer* buffer() = 0;
|
| +
|
| + protected:
|
| + AudioFrames() {}
|
| + virtual ~AudioFrames() {}
|
| +};
|
| +
|
| } // namespace cdm
|
|
|
| #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_CONTENT_DECRYPTION_MODULE_H_
|
|
|