# GstVulkanMemory

GstVulkanMemory is a GstMemory subclass providing support for the mapping of Vulkan device memory.

## GstVulkanMemory

### Members

`mem` (GstMemory) –

the parent GstMemory

`device` (GstVulkanDevice *) –

the GstVulkanDevice this memory is allocated from

`mem_ptr` (VkDeviceMemory) –

the vulkan memory handle

`lock` (GMutex) –

lock for accessing/changing memory informat

`map_count` (guint) –

number of times this memory is mapped

`mapping` (gpointer) –

internal pointer to already mapped memory

Since : 1.18

## GstVulkan.VulkanMemory

### Members

`mem` (Gst.Memory) –

the parent Gst.Memory

`device` (GstVulkan.VulkanDevice) –

the GstVulkan.VulkanDevice this memory is allocated from

`mem_ptr` (Vulkan.DeviceMemory) –

the vulkan memory handle

`lock` (GLib.Mutex) –

lock for accessing/changing memory informat

`map_count` (Number) –

number of times this memory is mapped

`mapping` (Object) –

internal pointer to already mapped memory

Since : 1.18

## GstVulkan.VulkanMemory

### Members

`mem` (Gst.Memory) –

the parent Gst.Memory

`device` (GstVulkan.VulkanDevice) –

the GstVulkan.VulkanDevice this memory is allocated from

`mem_ptr` (Vulkan.DeviceMemory) –

the vulkan memory handle

`lock` (GLib.Mutex) –

lock for accessing/changing memory informat

`map_count` (int) –

number of times this memory is mapped

`mapping` (object) –

internal pointer to already mapped memory

Since : 1.18

### Functions

#### gst_vulkan_memory_alloc

    GstMemory *
    gst_vulkan_memory_alloc (GstVulkanDevice * device,
                             guint32 memory_type_index,
                             GstAllocationParams * params,
                             gsize size,
                             VkMemoryPropertyFlags mem_prop_flags)

Allocated a new GstVulkanMemory.

Parameters:

`device` –

a GstVulkanDevice

`memory_type_index` –

the Vulkan memory type index

`params` –

a GstAllocationParams

`size` –

the size to allocate

`mem_prop_flags` –
No description available
Returns –

a GstMemory object backed by a vulkan device memory

Since : 1.18

#### GstVulkan.prototype.vulkan_memory_alloc

    function GstVulkan.prototype.vulkan_memory_alloc(device: GstVulkan.VulkanDevice, memory_type_index: Number, params: Gst.AllocationParams, size: Number, mem_prop_flags: Vulkan.MemoryPropertyFlags): {
        // javascript wrapper for 'gst_vulkan_memory_alloc'
    }

Allocated a new GstVulkan.VulkanMemory.

Parameters:

`device` (GstVulkan.VulkanDevice) –

a GstVulkan.VulkanDevice

`memory_type_index` (Number) –

the Vulkan memory type index

`params` (Gst.AllocationParams) –

a Gst.AllocationParams

`size` (Number) –

the size to allocate

`mem_prop_flags` (Vulkan.MemoryPropertyFlags) –
No description available
Returns (Gst.Memory) –

a Gst.Memory object backed by a vulkan device memory

Since : 1.18

#### GstVulkan.vulkan_memory_alloc

    def GstVulkan.vulkan_memory_alloc (device, memory_type_index, params, size, mem_prop_flags):
        #python wrapper for 'gst_vulkan_memory_alloc'

Allocated a new GstVulkan.VulkanMemory.

Parameters:

`device` (GstVulkan.VulkanDevice) –

a GstVulkan.VulkanDevice

`memory_type_index` (int) –

the Vulkan memory type index

`params` (Gst.AllocationParams) –

a Gst.AllocationParams

`size` (int) –

the size to allocate

`mem_prop_flags` (Vulkan.MemoryPropertyFlags) –
No description available
Returns (Gst.Memory) –

a Gst.Memory object backed by a vulkan device memory

Since : 1.18

#### gst_vulkan_memory_find_memory_type_index_with_requirements

    gboolean
    gst_vulkan_memory_find_memory_type_index_with_requirements (GstVulkanDevice * device,
                                                                VkMemoryRequirements* req,
                                                                VkMemoryPropertyFlags properties,
                                                                guint32* type_index)

