gi-gst-1.0.29: GStreamer bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

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 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.

Constructors

BufferList (ManagedPtr BufferList) 

Instances

Instances details
Eq BufferList Source # 
Instance details

Defined in GI.Gst.Structs.BufferList

GBoxed BufferList Source # 
Instance details

Defined in GI.Gst.Structs.BufferList

ManagedPtrNewtype BufferList Source # 
Instance details

Defined in GI.Gst.Structs.BufferList

Methods

toManagedPtr :: BufferList -> ManagedPtr BufferList

TypedObject BufferList Source # 
Instance details

Defined in GI.Gst.Structs.BufferList

Methods

glibType :: IO GType

HasParentTypes BufferList Source # 
Instance details

Defined in GI.Gst.Structs.BufferList

IsGValue (Maybe BufferList) Source #

Convert BufferList to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gst.Structs.BufferList

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe BufferList -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe BufferList)

type ParentTypes BufferList Source # 
Instance details

Defined in GI.Gst.Structs.BufferList

type ParentTypes BufferList = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

calculateSize, copyDeep, foreach, get, insert, length, remove.

Getters

getWritable.

Setters

None.

calculateSize

bufferListCalculateSize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BufferList

list: a BufferList

-> m Word64

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

Calculates the size of the data contained in 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.

Creates a copy of the given buffer list. This will make a newly allocated copy of the buffers 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.

Calls func with data for each buffer in list.

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

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.

Gets 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 () 

Inserts 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.

Creates a new, empty BufferList.

newSized

bufferListNewSized Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

size: an initial reserved size

-> m BufferList

Returns: the new BufferList.

Creates a new, empty BufferList. The list will have size space preallocated so that memory reallocations can be avoided.

remove

bufferListRemove Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BufferList

list: a BufferList

-> Word32

idx: the index

-> Word32

length: the amount to remove

-> m () 

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