va: allocator: refactor GstVaDmabufAllocator

Move code down to group it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1626>
This commit is contained in:
Víctor Manuel Jáquez Leal 2020-10-03 16:37:54 +02:00 committed by GStreamer Merge Bot
parent 9c56c1b3e8
commit 37fa6df57d

View file

@ -34,25 +34,6 @@
#define GST_CAT_DEFAULT gst_va_memory_debug
GST_DEBUG_CATEGORY_STATIC (gst_va_memory_debug);
struct _GstVaDmabufAllocator
{
GstDmaBufAllocator parent;
/* queue for disposed surfaces */
GstAtomicQueue *available_mems;
GstVaDisplay *display;
GstMemoryMapFunction parent_map;
GCond buffer_cond;
};
static void _init_debug_category (void);
#define gst_va_dmabuf_allocator_parent_class dmabuf_parent_class
G_DEFINE_TYPE_WITH_CODE (GstVaDmabufAllocator, gst_va_dmabuf_allocator,
GST_TYPE_DMABUF_ALLOCATOR, _init_debug_category ());
static void
_init_debug_category (void)
{
@ -381,6 +362,23 @@ gst_va_buffer_surface_new (VASurfaceID surface, GstVideoFormat format,
/*=========================== GstVaDmabufAllocator ===========================*/
struct _GstVaDmabufAllocator
{
GstDmaBufAllocator parent;
/* queue for disposed surfaces */
GstAtomicQueue *available_mems;
GstVaDisplay *display;
GstMemoryMapFunction parent_map;
GCond buffer_cond;
};
#define gst_va_dmabuf_allocator_parent_class dmabuf_parent_class
G_DEFINE_TYPE_WITH_CODE (GstVaDmabufAllocator, gst_va_dmabuf_allocator,
GST_TYPE_DMABUF_ALLOCATOR, _init_debug_category ());
static gpointer
gst_va_dmabuf_mem_map (GstMemory * gmem, gsize maxsize, GstMapFlags flags)
{