OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "media/base/test_data_util.h" | 5 #include "media/base/test_data_util.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 | |
11 #if !defined(OS_ANDROID) | |
10 #include "media/ffmpeg/ffmpeg_common.h" | 12 #include "media/ffmpeg/ffmpeg_common.h" |
13 #else | |
14 #define FF_INPUT_BUFFER_PADDING_SIZE 16 | |
15 #endif | |
11 | 16 |
12 namespace media { | 17 namespace media { |
13 | 18 |
14 void ReadTestDataFile(const std::string& name, scoped_array<uint8>* buffer, | 19 void ReadTestDataFile(const std::string& name, scoped_array<uint8>* buffer, |
scherkus (not reviewing)
2011/11/29 20:00:28
which media unit tests require these methods but n
michaelbai
2011/11/30 17:20:34
Removed this file
| |
15 int* size) { | 20 int* size) { |
16 FilePath file_path; | 21 FilePath file_path; |
17 CHECK(PathService::Get(base::DIR_SOURCE_ROOT, &file_path)); | 22 CHECK(PathService::Get(base::DIR_SOURCE_ROOT, &file_path)); |
18 | 23 |
19 file_path = file_path.Append(FILE_PATH_LITERAL("media")) | 24 file_path = file_path.Append(FILE_PATH_LITERAL("media")) |
20 .Append(FILE_PATH_LITERAL("test")) | 25 .Append(FILE_PATH_LITERAL("test")) |
21 .Append(FILE_PATH_LITERAL("data")) | 26 .Append(FILE_PATH_LITERAL("data")) |
22 .AppendASCII(name); | 27 .AppendASCII(name); |
23 | 28 |
24 int64 tmp = 0; | 29 int64 tmp = 0; |
(...skipping 14 matching lines...) Expand all Loading... | |
39 } | 44 } |
40 | 45 |
41 void ReadTestDataFile(const std::string& name, scoped_refptr<Buffer>* buffer) { | 46 void ReadTestDataFile(const std::string& name, scoped_refptr<Buffer>* buffer) { |
42 scoped_array<uint8> buf; | 47 scoped_array<uint8> buf; |
43 int buf_size; | 48 int buf_size; |
44 ReadTestDataFile(name, &buf, &buf_size); | 49 ReadTestDataFile(name, &buf, &buf_size); |
45 *buffer = new DataBuffer(buf.release(), buf_size); | 50 *buffer = new DataBuffer(buf.release(), buf_size); |
46 } | 51 } |
47 | 52 |
48 } // namespace media | 53 } // namespace media |
OLD | NEW |