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

Unified Diff: media/base/decrypt_config.h

Issue 757953002: Add SubsampleEntry constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years, 1 month 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 | « media/base/decoder_buffer_unittest.cc ('k') | media/base/decrypt_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/decrypt_config.h
diff --git a/media/base/decrypt_config.h b/media/base/decrypt_config.h
index 86480aa9eed29fceac570d0bdc3d9b5a29e1e19e..febd0fe866968a244379ef2d875656426970e06c 100644
--- a/media/base/decrypt_config.h
+++ b/media/base/decrypt_config.h
@@ -24,6 +24,9 @@ namespace media {
// result, and then copying each byte from the decrypted block over the
// position of the corresponding encrypted byte.
struct SubsampleEntry {
+ SubsampleEntry() : clear_bytes(0), cypher_bytes(0) {}
+ SubsampleEntry(uint32 clear_bytes, uint32 cypher_bytes)
+ : clear_bytes(clear_bytes), cypher_bytes(cypher_bytes) {}
uint32 clear_bytes;
uint32 cypher_bytes;
};
@@ -50,6 +53,9 @@ class MEDIA_EXPORT DecryptConfig {
const std::string& iv() const { return iv_; }
const std::vector<SubsampleEntry>& subsamples() const { return subsamples_; }
+ // Returns true if all fields in |config| match this config.
+ bool Matches(const DecryptConfig& config) const;
+
private:
const std::string key_id_;
« no previous file with comments | « media/base/decoder_buffer_unittest.cc ('k') | media/base/decrypt_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698