# GstVulkanBufferMemory

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

## GstVulkanBarrierBufferInfo

### Members

`parent` (GstVulkanBarrierMemoryInfo) –

parent GstVulkanBarrierMemoryInfo

`offset` (VkDeviceSize) –

offset into the vulkan buffer to execute the barrier with

`size` (VkDeviceSize) –

size of memory to execute barrier over

Since : 1.18

## GstVulkan.VulkanBarrierBufferInfo

### Members

`parent` (GstVulkan.VulkanBarrierMemoryInfo) –

parent GstVulkan.VulkanBarrierMemoryInfo

`offset` (Vulkan.DeviceSize) –

offset into the vulkan buffer to execute the barrier with

`size` (Vulkan.DeviceSize) –

size of memory to execute barrier over

Since : 1.18

## GstVulkan.VulkanBarrierBufferInfo

### Members

`parent` (GstVulkan.VulkanBarrierMemoryInfo) –

parent GstVulkan.VulkanBarrierMemoryInfo

`offset` (Vulkan.DeviceSize) –

offset into the vulkan buffer to execute the barrier with

`size` (Vulkan.DeviceSize) –

size of memory to execute barrier over

Since : 1.18

## GstVulkanBufferMemory

### Members

`parent` (GstMemory) –

parent GstMemory

`device` (GstVulkanDevice *) –

the GstVulkanDevice this vulkan buffer is allocated from

`buffer` (VkBuffer) –

Vulkan buffer object

`vk_mem` (GstVulkanMemory *) –

backing GstVulkanMemory for buffer

`requirements` (VkMemoryRequirements) –

allocation requirements for buffer

`usage` (VkBufferUsageFlags) –

intended usage for buffer

`barrier` (GstVulkanBarrierBufferInfo) –

the last set barrier information

Since : 1.18

## GstVulkan.VulkanBufferMemory

### Members

`parent` (Gst.Memory) –

parent Gst.Memory

`device` (GstVulkan.VulkanDevice) –

the GstVulkan.VulkanDevice this vulkan buffer is allocated from

`buffer` (Vulkan.Buffer) –

Vulkan buffer object

`vk_mem` (GstVulkan.VulkanMemory) –

backing GstVulkan.VulkanMemory for buffer

`requirements` (Vulkan.MemoryRequirements) –

allocation requirements for buffer

`usage` (Vulkan.BufferUsageFlags) –

intended usage for buffer

`barrier` (GstVulkan.VulkanBarrierBufferInfo) –

the last set barrier information

Since : 1.18

## GstVulkan.VulkanBufferMemory

### Members

`parent` (Gst.Memory) –

parent Gst.Memory

`device` (GstVulkan.VulkanDevice) –

the GstVulkan.VulkanDevice this vulkan buffer is allocated from

`buffer` (Vulkan.Buffer) –

Vulkan buffer object

`vk_mem` (GstVulkan.VulkanMemory) –

backing GstVulkan.VulkanMemory for buffer

`requirements` (Vulkan.MemoryRequirements) –

allocation requirements for buffer

`usage` (Vulkan.BufferUsageFlags) –

intended usage for buffer

`barrier` (GstVulkan.VulkanBarrierBufferInfo) –

the last set barrier information

Since : 1.18

### Functions

#### gst_vulkan_buffer_memory_alloc

    GstMemory *
    gst_vulkan_buffer_memory_alloc (GstVulkanDevice * device,
                                    gsize size,
                                    VkBufferUsageFlags usage,
                                    VkMemoryPropertyFlags mem_prop_flags)

Allocate a new GstVulkanBufferMemory.

Parameters:

`device` –

a GstVulkanDevice

`size` –

size of the new buffer

`usage` –

buffer usage flags

`mem_prop_flags` –

memory properties flags for the backing memory

Returns ( [transfer: full]) –

a GstMemory object backed by a vulkan buffer backed by vulkan device memory

Since : 1.18

#### GstVulkan.prototype.vulkan_buffer_memory_alloc

    function GstVulkan.prototype.vulkan_buffer_memory_alloc(device: GstVulkan.VulkanDevice, size: Number, usage: Vulkan.BufferUsageFlags, mem_prop_flags: Vulkan.MemoryPropertyFlags): {
        // javascript wrapper for 'gst_vulkan_buffer_memory_alloc'
    }

