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

Side by Side Diff: media/base/test_data_util.cc

Issue 8718014: Upstream: Media implementation for Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698