# GstDRMDumbAllocator

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstAllocator
                    ╰──GstDRMDumbAllocator

Private intance object for GstDRMDumbAllocator.

Since : 1.24

### Class structure

#### GstDRMDumbAllocatorClass

##### Fields

`parent_class` (GstAllocatorClass) –

Parent Class.

### GstAllocators.DRMDumbAllocatorClass

##### Attributes

`parent_class` (Gst.AllocatorClass) –

Parent Class.

### GstAllocators.DRMDumbAllocatorClass

##### Attributes

`parent_class` (Gst.AllocatorClass) –

Parent Class.

## GstAllocators.DRMDumbAllocator

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Allocator
                    ╰──GstAllocators.DRMDumbAllocator

Private intance object for GstAllocators.DRMDumbAllocator.

Since : 1.24

## GstAllocators.DRMDumbAllocator

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Allocator
                    ╰──GstAllocators.DRMDumbAllocator

Private intance object for GstAllocators.DRMDumbAllocator.

Since : 1.24

### Constructors

#### gst_drm_dumb_allocator_new_with_device_path

    GstAllocator *
    gst_drm_dumb_allocator_new_with_device_path (const gchar * drm_device_path)

Creates a new GstDRMDumbAllocator for the specific device path. This function can fail if the path does not exist, is not a DRM device or if the DRM device doesnot support DUMB allocation.

Parameters:

`drm_device_path` ( [typefilename]) –

path to the DRM device to open

Returns ( [transfer: full][nullable]) –

a new DRM Dumb allocator. Use gst_object_unref to release the allocator after usage.

Since : 1.24

#### GstAllocators.DRMDumbAllocator.prototype.new_with_device_path

    function GstAllocators.DRMDumbAllocator.prototype.new_with_device_path(drm_device_path: filename): {
        // javascript wrapper for 'gst_drm_dumb_allocator_new_with_device_path'
    }

Creates a new GstAllocators.DRMDumbAllocator for the specific device path. This function can fail if the path does not exist, is not a DRM device or if the DRM device doesnot support DUMB allocation.

Parameters:

`drm_device_path` (filename) –

path to the DRM device to open

Returns (Gst.Allocator) –

a new DRM Dumb allocator. Use Gst.Object.prototype.unref to release the allocator after usage.

Since : 1.24

#### GstAllocators.DRMDumbAllocator.new_with_device_path

    def GstAllocators.DRMDumbAllocator.new_with_device_path (drm_device_path):
        #python wrapper for 'gst_drm_dumb_allocator_new_with_device_path'

Creates a new GstAllocators.DRMDumbAllocator for the specific device path. This function can fail if the path does not exist, is not a DRM device or if the DRM device doesnot support DUMB allocation.

Parameters:

`drm_device_path` (str) –

path to the DRM device to open

Returns (Gst.Allocator) –

a new DRM Dumb allocator. Use Gst.Object.unref to release the allocator after usage.

Since : 1.24

#### gst_drm_dumb_allocator_new_with_fd

    GstAllocator *
    gst_drm_dumb_allocator_new_with_fd (gint drm_fd)

Creates a new GstDRMDumbAllocator for the specific file desciptor. This function can fail if the file descriptor is not a DRM device or if the DRM device does not support DUMB allocation.

Parameters:

`drm_fd` –

file descriptor of the DRM device

Returns ( [transfer: full][nullable]) –

a new DRM Dumb allocator. Use gst_object_unref to release the allocator after usage.

Since : 1.24

#### GstAllocators.DRMDumbAllocator.prototype.new_with_fd

    function GstAllocators.DRMDumbAllocator.prototype.new_with_fd(drm_fd: Number): {
        // javascript wrapper for 'gst_drm_dumb_allocator_new_with_fd'
    }

Creates a new GstAllocators.DRMDumbAllocator for the specific file desciptor. This function can fail if the file descriptor is not a DRM device or if the DRM device does not support DUMB allocation.

Parameters:

`drm_fd` (Number) –

file descriptor of the DRM device

Returns (Gst.Allocator) –

a new DRM Dumb allocator. Use Gst.Object.prototype.unref to release the allocator after usage.

Since : 1.24

#### GstAllocators.DRMDumbAllocator.new_with_fd

    def GstAllocators.DRMDumbAllocator.new_with_fd (drm_fd):
        #python wrapper for 'gst_drm_dumb_allocator_new_with_fd'

Creates a new GstAllocators.DRMDumbAllocator for the specific file desciptor. This function can fail if the file descriptor is not a DRM device or if the DRM device does not support DUMB allocation.

Parameters:

`drm_fd` (int) –

file descriptor of the DRM device

Returns (Gst.Allocator) –

a new DRM Dumb allocator. Use Gst.Object.unref to release the allocator after usage.

Since : 1.24

### Methods

