// Provides a simplified interface to manage one video decoding. // Similar to Encoder class, the exact services should be added // as more tests are added. class Decoder {
public: explicit Decoder(vpx_codec_dec_cfg_t cfg)
: cfg_(cfg), flags_(0), init_done_(false) {
memset(&decoder_, 0, sizeof(decoder_));
}
// Common test functionality for all Decoder tests. class DecoderTest {
public: // Main decoding loop
virtual void RunLoop(CompressedVideoSource *video);
virtual void RunLoop(CompressedVideoSource *video, const vpx_codec_dec_cfg_t &dec_cfg);
// Hook to be called before decompressing every frame.
virtual void PreDecodeFrameHook(const CompressedVideoSource & /*video*/,
Decoder * /*decoder*/) {}
// Hook to be called to handle decode result. Return true to continue.
virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec, const CompressedVideoSource & /*video*/,
Decoder *decoder) {
EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError(); return VPX_CODEC_OK == res_dec;
}
// Hook to be called on every decompressed frame.
virtual void DecompressedFrameHook(const vpx_image_t & /*img*/, constunsignedint/*frame_number*/) {}
// Hook to be called on peek result
virtual void HandlePeekResult(Decoder *const decoder,
CompressedVideoSource *video, const vpx_codec_err_t res_peek);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.