Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_TEST_DATA_UTIL_H_ | 5 #ifndef MEDIA_BASE_TEST_DATA_UTIL_H_ |
| 6 #define MEDIA_BASE_TEST_DATA_UTIL_H_ | 6 #define MEDIA_BASE_TEST_DATA_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 std::string GetURLQueryString(const base::StringPairs& query_params); | 29 std::string GetURLQueryString(const base::StringPairs& query_params); |
| 30 | 30 |
| 31 // Reads a test file from media/test/data directory and stores it in | 31 // Reads a test file from media/test/data directory and stores it in |
| 32 // a DecoderBuffer. Use DecoderBuffer vs DataBuffer to ensure no matter | 32 // a DecoderBuffer. Use DecoderBuffer vs DataBuffer to ensure no matter |
| 33 // what a test does, it's safe to use FFmpeg methods. | 33 // what a test does, it's safe to use FFmpeg methods. |
| 34 // | 34 // |
| 35 // |name| - The name of the file. | 35 // |name| - The name of the file. |
| 36 // |buffer| - The contents of the file. | 36 // |buffer| - The contents of the file. |
| 37 scoped_refptr<DecoderBuffer> ReadTestDataFile(const std::string& name); | 37 scoped_refptr<DecoderBuffer> ReadTestDataFile(const std::string& name); |
| 38 | 38 |
| 39 // If the provided |key_id| is that of the test key, returns true and fills the | |
|
ddorwin
2016/04/12 00:40:47
s/the/a/ - we could support multiple
dougsteed
2016/05/08 23:18:44
Done.
| |
| 40 // |key|, otherwise returns false. If |allowRotation| is true, then other valid | |
| 41 // values are obtained by rotating the original key_id and key. Two overloads | |
| 42 // are provided, one using vectors and one using strings. | |
| 43 bool LookupTestKey(const std::vector<uint8_t>& key_id, | |
|
ddorwin
2016/04/12 00:40:47
Consider ...Vector (and ...String below)
https://g
dougsteed
2016/05/08 23:18:44
Done.
| |
| 44 std::vector<uint8_t>* key, | |
| 45 bool allowRotation); | |
|
ddorwin
2016/04/12 00:40:47
This should be before the output parameter.
dougsteed
2016/05/08 23:18:44
Done.
| |
| 46 | |
| 47 bool LookupTestKey(const std::string& key_id, | |
| 48 std::string* key, | |
| 49 bool allowRotation); | |
| 50 | |
| 39 } // namespace media | 51 } // namespace media |
| 40 | 52 |
| 41 #endif // MEDIA_BASE_TEST_DATA_UTIL_H_ | 53 #endif // MEDIA_BASE_TEST_DATA_UTIL_H_ |
| OLD | NEW |