GstAllocator

Memory is usually created by allocators with a gst_allocator_alloc method call. When NULL is used as the allocator, the default allocator will be used.

New allocators can be registered with gst_allocator_register. Allocators are identified by name and can be retrieved with gst_allocator_find. gst_allocator_set_default can be used to change the default allocator.

New memory can be created with gst_memory_new_wrapped that wraps the memory allocated elsewhere.

GstAllocationParams

Parameters to control the allocation of memory

Members

flags (GstMemoryFlags) –

flags to control allocation

align (gsize) –

the desired alignment of the memory

prefix (gsize) –

the desired prefix

padding (gsize) –

the desired padding


Gst.AllocationParams

Parameters to control the allocation of memory

Members

flags (Gst.MemoryFlags) –

flags to control allocation

align (gsize) –

the desired alignment of the memory

prefix (gsize) –

the desired prefix

padding (gsize) –

the desired padding


Gst.AllocationParams

Parameters to control the allocation of memory

Members

flags (Gst.MemoryFlags) –

flags to control allocation

align (gsize) –

the desired alignment of the memory

prefix (gsize) –

the desired prefix

padding (gsize) –

the desired padding


Methods

gst_allocation_params_copy

GstAllocationParams *
gst_allocation_params_copy (const GstAllocationParams * params)

Create a copy of params.

Free-function: gst_allocation_params_free

Parameters:

params ( [transfer: none] [nullable] ) –

a GstAllocationParams

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

a new ##GstAllocationParams, free with gst_allocation_params_free.


Gst.AllocationParams.prototype.copy

function Gst.AllocationParams.prototype.copy(): {
    // javascript wrapper for 'gst_allocation_params_copy'
}

Create a copy of params.

Free-function: gst_allocation_params_free

Parameters:

Returns ( Gst.AllocationParams ) –

a new ##GstAllocationParams, free with Gst.AllocationParams.prototype.free.


Gst.AllocationParams.copy

def Gst.AllocationParams.copy (self):
    #python wrapper for 'gst_allocation_params_copy'

Create a copy of params.

Free-function: gst_allocation_params_free

Parameters:

Returns ( Gst.AllocationParams ) –

a new ##GstAllocationParams, free with Gst.AllocationParams.free.


gst_allocation_params_free

gst_allocation_params_free (GstAllocationParams * params)

Free params

Parameters:

params ( [in] [transfer: full] ) –

a GstAllocationParams


Gst.AllocationParams.prototype.free

function Gst.AllocationParams.prototype.free(): {
    // javascript wrapper for 'gst_allocation_params_free'
}

Free params

Parameters:


Gst.AllocationParams.free

def Gst.AllocationParams.free (self):
    #python wrapper for 'gst_allocation_params_free'

Free params

Parameters:


gst_allocation_params_init

gst_allocation_params_init (GstAllocationParams * params)

Initialize params to its default values

Parameters:

params

a GstAllocationParams


Gst.AllocationParams.prototype.init

function Gst.AllocationParams.prototype.init(): {
    // javascript wrapper for 'gst_allocation_params_init'
}

Initialize params to its default values

Parameters:


Gst.AllocationParams.init

def Gst.AllocationParams.init (self):
    #python wrapper for 'gst_allocation_params_init'

Initialize params to its default values

Parameters:


GstAllocator

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

The GstAllocator is used to create new memory.

Members

object (GstObject) –
No description available
mem_type (const gchar *) –
No description available

Class structure

GstAllocatorClass

The GstAllocator is used to create new memory.

Fields
object_class (GstObjectClass) –

Object parent class


Gst.AllocatorClass

The Gst.Allocator is used to create new memory.

Attributes
object_class (Gst.ObjectClass) –

Object parent class


Gst.AllocatorClass

The Gst.Allocator is used to create new memory.

Attributes
object_class (Gst.ObjectClass) –

Object parent class


GstAllocator

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

The GstAllocator is used to create new memory.

Members

object (GstObject) –
No description available
mem_type (utf8) –
No description available

GstAllocator

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

The GstAllocator is used to create new memory.

Members

object (GstObject) –
No description available
mem_type (utf8) –
No description available

Methods

gst_allocator_alloc

GstMemory *
gst_allocator_alloc (GstAllocator * allocator,
                     gsize size,
                     GstAllocationParams * params)

Use allocator to allocate a new memory block with memory that is at least size big.

The optional params can specify the prefix and padding for the memory. If NULL is passed, no flags, no extra prefix/padding and a default alignment is used.

The prefix/padding will be filled with 0 if flags contains GST_MEMORY_FLAG_ZERO_PREFIXED and GST_MEMORY_FLAG_ZERO_PADDED respectively.

When allocator is NULL, the default allocator will be used.

