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

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

Issue 10447035: Introducing DecoderBuffer and general Buffer cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/2011/2012/ Created 8 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 | Annotate | Revision Log
« no previous file with comments | « media/base/stream_parser_buffer.cc ('k') | media/base/test_data_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 13
14 namespace media { 14 namespace media {
15 15
16 class Buffer; 16 class DecoderBuffer;
17 class DataBuffer;
18 17
19 // Returns a URL path for a file in the media/test/data directory. 18 // Returns a URL path for a file in the media/test/data directory.
20 std::string GetTestDataURL(const std::string& name); 19 std::string GetTestDataURL(const std::string& name);
21 20
22 // Reads a test file from media/test/data directory and stores it in 21 // Reads a test file from media/test/data directory and stores it in
23 // a scoped_array. 22 // a DecoderBuffer. Use DecoderBuffer vs DataBuffer to ensure no matter
23 // what a test does, it's safe to use FFmpeg methods.
24 // 24 //
25 // |name| - The name of the file. 25 // |name| - The name of the file.
26 // |buffer| - The contents of the file. 26 // |buffer| - The contents of the file.
27 // |size| - The size of the buffer. 27 scoped_refptr<DecoderBuffer> ReadTestDataFile(const std::string& name);
28 void ReadTestDataFile(const std::string& name,
29 scoped_array<uint8>* buffer,
30 int* size);
31
32 // Reads a test file from media/test/data directory and stores it in
33 // a DataBuffer.
34 //
35 // |name| - The name of the file.
36 // |buffer| - The contents of the file.
37 void ReadTestDataFile(const std::string& name,
38 scoped_refptr<DataBuffer>* buffer);
39
40 // Reads a test file from media/test/data directory and stores it in
41 // a Buffer.
42 //
43 // |name| - The name of the file.
44 // |buffer| - The contents of the file.
45 void ReadTestDataFile(const std::string& name, scoped_refptr<Buffer>* buffer);
46 28
47 } // namespace media 29 } // namespace media
48 30
49 #endif // MEDIA_BASE_TEST_DATA_UTIL_H_ 31 #endif // MEDIA_BASE_TEST_DATA_UTIL_H_
OLDNEW
« no previous file with comments | « media/base/stream_parser_buffer.cc ('k') | media/base/test_data_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698