Callbacks¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- GstBase.CollectDataDestroyNotify(data)¶
- Parameters:
data (
GstBase.CollectData
) – theGstBase.CollectData
that will be freed
A function that will be called when the
GstBase.CollectData
will be freed. It is passed the pointer to the structure and should free any custom memory and resources allocated for it.
- GstBase.CollectPadsBufferFunction(pads, data, buffer, *user_data)¶
- Parameters:
pads (
GstBase.CollectPads
) – theGstBase.CollectPads
that triggered the callbackdata (
GstBase.CollectData
) – theGstBase.CollectData
of pad that has received the bufferbuffer (
Gst.Buffer
) – theGst.Buffer
user_data (
object
orNone
) – user data passed toGstBase.CollectPads.set_buffer_function
()
- Returns:
Gst.FlowReturn.OK
for success- Return type:
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
None
buffer andNone
data.
- GstBase.CollectPadsClipFunction(pads, data, inbuffer, *user_data)¶
- Parameters:
pads (
GstBase.CollectPads
) – aGstBase.CollectPads
data (
GstBase.CollectData
) – aGstBase.CollectData
inbuffer (
Gst.Buffer
) – the inputGst.Buffer
- Returns:
a
Gst.FlowReturn
that corresponds to the result of clipping.- outbuffer:
the output
Gst.Buffer
- Return type:
(
Gst.FlowReturn
, outbuffer:Gst.Buffer
)
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
None
in outbuffer if the buffer should be dropped.
- GstBase.CollectPadsCompareFunction(pads, data1, timestamp1, data2, timestamp2, *user_data)¶
- Parameters:
pads (
GstBase.CollectPads
) – theGstBase.CollectPads
that is comparing the timestampsdata1 (
GstBase.CollectData
) – the firstGstBase.CollectData
timestamp1 (
int
) – the first timestampdata2 (
GstBase.CollectData
) – the secondGstBase.CollectData
timestamp2 (
int
) – the second timestampuser_data (
object
orNone
) – user data passed toGstBase.CollectPads.set_compare_function
()
- 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.
- Return type:
A function for comparing two timestamps of buffers or newsegments collected on one pad.
- GstBase.CollectPadsEventFunction(pads, pad, event, *user_data)¶
- Parameters:
pads (
GstBase.CollectPads
) – theGstBase.CollectPads
that triggered the callbackpad (
GstBase.CollectData
) – theGst.Pad
that received an eventuser_data (
object
orNone
) – user data passed toGstBase.CollectPads.set_event_function
()
- Returns:
True
if the pad could handle the event- Return type:
A function that will be called while processing an event. It takes ownership of the event and is responsible for chaining up (to
GstBase.CollectPads.event_default
()) or dropping events (such typical cases being handled by the default handler).
- GstBase.CollectPadsFlushFunction(pads, *user_data)¶
- Parameters:
pads (
GstBase.CollectPads
) – aGstBase.CollectPads
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
GstBase.CollectPads.set_flushing
nor gst_collect_pads_clear from this function.New in version 1.4.
- GstBase.CollectPadsFunction(pads, *user_data)¶
- Parameters:
pads (
GstBase.CollectPads
) – theGstBase.CollectPads
that triggered the callbackuser_data (
object
orNone
) – user data passed toGstBase.CollectPads.set_function
()
- Returns:
Gst.FlowReturn.OK
for success- Return type:
A function that will be called when all pads have received data.
- GstBase.CollectPadsQueryFunction(pads, pad, query, *user_data)¶
- Parameters:
pads (
GstBase.CollectPads
) – theGstBase.CollectPads
that triggered the callbackpad (
GstBase.CollectData
) – theGst.Pad
that received an eventuser_data (
object
orNone
) – user data passed toGstBase.CollectPads.set_query_function
()
- Returns:
True
if the pad could handle the event- Return type:
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
Gst.Pad.event_default
()).
- GstBase.DataQueueEmptyCallback(queue, checkdata)¶
- Parameters:
queue (
GstBase.DataQueue
) –
- GstBase.DataQueueFullCallback(queue, checkdata)¶
- Parameters:
queue (
GstBase.DataQueue
) –
- GstBase.TypeFindHelperGetRangeFunction(obj, parent, offset, length)¶
- Parameters:
obj (
Gst.Object
) – aGst.Object
that will handle the getrange requestparent (
Gst.Object
orNone
) – the parent of obj orNone
offset (
int
) – the offset of the rangelength (
int
) – the length of the range
- Returns:
Gst.FlowReturn.OK
for success- buffer:
a memory location to hold the result buffer
- Return type:
(
Gst.FlowReturn
, buffer:Gst.Buffer
)
This function will be called by
GstBase.type_find_helper_get_range
() when typefinding functions request to peek at the data of a stream at certain offsets. If this function returnsGst.FlowReturn.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
Gst.PadGetRangeFunction
.