Parameters:

`device` –

a GstVulkanDevice

`req` –

memory requirements to look for

`properties` –

memory properties to search for

`type_index` ( [out]) –

resulting index of the memory type

Returns –

whether a valid memory type could be found

Since : 1.24

#### GstVulkan.prototype.vulkan_memory_find_memory_type_index_with_requirements

    function GstVulkan.prototype.vulkan_memory_find_memory_type_index_with_requirements(device: GstVulkan.VulkanDevice, req: Vulkan.MemoryRequirements, properties: Vulkan.MemoryPropertyFlags): {
        // javascript wrapper for 'gst_vulkan_memory_find_memory_type_index_with_requirements'
    }

Parameters:

`device` (GstVulkan.VulkanDevice) –

a GstVulkan.VulkanDevice

`req` (Vulkan.MemoryRequirements) –

memory requirements to look for

`properties` (Vulkan.MemoryPropertyFlags) –

memory properties to search for

Returns a tuple made of:

(Number ) –

whether a valid memory type could be found

`type_index` (Number ) –

whether a valid memory type could be found

Since : 1.24

#### GstVulkan.vulkan_memory_find_memory_type_index_with_requirements

    def GstVulkan.vulkan_memory_find_memory_type_index_with_requirements (device, req, properties):
        #python wrapper for 'gst_vulkan_memory_find_memory_type_index_with_requirements'

Parameters:

`device` (GstVulkan.VulkanDevice) –

a GstVulkan.VulkanDevice

`req` (Vulkan.MemoryRequirements) –

memory requirements to look for

`properties` (Vulkan.MemoryPropertyFlags) –

memory properties to search for

Returns a tuple made of:

(bool ) –

whether a valid memory type could be found

`type_index` (int ) –

whether a valid memory type could be found

Since : 1.24

#### gst_vulkan_memory_heap_flags_to_string

    gchar*
    gst_vulkan_memory_heap_flags_to_string (VkMemoryHeapFlags prop_bits)

Parameters:

`prop_bits` –
No description available
Returns –
No description available

Since : 1.18

#### GstVulkan.prototype.vulkan_memory_heap_flags_to_string

    function GstVulkan.prototype.vulkan_memory_heap_flags_to_string(prop_bits: Vulkan.MemoryHeapFlags): {
        // javascript wrapper for 'gst_vulkan_memory_heap_flags_to_string'
    }

Parameters:

`prop_bits` (Vulkan.MemoryHeapFlags) –
No description available
Returns (String) –
No description available

Since : 1.18

#### GstVulkan.vulkan_memory_heap_flags_to_string

    def GstVulkan.vulkan_memory_heap_flags_to_string (prop_bits):
        #python wrapper for 'gst_vulkan_memory_heap_flags_to_string'

Parameters:

`prop_bits` (Vulkan.MemoryHeapFlags) –
No description available
Returns (str) –
No description available

Since : 1.18

#### gst_vulkan_memory_init_once

    gst_vulkan_memory_init_once ()

Initializes the Vulkan memory allocator. It is safe to call this function multiple times. This must be called before any other GstVulkanMemory operation.

Since : 1.18

#### GstVulkan.prototype.vulkan_memory_init_once

    function GstVulkan.prototype.vulkan_memory_init_once(): {
        // javascript wrapper for 'gst_vulkan_memory_init_once'
    }

Initializes the Vulkan memory allocator. It is safe to call this function multiple times. This must be called before any other GstVulkan.VulkanMemory operation.

Since : 1.18

#### GstVulkan.vulkan_memory_init_once

    def GstVulkan.vulkan_memory_init_once ():
        #python wrapper for 'gst_vulkan_memory_init_once'

Initializes the Vulkan memory allocator. It is safe to call this function multiple times. This must be called before any other GstVulkan.VulkanMemory operation.

Since : 1.18

#### gst_vulkan_memory_property_flags_to_string

    gchar*
    gst_vulkan_memory_property_flags_to_string (VkMemoryPropertyFlags prop_bits)

Parameters:

`prop_bits` –
No description available
Returns –
No description available

