libs: decoder: vp8: implement reset() callback

remove create() and destroy() callbacks

https://bugzilla.gnome.org/show_bug.cgi?id=796308
This commit is contained in:
Víctor Manuel Jáquez Leal 2018-05-21 13:25:37 +02:00
parent 2b207a47cb
commit e493420375

View file

@ -147,6 +147,15 @@ gst_vaapi_decoder_vp8_create (GstVaapiDecoder * base_decoder)
return TRUE;
}
static GstVaapiDecoderStatus
gst_vaapi_decoder_vp8_reset (GstVaapiDecoder * base_decoder)
{
gst_vaapi_decoder_vp8_destroy (base_decoder);
if (gst_vaapi_decoder_vp8_create (base_decoder))
return GST_VAAPI_DECODER_STATUS_SUCCESS;
return GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN;
}
static GstVaapiDecoderStatus
ensure_context (GstVaapiDecoderVp8 * decoder)
{
@ -635,8 +644,7 @@ gst_vaapi_decoder_vp8_class_init (GstVaapiDecoderVp8Class * klass)
object_class->finalize = gst_vaapi_decoder_vp8_finalize;
decoder_class->create = gst_vaapi_decoder_vp8_create;
decoder_class->destroy = gst_vaapi_decoder_vp8_destroy;
decoder_class->reset = gst_vaapi_decoder_vp8_reset;
decoder_class->parse = gst_vaapi_decoder_vp8_parse;
decoder_class->decode = gst_vaapi_decoder_vp8_decode;
decoder_class->start_frame = gst_vaapi_decoder_vp8_start_frame;