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
GstAllocationParams
Parameters to control the allocation of memory
Members
flags
(GstMemoryFlags)
–
flags to control allocation
align
(Number)
–
the desired alignment of the memory
prefix
(Number)
–
the desired prefix
padding
(Number)
–
the desired padding
GstAllocationParams
Parameters to control the allocation of memory
Members
flags
(GstMemoryFlags)
–
flags to control allocation
align
(int)
–
the desired alignment of the memory
prefix
(int)
–
the desired prefix
padding
(int)
–
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 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:
params
(
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:
params
(
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]
)
–
Gst.AllocationParams.prototype.free
function Gst.AllocationParams.prototype.free(): {
// javascript wrapper for 'gst_allocation_params_free'
}
Free params
Parameters:
params
(
Gst.AllocationParams
)
–
Gst.AllocationParams.free
def Gst.AllocationParams.free (self):
#python wrapper for 'gst_allocation_params_free'
Free params
Parameters:
params
(
Gst.AllocationParams
)
–
gst_allocation_params_init
gst_allocation_params_init (GstAllocationParams * params)
Initialize params to its default values
Parameters:
params
–
Gst.AllocationParams.prototype.init
function Gst.AllocationParams.prototype.init(): {
// javascript wrapper for 'gst_allocation_params_init'
}
Initialize params to its default values
Parameters:
params
(
Gst.AllocationParams
)
–
Gst.AllocationParams.init
def Gst.AllocationParams.init (self):
#python wrapper for 'gst_allocation_params_init'
Initialize params to its default values
Parameters:
params
(
Gst.AllocationParams
)
–
GstAllocator
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstAllocator
The GstAllocator is used to create new memory.
Members
object
(GstObject)
–
mem_type
(const gchar *)
–
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.
GstAllocator
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstAllocator
The GstAllocator is used to create new memory.
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
a new GstMemory.
Gst.Allocator.prototype.alloc
function Gst.Allocator.prototype.alloc(size: Number, 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 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, 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
(
Number
)
–
size of the visible memory area
params
(
Gst.AllocationParams
)
–
optional parameters
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 None 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 None, 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
(
int
)
–
size of the visible memory area
params
(
Gst.AllocationParams
)
–
optional parameters
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]
)
–
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
)
–
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
)
–
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
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: String): {
// javascript wrapper for 'gst_allocator_find'
}
Find a previously registered allocator with name. When name is null, the default allocator will be returned.
Parameters:
name
(
String
)
–
the name of the allocator
a Gst.Allocator or null 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 None, the default allocator will be returned.
Parameters:
name
(
str
)
–
the name of the allocator
a Gst.Allocator or None 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.
Gst.Allocator.prototype.register
function Gst.Allocator.prototype.register(name: String, allocator: Gst.Allocator): {
// javascript wrapper for 'gst_allocator_register'
}
Registers the memory allocator with name. This function takes ownership of 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.
Virtual Methods
alloc
GstMemory * alloc (GstAllocator * allocator, gsize size, GstAllocationParams * params)
implementation that acquires memory
Parameters:
allocator
–
size
–
params
–
alloc
function alloc(allocator: Gst.Allocator, size: Number, params: Gst.AllocationParams): {
// javascript implementation of the 'alloc' virtual method
}
implementation that acquires memory
Parameters:
allocator
(
Gst.Allocator
)
–
size
(
Number
)
–
params
(
Gst.AllocationParams
)
–
alloc
def alloc (allocator, size, params):
#python implementation of the 'alloc' virtual method
implementation that acquires memory
Parameters:
allocator
(
Gst.Allocator
)
–
size
(
int
)
–
params
(
Gst.AllocationParams
)
–
free
free (GstAllocator * allocator, GstMemory * memory)
implementation that releases memory
Parameters:
allocator
–
memory
–
free
function free(allocator: Gst.Allocator, memory: Gst.Memory): {
// javascript implementation of the 'free' virtual method
}
implementation that releases memory
Parameters:
allocator
(
Gst.Allocator
)
–
memory
(
Gst.Memory
)
–
free
def free (allocator, memory):
#python implementation of the 'free' virtual method
implementation that releases memory
Parameters:
allocator
(
Gst.Allocator
)
–
memory
(
Gst.Memory
)
–
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