Class: Gst::Allocator
- Defined in:
- (unknown)
Overview
The Gst::Allocator is used to create new memory.
Class Method Summary collapse
-
.find(name) ⇒ Gst::Allocator
Find a previously registered allocator with name.
-
.register(name, allocator) ⇒ nil
Registers the memory allocator with name.
Instance Method Summary collapse
-
#alloc(size, params) ⇒ Gst::Memory
Use allocator to allocate a new memory block with memory that is at least size big.
-
#free(memory) ⇒ nil
Free memory that was previously allocated with gst_allocator_alloc().
-
#set_default ⇒ nil
Set the default allocator.
Methods inherited from Object
#add_control_binding, check_uniqueness, #control_bindings_disabled=, #control_rate, #control_rate=, default_deep_notify, #default_error, #get_control_binding, #get_g_value_array, #get_value, #get_value_array, #has_active_control_bindings, #has_ancestor, #has_as_ancestor, #has_as_parent, #name, #name=, #parent, #parent=, #path_string, #ref, ref_sink, #remove_control_binding, replace, #set_control_binding_disabled, #suggest_next_sync, #sync_values, #unparent, #unref
Class Method Details
.find(name) ⇒ Gst::Allocator
Find a previously registered allocator with name. When name is nil, the default allocator will be returned. the allocator with name was not registered.
.register(name, allocator) ⇒ nil
Registers the memory allocator with name.
Instance Method Details
#alloc(size, params) ⇒ Gst::Memory
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 nil 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 nil, 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.
#free(memory) ⇒ nil
Free memory that was previously allocated with gst_allocator_alloc().
#set_default ⇒ nil
Set the default allocator.