gi-gstbase-1.0.19: 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.Callbacks

Contents

Description

 
Synopsis

Signals

CollectDataDestroyNotify

type C_CollectDataDestroyNotify = Ptr CollectData -> IO () Source #

Type for the callback on the (unwrapped) C side.

type CollectDataDestroyNotify Source #

Arguments

 = CollectData

data: the CollectData that will be freed

-> IO () 

A function that will be called when the CollectData will be freed. It is passed the pointer to the structure and should free any custom memory and resources allocated for it.

dynamic_CollectDataDestroyNotify Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_CollectDataDestroyNotify 
-> CollectData

data: the CollectData that will be freed

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

CollectPadsBufferFunction

type C_CollectPadsBufferFunction = Ptr CollectPads -> Ptr CollectData -> Ptr Buffer -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type CollectPadsBufferFunction Source #

Arguments

 = CollectPads

pads: the CollectPads that triggered the callback

-> CollectData

data: the CollectData of pad that has received the buffer

-> Buffer

buffer: the Buffer

-> IO FlowReturn

Returns: FlowReturnOk for success

A function that will be called when a (considered oldest) buffer can be muxed. If all pads have reached EOS, this function is called with Nothing buffer and Nothing data.

type CollectPadsBufferFunction_WithClosures Source #

Arguments

 = CollectPads

pads: the CollectPads that triggered the callback

-> CollectData

data: the CollectData of pad that has received the buffer

-> Buffer

buffer: the Buffer

-> Ptr ()

userData: user data passed to collectPadsSetBufferFunction

-> IO FlowReturn

Returns: FlowReturnOk for success

A function that will be called when a (considered oldest) buffer can be muxed. If all pads have reached EOS, this function is called with Nothing buffer and Nothing data.

dynamic_CollectPadsBufferFunction Source #

Arguments

:: (HasCallStack, MonadIO m, IsCollectPads a) 
=> FunPtr C_CollectPadsBufferFunction 
-> a

pads: the CollectPads that triggered the callback

-> CollectData

data: the CollectData of pad that has received the buffer

-> Buffer

buffer: the Buffer

-> Ptr ()

userData: user data passed to collectPadsSetBufferFunction

-> m FlowReturn

Returns: FlowReturnOk for success

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

CollectPadsClipFunction

type C_CollectPadsClipFunction = Ptr CollectPads -> Ptr CollectData -> Ptr Buffer -> Ptr (Ptr Buffer) -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type CollectPadsClipFunction Source #

Arguments

 = CollectPads

pads: a CollectPads

-> CollectData

data: a CollectData

-> Buffer

inbuffer: the input Buffer

-> IO (FlowReturn, Buffer)

Returns: a FlowReturn that corresponds to the result of clipping.

A function that will be called when inbuffer is received on the pad managed by data in the collectpad object pads.

The function should use the segment of data and the negotiated media type on the pad to perform clipping of inbuffer.

This function takes ownership of inbuffer and should output a buffer in outbuffer or return Nothing in outbuffer if the buffer should be dropped.

type CollectPadsClipFunction_WithClosures Source #

Arguments

 = CollectPads

pads: a CollectPads

-> CollectData

data: a CollectData

-> Buffer

inbuffer: the input Buffer

-> Ptr ()

userData: user data

-> IO (FlowReturn, Buffer)

Returns: a FlowReturn that corresponds to the result of clipping.

A function that will be called when inbuffer is received on the pad managed by data in the collectpad object pads.

The function should use the segment of data and the negotiated media type on the pad to perform clipping of inbuffer.

This function takes ownership of inbuffer and should output a buffer in outbuffer or return Nothing in outbuffer if the buffer should be dropped.

dynamic_CollectPadsClipFunction Source #

Arguments

:: (HasCallStack, MonadIO m, IsCollectPads a) 
=> FunPtr C_CollectPadsClipFunction 
-> a

pads: a CollectPads

-> CollectData

data: a CollectData

-> Buffer

inbuffer: the input Buffer

-> Ptr ()

userData: user data

-> m (FlowReturn, Buffer)

Returns: a FlowReturn that corresponds to the result of clipping.

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

CollectPadsCompareFunction

type C_CollectPadsCompareFunction = Ptr CollectPads -> Ptr CollectData -> Word64 -> Ptr CollectData -> Word64 -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

type CollectPadsCompareFunction Source #

Arguments

 = CollectPads

pads: the CollectPads that is comparing the timestamps

-> CollectData

data1: the first CollectData

-> Word64

timestamp1: the first timestamp

-> CollectData

data2: the second CollectData

-> Word64

timestamp2: the second timestamp

-> IO Int32

