mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
omxvideodec: use flush because reset is deprecated
https://bugzilla.gnome.org/show_bug.cgi?id=726038
This commit is contained in:
parent
777411c286
commit
39ca9f980e
1 changed files with 6 additions and 11 deletions
|
@ -67,8 +67,7 @@ static gboolean gst_omx_video_dec_start (GstVideoDecoder * decoder);
|
||||||
static gboolean gst_omx_video_dec_stop (GstVideoDecoder * decoder);
|
static gboolean gst_omx_video_dec_stop (GstVideoDecoder * decoder);
|
||||||
static gboolean gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
|
static gboolean gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
|
||||||
GstVideoCodecState * state);
|
GstVideoCodecState * state);
|
||||||
static gboolean gst_omx_video_dec_reset (GstVideoDecoder * decoder,
|
static gboolean gst_omx_video_dec_flush (GstVideoDecoder * decoder);
|
||||||
gboolean hard);
|
|
||||||
static GstFlowReturn gst_omx_video_dec_handle_frame (GstVideoDecoder * decoder,
|
static GstFlowReturn gst_omx_video_dec_handle_frame (GstVideoDecoder * decoder,
|
||||||
GstVideoCodecFrame * frame);
|
GstVideoCodecFrame * frame);
|
||||||
static GstFlowReturn gst_omx_video_dec_finish (GstVideoDecoder * decoder);
|
static GstFlowReturn gst_omx_video_dec_finish (GstVideoDecoder * decoder);
|
||||||
|
@ -114,7 +113,7 @@ gst_omx_video_dec_class_init (GstOMXVideoDecClass * klass)
|
||||||
video_decoder_class->close = GST_DEBUG_FUNCPTR (gst_omx_video_dec_close);
|
video_decoder_class->close = GST_DEBUG_FUNCPTR (gst_omx_video_dec_close);
|
||||||
video_decoder_class->start = GST_DEBUG_FUNCPTR (gst_omx_video_dec_start);
|
video_decoder_class->start = GST_DEBUG_FUNCPTR (gst_omx_video_dec_start);
|
||||||
video_decoder_class->stop = GST_DEBUG_FUNCPTR (gst_omx_video_dec_stop);
|
video_decoder_class->stop = GST_DEBUG_FUNCPTR (gst_omx_video_dec_stop);
|
||||||
video_decoder_class->reset = GST_DEBUG_FUNCPTR (gst_omx_video_dec_reset);
|
video_decoder_class->flush = GST_DEBUG_FUNCPTR (gst_omx_video_dec_flush);
|
||||||
video_decoder_class->set_format =
|
video_decoder_class->set_format =
|
||||||
GST_DEBUG_FUNCPTR (gst_omx_video_dec_set_format);
|
GST_DEBUG_FUNCPTR (gst_omx_video_dec_set_format);
|
||||||
video_decoder_class->handle_frame =
|
video_decoder_class->handle_frame =
|
||||||
|
@ -1941,16 +1940,12 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_omx_video_dec_reset (GstVideoDecoder * decoder, gboolean hard)
|
gst_omx_video_dec_flush (GstVideoDecoder * decoder)
|
||||||
{
|
{
|
||||||
GstOMXVideoDec *self;
|
GstOMXVideoDec *self = GST_OMX_VIDEO_DEC (decoder);
|
||||||
OMX_ERRORTYPE err = OMX_ErrorNone;
|
OMX_ERRORTYPE err = OMX_ErrorNone;
|
||||||
|
|
||||||
self = GST_OMX_VIDEO_DEC (decoder);
|
GST_DEBUG_OBJECT (self, "Flushing decoder");
|
||||||
|
|
||||||
/* FIXME: Handle different values of hard */
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Resetting decoder");
|
|
||||||
|
|
||||||
if (gst_omx_component_get_state (self->dec, 0) == OMX_StateLoaded)
|
if (gst_omx_component_get_state (self->dec, 0) == OMX_StateLoaded)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -2000,7 +1995,7 @@ gst_omx_video_dec_reset (GstVideoDecoder * decoder, gboolean hard)
|
||||||
gst_pad_start_task (GST_VIDEO_DECODER_SRC_PAD (self),
|
gst_pad_start_task (GST_VIDEO_DECODER_SRC_PAD (self),
|
||||||
(GstTaskFunction) gst_omx_video_dec_loop, decoder, NULL);
|
(GstTaskFunction) gst_omx_video_dec_loop, decoder, NULL);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Reset decoder");
|
GST_DEBUG_OBJECT (self, "Flush decoder");
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue