| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_CDM_CENC_UTILS_H_ | 5 #ifndef MEDIA_CDM_CENC_UTILS_H_ |
| 6 #define MEDIA_CDM_CENC_UTILS_H_ | 6 #define MEDIA_CDM_CENC_UTILS_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | |
| 11 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
| 12 #include "media/cdm/json_web_key.h" | 11 #include "media/cdm/json_web_key.h" |
| 13 | 12 |
| 14 namespace media { | 13 namespace media { |
| 15 | 14 |
| 16 // Validate that |input| is a set of concatenated 'pssh' boxes and the sizes | 15 // Validate that |input| is a set of concatenated 'pssh' boxes and the sizes |
| 17 // match. Returns true if |input| looks valid, false otherwise. | 16 // match. Returns true if |input| looks valid, false otherwise. |
| 18 MEDIA_EXPORT bool ValidatePsshInput(const std::vector<uint8_t>& input); | 17 MEDIA_EXPORT bool ValidatePsshInput(const std::vector<uint8_t>& input); |
| 19 | 18 |
| 20 // Gets the Key Ids from the first 'pssh' box for the Common System ID among one | 19 // Gets the Key Ids from the first 'pssh' box for the Common System ID among one |
| (...skipping 16 matching lines...) Expand all Loading... |
| 37 // box will be set in |pssh_data|. | 36 // box will be set in |pssh_data|. |
| 38 // 2. Only PSSH boxes are allowed in |input|. Any other boxes in |pssh_boxes| | 37 // 2. Only PSSH boxes are allowed in |input|. Any other boxes in |pssh_boxes| |
| 39 // will result in false being returned. | 38 // will result in false being returned. |
| 40 MEDIA_EXPORT bool GetPsshData(const std::vector<uint8_t>& input, | 39 MEDIA_EXPORT bool GetPsshData(const std::vector<uint8_t>& input, |
| 41 const std::vector<uint8_t>& system_id, | 40 const std::vector<uint8_t>& system_id, |
| 42 std::vector<uint8_t>* pssh_data); | 41 std::vector<uint8_t>* pssh_data); |
| 43 | 42 |
| 44 } // namespace media | 43 } // namespace media |
| 45 | 44 |
| 46 #endif // MEDIA_CDM_CENC_UTILS_H_ | 45 #endif // MEDIA_CDM_CENC_UTILS_H_ |
| OLD | NEW |