mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
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:
parent
9c56c1b3e8
commit
37fa6df57d
1 changed files with 17 additions and 19 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue