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

Unified Diff: media/base/decrypt_config.h

Issue 1905423003: [Merged] media: Properly tell whether the buffer is encrypted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | media/filters/android/media_codec_audio_decoder.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 c90a3bc1a99610ac99da9d4a439ae5b3c3929c09..84b3874886d6bc4134975c3b8cf46c483dcdfe4a 100644
--- a/media/base/decrypt_config.h
+++ b/media/base/decrypt_config.h
@@ -56,6 +56,10 @@ class MEDIA_EXPORT DecryptConfig {
const std::string& iv() const { return iv_; }
const std::vector<SubsampleEntry>& subsamples() const { return subsamples_; }
+ // Returns true if the corresponding decoder buffer requires decryption and
+ // false if that buffer is clear despite the presense of DecryptConfig.
+ bool is_encrypted() const { return !key_id_.empty() && !iv_.empty(); }
+
// Returns true if all fields in |config| match this config.
bool Matches(const DecryptConfig& config) const;
« no previous file with comments | « no previous file | media/filters/android/media_codec_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698