diff options
author | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-08 22:23:17 +0000 |
---|---|---|
committer | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-08 22:23:17 +0000 |
commit | dcd57350ed464493780247174db6a7c3628c01a2 (patch) | |
tree | c0ee4511c106a7825b8894c6620f6fabb3aead9a /media/base | |
parent | 3b10e258f6ebf230e6c0a2c8096346eb002461c6 (diff) | |
download | chromium_src-dcd57350ed464493780247174db6a7c3628c01a2.zip chromium_src-dcd57350ed464493780247174db6a7c3628c01a2.tar.gz chromium_src-dcd57350ed464493780247174db6a7c3628c01a2.tar.bz2 |
Drop DecryptConfig::data_offset_.
This CL drops DecryptConfig::data_offset_ and moves the offset parsing code into WebM demuxers. This allows us to remove offset passing/calculation code in several layers of the media pipeline.
Background:
We used to have HMAC check in encrypted WebM RFC, which requires us to keep the IV together with the encrypted frame, hence the offset. Now the HMAC check is dropped from the RFC so offset is not necessary anymore.
BUG=298569
Review URL: https://codereview.chromium.org/119203003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243672 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base')
-rw-r--r-- | media/base/decrypt_config.cc | 3 | ||||
-rw-r--r-- | media/base/decrypt_config.h | 12 |
2 files changed, 0 insertions, 15 deletions
diff --git a/media/base/decrypt_config.cc b/media/base/decrypt_config.cc index 53e2014..a478065 100644 --- a/media/base/decrypt_config.cc +++ b/media/base/decrypt_config.cc @@ -10,16 +10,13 @@ namespace media { DecryptConfig::DecryptConfig(const std::string& key_id, const std::string& iv, - const int data_offset, const std::vector<SubsampleEntry>& subsamples) : key_id_(key_id), iv_(iv), - data_offset_(data_offset), subsamples_(subsamples) { CHECK_GT(key_id.size(), 0u); CHECK(iv.size() == static_cast<size_t>(DecryptConfig::kDecryptionKeySize) || iv.empty()); - CHECK_GE(data_offset, 0); } DecryptConfig::~DecryptConfig() {} diff --git a/media/base/decrypt_config.h b/media/base/decrypt_config.h index be0bb4d..86480aa 100644 --- a/media/base/decrypt_config.h +++ b/media/base/decrypt_config.h @@ -38,23 +38,16 @@ class MEDIA_EXPORT DecryptConfig { // |iv| is the initialization vector defined by the encrypted format. // Currently |iv| must be 16 bytes as defined by WebM and ISO. Or must be // empty which signals an unencrypted frame. - // |data_offset| is the amount of data that should be discarded from the - // head of the sample buffer before applying subsample information. A - // decrypted buffer will be shorter than an encrypted buffer by this amount. // |subsamples| defines the clear and encrypted portions of the sample as // described above. A decrypted buffer will be equal in size to the sum // of the subsample sizes. - // - // |data_offset| is applied before |subsamples|. DecryptConfig(const std::string& key_id, const std::string& iv, - const int data_offset, const std::vector<SubsampleEntry>& subsamples); ~DecryptConfig(); const std::string& key_id() const { return key_id_; } const std::string& iv() const { return iv_; } - int data_offset() const { return data_offset_; } const std::vector<SubsampleEntry>& subsamples() const { return subsamples_; } private: @@ -63,11 +56,6 @@ class MEDIA_EXPORT DecryptConfig { // Initialization vector. const std::string iv_; - // TODO(fgalligan): Remove |data_offset_| if there is no plan to use it in - // the future. - // Amount of data to be discarded before applying subsample information. - const int data_offset_; - // Subsample information. May be empty for some formats, meaning entire frame // (less data ignored by data_offset_) is encrypted. const std::vector<SubsampleEntry> subsamples_; |