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

Unified Diff: media/cdm/cenc_utils.h

Issue 1149023002: Combine 'pssh' parsing routines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: size_t Created 5 years, 6 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 | « components/cdm/browser/widevine_drm_delegate_android.cc ('k') | media/cdm/cenc_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/cenc_utils.h
diff --git a/media/cdm/cenc_utils.h b/media/cdm/cenc_utils.h
index ec85fb34e8b2f36728ada7438708c2eaf741d8be..7dd82a1537ff7edf656fc6a4c9b23c785c685c52 100644
--- a/media/cdm/cenc_utils.h
+++ b/media/cdm/cenc_utils.h
@@ -28,6 +28,17 @@ MEDIA_EXPORT bool ValidatePsshInput(const std::vector<uint8_t>& input);
MEDIA_EXPORT bool GetKeyIdsForCommonSystemId(const std::vector<uint8_t>& input,
KeyIdList* key_ids);
+// Gets the data field from the first 'pssh' box containing |system_id| UUID.
+// Returns true if such a box is found and successfully parsed. Returns false
+// otherwise.
+// Notes:
+// 1. If multiple PSSH boxes are found, the "Data" of the first matching 'pssh'
+// box will be set in |pssh_data|.
+// 2. Only PSSH boxes are allowed in |input|.
+MEDIA_EXPORT bool GetPsshData(const std::vector<uint8_t>& input,
+ const std::vector<uint8_t>& system_id,
+ std::vector<uint8_t>* pssh_data);
+
} // namespace media
#endif // MEDIA_CDM_CENC_UTILS_H_
« no previous file with comments | « components/cdm/browser/widevine_drm_delegate_android.cc ('k') | media/cdm/cenc_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698