Allocate a new GstVulkan.VulkanBufferMemory.

Parameters:

`device` (GstVulkan.VulkanDevice) –

a GstVulkan.VulkanDevice

`size` (Number) –

size of the new buffer

`usage` (Vulkan.BufferUsageFlags) –

buffer usage flags

`mem_prop_flags` (Vulkan.MemoryPropertyFlags) –

memory properties flags for the backing memory

Returns (Gst.Memory) –

a Gst.Memory object backed by a vulkan buffer backed by vulkan device memory

Since : 1.18

#### GstVulkan.vulkan_buffer_memory_alloc

    def GstVulkan.vulkan_buffer_memory_alloc (device, size, usage, mem_prop_flags):
        #python wrapper for 'gst_vulkan_buffer_memory_alloc'

Allocate a new GstVulkan.VulkanBufferMemory.

Parameters:

`device` (GstVulkan.VulkanDevice) –

a GstVulkan.VulkanDevice

`size` (int) –

size of the new buffer

`usage` (Vulkan.BufferUsageFlags) –

buffer usage flags

`mem_prop_flags` (Vulkan.MemoryPropertyFlags) –

memory properties flags for the backing memory

Returns (Gst.Memory) –

a Gst.Memory object backed by a vulkan buffer backed by vulkan device memory

Since : 1.18

#### gst_vulkan_buffer_memory_init_once

    gst_vulkan_buffer_memory_init_once ()

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

Since : 1.18

#### GstVulkan.prototype.vulkan_buffer_memory_init_once

    function GstVulkan.prototype.vulkan_buffer_memory_init_once(): {
        // javascript wrapper for 'gst_vulkan_buffer_memory_init_once'
    }

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

Since : 1.18

#### GstVulkan.vulkan_buffer_memory_init_once

    def GstVulkan.vulkan_buffer_memory_init_once ():
        #python wrapper for 'gst_vulkan_buffer_memory_init_once'

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

Since : 1.18

#### gst_vulkan_buffer_memory_wrapped

    GstMemory *
    gst_vulkan_buffer_memory_wrapped (GstVulkanDevice * device,
                                      VkBuffer buffer,
                                      VkBufferUsageFlags usage,
                                      gpointer user_data,
                                      GDestroyNotify notify)

Allocated a new wrapped GstVulkanBufferMemory with buffer.

Parameters:

`device` –

a GstVulkanDevice

`buffer` –

a `VkBuffer`

`usage` –

usage flags of buffer

`user_data` ( [allow-none]) –

user data to call notify with

`notify` ( [allow-none]) –

a GDestroyNotify called when buffer is no longer in use

Returns ( [transfer: full]) –

a GstMemory object backed by a vulkan device memory

Since : 1.18

#### GstVulkan.prototype.vulkan_buffer_memory_wrapped

    function GstVulkan.prototype.vulkan_buffer_memory_wrapped(device: GstVulkan.VulkanDevice, buffer: Vulkan.Buffer, usage: Vulkan.BufferUsageFlags, user_data: Object, notify: GLib.DestroyNotify): {
        // javascript wrapper for 'gst_vulkan_buffer_memory_wrapped'
    }

Allocated a new wrapped GstVulkan.VulkanBufferMemory with buffer.

Parameters:

`device` (GstVulkan.VulkanDevice) –

a GstVulkan.VulkanDevice

`buffer` (Vulkan.Buffer) –

a `VkBuffer`

`usage` (Vulkan.BufferUsageFlags) –

usage flags of buffer

`user_data` (Object) –

user data to call notify with

`notify` (GLib.DestroyNotify) –

a GLib.DestroyNotify called when buffer is no longer in use

Returns (Gst.Memory) –

a Gst.Memory object backed by a vulkan device memory

Since : 1.18

#### GstVulkan.vulkan_buffer_memory_wrapped

    def GstVulkan.vulkan_buffer_memory_wrapped (device, buffer, usage, user_data, notify):
        #python wrapper for 'gst_vulkan_buffer_memory_wrapped'

Allocated a new wrapped GstVulkan.VulkanBufferMemory with buffer.

Parameters:

`device` (GstVulkan.VulkanDevice) –

a GstVulkan.VulkanDevice

`buffer` (Vulkan.Buffer) –

a `VkBuffer`

`usage` (Vulkan.BufferUsageFlags) –

usage flags of buffer

`user_data` (object) –

user data to call notify with

`notify` (GLib.DestroyNotify) –

a GLib.DestroyNotify called when buffer is no longer in use

Returns (Gst.Memory) –

a Gst.Memory object backed by a vulkan device memory

Since : 1.18

## GstVulkanBufferMemoryAllocator

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstAllocator
                    ╰──GstVulkanBufferMemoryAllocator

Opaque GstVulkanBufferMemoryAllocator struct

### Members

`parent` (GstAllocator) –

the parent GstAllocator

Since : 1.18

### Class structure

#### GstVulkanBufferMemoryAllocatorClass

The GstVulkanBufferMemoryAllocatorClass only contains private data

##### Fields

`parent_class` (GstAllocatorClass) –

the parent GstAllocatorClass

Since : 1.18

### GstVulkan.VulkanBufferMemoryAllocatorClass

The GstVulkan.VulkanBufferMemoryAllocatorClass only contains private data

##### Attributes

`parent_class` (Gst.AllocatorClass) –

the parent Gst.AllocatorClass

Since : 1.18

### GstVulkan.VulkanBufferMemoryAllocatorClass

The GstVulkan.VulkanBufferMemoryAllocatorClass only contains private data

##### Attributes

`parent_class` (Gst.AllocatorClass) –

the parent Gst.AllocatorClass

Since : 1.18

## GstVulkan.VulkanBufferMemoryAllocator

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

Opaque GstVulkan.VulkanBufferMemoryAllocator struct

### Members

`parent` (Gst.Allocator) –

the parent Gst.Allocator

Since : 1.18

## GstVulkan.VulkanBufferMemoryAllocator

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

Opaque GstVulkan.VulkanBufferMemoryAllocator struct

### Members

`parent` (Gst.Allocator) –

the parent Gst.Allocator

Since : 1.18

## Functions

### gst_is_vulkan_buffer_memory

    gboolean
    gst_is_vulkan_buffer_memory (GstMemory * mem)

Parameters:

`mem` –

a GstMemory

Returns –

whether the memory at mem is a GstVulkanBufferMemory

Since : 1.18

### GstVulkan.prototype.is_vulkan_buffer_memory

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

Parameters:

`mem` (Gst.Memory) –

a Gst.Memory

Returns (Number) –

whether the memory at mem is a GstVulkan.VulkanBufferMemory

Since : 1.18

### GstVulkan.is_vulkan_buffer_memory

    def GstVulkan.is_vulkan_buffer_memory (mem):
        #python wrapper for 'gst_is_vulkan_buffer_memory'

Parameters:

`mem` (Gst.Memory) –

a Gst.Memory

Returns (bool) –

whether the memory at mem is a GstVulkan.VulkanBufferMemory

Since : 1.18

## Function Macros

### GST_VULKAN_BUFFER_MEMORY_ALLOCATOR_CAST

    #define GST_VULKAN_BUFFER_MEMORY_ALLOCATOR_CAST(obj)            ((GstVulkanBufferMemoryAllocator *)(obj))

Since : 1.18

## Constants

### GST_CAPS_FEATURE_MEMORY_VULKAN_BUFFER

    #define GST_CAPS_FEATURE_MEMORY_VULKAN_BUFFER "memory:VulkanBuffer"

Since : 1.18

### GstVulkan.CAPS_FEATURE_MEMORY_VULKAN_BUFFER

Since : 1.18

### GstVulkan.CAPS_FEATURE_MEMORY_VULKAN_BUFFER

Since : 1.18

### GST_VULKAN_BUFFER_MEMORY_ALLOCATOR_NAME

    #define GST_VULKAN_BUFFER_MEMORY_ALLOCATOR_NAME "VulkanBuffer"

Since : 1.18

### GstVulkan.VULKAN_BUFFER_MEMORY_ALLOCATOR_NAME

Since : 1.18

### GstVulkan.VULKAN_BUFFER_MEMORY_ALLOCATOR_NAME

Since : 1.18

The results of the search are