mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-15 10:48:16 +00:00
aom: Implement flush for av1dec
https://bugzilla.gnome.org/show_bug.cgi?id=791674
This commit is contained in:
parent
4d0b06f42c
commit
3a8d50a355
|
@ -70,6 +70,7 @@ static gboolean gst_av1_dec_start (GstVideoDecoder * dec);
|
||||||
static gboolean gst_av1_dec_stop (GstVideoDecoder * dec);
|
static gboolean gst_av1_dec_stop (GstVideoDecoder * dec);
|
||||||
static gboolean gst_av1_dec_set_format (GstVideoDecoder * dec,
|
static gboolean gst_av1_dec_set_format (GstVideoDecoder * dec,
|
||||||
GstVideoCodecState * state);
|
GstVideoCodecState * state);
|
||||||
|
static gboolean gst_av1_dec_flush (GstVideoDecoder * dec);
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_av1_dec_handle_frame (GstVideoDecoder * decoder,
|
gst_av1_dec_handle_frame (GstVideoDecoder * decoder,
|
||||||
GstVideoCodecFrame * frame);
|
GstVideoCodecFrame * frame);
|
||||||
|
@ -109,6 +110,8 @@ gst_av1_dec_class_init (GstAV1DecClass * klass)
|
||||||
|
|
||||||
vdec_class->start = GST_DEBUG_FUNCPTR (gst_av1_dec_start);
|
vdec_class->start = GST_DEBUG_FUNCPTR (gst_av1_dec_start);
|
||||||
vdec_class->stop = GST_DEBUG_FUNCPTR (gst_av1_dec_stop);
|
vdec_class->stop = GST_DEBUG_FUNCPTR (gst_av1_dec_stop);
|
||||||
|
vdec_class->flush = GST_DEBUG_FUNCPTR (gst_av1_dec_flush);
|
||||||
|
|
||||||
vdec_class->set_format = GST_DEBUG_FUNCPTR (gst_av1_dec_set_format);
|
vdec_class->set_format = GST_DEBUG_FUNCPTR (gst_av1_dec_set_format);
|
||||||
vdec_class->handle_frame = GST_DEBUG_FUNCPTR (gst_av1_dec_handle_frame);
|
vdec_class->handle_frame = GST_DEBUG_FUNCPTR (gst_av1_dec_handle_frame);
|
||||||
|
|
||||||
|
@ -209,6 +212,24 @@ gst_av1_dec_set_format (GstVideoDecoder * dec, GstVideoCodecState * state)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gst_av1_dec_flush (GstVideoDecoder * dec)
|
||||||
|
{
|
||||||
|
GstAV1Dec *av1dec = GST_AV1_DEC_CAST (dec);
|
||||||
|
|
||||||
|
if (av1dec->output_state) {
|
||||||
|
gst_video_codec_state_unref (av1dec->output_state);
|
||||||
|
av1dec->output_state = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (av1dec->decoder_inited) {
|
||||||
|
aom_codec_destroy (&av1dec->decoder);
|
||||||
|
}
|
||||||
|
av1dec->decoder_inited = FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_av1_dec_open_codec (GstAV1Dec * av1dec, GstVideoCodecFrame * frame)
|
gst_av1_dec_open_codec (GstAV1Dec * av1dec, GstVideoCodecFrame * frame)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue