AppSrc.connectPushSample

Connect to PushSample signal.

Extract a buffer from the provided sample and adds the extracted buffer to the queue of buffers that the appsrc element will push to its source pad. This function set the appsrc caps based on the caps in the sample and reset the caps if they change. Only the caps and the buffer of the provided sample are used and not for example the segment in the sample.

This function does not take ownership of the sample, but it takes a reference so the sample can be unreffed at any time after calling this function.

When the block property is TRUE, this function can block until free space becomes available in the queue.

class AppSrc
ulong
connectPushSample
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
is(ReturnType!T == gst.types.FlowReturn)
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
is(Parameters!T[0] == gst.sample.Sample)
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
is(Parameters!T[1] : gstapp.app_src.AppSrc)
)
)
&&
Parameters!T.length < 3
)

Parameters

callback T

signal callback delegate or function to connect

gst.types.FlowReturn callback(gst.sample.Sample sample, gstapp.app_src.AppSrc appSrc)

sample a sample from which extract buffer to push (optional)

appSrc the instance the signal is connected to (optional)

Returns

after Flag!"After"

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

Return Value

Type: ulong

Signal ID