v4l2codecs: dec: Remove has_videometa member

Now that the code is properly located, this member is not needed
anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9305>
This commit is contained in:
Nicolas Dufresne 2025-06-27 09:49:00 -04:00 committed by GStreamer Marge Bot
parent c7b0b9a816
commit 0fbd76dd50
6 changed files with 24 additions and 24 deletions

View File

@ -103,7 +103,6 @@ struct _GstV4l2CodecAV1Dec
GstV4l2CodecAllocator *src_allocator;
GstV4l2CodecPool *src_pool;
gint min_pool_size;
gboolean has_videometa;
gboolean streaming;
gboolean copy_frames;
gboolean need_negotiation;
@ -413,12 +412,13 @@ gst_v4l2_codec_av1_dec_decide_allocation (GstVideoDecoder * decoder,
GstV4l2CodecAV1Dec *self = GST_V4L2_CODEC_AV1_DEC (decoder);
GstCaps *caps = NULL;
guint min = 0, num_bitstream;
gboolean has_videometa;
g_clear_object (&self->src_pool);
g_clear_object (&self->src_allocator);
g_clear_object (&self->sink_allocator);
self->has_videometa = gst_query_find_allocation_meta (query,
has_videometa = gst_query_find_allocation_meta (query,
GST_VIDEO_META_API_TYPE, NULL);
gst_query_parse_allocation (query, &caps, NULL);
@ -427,14 +427,14 @@ gst_v4l2_codec_av1_dec_decide_allocation (GstVideoDecoder * decoder,
return FALSE;
}
if (gst_video_is_dma_drm_caps (caps) && !self->has_videometa) {
if (gst_video_is_dma_drm_caps (caps) && !has_videometa) {
GST_ERROR_OBJECT (self,
"DMABuf caps negotiated without the mandatory support of VideoMeta");
return FALSE;
}
/* Check if we can zero-copy buffers */
if (!self->has_videometa) {
if (!has_videometa) {
GstVideoInfo ref_vinfo;
gint i;

View File

@ -109,7 +109,6 @@ struct _GstV4l2CodecH264Dec
GstV4l2CodecAllocator *src_allocator;
GstV4l2CodecPool *src_pool;
gint min_pool_size;
gboolean has_videometa;
gboolean streaming;
gboolean interlaced;
gboolean need_sequence;
@ -454,6 +453,7 @@ gst_v4l2_codec_h264_dec_decide_allocation (GstVideoDecoder * decoder,
GstV4l2CodecH264Dec *self = GST_V4L2_CODEC_H264_DEC (decoder);
GstCaps *caps = NULL;
guint min = 0, num_bitstream;
gboolean has_videometa;
/* If we are streaming here, then it means there is nothing allocation
* related in the new state and allocation can be ignored */
@ -464,7 +464,7 @@ gst_v4l2_codec_h264_dec_decide_allocation (GstVideoDecoder * decoder,
g_clear_object (&self->src_allocator);
g_clear_object (&self->sink_allocator);
self->has_videometa = gst_query_find_allocation_meta (query,
has_videometa = gst_query_find_allocation_meta (query,
GST_VIDEO_META_API_TYPE, NULL);
gst_query_parse_allocation (query, &caps, NULL);
@ -473,14 +473,14 @@ gst_v4l2_codec_h264_dec_decide_allocation (GstVideoDecoder * decoder,
return FALSE;
}
if (gst_video_is_dma_drm_caps (caps) && !self->has_videometa) {
if (gst_video_is_dma_drm_caps (caps) && !has_videometa) {
GST_ERROR_OBJECT (self,
"DMABuf caps negotiated without the mandatory support of VideoMeta");
return FALSE;
}
/* Check if we can zero-copy buffers */
if (!self->has_videometa) {
if (!has_videometa) {
GstVideoInfo ref_vinfo;
gint i;

View File

@ -109,7 +109,6 @@ struct _GstV4l2CodecH265Dec
GstV4l2CodecAllocator *src_allocator;
GstV4l2CodecPool *src_pool;
gint min_pool_size;
gboolean has_videometa;
gboolean streaming;
gboolean copy_frames;
gboolean need_sequence;
@ -484,6 +483,7 @@ gst_v4l2_codec_h265_dec_decide_allocation (GstVideoDecoder * decoder,
GstV4l2CodecH265Dec *self = GST_V4L2_CODEC_H265_DEC (decoder);
GstCaps *caps = NULL;
guint min = 0, num_bitstream;
gboolean has_videometa;
if (self->streaming)
goto no_internal_changes;
@ -492,7 +492,7 @@ gst_v4l2_codec_h265_dec_decide_allocation (GstVideoDecoder * decoder,
g_clear_object (&self->src_allocator);
g_clear_object (&self->sink_allocator);
self->has_videometa = gst_query_find_allocation_meta (query,
has_videometa = gst_query_find_allocation_meta (query,
GST_VIDEO_META_API_TYPE, NULL);
gst_query_parse_allocation (query, &caps, NULL);
@ -501,14 +501,14 @@ gst_v4l2_codec_h265_dec_decide_allocation (GstVideoDecoder * decoder,
return FALSE;
}
if (gst_video_is_dma_drm_caps (caps) && !self->has_videometa) {
if (gst_video_is_dma_drm_caps (caps) && !has_videometa) {
GST_ERROR_OBJECT (self,
"DMABuf caps negotiated without the mandatory support of VideoMeta");
return FALSE;
}
/* Check if we can zero-copy buffers */
if (!self->has_videometa) {
if (!has_videometa) {
GstVideoInfo ref_vinfo;
gint i;

View File

@ -119,7 +119,6 @@ struct _GstV4l2CodecMpeg2Dec
GstV4l2CodecAllocator *src_allocator;
GstV4l2CodecPool *src_pool;
gint min_pool_size;
gboolean has_videometa;
gboolean streaming;
GstMemory *bitstream;
@ -376,6 +375,7 @@ gst_v4l2_codec_mpeg2_dec_decide_allocation (GstVideoDecoder * decoder,
GstV4l2CodecMpeg2Dec *self = GST_V4L2_CODEC_MPEG2_DEC (decoder);
GstCaps *caps = NULL;
guint min = 0, num_bitstream;
gboolean has_videometa;
/* If we are streaming here, then it means there is nothing allocation
* related in the new state and allocation can be ignored */
@ -386,7 +386,7 @@ gst_v4l2_codec_mpeg2_dec_decide_allocation (GstVideoDecoder * decoder,
g_clear_object (&self->src_allocator);
g_clear_object (&self->sink_allocator);
self->has_videometa = gst_query_find_allocation_meta (query,
has_videometa = gst_query_find_allocation_meta (query,
GST_VIDEO_META_API_TYPE, NULL);
gst_query_parse_allocation (query, &caps, NULL);
@ -395,14 +395,14 @@ gst_v4l2_codec_mpeg2_dec_decide_allocation (GstVideoDecoder * decoder,
return FALSE;
}
if (gst_video_is_dma_drm_caps (caps) && !self->has_videometa) {
if (gst_video_is_dma_drm_caps (caps) && !has_videometa) {
GST_ERROR_OBJECT (self,
"DMABuf caps negotiated without the mandatory support of VideoMeta");
return FALSE;
}
/* Check if we can zero-copy buffers */
if (!self->has_videometa) {
if (!has_videometa) {
GstVideoInfo ref_vinfo;
gint i;

View File

@ -123,7 +123,6 @@ struct _GstV4l2CodecVp8Dec
GstV4l2CodecAllocator *src_allocator;
GstV4l2CodecPool *src_pool;
gint min_pool_size;
gboolean has_videometa;
gboolean streaming;
gboolean copy_frames;
@ -337,6 +336,7 @@ gst_v4l2_codec_vp8_dec_decide_allocation (GstVideoDecoder * decoder,
GstCaps *caps = NULL;
guint min = 0;
guint num_bitstream;
gboolean has_videometa;
if (self->streaming)
goto no_internal_changes;
@ -345,7 +345,7 @@ gst_v4l2_codec_vp8_dec_decide_allocation (GstVideoDecoder * decoder,
g_clear_object (&self->src_allocator);
g_clear_object (&self->sink_allocator);
self->has_videometa = gst_query_find_allocation_meta (query,
has_videometa = gst_query_find_allocation_meta (query,
GST_VIDEO_META_API_TYPE, NULL);
gst_query_parse_allocation (query, &caps, NULL);
@ -354,14 +354,14 @@ gst_v4l2_codec_vp8_dec_decide_allocation (GstVideoDecoder * decoder,
return FALSE;
}
if (gst_video_is_dma_drm_caps (caps) && !self->has_videometa) {
if (gst_video_is_dma_drm_caps (caps) && !has_videometa) {
GST_ERROR_OBJECT (self,
"DMABuf caps negotiated without the mandatory support of VideoMeta");
return FALSE;
}
/* Check if we can zero-copy buffers */
if (!self->has_videometa) {
if (!has_videometa) {
GstVideoInfo ref_vinfo;
gint i;

View File

@ -123,7 +123,6 @@ struct _GstV4l2CodecVp9Dec
GstV4l2CodecAllocator *sink_allocator;
GstV4l2CodecAllocator *src_allocator;
GstV4l2CodecPool *src_pool;
gboolean has_videometa;
gboolean streaming;
gboolean copy_frames;
gboolean need_negotiation;
@ -610,12 +609,13 @@ gst_v4l2_codec_vp9_dec_decide_allocation (GstVideoDecoder * decoder,
GstCaps *caps = NULL;
guint min = 0;
guint num_bitstream;
gboolean has_videometa;
g_clear_object (&self->src_pool);
g_clear_object (&self->src_allocator);
g_clear_object (&self->sink_allocator);
self->has_videometa = gst_query_find_allocation_meta (query,
has_videometa = gst_query_find_allocation_meta (query,
GST_VIDEO_META_API_TYPE, NULL);
gst_query_parse_allocation (query, &caps, NULL);
@ -624,14 +624,14 @@ gst_v4l2_codec_vp9_dec_decide_allocation (GstVideoDecoder * decoder,
return FALSE;
}
if (gst_video_is_dma_drm_caps (caps) && !self->has_videometa) {
if (gst_video_is_dma_drm_caps (caps) && !has_videometa) {
GST_ERROR_OBJECT (self,
"DMABuf caps negotiated without the mandatory support of VideoMeta");
return FALSE;
}
/* Check if we can zero-copy buffers */
if (!self->has_videometa) {
if (!has_videometa) {
GstVideoInfo ref_vinfo;
gint i;