#### gst_drm_dumb_allocator_alloc

    GstMemory *
    gst_drm_dumb_allocator_alloc (GstAllocator * allocator,
                                  guint32 drm_fourcc,
                                  guint32 width,
                                  guint32 height,
                                  guint32 * out_pitch)

Allocated a DRM buffer object for the specific drm_fourcc, width and height. Note that the DRM Dumb allocation interface is agnostic to the pixel format. This drm_fourcc is converted into a bpp (bit-per-pixel) number and the height is scaled according to the sub-sampling.

Parameters:

`allocator` ( [typeGstAllocators.DRMDumbAllocator]) –

the allocator instance

`drm_fourcc` –

the DRM format to allocate for

`width` –

padded width for this allocation

`height` –

padded height for this allocation

`out_pitch` ( [out]) –

the pitch as returned by the driver

Returns ( [transfer: full]) –

a new DRM Dumb GstMemory. Use gst_memory_unref to release the memory after usage.

Since : 1.24

#### GstAllocators.DRMDumbAllocator.prototype.alloc

    function GstAllocators.DRMDumbAllocator.prototype.alloc(drm_fourcc: Number, width: Number, height: Number): {
        // javascript wrapper for 'gst_drm_dumb_allocator_alloc'
    }

Allocated a DRM buffer object for the specific drm_fourcc, width and height. Note that the DRM Dumb allocation interface is agnostic to the pixel format. This drm_fourcc is converted into a bpp (bit-per-pixel) number and the height is scaled according to the sub-sampling.

Parameters:

`allocator` (GstAllocators.DRMDumbAllocator) –

the allocator instance

`drm_fourcc` (Number) –

the DRM format to allocate for

`width` (Number) –

padded width for this allocation

`height` (Number) –

padded height for this allocation

Returns a tuple made of:

(Gst.Memory ) –

a new DRM Dumb Gst.Memory. Use gst_memory_unref (not introspectable) to release the memory after usage.

`out_pitch` (Number ) –

a new DRM Dumb Gst.Memory. Use gst_memory_unref (not introspectable) to release the memory after usage.

Since : 1.24

#### GstAllocators.DRMDumbAllocator.alloc

    def GstAllocators.DRMDumbAllocator.alloc (self, drm_fourcc, width, height):
        #python wrapper for 'gst_drm_dumb_allocator_alloc'

Allocated a DRM buffer object for the specific drm_fourcc, width and height. Note that the DRM Dumb allocation interface is agnostic to the pixel format. This drm_fourcc is converted into a bpp (bit-per-pixel) number and the height is scaled according to the sub-sampling.

Parameters:

`allocator` (GstAllocators.DRMDumbAllocator) –

the allocator instance

`drm_fourcc` (int) –

the DRM format to allocate for

`width` (int) –

padded width for this allocation

`height` (int) –

padded height for this allocation

Returns a tuple made of:

(Gst.Memory ) –

a new DRM Dumb Gst.Memory. Use gst_memory_unref (not introspectable) to release the memory after usage.

`out_pitch` (int ) –

a new DRM Dumb Gst.Memory. Use gst_memory_unref (not introspectable) to release the memory after usage.

Since : 1.24

#### gst_drm_dumb_allocator_has_prime_export

    gboolean
    gst_drm_dumb_allocator_has_prime_export (GstAllocator * allocator)

This function allow verifying if the driver support dma-buf exportation.

Parameters:

`allocator` ( [typeGstAllocators.DRMDumbAllocator]) –

the GstAllocator

Returns –

TRUE if the allocator support exporting dma-buf.

Since : 1.24

#### GstAllocators.DRMDumbAllocator.prototype.has_prime_export

    function GstAllocators.DRMDumbAllocator.prototype.has_prime_export(): {
        // javascript wrapper for 'gst_drm_dumb_allocator_has_prime_export'
    }

This function allow verifying if the driver support dma-buf exportation.

Parameters:

`allocator` (GstAllocators.DRMDumbAllocator) –

the Gst.Allocator

Returns (Number) –

true if the allocator support exporting dma-buf.

Since : 1.24

#### GstAllocators.DRMDumbAllocator.has_prime_export

    def GstAllocators.DRMDumbAllocator.has_prime_export (self):
        #python wrapper for 'gst_drm_dumb_allocator_has_prime_export'

This function allow verifying if the driver support dma-buf exportation.

Parameters:

`allocator` (GstAllocators.DRMDumbAllocator) –

the Gst.Allocator

Returns (bool) –

True if the allocator support exporting dma-buf.

Since : 1.24

### Properties

#### drm-device-path

    “drm-device-path” gchar *

Flags : Read / Write / Construct Only

Since : 1.24

#### drm-device-path

    “drm-device-path” filename

Flags : Read / Write / Construct Only

Since : 1.24

#### drm_device_path

    “self.props.drm_device_path” str

Flags : Read / Write / Construct Only

Since : 1.24

#### drm-fd

    “drm-fd” gint

Flags : Read / Write / Construct Only

Since : 1.24

#### drm-fd

    “drm-fd” Number

