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

Side by Side Diff: source/libvpx/test/video_source.h

Issue 375983002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 5 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 | « source/libvpx/test/user_priv_test.cc ('k') | source/libvpx/test/vp9_lossless_test.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 /* 1 /*
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #ifndef TEST_VIDEO_SOURCE_H_ 10 #ifndef TEST_VIDEO_SOURCE_H_
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // Undefining stringification macros because they are not used elsewhere 44 // Undefining stringification macros because they are not used elsewhere
45 #undef TO_STRING 45 #undef TO_STRING
46 #undef STRINGIFY 46 #undef STRINGIFY
47 47
48 static FILE *OpenTestDataFile(const std::string& file_name) { 48 static FILE *OpenTestDataFile(const std::string& file_name) {
49 const std::string path_to_source = GetDataPath() + "/" + file_name; 49 const std::string path_to_source = GetDataPath() + "/" + file_name;
50 return fopen(path_to_source.c_str(), "rb"); 50 return fopen(path_to_source.c_str(), "rb");
51 } 51 }
52 52
53 static FILE *OpenTestOutFile(const std::string& file_name) {
54 const std::string path_to_source = GetDataPath() + "/" + file_name;
55 return fopen(path_to_source.c_str(), "wb");
56 }
57
58 static FILE *OpenTempOutFile() {
59 return tmpfile();
60 }
61
53 // Abstract base class for test video sources, which provide a stream of 62 // Abstract base class for test video sources, which provide a stream of
54 // vpx_image_t images with associated timestamps and duration. 63 // vpx_image_t images with associated timestamps and duration.
55 class VideoSource { 64 class VideoSource {
56 public: 65 public:
57 virtual ~VideoSource() {} 66 virtual ~VideoSource() {}
58 67
59 // Prepare the stream for reading, rewind/open as necessary. 68 // Prepare the stream for reading, rewind/open as necessary.
60 virtual void Begin() = 0; 69 virtual void Begin() = 0;
61 70
62 // Advance the cursor to the next frame 71 // Advance the cursor to the next frame
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 virtual const uint8_t *cxdata() const = 0; 194 virtual const uint8_t *cxdata() const = 0;
186 195
187 virtual size_t frame_size() const = 0; 196 virtual size_t frame_size() const = 0;
188 197
189 virtual unsigned int frame_number() const = 0; 198 virtual unsigned int frame_number() const = 0;
190 }; 199 };
191 200
192 } // namespace libvpx_test 201 } // namespace libvpx_test
193 202
194 #endif // TEST_VIDEO_SOURCE_H_ 203 #endif // TEST_VIDEO_SOURCE_H_
OLDNEW
« no previous file with comments | « source/libvpx/test/user_priv_test.cc ('k') | source/libvpx/test/vp9_lossless_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698