Returns: Integer less than zero when first timestamp is deemed older than the second one. Zero if the timestamps are deemed equally old. Integer greater than zero when second timestamp is deemed older than the first one.

A function for comparing two timestamps of buffers or newsegments collected on one pad.

type CollectPadsCompareFunction_WithClosures Source #

Arguments

 = CollectPads

pads: the CollectPads that is comparing the timestamps

-> CollectData

data1: the first CollectData

-> Word64

timestamp1: the first timestamp

-> CollectData

data2: the second CollectData

-> Word64

timestamp2: the second timestamp

-> Ptr ()

userData: user data passed to collectPadsSetCompareFunction

-> IO Int32

Returns: Integer less than zero when first timestamp is deemed older than the second one. Zero if the timestamps are deemed equally old. Integer greater than zero when second timestamp is deemed older than the first one.

A function for comparing two timestamps of buffers or newsegments collected on one pad.

dynamic_CollectPadsCompareFunction Source #

Arguments

:: (HasCallStack, MonadIO m, IsCollectPads a) 
=> FunPtr C_CollectPadsCompareFunction 
-> a

pads: the CollectPads that is comparing the timestamps

-> CollectData

data1: the first CollectData

-> Word64

timestamp1: the first timestamp

-> CollectData

data2: the second CollectData

-> Word64

timestamp2: the second timestamp

-> Ptr ()

userData: user data passed to collectPadsSetCompareFunction

-> m Int32

Returns: Integer less than zero when first timestamp is deemed older than the second one. Zero if the timestamps are deemed equally old. Integer greater than zero when second timestamp is deemed older than the first one.

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

CollectPadsEventFunction

type C_CollectPadsEventFunction = Ptr CollectPads -> Ptr CollectData -> Ptr Event -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type CollectPadsEventFunction Source #

Arguments

 = CollectPads

pads: the CollectPads that triggered the callback

-> CollectData

pad: the Pad that received an event

-> Event

event: the Event received

-> IO Bool

Returns: True if the pad could handle the event

A function that will be called while processing an event. It takes ownership of the event and is responsible for chaining up (to collectPadsEventDefault) or dropping events (such typical cases being handled by the default handler).

type CollectPadsEventFunction_WithClosures Source #

Arguments

 = CollectPads

pads: the CollectPads that triggered the callback

-> CollectData

pad: the Pad that received an event

-> Event

event: the Event received

-> Ptr ()

userData: user data passed to collectPadsSetEventFunction

-> IO Bool

Returns: True if the pad could handle the event

A function that will be called while processing an event. It takes ownership of the event and is responsible for chaining up (to collectPadsEventDefault) or dropping events (such typical cases being handled by the default handler).

dynamic_CollectPadsEventFunction Source #

Arguments

:: (HasCallStack, MonadIO m, IsCollectPads a) 
=> FunPtr C_CollectPadsEventFunction 
-> a

pads: the CollectPads that triggered the callback

-> CollectData

pad: the Pad that received an event

-> Event

event: the Event received

-> Ptr ()

userData: user data passed to collectPadsSetEventFunction

-> m Bool

Returns: True if the pad could handle the event

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

CollectPadsFlushFunction

type C_CollectPadsFlushFunction = Ptr CollectPads -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type CollectPadsFlushFunction Source #

Arguments

 = CollectPads

pads: a CollectPads

-> IO () 

A function that will be called while processing a flushing seek event.

The function should flush any internal state of the element and the state of all the pads. It should clear only the state not directly managed by the pads object. It is therefore not necessary to call gst_collect_pads_set_flushing nor gst_collect_pads_clear from this function.

Since: 1.4

type CollectPadsFlushFunction_WithClosures Source #

Arguments

 = CollectPads

pads: a CollectPads

-> Ptr ()

userData: user data

-> IO () 

A function that will be called while processing a flushing seek event.

The function should flush any internal state of the element and the state of all the pads. It should clear only the state not directly managed by the pads object. It is therefore not necessary to call gst_collect_pads_set_flushing nor gst_collect_pads_clear from this function.

Since: 1.4

dynamic_CollectPadsFlushFunction Source #

Arguments

:: (HasCallStack, MonadIO m, IsCollectPads a) 
=> FunPtr C_CollectPadsFlushFunction 
-> a

pads: a CollectPads

-> Ptr ()

userData: user data

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

CollectPadsFunction

type C_CollectPadsFunction = Ptr CollectPads -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type CollectPadsFunction Source #

Arguments

 = CollectPads

pads: the CollectPads that triggered the callback

-> IO FlowReturn

Returns: FlowReturnOk for success

A function that will be called when all pads have received data.

