1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_CDM_CENC_UTILS_H_
6 #define MEDIA_CDM_CENC_UTILS_H_
10 #include "base/basictypes.h"
11 #include "media/base/media_export.h"
12 #include "media/cdm/json_web_key.h"
16 // Validate that |input| is a set of concatenated 'pssh' boxes and the sizes
17 // match. Returns true if |input| looks valid, false otherwise.
18 MEDIA_EXPORT
bool ValidatePsshInput(const std::vector
<uint8_t>& input
);
20 // Gets the Key Ids from a 'pssh' box for the Common SystemID among one or
21 // more concatenated 'pssh' boxes. If |input| looks valid, then true is
22 // returned and |key_ids| is updated to contain the values found. Otherwise
24 // TODO(jrummell): This returns true if no Common SystemID 'pssh' boxes are
25 // found, or are included but don't contain any key IDs. This should be
26 // fixed once the test files are updated to include correct 'pssh' boxes.
27 // http://crbug.com/460308
28 MEDIA_EXPORT
bool GetKeyIdsForCommonSystemId(const std::vector
<uint8_t>& input
,
33 #endif // MEDIA_CDM_CENC_UTILS_H_