The alignment in params is given as a bitmask so that align + 1 equals the amount of bytes to align to. For example, to align to 8 bytes, use an alignment of 7.

Parameters:

allocator ( [transfer: none] [allow-none] ) –

a GstAllocator to use

size

size of the visible memory area

params ( [transfer: none] [allow-none] ) –

optional parameters

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

a new GstMemory.


Gst.Allocator.prototype.alloc

function Gst.Allocator.prototype.alloc(size: gsize, params: Gst.AllocationParams): {
    // javascript wrapper for 'gst_allocator_alloc'
}

Use allocator to allocate a new memory block with memory that is at least size big.

The optional params can specify the prefix and padding for the memory. If NULL (not introspectable) is passed, no flags, no extra prefix/padding and a default alignment is used.

The prefix/padding will be filled with 0 if flags contains Gst.MemoryFlags.ZERO_PREFIXED and Gst.MemoryFlags.ZERO_PADDED respectively.

When allocator is NULL (not introspectable), the default allocator will be used.

The alignment in params is given as a bitmask so that align + 1 equals the amount of bytes to align to. For example, to align to 8 bytes, use an alignment of 7.

Parameters:

allocator ( Gst.Allocator ) –

a Gst.Allocator to use

size ( gsize ) –

size of the visible memory area

params ( Gst.AllocationParams ) –

optional parameters

Returns ( Gst.Memory ) –

a new Gst.Memory.


Gst.Allocator.alloc

def Gst.Allocator.alloc (self, size, params):
    #python wrapper for 'gst_allocator_alloc'

Use allocator to allocate a new memory block with memory that is at least size big.

The optional params can specify the prefix and padding for the memory. If NULL (not introspectable) is passed, no flags, no extra prefix/padding and a default alignment is used.

The prefix/padding will be filled with 0 if flags contains Gst.MemoryFlags.ZERO_PREFIXED and Gst.MemoryFlags.ZERO_PADDED respectively.

When allocator is NULL (not introspectable), the default allocator will be used.

The alignment in params is given as a bitmask so that align + 1 equals the amount of bytes to align to. For example, to align to 8 bytes, use an alignment of 7.

Parameters:

allocator ( Gst.Allocator ) –

a Gst.Allocator to use

size ( gsize ) –

size of the visible memory area

params ( Gst.AllocationParams ) –

optional parameters

Returns ( Gst.Memory ) –

a new Gst.Memory.


gst_allocator_free

gst_allocator_free (GstAllocator * allocator,
                    GstMemory * memory)

Free memory that was previously allocated with gst_allocator_alloc.

Parameters:

allocator ( [transfer: none] ) –

a GstAllocator to use

memory ( [transfer: full] ) –

the memory to free


Gst.Allocator.prototype.free

function Gst.Allocator.prototype.free(memory: Gst.Memory): {
    // javascript wrapper for 'gst_allocator_free'
}

Free memory that was previously allocated with Gst.Allocator.prototype.alloc.

Parameters:

allocator ( Gst.Allocator ) –

a Gst.Allocator to use

memory ( Gst.Memory ) –

the memory to free


Gst.Allocator.free

def Gst.Allocator.free (self, memory):
    #python wrapper for 'gst_allocator_free'

Free memory that was previously allocated with Gst.Allocator.alloc.

Parameters:

allocator ( Gst.Allocator ) –

a Gst.Allocator to use

memory ( Gst.Memory ) –

the memory to free


gst_allocator_set_default

gst_allocator_set_default (GstAllocator * allocator)

Set the default allocator. This function takes ownership of allocator.

Parameters:

allocator ( [transfer: full] ) –

a GstAllocator


Gst.Allocator.prototype.set_default

function Gst.Allocator.prototype.set_default(): {
    // javascript wrapper for 'gst_allocator_set_default'
}

Set the default allocator. This function takes ownership of allocator.

Parameters:

allocator ( Gst.Allocator ) –

a Gst.Allocator


Gst.Allocator.set_default

def Gst.Allocator.set_default (self):
    #python wrapper for 'gst_allocator_set_default'

Set the default allocator. This function takes ownership of allocator.

Parameters:

allocator ( Gst.Allocator ) –

a Gst.Allocator


Functions

gst_allocator_find

GstAllocator *
gst_allocator_find (const gchar * name)

Find a previously registered allocator with name. When name is NULL, the default allocator will be returned.

Parameters:

name ( [allow-none] ) –

the name of the allocator

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

a GstAllocator or NULL when the allocator with name was not registered. Use gst_object_unref to release the allocator after usage.


Gst.Allocator.prototype.find

function Gst.Allocator.prototype.find(name: utf8): {
    // javascript wrapper for 'gst_allocator_find'
}

Find a previously registered allocator with name. When name is NULL (not introspectable), the default allocator will be returned.

Parameters:

name ( utf8 ) –

