summaryrefslogtreecommitdiff
path: root/test/encode_test_driver.h
diff options
context:
space:
mode:
authorJim Bankoski <jimbankoski@google.com>2014-07-17 06:31:50 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-07-17 07:07:48 -0700
commit943e43273b0a7369d07714e7fd2e19fecfb11c7c (patch)
treea503ecd8b32bff01dcb767e87db4d94685681b3a /test/encode_test_driver.h
parent1a01194ab548ca9b5d7dbbdc2350d4c06f54e6d4 (diff)
downloadlibvpx-943e43273b0a7369d07714e7fd2e19fecfb11c7c.tar
libvpx-943e43273b0a7369d07714e7fd2e19fecfb11c7c.tar.gz
libvpx-943e43273b0a7369d07714e7fd2e19fecfb11c7c.tar.bz2
libvpx-943e43273b0a7369d07714e7fd2e19fecfb11c7c.zip
allow config options to limit max size of decode
This is a practical concern to allow us to fail in a decoder instance if the size of a file is bigger than we can reasonably handle. Change-Id: I0446b5502b1f8a48408107648ff2a8d187dca393
Diffstat (limited to 'test/encode_test_driver.h')
-rw-r--r--test/encode_test_driver.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/encode_test_driver.h b/test/encode_test_driver.h
index 9526068da..2270ce22f 100644
--- a/test/encode_test_driver.h
+++ b/test/encode_test_driver.h
@@ -221,6 +221,14 @@ class EncoderTest {
virtual void DecompressedFrameHook(const vpx_image_t& img,
vpx_codec_pts_t pts) {}
+ // Hook to be called to handle decode result. Return true to continue.
+ virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec,
+ const VideoSource& /* video */,
+ Decoder *decoder) {
+ EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
+ return VPX_CODEC_OK == res_dec;
+ }
+
// Hook that can modify the encoder's output data
virtual const vpx_codec_cx_pkt_t * MutateEncoderOutputHook(
const vpx_codec_cx_pkt_t *pkt) {