Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1673>
else
gst_query_add_allocation_pool (query, pool, size, min, max);
+ if (!base->has_videometa) {
+ if ((base->copy_frames = gst_va_pool_requires_video_meta (pool))) {
+ GST_INFO_OBJECT (base, "Raw frame copy enabled.");
+ _create_other_pool (base, other_allocator, &other_params, caps, size);
+ }
+ }
+ if (!base->copy_frames)
+ gst_clear_object (&base->other_pool);
+
gst_object_unref (allocator);
gst_object_unref (pool);
GstVideoAlignment valign;
gboolean has_videometa;
+
+ gboolean copy_frames;
};
struct _GstVaBaseDecClass
#include "gstvah264dec.h"
#include "gstvabasedec.h"
-#include "gstvapool.h"
GST_DEBUG_CATEGORY_STATIC (gst_va_h264dec_debug);
#ifndef GST_DISABLE_GST_DEBUG
gint dpb_size;
gboolean need_negotiation;
- gboolean copy_frames;
};
#define parent_class gst_va_base_dec_parent_class
gst_va_h264_dec_output_picture (GstH264Decoder * decoder,
GstVideoCodecFrame * frame, GstH264Picture * picture)
{
+ GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
GstVaH264Dec *self = GST_VA_H264_DEC (decoder);
GST_LOG_OBJECT (self,
return self->last_ret;
}
- if (self->copy_frames)
- gst_va_base_dec_copy_output_buffer (GST_VA_BASE_DEC (self), frame);
+ if (base->copy_frames)
+ gst_va_base_dec_copy_output_buffer (base, frame);
gst_h264_picture_unref (picture);
}
}
- if (!base->has_videometa) {
- GstBufferPool *pool;
-
- pool = gst_video_decoder_get_buffer_pool (GST_VIDEO_DECODER (self));
- self->copy_frames = gst_va_pool_requires_video_meta (pool);
- gst_object_unref (pool);
-
- if (self->copy_frames)
- GST_INFO_OBJECT (self, "Raw frame copy enabled.");
- }
-
return TRUE;
}
#include "gstvavp8dec.h"
#include "gstvabasedec.h"
-#include "gstvapool.h"
GST_DEBUG_CATEGORY_STATIC (gst_va_vp8dec_debug);
#ifndef GST_DISABLE_GST_DEBUG
GstFlowReturn last_ret;
gboolean need_negotiation;
- gboolean copy_frames;
};
#define parent_class gst_va_base_dec_parent_class
}
}
- if (!base->has_videometa) {
- GstBufferPool *pool;
-
- pool = gst_video_decoder_get_buffer_pool (GST_VIDEO_DECODER (self));
- self->copy_frames = gst_va_pool_requires_video_meta (pool);
- gst_object_unref (pool);
- }
-
return TRUE;
}
gst_va_vp8_dec_output_picture (GstVp8Decoder * decoder,
GstVideoCodecFrame * frame, GstVp8Picture * picture)
{
+ GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
GstVaVp8Dec *self = GST_VA_VP8_DEC (decoder);
GST_LOG_OBJECT (self,
return self->last_ret;
}
- if (self->copy_frames)
- gst_va_base_dec_copy_output_buffer (GST_VA_BASE_DEC (self), frame);
+ if (base->copy_frames)
+ gst_va_base_dec_copy_output_buffer (base, frame);
gst_vp8_picture_unref (picture);