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

Unified Diff: media/cdm/cenc_utils.h

Issue 1199643002: Have GetKeyIds() return the key IDs from the first matching 'pssh' box (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back to GetKeyIdsForCommonSystemId 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 | « no previous file | 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 8938fb92582a6d387db5dae73f99a9e2de4c33c2..59142e709a337156e4c03fe2a1be8c3a43e597cd 100644
--- a/media/cdm/cenc_utils.h
+++ b/media/cdm/cenc_utils.h
@@ -17,20 +17,26 @@ namespace media {
// match. Returns true if |input| looks valid, false otherwise.
MEDIA_EXPORT bool ValidatePsshInput(const std::vector<uint8_t>& input);
-// Gets the Key Ids from a 'pssh' box for the Common SystemID among one or
-// more concatenated 'pssh' boxes. If |input| looks valid, then true is
-// returned and |key_ids| is updated to contain the values found. Otherwise
-// return false.
-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.
+// Gets the Key Ids from the first 'pssh' box for the Common System ID among one
+// or more concatenated 'pssh' boxes. Returns true if a matching box is found
+// and it contains 1 or more key IDs. Returns false otherwise.
+// Notes:
+// 1. If multiple PSSH boxes are found, the "KIDs" of the first matching 'pssh'
+// box will be set in |key_ids|.
+// 2. Only PSSH boxes are allowed in |input|. Any other boxes in |pssh_boxes|
+// will result in false being returned.
+MEDIA_EXPORT bool GetKeyIdsForCommonSystemId(
+ const std::vector<uint8_t>& pssh_boxes,
+ KeyIdList* key_ids);
+
+// Gets the data field from the first 'pssh' box containing |system_id|.
// 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|.
+// 2. Only PSSH boxes are allowed in |input|. Any other boxes in |pssh_boxes|
+// will result in false being returned.
MEDIA_EXPORT bool GetPsshData(const std::vector<uint8_t>& input,
const std::vector<uint8_t>& system_id,
std::vector<uint8_t>* pssh_data);
« no previous file with comments | « no previous file | media/cdm/cenc_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698