gi-gstbase-1.0.21: GStreamerBase 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.GstBase.Structs.BaseParseFrame

Contents

Description

Frame (context) data passed to each frame parsing virtual methods. In addition to providing the data to be checked for a valid frame or an already identified frame, it conveys additional metadata or control information from and to the subclass w.r.t. the particular frame in question (rather than global parameters). Some of these may apply to each parsing stage, others only to some a particular one. These parameters are effectively zeroed at start of each frame's processing, i.e. parsing virtual method invocation sequence.

Synopsis

Exported types

newZeroBaseParseFrame :: MonadIO m => m BaseParseFrame Source #

Construct a BaseParseFrame struct initialized to zero.

Methods

copy

baseParseFrameCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BaseParseFrame

frame: a BaseParseFrame

-> m BaseParseFrame

Returns: A copy of frame

Copies a BaseParseFrame.

free

baseParseFrameFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BaseParseFrame

frame: A BaseParseFrame

-> m () 

Frees the provided frame.

init

baseParseFrameInit Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> BaseParseFrame

frame: BaseParseFrame.

-> m () 

Sets a BaseParseFrame to initial state. Currently this means all public fields are zero-ed and a private flag is set to make sure baseParseFrameFree only frees the contents but not the actual frame. Use this function to initialise a BaseParseFrame allocated on the stack.

new

baseParseFrameNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Buffer

buffer: a Buffer

-> [BaseParseFrameFlags]

flags: the flags

-> Int32

overhead: number of bytes in this frame which should be counted as metadata overhead, ie. not used to calculate the average bitrate. Set to -1 to mark the entire frame as metadata. If in doubt, set to 0.

-> m BaseParseFrame

Returns: a newly-allocated BaseParseFrame. Free with baseParseFrameFree when no longer needed.

Allocates a new BaseParseFrame. This function is mainly for bindings, elements written in C should usually allocate the frame on the stack and then use baseParseFrameInit to initialise it.

Properties

buffer

input data to be parsed for frames.

clearBaseParseFrameBuffer :: MonadIO m => BaseParseFrame -> m () Source #

Set the value of the “buffer” field to Nothing. When overloading is enabled, this is equivalent to

clear #buffer

getBaseParseFrameBuffer :: MonadIO m => BaseParseFrame -> m (Maybe Buffer) Source #

Get the value of the “buffer” field. When overloading is enabled, this is equivalent to

get baseParseFrame #buffer

setBaseParseFrameBuffer :: MonadIO m => BaseParseFrame -> Ptr Buffer -> m () Source #

Set the value of the “buffer” field. When overloading is enabled, this is equivalent to

set baseParseFrame [ #buffer := value ]

flags

a combination of input and output BaseParseFrameFlags that convey additional context to subclass or allow subclass to tune subsequent BaseParse actions.

getBaseParseFrameFlags :: MonadIO m => BaseParseFrame -> m Word32 Source #

Get the value of the “flags” field. When overloading is enabled, this is equivalent to

get baseParseFrame #flags

setBaseParseFrameFlags :: MonadIO m => BaseParseFrame -> Word32 -> m () Source #

Set the value of the “flags” field. When overloading is enabled, this is equivalent to

set baseParseFrame [ #flags := value ]

offset

media specific offset of input frame Note that a converter may have a different one on the frame's buffer.

getBaseParseFrameOffset :: MonadIO m => BaseParseFrame -> m Word64 Source #

Get the value of the “offset” field. When overloading is enabled, this is equivalent to

get baseParseFrame #offset

setBaseParseFrameOffset :: MonadIO m => BaseParseFrame -> Word64 -> m () Source #

Set the value of the “offset” field. When overloading is enabled, this is equivalent to

set baseParseFrame [ #offset := value ]

outBuffer

output data.

clearBaseParseFrameOutBuffer :: MonadIO m => BaseParseFrame -> m () Source #

Set the value of the “out_buffer” field to Nothing. When overloading is enabled, this is equivalent to

clear #outBuffer

getBaseParseFrameOutBuffer :: MonadIO m => BaseParseFrame -> m (Maybe Buffer) Source #

Get the value of the “out_buffer” field. When overloading is enabled, this is equivalent to

get baseParseFrame #outBuffer

setBaseParseFrameOutBuffer :: MonadIO m => BaseParseFrame -> Ptr Buffer -> m () Source #

Set the value of the “out_buffer” field. When overloading is enabled, this is equivalent to

set baseParseFrame [ #outBuffer := value ]

overhead

subclass can set this to indicates the metadata overhead for the given frame, which is then used to enable more accurate bitrate computations. If this is -1, it is assumed that this frame should be skipped in bitrate calculation.

getBaseParseFrameOverhead :: MonadIO m => BaseParseFrame -> m Int32 Source #

Get the value of the “overhead” field. When overloading is enabled, this is equivalent to

get baseParseFrame #overhead

setBaseParseFrameOverhead :: MonadIO m => BaseParseFrame -> Int32 -> m () Source #

Set the value of the “overhead” field. When overloading is enabled, this is equivalent to

set baseParseFrame [ #overhead := value ]