}
static gboolean
-_try_allocator (GstVaH264Dec * self, GstAllocator * allocator, GstCaps * caps,
- guint * size)
+_try_allocator (GstVaH264Dec * self, GstAllocator * allocator, GstCaps * caps)
{
GstVaAllocationParams params = {
.usage_hint = VA_SURFACE_ATTRIB_USAGE_HINT_DECODER,
return FALSE;
}
- if (size)
- *size = GST_VIDEO_INFO_SIZE (¶ms.info);
-
return TRUE;
}
static GstAllocator *
-_create_allocator (GstVaH264Dec * self, GstCaps * caps, guint * size)
+_create_allocator (GstVaH264Dec * self, GstCaps * caps)
{
GstAllocator *allocator = NULL;
GstVaDisplay *display = NULL;
gst_object_unref (display);
- if (!_try_allocator (self, allocator, caps, size))
+ if (!_try_allocator (self, allocator, caps))
gst_clear_object (&allocator);
return allocator;
GstStructure *config;
GstVideoInfo info;
GstVaH264Dec *self = GST_VA_H264_DEC (decoder);
- guint size, min, max;
+ guint size = 0, min, max;
gboolean update_pool = FALSE, update_allocator = FALSE, has_videoalignment;
gst_query_parse_allocation (query, &caps, NULL);
}
if (!allocator) {
- if (!(allocator = _create_allocator (self, caps, &size)))
+ if (!(allocator = _create_allocator (self, caps)))
return FALSE;
}
}
static gboolean
-_try_allocator (GstVaVp8Dec * self, GstAllocator * allocator, GstCaps * caps,
- guint * size)
+_try_allocator (GstVaVp8Dec * self, GstAllocator * allocator, GstCaps * caps)
{
GstVaAllocationParams params = {
.usage_hint = VA_SURFACE_ATTRIB_USAGE_HINT_DECODER,
return FALSE;
}
- if (size)
- *size = GST_VIDEO_INFO_SIZE (¶ms.info);
-
return TRUE;
}
static GstAllocator *
-_create_allocator (GstVaVp8Dec * self, GstCaps * caps, guint * size)
+_create_allocator (GstVaVp8Dec * self, GstCaps * caps)
{
GstAllocator *allocator = NULL;
GstVaDisplay *display = NULL;
gst_object_unref (display);
- if (!_try_allocator (self, allocator, caps, size))
+ if (!_try_allocator (self, allocator, caps))
gst_clear_object (&allocator);
return allocator;
GstStructure *config;
GstVideoInfo info;
GstVaVp8Dec *self = GST_VA_VP8_DEC (decoder);
- guint size, min, max;
+ guint size = 0, min, max;
gboolean update_pool = FALSE, update_allocator = FALSE;
gst_query_parse_allocation (query, &caps, NULL);
}
if (!allocator) {
- if (!(allocator = _create_allocator (self, caps, &size)))
+ if (!(allocator = _create_allocator (self, caps)))
return FALSE;
}
static gboolean
_try_allocator (GstVaVpp * self, GstAllocator * allocator, GstCaps * caps,
- guint usage_hint, guint * size)
+ guint usage_hint)
{
GstVaAllocationParams params = {
.usage_hint = usage_hint,
return FALSE;
}
- if (size)
- *size = GST_VIDEO_INFO_SIZE (¶ms.info);
-
return TRUE;
}
static GstAllocator *
-_create_allocator (GstVaVpp * self, GstCaps * caps, guint usage_hint,
- guint * size)
+_create_allocator (GstVaVpp * self, GstCaps * caps, guint usage_hint)
{
GstAllocator *allocator = NULL;
allocator = gst_va_allocator_new (self->display, surface_formats);
}
- if (!_try_allocator (self, allocator, caps, usage_hint, size))
+ if (!_try_allocator (self, allocator, caps, usage_hint))
gst_clear_object (&allocator);
return allocator;
}
if (!allocator) {
- if (!(allocator = _create_allocator (self, caps, usage_hint, &size)))
+ if (!(allocator = _create_allocator (self, caps, usage_hint)))
return FALSE;
}
GstBufferPool *pool = NULL;
GstCaps *outcaps = NULL;
GstStructure *config;
- guint min, max, size, usage_hint = VA_SURFACE_ATTRIB_USAGE_HINT_VPP_WRITE;
+ guint min, max, size = 0, usage_hint = VA_SURFACE_ATTRIB_USAGE_HINT_VPP_WRITE;
gboolean update_pool, update_allocator;
gst_query_parse_allocation (query, &outcaps, NULL);
}
if (!allocator) {
- if (!(allocator = _create_allocator (self, outcaps, usage_hint, &size)))
+ if (!(allocator = _create_allocator (self, outcaps, usage_hint)))
return FALSE;
}
size = GST_VIDEO_INFO_SIZE (&self->in_info);
- allocator = _create_allocator (self, self->incaps, usage_hint, &size);
+ allocator = _create_allocator (self, self->incaps, usage_hint);
self->sinkpad_pool = _create_sinkpad_bufferpool (self->incaps, size, 0, 0,
usage_hint, allocator, ¶ms);