type CollectPadsFunction_WithClosures Source #

Arguments

 = CollectPads

pads: the CollectPads that triggered the callback

-> Ptr ()

userData: user data passed to collectPadsSetFunction

-> IO FlowReturn

Returns: FlowReturnOk for success

A function that will be called when all pads have received data.

drop_closures_CollectPadsFunction :: CollectPadsFunction -> CollectPadsFunction_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_CollectPadsFunction Source #

Arguments

:: (HasCallStack, MonadIO m, IsCollectPads a) 
=> FunPtr C_CollectPadsFunction 
-> a

pads: the CollectPads that triggered the callback

-> Ptr ()

userData: user data passed to collectPadsSetFunction

-> m FlowReturn

Returns: FlowReturnOk for success

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_CollectPadsFunction :: C_CollectPadsFunction -> IO (FunPtr C_CollectPadsFunction) Source #

Generate a function pointer callable from C code, from a C_CollectPadsFunction.

CollectPadsQueryFunction

type C_CollectPadsQueryFunction = Ptr CollectPads -> Ptr CollectData -> Ptr Query -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type CollectPadsQueryFunction Source #

Arguments

 = CollectPads

pads: the CollectPads that triggered the callback

-> CollectData

pad: the Pad that received an event

-> Query

query: the Event received

-> IO Bool

Returns: True if the pad could handle the event

A function that will be called while processing a query. It takes ownership of the query and is responsible for chaining up (to events downstream (with padEventDefault).

type CollectPadsQueryFunction_WithClosures Source #

Arguments

 = CollectPads

pads: the CollectPads that triggered the callback

-> CollectData

pad: the Pad that received an event

-> Query

query: the Event received

-> Ptr ()

userData: user data passed to collectPadsSetQueryFunction

-> IO Bool

Returns: True if the pad could handle the event

A function that will be called while processing a query. It takes ownership of the query and is responsible for chaining up (to events downstream (with padEventDefault).

dynamic_CollectPadsQueryFunction Source #

Arguments

:: (HasCallStack, MonadIO m, IsCollectPads a) 
=> FunPtr C_CollectPadsQueryFunction 
-> a

pads: the CollectPads that triggered the callback

-> CollectData

pad: the Pad that received an event

-> Query

query: the Event received

-> Ptr ()

userData: user data passed to collectPadsSetQueryFunction

-> m Bool

Returns: True if the pad could handle the event

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

DataQueueEmptyCallback

type C_DataQueueEmptyCallback = Ptr DataQueue -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type DataQueueEmptyCallback = DataQueue -> Ptr () -> IO () Source #

No description available in the introspection data.

dynamic_DataQueueEmptyCallback :: (HasCallStack, MonadIO m, IsDataQueue a) => FunPtr C_DataQueueEmptyCallback -> a -> Ptr () -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

DataQueueFullCallback

type C_DataQueueFullCallback = Ptr DataQueue -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type DataQueueFullCallback = DataQueue -> Ptr () -> IO () Source #

No description available in the introspection data.

dynamic_DataQueueFullCallback :: (HasCallStack, MonadIO m, IsDataQueue a) => FunPtr C_DataQueueFullCallback -> a -> Ptr () -> m () Source #

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_DataQueueFullCallback :: C_DataQueueFullCallback -> IO (FunPtr C_DataQueueFullCallback) Source #

Generate a function pointer callable from C code, from a C_DataQueueFullCallback.

TypeFindHelperGetRangeFunction

type C_TypeFindHelperGetRangeFunction = Ptr Object -> Ptr Object -> Word64 -> Word32 -> Ptr (Ptr Buffer) -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type TypeFindHelperGetRangeFunction Source #

Arguments

 = Object

obj: a Object that will handle the getrange request

-> Maybe Object

parent: the parent of obj or Nothing

-> Word64

offset: the offset of the range

-> Word32

length: the length of the range

-> IO (FlowReturn, Buffer)

Returns: GST_FLOW_OK for success

This function will be called by typeFindHelperGetRange when typefinding functions request to peek at the data of a stream at certain offsets. If this function returns GST_FLOW_OK, the result buffer will be stored in buffer. The contents of buffer is invalid for any other return value.

This function is supposed to behave exactly like a PadGetRangeFunction.

dynamic_TypeFindHelperGetRangeFunction Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a, IsObject b) 
=> FunPtr C_TypeFindHelperGetRangeFunction 
-> a

obj: a Object that will handle the getrange request

-> Maybe b

parent: the parent of obj or Nothing

-> Word64

offset: the offset of the range

-> Word32

length: the length of the range

-> m (FlowReturn, Buffer)

Returns: GST_FLOW_OK for success

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.