Gst.BufferList¶
Fields¶
None
Methods¶
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gst.BufferList¶
Buffer lists are an object containing a list of buffers.
Buffer lists are created with
Gst.BufferList.new() and filled with data usingGst.BufferList.insert().Buffer lists can be pushed on a srcpad with
Gst.Pad.push_list(). This is interesting when multiple buffers need to be pushed in one go because it can reduce the amount of overhead for pushing each buffer individually.- classmethod new()[source]¶
- Returns:
the new
Gst.BufferList.- Return type:
Creates a new, empty
Gst.BufferList.
- classmethod new_sized(size)[source]¶
- Parameters:
size (
int) – an initial reserved size- Returns:
the new
Gst.BufferList.- Return type:
Creates a new, empty
Gst.BufferList. The list will have size space preallocated so that memory reallocations can be avoided.
- classmethod replace(old_list, new_list)[source]¶
- Parameters:
old_list (
Gst.BufferListorNone) – pointer to a pointer to aGst.BufferListto be replaced.new_list (
Gst.BufferListorNone) – pointer to aGst.BufferListthat will replace the buffer list pointed to by old_list.
- Returns:
Trueif new_list was different from old_list- old_list:
pointer to a pointer to a
Gst.BufferListto be replaced.
- Return type:
(
bool, old_list:Gst.BufferListorNone)
Modifies a pointer to a
Gst.BufferListto point to a differentGst.BufferList. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old buffer list is unreffed, the new is reffed).Either new_list or the
Gst.BufferListpointed to by old_list may beNone.New in version 1.16.
- classmethod take(old_list, new_list)[source]¶
- Parameters:
old_list (
Gst.BufferList) – pointer to a pointer to aGst.BufferListto be replaced.new_list (
Gst.BufferListorNone) – pointer to aGst.BufferListthat will replace the bufferlist pointed to by old_list.
- Returns:
Trueif new_list was different from old_list- old_list:
pointer to a pointer to a
Gst.BufferListto be replaced.
- Return type:
(
bool, old_list:Gst.BufferList)
Modifies a pointer to a
Gst.BufferListto point to a differentGst.BufferList. This function is similar toGst.BufferList.replace() except that it takes ownership of new_list.New in version 1.16.
- calculate_size()[source]¶
- Returns:
the size of the data contained in self in bytes.
- Return type:
Calculates the size of the data contained in self by adding the size of all buffers.
New in version 1.14.
- copy_deep()[source]¶
- Returns:
a new copy of self.
- Return type:
Creates a copy of the given buffer list. This will make a newly allocated copy of the buffers that the source buffer list contains.
New in version 1.6.
- foreach(func, *user_data)[source]¶
- Parameters:
func (
Gst.BufferListFunc) – aGst.BufferListFuncto call
- Returns:
Truewhen func returnedTruefor each buffer in self or when self is empty.- Return type:
Calls func with data for each buffer in self.
func can modify the passed buffer pointer or its contents. The return value of func defines if this function returns or if the remaining buffers in the list should be skipped.
- get(idx)[source]¶
- Parameters:
idx (
int) – the index- Returns:
the buffer at idx in group. The returned buffer remains valid as long as self is valid and buffer is not removed from the list.
- Return type:
Gets the buffer at idx.
You must make sure that idx does not exceed the number of buffers available.
- get_writable(idx)[source]¶
- Parameters:
idx (
int) – the index- Returns:
the buffer at idx in group. The returned buffer remains valid as long as self is valid and the buffer is not removed from the list.
- Return type:
Gets the buffer at idx, ensuring it is a writable buffer.
You must make sure that idx does not exceed the number of buffers available.
New in version 1.14.
- insert(idx, buffer)[source]¶
- Parameters:
idx (
int) – the indexbuffer (
Gst.Buffer) – aGst.Buffer
Inserts buffer at idx in self. Other buffers are moved to make room for this new buffer.
A -1 value for idx will append the buffer at the end.