diff options
author | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-08 05:09:27 +0000 |
---|---|---|
committer | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-08 05:09:27 +0000 |
commit | 08819ae89715143453b592abe0115ac1d3076003 (patch) | |
tree | 2f271a0ad88893d89a49703a5f6873ede8b5c073 /media/base/buffers.h | |
parent | a8076b782e9d36f69651c84d5aee2a5ae321dca7 (diff) | |
download | chromium_src-08819ae89715143453b592abe0115ac1d3076003.zip chromium_src-08819ae89715143453b592abe0115ac1d3076003.tar.gz chromium_src-08819ae89715143453b592abe0115ac1d3076003.tar.bz2 |
Add AES decryptor and tests.
For now we support decryption in video only. The first encryption key ID in ContentEncodings element will be used as the decryption key ID. Also we assume decryption key is the same as key ID.
BUG=117060
TEST=test page with encrypted content plays; added media_unittest
Review URL: http://codereview.chromium.org/9298021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125560 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/buffers.h')
-rw-r--r-- | media/base/buffers.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/media/base/buffers.h b/media/base/buffers.h index cbe89e1..379b175 100644 --- a/media/base/buffers.h +++ b/media/base/buffers.h @@ -34,6 +34,8 @@ namespace media { +class DecryptConfig; + // Indicates an invalid or missing timestamp. MEDIA_EXPORT extern inline base::TimeDelta kNoTimestamp() { return base::TimeDelta::FromMicroseconds(kint64min); @@ -84,7 +86,6 @@ class MEDIA_EXPORT StreamSample DISALLOW_COPY_AND_ASSIGN(StreamSample); }; - class MEDIA_EXPORT Buffer : public StreamSample { public: // Returns a read only pointer to the buffer data. @@ -96,6 +97,9 @@ class MEDIA_EXPORT Buffer : public StreamSample { // If there's no data in this buffer, it represents end of stream. virtual bool IsEndOfStream() const OVERRIDE; + // Return DecryptConfig if buffer is encrypted, or NULL otherwise. + virtual const DecryptConfig* GetDecryptConfig() const; + protected: virtual ~Buffer() {} }; |