Flags : Read / Write / Construct Only

Since : 1.24

#### drm_fd

    “self.props.drm_fd” int

Flags : Read / Write / Construct Only

Since : 1.24

## Functions

### gst_drm_dumb_memory_export_dmabuf

    GstMemory *
    gst_drm_dumb_memory_export_dmabuf (GstMemory * mem)

Exports a DMABuf from the DRM Bumb buffer object. One can check if this feature is supported using gst_drm_dumb_allocator_has_prime_export;

Parameters:

`mem` –

the memory to export from

Returns –

a GstMemory from GstDmaBufAllocator wrapping the exported dma-buf file descriptor.

Since : 1.24

### GstAllocators.prototype.drm_dumb_memory_export_dmabuf

    function GstAllocators.prototype.drm_dumb_memory_export_dmabuf(mem: Gst.Memory): {
        // javascript wrapper for 'gst_drm_dumb_memory_export_dmabuf'
    }

Exports a DMABuf from the DRM Bumb buffer object. One can check if this feature is supported using GstAllocators.DRMDumbAllocator.prototype.has_prime_export;

Parameters:

`mem` (Gst.Memory) –

the memory to export from

Returns (Gst.Memory) –

a Gst.Memory from GstAllocators.DmaBufAllocator wrapping the exported dma-buf file descriptor.

Since : 1.24

### GstAllocators.drm_dumb_memory_export_dmabuf

    def GstAllocators.drm_dumb_memory_export_dmabuf (mem):
        #python wrapper for 'gst_drm_dumb_memory_export_dmabuf'

Exports a DMABuf from the DRM Bumb buffer object. One can check if this feature is supported using GstAllocators.DRMDumbAllocator.has_prime_export;

Parameters:

`mem` (Gst.Memory) –

the memory to export from

Returns (Gst.Memory) –

a Gst.Memory from GstAllocators.DmaBufAllocator wrapping the exported dma-buf file descriptor.

Since : 1.24

### gst_drm_dumb_memory_get_handle

    guint32
    gst_drm_dumb_memory_get_handle (GstMemory * mem)

Return the DRM buffer object handle associated with mem.

Parameters:

`mem` –

the memory to get the handle from

Returns –

the DRM buffer object handle associated with the memory, or 0. The handle is still owned by the GstMemory and cannot be used beyond the lifetime of this GstMemory unless it is being passed to DRM driver, which does handle a refcount internally.

Since : 1.24

### GstAllocators.prototype.drm_dumb_memory_get_handle

    function GstAllocators.prototype.drm_dumb_memory_get_handle(mem: Gst.Memory): {
        // javascript wrapper for 'gst_drm_dumb_memory_get_handle'
    }

Return the DRM buffer object handle associated with mem.

Parameters:

`mem` (Gst.Memory) –

the memory to get the handle from

Returns (Number) –

the DRM buffer object handle associated with the memory, or 0. The handle is still owned by the GstMemory and cannot be used beyond the lifetime of this GstMemory unless it is being passed to DRM driver, which does handle a refcount internally.

Since : 1.24

### GstAllocators.drm_dumb_memory_get_handle

    def GstAllocators.drm_dumb_memory_get_handle (mem):
        #python wrapper for 'gst_drm_dumb_memory_get_handle'

Return the DRM buffer object handle associated with mem.

Parameters:

`mem` (Gst.Memory) –

the memory to get the handle from

Returns (int) –

the DRM buffer object handle associated with the memory, or 0. The handle is still owned by the GstMemory and cannot be used beyond the lifetime of this GstMemory unless it is being passed to DRM driver, which does handle a refcount internally.

Since : 1.24

### gst_is_drm_dumb_memory

    gboolean
    gst_is_drm_dumb_memory (GstMemory * mem)

Parameters:

`mem` –

the memory to be checked

Returns –

TRUE if mem is DRM Dumb memory, otherwise FALSE

Since : 1.24

### GstAllocators.prototype.is_drm_dumb_memory

    function GstAllocators.prototype.is_drm_dumb_memory(mem: Gst.Memory): {
        // javascript wrapper for 'gst_is_drm_dumb_memory'
    }

Parameters:

`mem` (Gst.Memory) –

the memory to be checked

Returns (Number) –

true if mem is DRM Dumb memory, otherwise false

Since : 1.24

### GstAllocators.is_drm_dumb_memory

    def GstAllocators.is_drm_dumb_memory (mem):
        #python wrapper for 'gst_is_drm_dumb_memory'

Parameters:

`mem` (Gst.Memory) –

the memory to be checked

Returns (bool) –

True if mem is DRM Dumb memory, otherwise False

Since : 1.24

## Constants

### GST_TYPE_DRM_DUMB_ALLOCATOR

    #define GST_TYPE_DRM_DUMB_ALLOCATOR gst_drm_dumb_allocator_get_type ()

Macro that returns the GstDRMDumbAllocator type.

Since : 1.24

The results of the search are