Since : 1.18

#### GstVulkan.prototype.vulkan_memory_property_flags_to_string

    function GstVulkan.prototype.vulkan_memory_property_flags_to_string(prop_bits: Vulkan.MemoryPropertyFlags): {
        // javascript wrapper for 'gst_vulkan_memory_property_flags_to_string'
    }

Parameters:

`prop_bits` (Vulkan.MemoryPropertyFlags) –
No description available
Returns (String) –
No description available

Since : 1.18

#### GstVulkan.vulkan_memory_property_flags_to_string

    def GstVulkan.vulkan_memory_property_flags_to_string (prop_bits):
        #python wrapper for 'gst_vulkan_memory_property_flags_to_string'

Parameters:

`prop_bits` (Vulkan.MemoryPropertyFlags) –
No description available
Returns (str) –
No description available

Since : 1.18

## GstVulkanMemoryAllocator

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstAllocator
                    ╰──GstVulkanMemoryAllocator

Opaque GstVulkanMemoryAllocator struct

### Members

`parent` (GstAllocator) –

the parent GstAllocator

Since : 1.18

### Class structure

#### GstVulkanMemoryAllocatorClass

The GstVulkanMemoryAllocatorClass only contains private data

##### Fields

`parent_class` (GstAllocatorClass) –

the parent GstAllocatorClass

Since : 1.18

### GstVulkan.VulkanMemoryAllocatorClass

The GstVulkan.VulkanMemoryAllocatorClass only contains private data

##### Attributes

`parent_class` (Gst.AllocatorClass) –

the parent Gst.AllocatorClass

Since : 1.18

### GstVulkan.VulkanMemoryAllocatorClass

The GstVulkan.VulkanMemoryAllocatorClass only contains private data

##### Attributes

`parent_class` (Gst.AllocatorClass) –

the parent Gst.AllocatorClass

Since : 1.18

## GstVulkan.VulkanMemoryAllocator

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Allocator
                    ╰──GstVulkan.VulkanMemoryAllocator

Opaque GstVulkan.VulkanMemoryAllocator struct

### Members

`parent` (Gst.Allocator) –

the parent Gst.Allocator

Since : 1.18

## GstVulkan.VulkanMemoryAllocator

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Allocator
                    ╰──GstVulkan.VulkanMemoryAllocator

Opaque GstVulkan.VulkanMemoryAllocator struct

### Members

`parent` (Gst.Allocator) –

the parent Gst.Allocator

Since : 1.18

## Functions

### gst_is_vulkan_memory

    gboolean
    gst_is_vulkan_memory (GstMemory * mem)

Parameters:

`mem` –

a GstMemory

Returns –

whether the memory at mem is a GstVulkanMemory

Since : 1.18

### GstVulkan.prototype.is_vulkan_memory

    function GstVulkan.prototype.is_vulkan_memory(mem: Gst.Memory): {
        // javascript wrapper for 'gst_is_vulkan_memory'
    }

Parameters:

`mem` (Gst.Memory) –

a Gst.Memory

Returns (Number) –

whether the memory at mem is a GstVulkan.VulkanMemory

Since : 1.18

### GstVulkan.is_vulkan_memory

    def GstVulkan.is_vulkan_memory (mem):
        #python wrapper for 'gst_is_vulkan_memory'

Parameters:

`mem` (Gst.Memory) –

a Gst.Memory

Returns (bool) –

whether the memory at mem is a GstVulkan.VulkanMemory

Since : 1.18

## Function Macros

### GST_VULKAN_MEMORY_ALLOCATOR_CAST

    #define GST_VULKAN_MEMORY_ALLOCATOR_CAST(obj)            ((GstVulkanMemoryAllocator *)(obj))

Since : 1.18

## Constants

### GST_VULKAN_MEMORY_ALLOCATOR_NAME

    #define GST_VULKAN_MEMORY_ALLOCATOR_NAME "Vulkan"

Since : 1.18

### GstVulkan.VULKAN_MEMORY_ALLOCATOR_NAME

Since : 1.18

### GstVulkan.VULKAN_MEMORY_ALLOCATOR_NAME

Since : 1.18

The results of the search are