Callbacks

CollectDataDestroyNotify (data)

CollectPadsBufferFunction (pads, data, buffer, *user_data)

CollectPadsClipFunction (pads, data, inbuffer, *user_data)

CollectPadsCompareFunction (pads, data1, timestamp1, data2, timestamp2, *user_data)

CollectPadsEventFunction (pads, pad, event, *user_data)

CollectPadsFlushFunction (pads, *user_data)

CollectPadsFunction (pads, *user_data)

CollectPadsQueryFunction (pads, pad, query, *user_data)

DataQueueEmptyCallback (queue, checkdata)

DataQueueFullCallback (queue, checkdata)

TypeFindHelperGetRangeFunction (obj, parent, offset, length)

Details

GstBase.CollectDataDestroyNotify(data)
Parameters:

data (GstBase.CollectData) – the GstBase.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:
Returns:

Gst.FlowReturn.OK for success

Return type:

Gst.FlowReturn

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 and None data.

GstBase.CollectPadsClipFunction(pads, data, inbuffer, *user_data)
Parameters:
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:
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:

int

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

GstBase.CollectPadsEventFunction(pads, pad, event, *user_data)
Parameters:
Returns:

True if the pad could handle the event

Return type:

bool

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:

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:
Returns:

Gst.FlowReturn.OK for success

Return type:

Gst.FlowReturn

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

GstBase.CollectPadsQueryFunction(pads, pad, query, *user_data)
Parameters:
Returns:

True if the pad could handle the event

Return type:

bool

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:
GstBase.DataQueueFullCallback(queue, checkdata)
Parameters:
GstBase.TypeFindHelperGetRangeFunction(obj, parent, offset, length)
Parameters:
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 returns Gst.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.