gi-gst-1.0.19: GStreamer bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Gst.Structs.BufferList

Contents

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.

Synopsis

Exported types

newtype BufferList Source #

Memory-managed wrapper type.

Instances
BoxedObject BufferList Source # 
Instance details

Defined in GI.Gst.Structs.BufferList

Methods

calculateSize

bufferListCalculateSize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BufferList

list: a BufferList

-> m Word64

Returns: the size of the data contained in buffer list in bytes.

Calculates the size of the data contained in buffer list by adding the size of all buffers.

Since: 1.14

copyDeep

bufferListCopyDeep Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BufferList

list: a BufferList

-> m BufferList

Returns: a new copy of list.

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

bufferListForeach Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BufferList

list: a BufferList

-> BufferListFunc

func: a BufferListFunc to call

-> m Bool

Returns: True when func returned True for each buffer in list or when list is empty.

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

bufferListGet Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BufferList

list: a BufferList

-> Word32

idx: the index

-> m (Maybe Buffer)

Returns: the buffer at idx in group or Nothing when there is no buffer. The buffer remains valid as long as list is valid and buffer is not removed from the list.

Get the buffer at idx.

You must make sure that idx does not exceed the number of buffers available.

getWritable

bufferListGetWritable Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BufferList

list: a (writable) BufferList

-> Word32

idx: the index

-> m (Maybe Buffer)

Returns: the buffer at idx in group. The returned buffer remains valid as long as list is valid and the buffer is not removed from the list.

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.

Since: 1.14

insert

bufferListInsert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BufferList

list: a BufferList

-> Int32

idx: the index

-> Buffer

buffer: a 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

bufferListLength Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BufferList

list: a BufferList

-> m Word32

Returns: the number of buffers in the buffer list

Returns the number of buffers in list.

new

bufferListNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m BufferList

Returns: the new BufferList. gst_buffer_list_unref() after usage.

Creates a new, empty BufferList. The caller is responsible for unreffing the returned BufferList.

Free-function: gst_buffer_list_unref

newSized

bufferListNewSized Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

size: an initial reserved size

-> m BufferList

Returns: the new BufferList. gst_buffer_list_unref() after usage.

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

bufferListRemove Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BufferList

list: a BufferList

-> Word32

idx: the index

-> Word32

length: the amount to remove

-> m () 

Remove length buffers starting from idx in list. The following buffers are moved to close the gap.