def peek_stream_info(data): info = vpx.vpx_codec_stream_info_alloc() VpxError.check( vpx.vpx_codec_peek_stream_info(vpx.vpx_codec_vp8_dx(), data, info)) return info
class Decoder(Context): Interface = Codec(vpx.vpx_codec_vp8_dx()) def __init__(self, flags=0): Context.__init__(self, vpx.vpx_codec_vp8_dx()) VpxError.check( vpx.vpx_codec_dec_init_ver(self.codec, self.iface, None, flags, vpx.VPX_DECODER_ABI_VERSION)) def decode(self, data, deadline=0): VpxError.check(vpx.vpx_codec_decode(self.codec, data, None, deadline)) return Frames(self.codec) def register_frame_callback(self, callback): "void callback(const vpx_image_t *img)" VpxError.check( vpx.vpx_codec_register_frame_callback(self.codec, callback)) def register_slice_callback(self, callback): "void callback(const vpx_image_t *img, const vpx_image_rect_t *valid, const vpx_image_rect_t *update)" VpxError.check( vpx.vpx_codec_register_slice_callback(self.codec, callback)) def get_stream_info(self): info = vpx.vpx_codec_stream_info_alloc() VpxError.check(vpx.vpx_codec_get_stream_info(self.codec, info)) return info @staticmethod def peek_stream_info(data): info = vpx.vpx_codec_stream_info_alloc() VpxError.check( vpx.vpx_codec_peek_stream_info(vpx.vpx_codec_vp8_dx(), data, info)) return info
def __init__(self, flags=0): Context.__init__(self, vpx.vpx_codec_vp8_dx()) VpxError.check( vpx.vpx_codec_dec_init_ver(self.codec, self.iface, None, flags, vpx.VPX_DECODER_ABI_VERSION))
def peek_stream_info(data): info = vpx.vpx_codec_stream_info_alloc() VpxError.check(vpx.vpx_codec_peek_stream_info(vpx.vpx_codec_vp8_dx(), data, info)) return info
def __init__(self, flags=0): Context.__init__(self, vpx.vpx_codec_vp8_dx()) VpxError.check(vpx.vpx_codec_dec_init_ver(self.codec, self.iface, None, flags, vpx.VPX_DECODER_ABI_VERSION))