the name of the allocator

Returns ( Gst.Allocator ) –

a Gst.Allocator or NULL (not introspectable) when the allocator with name was not registered. Use Gst.Object.prototype.unref to release the allocator after usage.


Gst.Allocator.find

def Gst.Allocator.find (name):
    #python wrapper for 'gst_allocator_find'

Find a previously registered allocator with name. When name is NULL (not introspectable), the default allocator will be returned.

Parameters:

name ( utf8 ) –

the name of the allocator

Returns ( Gst.Allocator ) –

a Gst.Allocator or NULL (not introspectable) when the allocator with name was not registered. Use Gst.Object.unref to release the allocator after usage.


gst_allocator_register

gst_allocator_register (const gchar * name,
                        GstAllocator * allocator)

Registers the memory allocator with name. This function takes ownership of allocator.

Parameters:

name

the name of the allocator

allocator ( [transfer: full] ) –

GstAllocator


Gst.Allocator.prototype.register

function Gst.Allocator.prototype.register(name: utf8, allocator: Gst.Allocator): {
    // javascript wrapper for 'gst_allocator_register'
}

Registers the memory allocator with name. This function takes ownership of allocator.

Parameters:

name ( utf8 ) –

the name of the allocator

allocator ( Gst.Allocator ) –

Gst.Allocator


Gst.Allocator.register

def Gst.Allocator.register (name, allocator):
    #python wrapper for 'gst_allocator_register'

Registers the memory allocator with name. This function takes ownership of allocator.

Parameters:

name ( utf8 ) –

the name of the allocator

allocator ( Gst.Allocator ) –

Gst.Allocator


Virtual Methods

alloc

GstMemory *
alloc (GstAllocator * allocator,
       gsize size,
       GstAllocationParams * params)

implementation that acquires memory

Parameters:

allocator
No description available
size
No description available
params
No description available
Returns
No description available

vfunc_alloc

function vfunc_alloc(allocator: Gst.Allocator, size: gsize, params: Gst.AllocationParams): {
    // javascript implementation of the 'alloc' virtual method
}

implementation that acquires memory

Parameters:

allocator ( Gst.Allocator ) –
No description available
size ( gsize ) –
No description available
params ( Gst.AllocationParams ) –
No description available
Returns ( Gst.Memory ) –
No description available

do_alloc

def do_alloc (allocator, size, params):
    #python implementation of the 'alloc' virtual method

implementation that acquires memory

Parameters:

allocator ( Gst.Allocator ) –
No description available
size ( gsize ) –
No description available
params ( Gst.AllocationParams ) –
No description available
Returns ( Gst.Memory ) –
No description available

free

free (GstAllocator * allocator,
      GstMemory * memory)

implementation that releases memory

Parameters:

allocator
No description available
memory
No description available

vfunc_free

function vfunc_free(allocator: Gst.Allocator, memory: Gst.Memory): {
    // javascript implementation of the 'free' virtual method
}

implementation that releases memory

Parameters:

allocator ( Gst.Allocator ) –
No description available
memory ( Gst.Memory ) –
No description available

do_free

def do_free (allocator, memory):
    #python implementation of the 'free' virtual method

implementation that releases memory

Parameters:

allocator ( Gst.Allocator ) –
No description available
memory ( Gst.Memory ) –
No description available

Function Macros

GST_ALLOCATOR_CAST

#define GST_ALLOCATOR_CAST(obj)            ((GstAllocator *)(obj))

Enumerations

GstAllocatorFlags

Flags for allocators.

Members

GST_ALLOCATOR_FLAG_CUSTOM_ALLOC (16) –

The allocator has a custom alloc function.

GST_ALLOCATOR_FLAG_LAST (1048576) –

first flag that can be used for custom purposes


Gst.AllocatorFlags

Flags for allocators.

Members

Gst.AllocatorFlags.CUSTOM_ALLOC (16) –

The allocator has a custom alloc function.

Gst.AllocatorFlags.LAST (1048576) –

first flag that can be used for custom purposes


Gst.AllocatorFlags

Flags for allocators.

Members

Gst.AllocatorFlags.CUSTOM_ALLOC (16) –

The allocator has a custom alloc function.

Gst.AllocatorFlags.LAST (1048576) –

first flag that can be used for custom purposes


Constants

GST_ALLOCATOR_SYSMEM

#define GST_ALLOCATOR_SYSMEM   "SystemMemory"

The allocator name for the default system memory allocator


Gst.ALLOCATOR_SYSMEM

The allocator name for the default system memory allocator


Gst.ALLOCATOR_SYSMEM

The allocator name for the default system memory allocator


GST_TYPE_ALLOCATION_PARAMS

#define GST_TYPE_ALLOCATION_PARAMS (gst_allocation_params_get_type())

The results of the search are