mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
vkh26xdec: implement close() vmethod
Since a validation layer error is signaled at EOS because it's required to wait for the last frame to be processed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6400>
This commit is contained in:
parent
316ca23cab
commit
a6608d72e6
2 changed files with 30 additions and 12 deletions
|
@ -177,12 +177,6 @@ gst_vulkan_h264_decoder_close (GstVideoDecoder * decoder)
|
|||
{
|
||||
GstVulkanH264Decoder *self = GST_VULKAN_H264_DECODER (decoder);
|
||||
|
||||
if (self->decoder)
|
||||
gst_vulkan_decoder_stop (self->decoder);
|
||||
|
||||
if (self->output_state)
|
||||
gst_video_codec_state_unref (self->output_state);
|
||||
|
||||
gst_clear_object (&self->decoder);
|
||||
gst_clear_object (&self->decode_queue);
|
||||
gst_clear_object (&self->graphic_queue);
|
||||
|
@ -192,6 +186,20 @@ gst_vulkan_h264_decoder_close (GstVideoDecoder * decoder)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_vulkan_h264_decoder_stop (GstVideoDecoder * decoder)
|
||||
{
|
||||
GstVulkanH264Decoder *self = GST_VULKAN_H264_DECODER (decoder);
|
||||
|
||||
if (self->decoder)
|
||||
gst_vulkan_decoder_stop (self->decoder);
|
||||
|
||||
if (self->output_state)
|
||||
gst_video_codec_state_unref (self->output_state);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_vulkan_h264_decoder_set_context (GstElement * element, GstContext * context)
|
||||
{
|
||||
|
@ -1312,6 +1320,7 @@ gst_vulkan_h264_decoder_class_init (GstVulkanH264DecoderClass * klass)
|
|||
|
||||
decoder_class->open = GST_DEBUG_FUNCPTR (gst_vulkan_h264_decoder_open);
|
||||
decoder_class->close = GST_DEBUG_FUNCPTR (gst_vulkan_h264_decoder_close);
|
||||
decoder_class->stop = GST_DEBUG_FUNCPTR (gst_vulkan_h264_decoder_stop);
|
||||
decoder_class->src_query =
|
||||
GST_DEBUG_FUNCPTR (gst_vulkan_h264_decoder_src_query);
|
||||
decoder_class->sink_query =
|
||||
|
|
|
@ -235,12 +235,6 @@ gst_vulkan_h265_decoder_close (GstVideoDecoder * decoder)
|
|||
{
|
||||
GstVulkanH265Decoder *self = GST_VULKAN_H265_DECODER (decoder);
|
||||
|
||||
if (self->decoder)
|
||||
gst_vulkan_decoder_stop (self->decoder);
|
||||
|
||||
if (self->output_state)
|
||||
gst_video_codec_state_unref (self->output_state);
|
||||
|
||||
gst_clear_object (&self->decoder);
|
||||
gst_clear_object (&self->decode_queue);
|
||||
gst_clear_object (&self->graphic_queue);
|
||||
|
@ -250,6 +244,20 @@ gst_vulkan_h265_decoder_close (GstVideoDecoder * decoder)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_vulkan_h265_decoder_stop (GstVideoDecoder * decoder)
|
||||
{
|
||||
GstVulkanH265Decoder *self = GST_VULKAN_H265_DECODER (decoder);
|
||||
|
||||
if (self->decoder)
|
||||
gst_vulkan_decoder_stop (self->decoder);
|
||||
|
||||
if (self->output_state)
|
||||
gst_video_codec_state_unref (self->output_state);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_vulkan_h265_decoder_negotiate (GstVideoDecoder * decoder)
|
||||
{
|
||||
|
@ -1657,6 +1665,7 @@ gst_vulkan_h265_decoder_class_init (GstVulkanH265DecoderClass * klass)
|
|||
GST_DEBUG_FUNCPTR (gst_vulkan_h265_decoder_sink_query);
|
||||
decoder_class->open = GST_DEBUG_FUNCPTR (gst_vulkan_h265_decoder_open);
|
||||
decoder_class->close = GST_DEBUG_FUNCPTR (gst_vulkan_h265_decoder_close);
|
||||
decoder_class->stop = GST_DEBUG_FUNCPTR (gst_vulkan_h265_decoder_stop);
|
||||
decoder_class->negotiate =
|
||||
GST_DEBUG_FUNCPTR (gst_vulkan_h265_decoder_negotiate);
|
||||
decoder_class->decide_allocation =
|
||||
|
|
Loading…
Reference in a new issue