Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gst.Structs.BufferList
Description
Buffer lists are an object containing a list of buffers.
Buffer lists are created with bufferListNew
and filled with data
using a bufferListInsert
.
Buffer lists can be pushed on a srcpad with padPushList
. 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.
- newtype BufferList = BufferList (ManagedPtr BufferList)
- noBufferList :: Maybe BufferList
- bufferListCopyDeep :: (HasCallStack, MonadIO m) => BufferList -> m BufferList
- bufferListForeach :: (HasCallStack, MonadIO m) => BufferList -> BufferListFunc -> m Bool
- bufferListGet :: (HasCallStack, MonadIO m) => BufferList -> Word32 -> m (Maybe Buffer)
- bufferListInsert :: (HasCallStack, MonadIO m) => BufferList -> Int32 -> Buffer -> m ()
- bufferListLength :: (HasCallStack, MonadIO m) => BufferList -> m Word32
- bufferListNew :: (HasCallStack, MonadIO m) => m BufferList
- bufferListNewSized :: (HasCallStack, MonadIO m) => Word32 -> m BufferList
- bufferListRemove :: (HasCallStack, MonadIO m) => BufferList -> Word32 -> Word32 -> m ()
Exported types
Methods
copyDeep
Arguments
:: (HasCallStack, MonadIO m) | |
=> BufferList |
|
-> m BufferList | Returns: a new copy of |
Create a copy of the given buffer list. This will make a newly allocated copy of the buffer that the source buffer list contains.
Since: 1.6
foreach
Arguments
:: (HasCallStack, MonadIO m) | |
=> BufferList |
|
-> BufferListFunc |
|
-> m Bool | Returns: |
Call func
with data
for each buffer in list
.
func
can modify the passed buffer pointer or its contents. The return value
of func
define if this function returns or if the remaining buffers in
the list should be skipped.
get
Arguments
:: (HasCallStack, MonadIO m) | |
=> BufferList |
|
-> Word32 |
|
-> m (Maybe Buffer) | Returns: the buffer at |
Get the buffer at idx
.
insert
Arguments
:: (HasCallStack, MonadIO m) | |
=> BufferList |
|
-> Int32 |
|
-> Buffer |
|
-> m () |
Insert buffer
at idx
in list
. Other buffers are moved to make room for
this new buffer.
A -1 value for idx
will append the buffer at the end.
length
Arguments
:: (HasCallStack, MonadIO m) | |
=> BufferList |
|
-> m Word32 | Returns: the number of buffers in the buffer list |
Returns the number of buffers in list
.
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> m BufferList | Returns: the new |
Creates a new, empty BufferList
. The caller is responsible for unreffing
the returned BufferList
.
Free-function: gst_buffer_list_unref
newSized
Arguments
:: (HasCallStack, MonadIO m) | |
=> Word32 |
|
-> m BufferList | Returns: the new |
Creates a new, empty BufferList
. The caller is responsible for unreffing
the returned BufferList
. The list will have size
space preallocated so
that memory reallocations can be avoided.
Free-function: gst_buffer_list_unref
remove
Arguments
:: (HasCallStack, MonadIO m) | |
=> BufferList |
|
-> Word32 |
|
-> Word32 |
|
-> m () |
Remove length
buffers starting from idx
in list
. The following buffers
are moved to close the gap.