| 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 <stdint.h> |
| 9 |
| 8 #include <vector> | 10 #include <vector> |
| 9 | 11 |
| 10 #include "media/base/media_export.h" | 12 #include "media/base/media_export.h" |
| 11 #include "media/cdm/json_web_key.h" | 13 #include "media/cdm/json_web_key.h" |
| 12 | 14 |
| 13 namespace media { | 15 namespace media { |
| 14 | 16 |
| 15 // Validate that |input| is a set of concatenated 'pssh' boxes and the sizes | 17 // Validate that |input| is a set of concatenated 'pssh' boxes and the sizes |
| 16 // match. Returns true if |input| looks valid, false otherwise. | 18 // match. Returns true if |input| looks valid, false otherwise. |
| 17 MEDIA_EXPORT bool ValidatePsshInput(const std::vector<uint8_t>& input); | 19 MEDIA_EXPORT bool ValidatePsshInput(const std::vector<uint8_t>& input); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 36 // box will be set in |pssh_data|. | 38 // box will be set in |pssh_data|. |
| 37 // 2. Only PSSH boxes are allowed in |input|. Any other boxes in |pssh_boxes| | 39 // 2. Only PSSH boxes are allowed in |input|. Any other boxes in |pssh_boxes| |
| 38 // will result in false being returned. | 40 // will result in false being returned. |
| 39 MEDIA_EXPORT bool GetPsshData(const std::vector<uint8_t>& input, | 41 MEDIA_EXPORT bool GetPsshData(const std::vector<uint8_t>& input, |
| 40 const std::vector<uint8_t>& system_id, | 42 const std::vector<uint8_t>& system_id, |
| 41 std::vector<uint8_t>* pssh_data); | 43 std::vector<uint8_t>* pssh_data); |
| 42 | 44 |
| 43 } // namespace media | 45 } // namespace media |
| 44 | 46 |
| 45 #endif // MEDIA_CDM_CENC_UTILS_H_ | 47 #endif // MEDIA_CDM_CENC_UTILS_H_ |
| OLD | NEW |