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

Side by Side Diff: media/cdm/cenc_utils.h

Issue 1163713007: Use 'pssh' data to determine key_id properly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/cdm/cenc_utils.cc » ('j') | media/cdm/cenc_utils_unittest.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" 10 #include "base/basictypes.h"
11 #include "media/base/media_export.h" 11 #include "media/base/media_export.h"
12 #include "media/cdm/json_web_key.h" 12 #include "media/cdm/json_web_key.h"
13 13
14 namespace media { 14 namespace media {
15 15
16 // Validate that |input| is a set of concatenated 'pssh' boxes and the sizes 16 // Validate that |input| is a set of concatenated 'pssh' boxes and the sizes
17 // match. Returns true if |input| looks valid, false otherwise. 17 // match. Returns true if |input| looks valid, false otherwise.
18 MEDIA_EXPORT bool ValidatePsshInput(const std::vector<uint8_t>& input); 18 MEDIA_EXPORT bool ValidatePsshInput(const std::vector<uint8_t>& input);
19 19
20 // Gets the Key Ids from a 'pssh' box for the Common SystemID among one or 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 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 22 // returned and |key_ids| is updated to contain the values found. Otherwise
23 // return false. 23 // return false.
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, 24 MEDIA_EXPORT bool GetKeyIdsForCommonSystemId(const std::vector<uint8_t>& input,
ddorwin 2015/06/04 19:57:17 Are there any call sites that were checking for th
jrummell 2015/06/15 22:22:09 Nope. The only caller (other than tests) is aes_de
29 KeyIdList* key_ids); 25 KeyIdList* key_ids);
30 26
31 } // namespace media 27 } // namespace media
32 28
33 #endif // MEDIA_CDM_CENC_UTILS_H_ 29 #endif // MEDIA_CDM_CENC_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | media/cdm/cenc_utils.cc » ('j') | media/cdm/cenc_utils_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698