diff options
author | John Koleszar <jkoleszar@google.com> | 2013-01-18 11:51:12 -0800 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2013-01-23 14:41:33 -0800 |
commit | 706cafe336f43934c3824734f95cffec8e45151b (patch) | |
tree | 44b23ee44e54278a9592d586fd3965f64b741ae2 /test/decode_test_driver.h | |
parent | bed59eb8de198ca9ab1230011e5a6d54d1c9765e (diff) | |
download | libvpx-706cafe336f43934c3824734f95cffec8e45151b.tar libvpx-706cafe336f43934c3824734f95cffec8e45151b.tar.gz libvpx-706cafe336f43934c3824734f95cffec8e45151b.tar.bz2 libvpx-706cafe336f43934c3824734f95cffec8e45151b.zip |
Support multiple codecs in test infrastructure
This commit starts to convert the tests to a system where the codec
to be used is provided by a factory object. Currently no tests are
instantiated for VP9 since they all fail for various reasons, but it
was verified that they're called and the correct codec is
instantiated.
Change-Id: Ia7506df2ca3a7651218ba3ca560634f08c9fbdeb
Diffstat (limited to 'test/decode_test_driver.h')
-rw-r--r-- | test/decode_test_driver.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/decode_test_driver.h b/test/decode_test_driver.h index 6408bee01..5daa1657b 100644 --- a/test/decode_test_driver.h +++ b/test/decode_test_driver.h @@ -14,10 +14,10 @@ #include "third_party/googletest/src/include/gtest/gtest.h" #include "vpx_config.h" #include "vpx/vpx_decoder.h" -#include "vpx/vp8dx.h" namespace libvpx_test { +class CodecFactory; class CompressedVideoSource; // Provides an object to handle decoding output @@ -46,7 +46,7 @@ class Decoder { memset(&decoder_, 0, sizeof(decoder_)); } - ~Decoder() { + virtual ~Decoder() { vpx_codec_destroy(&decoder_); } @@ -66,7 +66,9 @@ class Decoder { } protected: - const char *DecodeError() { + virtual const vpx_codec_iface_t* CodecInterface() const = 0; + + const char* DecodeError() { const char *detail = vpx_codec_error_detail(&decoder_); return detail ? detail : vpx_codec_error(&decoder_); } @@ -87,9 +89,11 @@ class DecoderTest { const unsigned int frame_number) {} protected: - DecoderTest() {} + explicit DecoderTest(const CodecFactory *codec) : codec_(codec) {} virtual ~DecoderTest() {} + + const CodecFactory *codec_; }; } // namespace libvpx_test |