static void
gst_msdk_system_allocator_class_init (GstMsdkSystemAllocatorClass * klass)
{
  GstAllocatorClass *const allocator_class = GST_ALLOCATOR_CLASS (klass);

  allocator_class->alloc = gst_msdk_system_allocator_alloc;
  allocator_class->free = gst_msdk_system_allocator_free;
}
static void gst_allocator_fast_malloc_class_init(GstAllocatorFastMallocClass* klass)
{
    auto* gobjectClass = G_OBJECT_CLASS(klass);
    gobjectClass->finalize = gst_allocator_fast_malloc_finalize;

    auto* gstAllocatorClass = GST_ALLOCATOR_CLASS(klass);
    gstAllocatorClass->alloc = gst_allocator_fast_malloc_alloc;
    gstAllocatorClass->free = gst_allocator_fast_malloc_free;
}
Esempio n. 3
0
static void
gst_shm_sink_allocator_class_init (GstShmSinkAllocatorClass * klass)
{
  GstAllocatorClass *allocator_class = GST_ALLOCATOR_CLASS (klass);
  GObjectClass *object_class = G_OBJECT_CLASS (klass);

  allocator_class->alloc = gst_shm_sink_allocator_alloc;
  allocator_class->free = gst_shm_sink_allocator_free;
  object_class->dispose = gst_shm_sink_allocator_dispose;
}
static void
gst_vaapi_video_allocator_class_init (GstVaapiVideoAllocatorClass * klass)
{
  GObjectClass *const object_class = G_OBJECT_CLASS (klass);
  GstAllocatorClass *const allocator_class = GST_ALLOCATOR_CLASS (klass);

  GST_DEBUG_CATEGORY_INIT (gst_debug_vaapivideomemory,
      "vaapivideomemory", 0, "VA-API video memory allocator");

  object_class->finalize = gst_vaapi_video_allocator_finalize;
  allocator_class->alloc = gst_vaapi_video_allocator_alloc;
  allocator_class->free = gst_vaapi_video_allocator_free;
}
void gst_test_phys_mem_allocator_class_init(GstTestPhysMemAllocatorClass *klass)
{
	GObjectClass *object_class = G_OBJECT_CLASS(klass);
	GstAllocatorClass *parent_class = GST_ALLOCATOR_CLASS(klass);

	GST_DEBUG_CATEGORY_INIT(test_phys_mem_allocator_debug, "testphysmemallocator", 0, "Allocator for physically contiguous memory blocks");

	klass->alloc_phys_mem  = NULL;
	klass->free_phys_mem   = NULL;
	klass->map_phys_mem    = NULL;
	klass->unmap_phys_mem  = NULL;
	parent_class->alloc    = GST_DEBUG_FUNCPTR(gst_test_phys_mem_allocator_alloc);
	parent_class->free     = GST_DEBUG_FUNCPTR(gst_test_phys_mem_allocator_free);
	object_class->finalize = GST_DEBUG_FUNCPTR(gst_test_phys_mem_allocator_finalize);
}
static void
_gl_mem_free (GstAllocator * allocator, GstMemory * mem)
{
  GST_ALLOCATOR_CLASS (parent_class)->free (allocator, mem);
}