Callbacks¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- GstApp.AppSinkEosCallback(appsink, *user_data)¶
- Parameters:
appsink (
GstApp.AppSink) – aGstApp.AppSink
Called when the end-of-stream has been reached. This callback is called from the streaming thread.
New in version 1.28.
- GstApp.AppSinkNewEventCallback(appsink, *user_data)¶
- Parameters:
appsink (
GstApp.AppSink) – aGstApp.AppSink
- Returns:
Truewhen the event has been handled.- Return type:
Called when a new event is available. This callback is called from the streaming thread. The new event can be retrieved with
GstApp.AppSink.pull_object() either from this callback or from any other thread.The callback should return
Trueif the event has been handled,Falseotherwise.New in version 1.28.
- GstApp.AppSinkNewPrerollCallback(appsink, *user_data)¶
- Parameters:
appsink (
GstApp.AppSink) – aGstApp.AppSink
- Returns:
Gst.FlowReturn.OKon success.- Return type:
Called when a new preroll sample is available. This callback is called from the streaming thread. The new preroll sample can be retrieved with
GstApp.AppSink.pull_preroll() either from this callback or from any other thread.New in version 1.28.
- GstApp.AppSinkNewSampleCallback(appsink, *user_data)¶
- Parameters:
appsink (
GstApp.AppSink) – aGstApp.AppSink
- Returns:
Gst.FlowReturn.OKon success.- Return type:
Called when a new sample is available. This callback is called from the streaming thread. The new sample can be retrieved with
GstApp.AppSink.pull_sample() either from this callback or from any other thread.New in version 1.28.
- GstApp.AppSinkProposeAllocationCallback(appsink, query, *user_data)¶
- Parameters:
appsink (
GstApp.AppSink) – aGstApp.AppSinkquery (
Gst.Query) – An ALLOCATION query
- Returns:
Truewhen the query has been handled.- Return type:
Called when the propose_allocation query is available. This callback is called from the streaming thread.
New in version 1.28.
- GstApp.AppSrcEnoughDataCallback(appsrc, *user_data)¶
- Parameters:
appsrc (
GstApp.AppSrc) – aGstApp.AppSrc
Called when appsrc has enough data. It is recommended that the application stops calling push-buffer until the need_data callback is emitted again to avoid excessive buffer queueing.
New in version 1.28.
- GstApp.AppSrcNeedDataCallback(appsrc, length, *user_data)¶
- Parameters:
appsrc (
GstApp.AppSrc) – aGstApp.AppSrclength (
int) – Length hint
Called when the appsrc needs more data. A buffer or EOS should be pushed to appsrc from this thread or another thread. length is just a hint and when it is set to -1, any number of bytes can be pushed into appsrc.
New in version 1.28.
- GstApp.AppSrcSeekDataCallback(appsrc, offset, *user_data)¶
- Parameters:
appsrc (
GstApp.AppSrc) – aGstApp.AppSrcoffset (
int) – Offset to seek to.
- Returns:
Trueif the seek was successful.- Return type:
Called when a seek should be performed to the offset. The next push-buffer should produce buffers from the new offset. This callback is only called for seekable stream types.
New in version 1.28.