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

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

Issue 341353002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 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 | « README.chromium ('k') | source/libvpx/test/decode_test_driver.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 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // Common test functionality for all Decoder tests. 107 // Common test functionality for all Decoder tests.
108 class DecoderTest { 108 class DecoderTest {
109 public: 109 public:
110 // Main decoding loop 110 // Main decoding loop
111 virtual void RunLoop(CompressedVideoSource *video); 111 virtual void RunLoop(CompressedVideoSource *video);
112 112
113 // Hook to be called before decompressing every frame. 113 // Hook to be called before decompressing every frame.
114 virtual void PreDecodeFrameHook(const CompressedVideoSource& video, 114 virtual void PreDecodeFrameHook(const CompressedVideoSource& video,
115 Decoder *decoder) {} 115 Decoder *decoder) {}
116 116
117 // Hook to be called to handle decode result. Return true to continue.
118 virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec,
119 const CompressedVideoSource& /* video */,
120 Decoder *decoder) {
121 EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
122 return VPX_CODEC_OK == res_dec;
123 }
124
117 // Hook to be called on every decompressed frame. 125 // Hook to be called on every decompressed frame.
118 virtual void DecompressedFrameHook(const vpx_image_t& img, 126 virtual void DecompressedFrameHook(const vpx_image_t& img,
119 const unsigned int frame_number) {} 127 const unsigned int frame_number) {}
120 128
121 protected: 129 protected:
122 explicit DecoderTest(const CodecFactory *codec) : codec_(codec) {} 130 explicit DecoderTest(const CodecFactory *codec) : codec_(codec) {}
123 131
124 virtual ~DecoderTest() {} 132 virtual ~DecoderTest() {}
125 133
126 const CodecFactory *codec_; 134 const CodecFactory *codec_;
127 }; 135 };
128 136
129 } // namespace libvpx_test 137 } // namespace libvpx_test
130 138
131 #endif // TEST_DECODE_TEST_DRIVER_H_ 139 #endif // TEST_DECODE_TEST_DRIVER_H_
OLDNEW
« no previous file with comments | « README.chromium ('k') | source/libvpx/test/decode_test_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698