Gst.BufferList¶
Fields¶
None
Methods¶
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.
- 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.BufferListFunc
to call
- Returns:
True
when func returnedTrue
for 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 or
None
when there is no buffer. The buffer remains valid as long as self is valid and buffer is not removed from the list.- Return type:
Gst.Buffer
orNone
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:
Gst.Buffer
orNone
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.