AppSink.connectTryPullObject

Connect to TryPullObject signal.

This function blocks until a sample or an event becomes available or the appsink element is set to the READY/NULL state or the timeout expires.

This function will only return samples when the appsink is in the PLAYING state. All rendered samples and events will be put in a queue so that the application can pull them at its own rate. Events can be pulled when the appsink is in the READY, PAUSED or PLAYING state.

Note that when the application does not pull samples fast enough, the queued samples could consume a lot of memory, especially when dealing with raw video frames. It's possible to control the behaviour of the queue with the "drop" and "max-buffers" / "max-bytes" / "max-time" set of properties.

This function will only pull serialized events, excluding the EOS event for which this functions returns null. Use gstapp.app_sink.AppSink.isEos to check for the EOS condition.

This signal is a variant of #GstAppSink::try-pull-sample: that can be used to handle incoming events as well as samples.

Note that future releases may extend this API to return other object types so make sure that your code is checking for the actual type it is handling.

class AppSink
ulong
connectTryPullObject
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
is(Parameters!T[0] == ulong)
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
is(Parameters!T[1] : gstapp.app_sink.AppSink)
)
)
&&
Parameters!T.length < 3
)

Parameters

callback T

signal callback delegate or function to connect

gst.mini_object.MiniObject callback(ulong timeout, gstapp.app_sink.AppSink appSink)

timeout the maximum amount of time to wait for a sample (optional)

appSink the instance the signal is connected to (optional)

Returns a #GstSample or a #GstEvent or NULL when the appsink is stopped or EOS or the timeout expires.

after Flag!"After"

Yes.After to execute callback after default handler, No.After to execute before (default)

Return Value

Type: ulong

Signal ID