gst_va_dmabuf_mem_map (GstMemory * gmem, gsize maxsize, GstMapFlags flags)
{
GstVaDmabufAllocator *self = GST_VA_DMABUF_ALLOCATOR (gmem->allocator);
- VASurfaceID surface = gst_va_memory_get_surface (gmem, NULL);
+ VASurfaceID surface = gst_va_memory_get_surface (gmem);
_sync_surface (self->display, surface);
g_cond_wait (&self->buffer_cond, GST_OBJECT_GET_LOCK (self));
mem[0] = gst_atomic_queue_pop (self->available_mems);
- surface = gst_va_memory_get_surface (mem[0], NULL);
+ surface = gst_va_memory_get_surface (mem[0]);
do {
pmem = gst_atomic_queue_peek (self->available_mems);
if (!pmem)
break;
- psurface = gst_va_memory_get_surface (pmem, NULL);
+ psurface = gst_va_memory_get_surface (pmem);
if (psurface != surface)
break;
mem = gst_atomic_queue_pop (self->available_mems);
GST_OBJECT_UNLOCK (self);
- surface = gst_va_memory_get_surface (mem, NULL);
+ surface = gst_va_memory_get_surface (mem);
gst_buffer_append_memory (buffer, mem);
GST_TRACE_OBJECT (self, "Prepared surface %#x in buffer %p", surface, buffer);
/*============ Utilities =====================================================*/
VASurfaceID
-gst_va_memory_get_surface (GstMemory * mem, GstVideoInfo * info)
+gst_va_memory_get_surface (GstMemory * mem)
{
VASurfaceID surface = VA_INVALID_ID;
buf = gst_mini_object_get_qdata (GST_MINI_OBJECT (mem),
gst_va_buffer_surface_quark ());
- if (buf) {
- if (info)
- *info = buf->info;
+ if (buf)
surface = buf->surface;
- }
} else if (GST_IS_VA_ALLOCATOR (mem->allocator)) {
GstVaMemory *va_mem = (GstVaMemory *) mem;
surface = va_mem->surface;
- if (info)
- *info = va_mem->info;
}
return surface;
}
VASurfaceID
-gst_va_buffer_get_surface (GstBuffer * buffer, GstVideoInfo * info)
+gst_va_buffer_get_surface (GstBuffer * buffer)
{
GstMemory *mem;
if (!mem)
return VA_INVALID_ID;
- return gst_va_memory_get_surface (mem, info);
+ return gst_va_memory_get_surface (mem);
}
gboolean gst_va_allocator_try (GstAllocator * allocator,
GstVaAllocationParams * params);
-VASurfaceID gst_va_memory_get_surface (GstMemory * mem,
- GstVideoInfo * info);
-VASurfaceID gst_va_buffer_get_surface (GstBuffer * buffer,
- GstVideoInfo * info);
+VASurfaceID gst_va_memory_get_surface (GstMemory * mem);
+VASurfaceID gst_va_buffer_get_surface (GstBuffer * buffer);
G_END_DECLS
{
VASurfaceID surface;
- surface = gst_va_buffer_get_surface (inbuf, NULL);
+ surface = gst_va_buffer_get_surface (inbuf);
if (surface != VA_INVALID_ID)
return TRUE;
if (res != GST_FLOW_OK)
return res;
- in_surface = gst_va_buffer_get_surface (buf, NULL);
- out_surface = gst_va_buffer_get_surface (outbuf, NULL);
+ in_surface = gst_va_buffer_get_surface (buf);
+ out_surface = gst_va_buffer_get_surface (outbuf);
if (!gst_va_filter_convert_surface (self->filter, in_surface, &self->in_info,
out_surface, &self->out_info)) {