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.CollectDatathat will be freed- A function that will be called when the - GstBase.CollectDatawill 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.CollectPadsthat triggered the callback
- data (GstBase.CollectData) – theGstBase.CollectDataof pad that has received the buffer
- buffer (Gst.Buffer) – theGst.Buffer
- user_data (objectorNone) – user data passed toGstBase.CollectPads.set_buffer_function()
 - Returns: - Gst.FlowReturn.OKfor 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 - Nonebuffer and- Nonedata.
- pads (
- 
GstBase.CollectPadsClipFunction(pads, data, inbuffer, *user_data)¶
- Parameters: - pads (GstBase.CollectPads) – aGstBase.CollectPads
- data (GstBase.CollectData) – aGstBase.CollectData
- inbuffer (Gst.Buffer) – the inputGst.Buffer
- user_data (objectorNone) – user data
 - Returns: - a - Gst.FlowReturnthat 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 - Nonein outbuffer if the buffer should be dropped.
- pads (
- 
GstBase.CollectPadsCompareFunction(pads, data1, timestamp1, data2, timestamp2, *user_data)¶
- Parameters: - pads (GstBase.CollectPads) – theGstBase.CollectPadsthat is comparing the timestamps
- data1 (GstBase.CollectData) – the firstGstBase.CollectData
- timestamp1 (int) – the first timestamp
- data2 (GstBase.CollectData) – the secondGstBase.CollectData
- timestamp2 (int) – the second timestamp
- user_data (objectorNone) – 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. 
- pads (
- 
GstBase.CollectPadsEventFunction(pads, pad, event, *user_data)¶
- Parameters: - pads (GstBase.CollectPads) – theGstBase.CollectPadsthat triggered the callback
- pad (GstBase.CollectData) – theGst.Padthat received an event
- event (Gst.Event) – theGst.Eventreceived
- user_data (objectorNone) – user data passed toGstBase.CollectPads.set_event_function()
 - Returns: - Trueif 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).
- pads (
- 
GstBase.CollectPadsFlushFunction(pads, *user_data)¶
- Parameters: - pads (GstBase.CollectPads) – aGstBase.CollectPads
- user_data (objectorNone) – user data
 - 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_flushingnor gst_collect_pads_clear from this function.- New in version 1.4. 
- pads (
- 
GstBase.CollectPadsFunction(pads, *user_data)¶
- Parameters: - pads (GstBase.CollectPads) – theGstBase.CollectPadsthat triggered the callback
- user_data (objectorNone) – user data passed toGstBase.CollectPads.set_function()
 - Returns: - Gst.FlowReturn.OKfor success- Return type: - A function that will be called when all pads have received data. 
- pads (
- 
GstBase.CollectPadsQueryFunction(pads, pad, query, *user_data)¶
- Parameters: - pads (GstBase.CollectPads) – theGstBase.CollectPadsthat triggered the callback
- pad (GstBase.CollectData) – theGst.Padthat received an event
- query (Gst.Query) – theGst.Eventreceived
- user_data (objectorNone) – user data passed toGstBase.CollectPads.set_query_function()
 - Returns: - Trueif 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()).
- pads (
- 
GstBase.DataQueueEmptyCallback(queue, checkdata)¶
- Parameters: - queue (GstBase.DataQueue) –
- checkdata (objectorNone) –
 
- queue (
- 
GstBase.DataQueueFullCallback(queue, checkdata)¶
- Parameters: - queue (GstBase.DataQueue) –
- checkdata (objectorNone) –
 
- queue (
- 
GstBase.TypeFindHelperGetRangeFunction(obj, parent, offset, length)¶
- Parameters: - obj (Gst.Object) – aGst.Objectthat will handle the getrange request
- parent (Gst.ObjectorNone) – the parent of obj orNone
- offset (int) – the offset of the range
- length (int) – the length of the range
 - Returns: - Gst.FlowReturn.OKfor 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.
- obj (