GstAppSink
Appsink is a sink plugin that supports many different methods for making the application get a handle on the GStreamer data in a pipeline. Unlike most GStreamer elements, Appsink provides external API functions.
appsink can be used by linking to the gstappsink.h header file to access the methods or by using the appsink action signals and properties.
The normal way of retrieving samples from appsink is by using the gst_app_sink_pull_sample and gst_app_sink_pull_preroll methods. These methods block until a sample becomes available in the sink or when the sink is shut down or reaches EOS. There are also timed variants of these methods, gst_app_sink_try_pull_sample and gst_app_sink_try_pull_preroll, which accept a timeout parameter to limit the amount of time to wait.
Appsink will internally use a queue to collect buffers from the streaming thread. If the application is not pulling samples fast enough, this queue will consume a lot of memory over time. The "max-buffers", "max-time" and "max-bytes" properties can be used to limit the queue size. The "drop" property controls whether the streaming thread blocks or if older buffers are dropped when the maximum queue size is reached. Note that blocking the streaming thread can negatively affect real-time performance and should be avoided.
If a blocking behaviour is not desirable, setting the "emit-signals" property to TRUE will make appsink emit the "new-sample" and "new-preroll" signals when a sample can be pulled without blocking.
The "caps" property on appsink can be used to control the formats that appsink can receive. This property can contain non-fixed caps, the format of the pulled samples can be obtained by getting the sample caps.
If one of the pull-preroll or pull-sample methods return NULL, the appsink is stopped or in the EOS state. You can check for the EOS state with the "eos" property or with the gst_app_sink_is_eos method.
The eos signal can also be used to be informed when the EOS state is reached to avoid polling.
GstAppSink
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseSink ╰──GstAppSink
Members
basesink
(GstBaseSink)
–
Class structure
GstApp.AppSink
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──Gst.Element ╰──GstBase.BaseSink ╰──GstApp.AppSink
Members
basesink
(GstBase.BaseSink)
–
GstApp.AppSink
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──Gst.Element ╰──GstBase.BaseSink ╰──GstApp.AppSink
Members
basesink
(GstBase.BaseSink)
–
Methods
gst_app_sink_get_buffer_list_support
gboolean gst_app_sink_get_buffer_list_support (GstAppSink * appsink)
Check if appsink supports buffer lists.
Parameters:
appsink
–
TRUE if appsink supports buffer lists.
Since : 1.12
GstApp.AppSink.prototype.get_buffer_list_support
function GstApp.AppSink.prototype.get_buffer_list_support(): {
// javascript wrapper for 'gst_app_sink_get_buffer_list_support'
}
Check if appsink supports buffer lists.
Parameters:
Since : 1.12
GstApp.AppSink.get_buffer_list_support
def GstApp.AppSink.get_buffer_list_support (self):
#python wrapper for 'gst_app_sink_get_buffer_list_support'
Check if appsink supports buffer lists.
Parameters:
Since : 1.12
gst_app_sink_get_caps
GstCaps * gst_app_sink_get_caps (GstAppSink * appsink)
Get the configured caps on appsink.
Parameters:
appsink
–
the GstCaps accepted by the sink. gst_caps_unref after usage.
GstApp.AppSink.prototype.get_caps
function GstApp.AppSink.prototype.get_caps(): {
// javascript wrapper for 'gst_app_sink_get_caps'
}
Get the configured caps on appsink.
Parameters:
the Gst.Caps accepted by the sink. gst_caps_unref (not introspectable) after usage.
GstApp.AppSink.get_caps
def GstApp.AppSink.get_caps (self):
#python wrapper for 'gst_app_sink_get_caps'
Get the configured caps on appsink.
Parameters:
the Gst.Caps accepted by the sink. gst_caps_unref (not introspectable) after usage.
gst_app_sink_get_drop
gboolean gst_app_sink_get_drop (GstAppSink * appsink)
Check if appsink will drop old buffers when the maximum amount of queued data is reached (meaning max buffers, time or bytes limit, whichever is hit first).
Parameters:
appsink
–
TRUE if appsink is dropping old buffers when the queue is filled.
GstApp.AppSink.prototype.get_drop
function GstApp.AppSink.prototype.get_drop(): {
// javascript wrapper for 'gst_app_sink_get_drop'
}
Check if appsink will drop old buffers when the maximum amount of queued data is reached (meaning max buffers, time or bytes limit, whichever is hit first).
Parameters:
GstApp.AppSink.get_drop
def GstApp.AppSink.get_drop (self):
#python wrapper for 'gst_app_sink_get_drop'
Check if appsink will drop old buffers when the maximum amount of queued data is reached (meaning max buffers, time or bytes limit, whichever is hit first).
Parameters:
gst_app_sink_get_emit_signals
gboolean gst_app_sink_get_emit_signals (GstAppSink * appsink)
Check if appsink will emit the "new-preroll" and "new-sample" signals.
Parameters:
appsink
–
TRUE if appsink is emitting the "new-preroll" and "new-sample" signals.
GstApp.AppSink.prototype.get_emit_signals
function GstApp.AppSink.prototype.get_emit_signals(): {
// javascript wrapper for 'gst_app_sink_get_emit_signals'
}
Check if appsink will emit the "new-preroll" and "new-sample" signals.
Parameters:
GstApp.AppSink.get_emit_signals
def GstApp.AppSink.get_emit_signals (self):
#python wrapper for 'gst_app_sink_get_emit_signals'
Check if appsink will emit the "new-preroll" and "new-sample" signals.
Parameters:
gst_app_sink_get_max_buffers
guint gst_app_sink_get_max_buffers (GstAppSink * appsink)
Get the maximum amount of buffers that can be queued in appsink.
Parameters:
appsink
–
The maximum amount of buffers that can be queued.
GstApp.AppSink.prototype.get_max_buffers
function GstApp.AppSink.prototype.get_max_buffers(): {
// javascript wrapper for 'gst_app_sink_get_max_buffers'
}
Get the maximum amount of buffers that can be queued in appsink.
Parameters:
The maximum amount of buffers that can be queued.
GstApp.AppSink.get_max_buffers
def GstApp.AppSink.get_max_buffers (self):
#python wrapper for 'gst_app_sink_get_max_buffers'
Get the maximum amount of buffers that can be queued in appsink.
Parameters:
The maximum amount of buffers that can be queued.
gst_app_sink_get_max_bytes
guint64 gst_app_sink_get_max_bytes (GstAppSink * appsink)
Get the maximum total size, in bytes, that can be queued in appsink.
Parameters:
appsink
–
The maximum amount of bytes that can be queued
Since : 1.24
GstApp.AppSink.prototype.get_max_bytes
function GstApp.AppSink.prototype.get_max_bytes(): {
// javascript wrapper for 'gst_app_sink_get_max_bytes'
}
Get the maximum total size, in bytes, that can be queued in appsink.
Parameters:
The maximum amount of bytes that can be queued
Since : 1.24
GstApp.AppSink.get_max_bytes
def GstApp.AppSink.get_max_bytes (self):
#python wrapper for 'gst_app_sink_get_max_bytes'
Get the maximum total size, in bytes, that can be queued in appsink.
Parameters:
The maximum amount of bytes that can be queued
Since : 1.24
gst_app_sink_get_max_time
GstClockTime gst_app_sink_get_max_time (GstAppSink * appsink)
Get the maximum total duration that can be queued in appsink.
Parameters:
appsink
–
The maximum total duration that can be queued.
Since : 1.24
GstApp.AppSink.prototype.get_max_time
function GstApp.AppSink.prototype.get_max_time(): {
// javascript wrapper for 'gst_app_sink_get_max_time'
}
Get the maximum total duration that can be queued in appsink.
Parameters:
The maximum total duration that can be queued.
Since : 1.24
GstApp.AppSink.get_max_time
def GstApp.AppSink.get_max_time (self):
#python wrapper for 'gst_app_sink_get_max_time'
Get the maximum total duration that can be queued in appsink.
Parameters:
The maximum total duration that can be queued.
Since : 1.24
gst_app_sink_get_wait_on_eos
gboolean gst_app_sink_get_wait_on_eos (GstAppSink * appsink)
Check if appsink will wait for all buffers to be consumed when an EOS is received.
Parameters:
appsink
–
TRUE if appsink will wait for all buffers to be consumed when an EOS is received.
GstApp.AppSink.prototype.get_wait_on_eos
function GstApp.AppSink.prototype.get_wait_on_eos(): {
// javascript wrapper for 'gst_app_sink_get_wait_on_eos'
}
Check if appsink will wait for all buffers to be consumed when an EOS is received.
Parameters:
GstApp.AppSink.get_wait_on_eos
def GstApp.AppSink.get_wait_on_eos (self):
#python wrapper for 'gst_app_sink_get_wait_on_eos'
Check if appsink will wait for all buffers to be consumed when an EOS is received.
Parameters:
gst_app_sink_is_eos
gboolean gst_app_sink_is_eos (GstAppSink * appsink)
Check if appsink is EOS, which is when no more samples can be pulled because an EOS event was received.
This function also returns TRUE when the appsink is not in the PAUSED or PLAYING state.
Parameters:
appsink
–
TRUE if no more samples can be pulled and the appsink is EOS.
GstApp.AppSink.prototype.is_eos
function GstApp.AppSink.prototype.is_eos(): {
// javascript wrapper for 'gst_app_sink_is_eos'
}
Check if appsink is EOS, which is when no more samples can be pulled because an EOS event was received.
This function also returns true when the appsink is not in the PAUSED or PLAYING state.
Parameters:
GstApp.AppSink.is_eos
def GstApp.AppSink.is_eos (self):
#python wrapper for 'gst_app_sink_is_eos'
Check if appsink is EOS, which is when no more samples can be pulled because an EOS event was received.
This function also returns True when the appsink is not in the PAUSED or PLAYING state.
Parameters:
gst_app_sink_pull_object
GstMiniObject * gst_app_sink_pull_object (GstAppSink * appsink)
This function blocks until a sample or an event becomes available or the appsink element is set to the READY/NULL state.
This function will only return samples when the appsink is in the PLAYING state. All rendered buffers and events will be put in a queue so that the application can pull them at its own rate. Note that when the application does not pull samples fast enough, the queued buffers could consume a lot of memory, especially when dealing with raw video frames. Events can be pulled when the appsink is in the READY, PAUSED or PLAYING state.
This function will only pull serialized events, excluding the EOS event for which this functions returns NULL. Use gst_app_sink_is_eos to check for the EOS condition.
This method is a variant of gst_app_sink_pull_sample that can be used to handle incoming events 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.
Parameters:
appsink
–
a GstSample, or a GstEvent or NULL when the appsink is stopped or EOS. Call gst_mini_object_unref after usage.
Since : 1.20
gst_app_sink_pull_preroll
GstSample * gst_app_sink_pull_preroll (GstAppSink * appsink)
Get the last preroll sample in appsink. This was the sample that caused the appsink to preroll in the PAUSED state.
This function is typically used when dealing with a pipeline in the PAUSED state. Calling this function after doing a seek will give the sample right after the seek position.
Calling this function will clear the internal reference to the preroll buffer.
Note that the preroll sample will also be returned as the first sample when calling gst_app_sink_pull_sample.
If an EOS event was received before any buffers, this function returns NULL. Use gst_app_sink_is_eos () to check for the EOS condition.
This function blocks until a preroll sample or EOS is received or the appsink element is set to the READY/NULL state.
Parameters:
appsink
–
a GstSample or NULL when the appsink is stopped or EOS. Call gst_sample_unref after usage.
GstApp.AppSink.prototype.pull_preroll
function GstApp.AppSink.prototype.pull_preroll(): {
// javascript wrapper for 'gst_app_sink_pull_preroll'
}
Get the last preroll sample in appsink. This was the sample that caused the appsink to preroll in the PAUSED state.
This function is typically used when dealing with a pipeline in the PAUSED state. Calling this function after doing a seek will give the sample right after the seek position.
Calling this function will clear the internal reference to the preroll buffer.
Note that the preroll sample will also be returned as the first sample when calling GstApp.AppSink.prototype.pull_sample.
If an EOS event was received before any buffers, this function returns null. Use gst_app_sink_is_eos () to check for the EOS condition.
This function blocks until a preroll sample or EOS is received or the appsink element is set to the READY/NULL state.
Parameters:
a Gst.Sample or NULL when the appsink is stopped or EOS. Call gst_sample_unref (not introspectable) after usage.
GstApp.AppSink.pull_preroll
def GstApp.AppSink.pull_preroll (self):
#python wrapper for 'gst_app_sink_pull_preroll'
Get the last preroll sample in appsink. This was the sample that caused the appsink to preroll in the PAUSED state.
This function is typically used when dealing with a pipeline in the PAUSED state. Calling this function after doing a seek will give the sample right after the seek position.
Calling this function will clear the internal reference to the preroll buffer.
Note that the preroll sample will also be returned as the first sample when calling GstApp.AppSink.pull_sample.
If an EOS event was received before any buffers, this function returns None. Use gst_app_sink_is_eos () to check for the EOS condition.
This function blocks until a preroll sample or EOS is received or the appsink element is set to the READY/NULL state.
Parameters:
a Gst.Sample or NULL when the appsink is stopped or EOS. Call gst_sample_unref (not introspectable) after usage.
gst_app_sink_pull_sample
GstSample * gst_app_sink_pull_sample (GstAppSink * appsink)
This function blocks until a sample or EOS becomes available or the appsink element is set to the READY/NULL state.
This function will only return samples when the appsink is in the PLAYING state. All rendered buffers will be put in a queue so that the application can pull samples at its own rate. Note that when the application does not pull samples fast enough, the queued buffers could consume a lot of memory, especially when dealing with raw video frames.
If an EOS event was received before any buffers, this function returns NULL. Use gst_app_sink_is_eos () to check for the EOS condition.
Parameters:
appsink
–
a GstSample or NULL when the appsink is stopped or EOS. Call gst_sample_unref after usage.
GstApp.AppSink.prototype.pull_sample
function GstApp.AppSink.prototype.pull_sample(): {
// javascript wrapper for 'gst_app_sink_pull_sample'
}
This function blocks until a sample or EOS becomes available or the appsink element is set to the READY/NULL state.
This function will only return samples when the appsink is in the PLAYING state. All rendered buffers will be put in a queue so that the application can pull samples at its own rate. Note that when the application does not pull samples fast enough, the queued buffers could consume a lot of memory, especially when dealing with raw video frames.
If an EOS event was received before any buffers, this function returns null. Use gst_app_sink_is_eos () to check for the EOS condition.
Parameters:
a Gst.Sample or NULL when the appsink is stopped or EOS. Call gst_sample_unref (not introspectable) after usage.
GstApp.AppSink.pull_sample
def GstApp.AppSink.pull_sample (self):
#python wrapper for 'gst_app_sink_pull_sample'
This function blocks until a sample or EOS becomes available or the appsink element is set to the READY/NULL state.
This function will only return samples when the appsink is in the PLAYING state. All rendered buffers will be put in a queue so that the application can pull samples at its own rate. Note that when the application does not pull samples fast enough, the queued buffers could consume a lot of memory, especially when dealing with raw video frames.
If an EOS event was received before any buffers, this function returns None. Use gst_app_sink_is_eos () to check for the EOS condition.
Parameters:
a Gst.Sample or NULL when the appsink is stopped or EOS. Call gst_sample_unref (not introspectable) after usage.
gst_app_sink_set_buffer_list_support
gst_app_sink_set_buffer_list_support (GstAppSink * appsink, gboolean enable_lists)
Instruct appsink to enable or disable buffer list support.
For backwards-compatibility reasons applications need to opt in to indicate that they will be able to handle buffer lists.
Since : 1.12
GstApp.AppSink.prototype.set_buffer_list_support
function GstApp.AppSink.prototype.set_buffer_list_support(enable_lists: Number): {
// javascript wrapper for 'gst_app_sink_set_buffer_list_support'
}
Instruct appsink to enable or disable buffer list support.
For backwards-compatibility reasons applications need to opt in to indicate that they will be able to handle buffer lists.
Parameters:
enable or disable buffer list support
Since : 1.12
GstApp.AppSink.set_buffer_list_support
def GstApp.AppSink.set_buffer_list_support (self, enable_lists):
#python wrapper for 'gst_app_sink_set_buffer_list_support'
Instruct appsink to enable or disable buffer list support.
For backwards-compatibility reasons applications need to opt in to indicate that they will be able to handle buffer lists.
Parameters:
enable or disable buffer list support
Since : 1.12
gst_app_sink_set_callbacks
gst_app_sink_set_callbacks (GstAppSink * appsink, GstAppSinkCallbacks * callbacks, gpointer user_data, GDestroyNotify notify)
Set callbacks which will be executed for each new preroll, new sample and eos. This is an alternative to using the signals, it has lower overhead and is thus less expensive, but also less flexible.
If callbacks are installed, no signals will be emitted for performance reasons.
Before 1.16.3 it was not possible to change the callbacks in a thread-safe way.
Parameters:
appsink
–
callbacks
–
the callbacks
user_data
–
a user_data argument for the callbacks
notify
–
a destroy notify function
gst_app_sink_set_caps
gst_app_sink_set_caps (GstAppSink * appsink, const GstCaps * caps)
Set the capabilities on the appsink element. This function takes a copy of the caps structure. After calling this method, the sink will only accept caps that match caps. If caps is non-fixed, or incomplete, you must check the caps on the samples to get the actual used caps.
GstApp.AppSink.prototype.set_caps
function GstApp.AppSink.prototype.set_caps(caps: Gst.Caps): {
// javascript wrapper for 'gst_app_sink_set_caps'
}
Set the capabilities on the appsink element. This function takes a copy of the caps structure. After calling this method, the sink will only accept caps that match caps. If caps is non-fixed, or incomplete, you must check the caps on the samples to get the actual used caps.
GstApp.AppSink.set_caps
def GstApp.AppSink.set_caps (self, caps):
#python wrapper for 'gst_app_sink_set_caps'
Set the capabilities on the appsink element. This function takes a copy of the caps structure. After calling this method, the sink will only accept caps that match caps. If caps is non-fixed, or incomplete, you must check the caps on the samples to get the actual used caps.
gst_app_sink_set_drop
gst_app_sink_set_drop (GstAppSink * appsink, gboolean drop)
Instruct appsink to drop old buffers when the maximum amount of queued data is reached, that is, when any configured limit is hit (max-buffers, max-time or max-bytes).
GstApp.AppSink.prototype.set_drop
function GstApp.AppSink.prototype.set_drop(drop: Number): {
// javascript wrapper for 'gst_app_sink_set_drop'
}
Instruct appsink to drop old buffers when the maximum amount of queued data is reached, that is, when any configured limit is hit (max-buffers, max-time or max-bytes).
GstApp.AppSink.set_drop
def GstApp.AppSink.set_drop (self, drop):
#python wrapper for 'gst_app_sink_set_drop'
Instruct appsink to drop old buffers when the maximum amount of queued data is reached, that is, when any configured limit is hit (max-buffers, max-time or max-bytes).
gst_app_sink_set_emit_signals
gst_app_sink_set_emit_signals (GstAppSink * appsink, gboolean emit)
Make appsink emit the "new-preroll" and "new-sample" signals. This option is by default disabled because signal emission is expensive and unneeded when the application prefers to operate in pull mode.
GstApp.AppSink.prototype.set_emit_signals
function GstApp.AppSink.prototype.set_emit_signals(emit: Number): {
// javascript wrapper for 'gst_app_sink_set_emit_signals'
}
Make appsink emit the "new-preroll" and "new-sample" signals. This option is by default disabled because signal emission is expensive and unneeded when the application prefers to operate in pull mode.
GstApp.AppSink.set_emit_signals
def GstApp.AppSink.set_emit_signals (self, emit):
#python wrapper for 'gst_app_sink_set_emit_signals'
Make appsink emit the "new-preroll" and "new-sample" signals. This option is by default disabled because signal emission is expensive and unneeded when the application prefers to operate in pull mode.
gst_app_sink_set_max_buffers
gst_app_sink_set_max_buffers (GstAppSink * appsink, guint max)
Set the maximum amount of buffers that can be queued in appsink. After this amount of buffers are queued in appsink, any more buffers will block upstream elements until a sample is pulled from appsink, unless 'drop' is set, in which case new buffers will be discarded.
GstApp.AppSink.prototype.set_max_buffers
function GstApp.AppSink.prototype.set_max_buffers(max: Number): {
// javascript wrapper for 'gst_app_sink_set_max_buffers'
}
Set the maximum amount of buffers that can be queued in appsink. After this amount of buffers are queued in appsink, any more buffers will block upstream elements until a sample is pulled from appsink, unless 'drop' is set, in which case new buffers will be discarded.
Parameters:
the maximum number of buffers to queue
GstApp.AppSink.set_max_buffers
def GstApp.AppSink.set_max_buffers (self, max):
#python wrapper for 'gst_app_sink_set_max_buffers'
Set the maximum amount of buffers that can be queued in appsink. After this amount of buffers are queued in appsink, any more buffers will block upstream elements until a sample is pulled from appsink, unless 'drop' is set, in which case new buffers will be discarded.
Parameters:
the maximum number of buffers to queue
gst_app_sink_set_max_bytes
gst_app_sink_set_max_bytes (GstAppSink * appsink, guint64 max)
Set the maximum total size that can be queued in appsink. After this amount of buffers are queued in appsink, any more buffers will block upstream elements until a sample is pulled from appsink, unless 'drop' is set, in which case new buffers will be discarded.
Since : 1.24
GstApp.AppSink.prototype.set_max_bytes
function GstApp.AppSink.prototype.set_max_bytes(max: Number): {
// javascript wrapper for 'gst_app_sink_set_max_bytes'
}
Set the maximum total size that can be queued in appsink. After this amount of buffers are queued in appsink, any more buffers will block upstream elements until a sample is pulled from appsink, unless 'drop' is set, in which case new buffers will be discarded.
Parameters:
the maximum total size of buffers to queue, in bytes
Since : 1.24
GstApp.AppSink.set_max_bytes
def GstApp.AppSink.set_max_bytes (self, max):
#python wrapper for 'gst_app_sink_set_max_bytes'
Set the maximum total size that can be queued in appsink. After this amount of buffers are queued in appsink, any more buffers will block upstream elements until a sample is pulled from appsink, unless 'drop' is set, in which case new buffers will be discarded.
Parameters:
the maximum total size of buffers to queue, in bytes
Since : 1.24
gst_app_sink_set_max_time
gst_app_sink_set_max_time (GstAppSink * appsink, GstClockTime max)
Set the maximum total duration that can be queued in appsink. After this amount of buffers are queued in appsink, any more buffers will block upstream elements until a sample is pulled from appsink, unless 'drop' is set, in which case new buffers will be discarded.
Since : 1.24
GstApp.AppSink.prototype.set_max_time
function GstApp.AppSink.prototype.set_max_time(max: Number): {
// javascript wrapper for 'gst_app_sink_set_max_time'
}
Set the maximum total duration that can be queued in appsink. After this amount of buffers are queued in appsink, any more buffers will block upstream elements until a sample is pulled from appsink, unless 'drop' is set, in which case new buffers will be discarded.
Parameters:
the maximum total duration to queue
Since : 1.24
GstApp.AppSink.set_max_time
def GstApp.AppSink.set_max_time (self, max):
#python wrapper for 'gst_app_sink_set_max_time'
Set the maximum total duration that can be queued in appsink. After this amount of buffers are queued in appsink, any more buffers will block upstream elements until a sample is pulled from appsink, unless 'drop' is set, in which case new buffers will be discarded.
Parameters:
the maximum total duration to queue
Since : 1.24
gst_app_sink_set_wait_on_eos
gst_app_sink_set_wait_on_eos (GstAppSink * appsink, gboolean wait)
Instruct appsink to wait for all buffers to be consumed when an EOS is received.
GstApp.AppSink.prototype.set_wait_on_eos
function GstApp.AppSink.prototype.set_wait_on_eos(wait: Number): {
// javascript wrapper for 'gst_app_sink_set_wait_on_eos'
}
Instruct appsink to wait for all buffers to be consumed when an EOS is received.
GstApp.AppSink.set_wait_on_eos
def GstApp.AppSink.set_wait_on_eos (self, wait):
#python wrapper for 'gst_app_sink_set_wait_on_eos'
Instruct appsink to wait for all buffers to be consumed when an EOS is received.
gst_app_sink_try_pull_object
GstMiniObject * gst_app_sink_try_pull_object (GstAppSink * appsink, GstClockTime timeout)
This function blocks until a sample or an event or EOS 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 buffers and events will be put in a queue so that the application can pull them at its own rate. Note that when the application does not pull samples fast enough, the queued buffers could consume a lot of memory, especially when dealing with raw video frames. Events can be pulled when the appsink is in the READY, PAUSED or PLAYING state.
This function will only pull serialized events, excluding the EOS event for which this functions returns NULL. Use gst_app_sink_is_eos to check for the EOS condition.
This method is a variant of gst_app_sink_try_pull_sample that can be used to handle incoming events 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.
a GstSample, or GstEvent or NULL when the appsink is stopped or EOS or the timeout expires. Call gst_mini_object_unref after usage.
Since : 1.20
gst_app_sink_try_pull_preroll
GstSample * gst_app_sink_try_pull_preroll (GstAppSink * appsink, GstClockTime timeout)
Get the last preroll sample in appsink. This was the sample that caused the appsink to preroll in the PAUSED state.
This function is typically used when dealing with a pipeline in the PAUSED state. Calling this function after doing a seek will give the sample right after the seek position.
Calling this function will clear the internal reference to the preroll buffer.
Note that the preroll sample will also be returned as the first sample when calling gst_app_sink_pull_sample.
If an EOS event was received before any buffers or the timeout expires, this function returns NULL. Use gst_app_sink_is_eos () to check for the EOS condition.
This function blocks until a preroll sample or EOS is received, the appsink element is set to the READY/NULL state, or the timeout expires.
Parameters:
appsink
–
timeout
–
the maximum amount of time to wait for the preroll sample
a GstSample or NULL when the appsink is stopped or EOS or the timeout expires. Call gst_sample_unref after usage.
Since : 1.10
GstApp.AppSink.prototype.try_pull_preroll
function GstApp.AppSink.prototype.try_pull_preroll(timeout: Number): {
// javascript wrapper for 'gst_app_sink_try_pull_preroll'
}
Get the last preroll sample in appsink. This was the sample that caused the appsink to preroll in the PAUSED state.
This function is typically used when dealing with a pipeline in the PAUSED state. Calling this function after doing a seek will give the sample right after the seek position.
Calling this function will clear the internal reference to the preroll buffer.
Note that the preroll sample will also be returned as the first sample when calling GstApp.AppSink.prototype.pull_sample.
If an EOS event was received before any buffers or the timeout expires, this function returns null. Use gst_app_sink_is_eos () to check for the EOS condition.
This function blocks until a preroll sample or EOS is received, the appsink element is set to the READY/NULL state, or the timeout expires.
Parameters:
the maximum amount of time to wait for the preroll sample
a Gst.Sample or NULL when the appsink is stopped or EOS or the timeout expires. Call gst_sample_unref (not introspectable) after usage.
Since : 1.10
GstApp.AppSink.try_pull_preroll
def GstApp.AppSink.try_pull_preroll (self, timeout):
#python wrapper for 'gst_app_sink_try_pull_preroll'
Get the last preroll sample in appsink. This was the sample that caused the appsink to preroll in the PAUSED state.
This function is typically used when dealing with a pipeline in the PAUSED state. Calling this function after doing a seek will give the sample right after the seek position.
Calling this function will clear the internal reference to the preroll buffer.
Note that the preroll sample will also be returned as the first sample when calling GstApp.AppSink.pull_sample.
If an EOS event was received before any buffers or the timeout expires, this function returns None. Use gst_app_sink_is_eos () to check for the EOS condition.
This function blocks until a preroll sample or EOS is received, the appsink element is set to the READY/NULL state, or the timeout expires.
Parameters:
the maximum amount of time to wait for the preroll sample
a Gst.Sample or NULL when the appsink is stopped or EOS or the timeout expires. Call gst_sample_unref (not introspectable) after usage.
Since : 1.10
gst_app_sink_try_pull_sample
GstSample * gst_app_sink_try_pull_sample (GstAppSink * appsink, GstClockTime timeout)
This function blocks until a sample or EOS 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 buffers will be put in a queue so that the application can pull samples at its own rate. Note that when the application does not pull samples fast enough, the queued buffers could consume a lot of memory, especially when dealing with raw video frames.
If an EOS event was received before any buffers or the timeout expires, this function returns NULL. Use gst_app_sink_is_eos () to check for the EOS condition.
a GstSample or NULL when the appsink is stopped or EOS or the timeout expires. Call gst_sample_unref after usage.
Since : 1.10
GstApp.AppSink.prototype.try_pull_sample
function GstApp.AppSink.prototype.try_pull_sample(timeout: Number): {
// javascript wrapper for 'gst_app_sink_try_pull_sample'
}
This function blocks until a sample or EOS 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 buffers will be put in a queue so that the application can pull samples at its own rate. Note that when the application does not pull samples fast enough, the queued buffers could consume a lot of memory, especially when dealing with raw video frames.
If an EOS event was received before any buffers or the timeout expires, this function returns null. Use gst_app_sink_is_eos () to check for the EOS condition.
Parameters:
the maximum amount of time to wait for a sample
a Gst.Sample or NULL when the appsink is stopped or EOS or the timeout expires. Call gst_sample_unref (not introspectable) after usage.
Since : 1.10
GstApp.AppSink.try_pull_sample
def GstApp.AppSink.try_pull_sample (self, timeout):
#python wrapper for 'gst_app_sink_try_pull_sample'
This function blocks until a sample or EOS 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 buffers will be put in a queue so that the application can pull samples at its own rate. Note that when the application does not pull samples fast enough, the queued buffers could consume a lot of memory, especially when dealing with raw video frames.
If an EOS event was received before any buffers or the timeout expires, this function returns None. Use gst_app_sink_is_eos () to check for the EOS condition.
Parameters:
the maximum amount of time to wait for a sample
a Gst.Sample or NULL when the appsink is stopped or EOS or the timeout expires. Call gst_sample_unref (not introspectable) after usage.
Since : 1.10
Signals
eos
eos_callback (GstAppSink * self, gpointer user_data)
Signal that the end-of-stream has been reached. This signal is emitted from the streaming thread.
Parameters:
self
–
user_data
–
Flags: Run Last
eos
function eos_callback(self: GstApp.AppSink, user_data: Object): {
// javascript callback for the 'eos' signal
}
Signal that the end-of-stream has been reached. This signal is emitted from the streaming thread.
Parameters:
Flags: Run Last
eos
def eos_callback (self, *user_data):
#python callback for the 'eos' signal
Signal that the end-of-stream has been reached. This signal is emitted from the streaming thread.
Parameters:
Flags: Run Last
new-preroll
GstFlowReturn * new_preroll_callback (GstAppSink * self, gpointer user_data)
Signal that a new preroll sample is available.
This signal is emitted from the streaming thread and only when the "emit-signals" property is TRUE.
The new preroll sample can be retrieved with the "pull-preroll" action signal or gst_app_sink_pull_preroll either from this signal callback or from any other thread.
Note that this signal is only emitted when the "emit-signals" property is set to TRUE, which it is not by default for performance reasons.
Parameters:
self
–
user_data
–
Flags: Run Last
new-preroll
function new_preroll_callback(self: GstApp.AppSink, user_data: Object): {
// javascript callback for the 'new-preroll' signal
}
Signal that a new preroll sample is available.
This signal is emitted from the streaming thread and only when the "emit-signals" property is true.
The new preroll sample can be retrieved with the "pull-preroll" action signal or GstApp.AppSink.prototype.pull_preroll either from this signal callback or from any other thread.
Note that this signal is only emitted when the "emit-signals" property is set to true, which it is not by default for performance reasons.
Parameters:
Flags: Run Last
new-preroll
def new_preroll_callback (self, *user_data):
#python callback for the 'new-preroll' signal
Signal that a new preroll sample is available.
This signal is emitted from the streaming thread and only when the "emit-signals" property is True.
The new preroll sample can be retrieved with the "pull-preroll" action signal or GstApp.AppSink.pull_preroll either from this signal callback or from any other thread.
Note that this signal is only emitted when the "emit-signals" property is set to True, which it is not by default for performance reasons.
Parameters:
Flags: Run Last
new-sample
GstFlowReturn * new_sample_callback (GstAppSink * self, gpointer user_data)
Signal that a new sample is available.
This signal is emitted from the streaming thread and only when the "emit-signals" property is TRUE.
The new sample can be retrieved with the "pull-sample" action signal or gst_app_sink_pull_sample either from this signal callback or from any other thread.
Note that this signal is only emitted when the "emit-signals" property is set to TRUE, which it is not by default for performance reasons.
Parameters:
self
–
user_data
–
Flags: Run Last
new-sample
function new_sample_callback(self: GstApp.AppSink, user_data: Object): {
// javascript callback for the 'new-sample' signal
}
Signal that a new sample is available.
This signal is emitted from the streaming thread and only when the "emit-signals" property is true.
The new sample can be retrieved with the "pull-sample" action signal or GstApp.AppSink.prototype.pull_sample either from this signal callback or from any other thread.
Note that this signal is only emitted when the "emit-signals" property is set to true, which it is not by default for performance reasons.
Parameters:
Flags: Run Last
new-sample
def new_sample_callback (self, *user_data):
#python callback for the 'new-sample' signal
Signal that a new sample is available.
This signal is emitted from the streaming thread and only when the "emit-signals" property is True.
The new sample can be retrieved with the "pull-sample" action signal or GstApp.AppSink.pull_sample either from this signal callback or from any other thread.
Note that this signal is only emitted when the "emit-signals" property is set to True, which it is not by default for performance reasons.
Parameters:
Flags: Run Last
new-serialized-event
gboolean new_serialized_event_callback (GstAppSink * self, gpointer user_data)
Signal that a new downstream serialized event is available.
This signal is emitted from the streaming thread and only when the "emit-signals" property is TRUE.
The new event can be retrieved with the "try-pull-object" action signal or gst_app_sink_pull_object either from this signal callback or from any other thread.
EOS will not be notified using this signal, use eos instead. EOS cannot be pulled either, use gst_app_sink_is_eos to check for it.
Note that this signal is only emitted when the "emit-signals" property is set to TRUE, which it is not by default for performance reasons.
The callback should return TRUE if the event has been handled, which will skip basesink handling of the event, FALSE otherwise.
Parameters:
self
–
user_data
–
Flags: Run Last
Since : 1.20
new-serialized-event
function new_serialized_event_callback(self: GstApp.AppSink, user_data: Object): {
// javascript callback for the 'new-serialized-event' signal
}
Signal that a new downstream serialized event is available.
This signal is emitted from the streaming thread and only when the "emit-signals" property is true.
The new event can be retrieved with the "try-pull-object" action signal or gst_app_sink_pull_object (not introspectable) either from this signal callback or from any other thread.
EOS will not be notified using this signal, use eos instead. EOS cannot be pulled either, use GstApp.AppSink.prototype.is_eos to check for it.
Note that this signal is only emitted when the "emit-signals" property is set to true, which it is not by default for performance reasons.
The callback should return true if the event has been handled, which will skip basesink handling of the event, false otherwise.
Parameters:
Flags: Run Last
Since : 1.20
new-serialized-event
def new_serialized_event_callback (self, *user_data):
#python callback for the 'new-serialized-event' signal
Signal that a new downstream serialized event is available.
This signal is emitted from the streaming thread and only when the "emit-signals" property is True.
The new event can be retrieved with the "try-pull-object" action signal or gst_app_sink_pull_object (not introspectable) either from this signal callback or from any other thread.
EOS will not be notified using this signal, use eos instead. EOS cannot be pulled either, use GstApp.AppSink.is_eos to check for it.
Note that this signal is only emitted when the "emit-signals" property is set to True, which it is not by default for performance reasons.
The callback should return True if the event has been handled, which will skip basesink handling of the event, False otherwise.
Parameters:
Flags: Run Last
Since : 1.20
propose-allocation
gboolean propose_allocation_callback (GstAppSink * self, GstQuery * query, gpointer user_data)
Signal that a new propose_allocation query is available.
This signal is emitted from the streaming thread and only when the "emit-signals" property is TRUE.
Parameters:
self
–
query
–
the allocation query
user_data
–
Flags: Run Last
Since : 1.24
propose-allocation
function propose_allocation_callback(self: GstApp.AppSink, query: Gst.Query, user_data: Object): {
// javascript callback for the 'propose-allocation' signal
}
Signal that a new propose_allocation query is available.
This signal is emitted from the streaming thread and only when the "emit-signals" property is true.
Parameters:
the allocation query
Flags: Run Last
Since : 1.24
propose-allocation
def propose_allocation_callback (self, query, *user_data):
#python callback for the 'propose-allocation' signal
Signal that a new propose_allocation query is available.
This signal is emitted from the streaming thread and only when the "emit-signals" property is True.
Parameters:
the allocation query
Flags: Run Last
Since : 1.24
Action Signals
pull-preroll
g_signal_emit_by_name (self, "pull-preroll", user_data, &ret);
Get the last preroll sample in appsink. This was the sample that caused the appsink to preroll in the PAUSED state.
This function is typically used when dealing with a pipeline in the PAUSED state. Calling this function after doing a seek will give the sample right after the seek position.
Calling this function will clear the internal reference to the preroll buffer.
Note that the preroll sample will also be returned as the first sample when calling gst_app_sink_pull_sample or the "pull-sample" action signal.
If an EOS event was received before any buffers, this function returns NULL. Use gst_app_sink_is_eos () to check for the EOS condition.
This function blocks until a preroll sample or EOS is received or the appsink element is set to the READY/NULL state.
Parameters:
pull-preroll
let ret = self.emit ("pull-preroll", user_data);
Get the last preroll sample in appsink. This was the sample that caused the appsink to preroll in the PAUSED state.
This function is typically used when dealing with a pipeline in the PAUSED state. Calling this function after doing a seek will give the sample right after the seek position.
Calling this function will clear the internal reference to the preroll buffer.
Note that the preroll sample will also be returned as the first sample when calling GstApp.AppSink.prototype.pull_sample or the "pull-sample" action signal.
If an EOS event was received before any buffers, this function returns null. Use gst_app_sink_is_eos () to check for the EOS condition.
This function blocks until a preroll sample or EOS is received or the appsink element is set to the READY/NULL state.
Parameters:
a Gst.Sample or null when the appsink is stopped or EOS.
pull-preroll
ret = self.emit ("pull-preroll", user_data)
Get the last preroll sample in appsink. This was the sample that caused the appsink to preroll in the PAUSED state.
This function is typically used when dealing with a pipeline in the PAUSED state. Calling this function after doing a seek will give the sample right after the seek position.
Calling this function will clear the internal reference to the preroll buffer.
Note that the preroll sample will also be returned as the first sample when calling GstApp.AppSink.pull_sample or the "pull-sample" action signal.
If an EOS event was received before any buffers, this function returns None. Use gst_app_sink_is_eos () to check for the EOS condition.
This function blocks until a preroll sample or EOS is received or the appsink element is set to the READY/NULL state.
Parameters:
a Gst.Sample or None when the appsink is stopped or EOS.
pull-sample
g_signal_emit_by_name (self, "pull-sample", user_data, &ret);
This function blocks until a sample or EOS becomes available or the appsink element is set to the READY/NULL state.
This function will only return samples when the appsink is in the PLAYING state. All rendered samples will be put in a queue so that the application can pull samples at its own rate.
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.
If an EOS event was received before any buffers, this function returns NULL. Use gst_app_sink_is_eos () to check for the EOS condition.
Parameters:
pull-sample
let ret = self.emit ("pull-sample", user_data);
This function blocks until a sample or EOS becomes available or the appsink element is set to the READY/NULL state.
This function will only return samples when the appsink is in the PLAYING state. All rendered samples will be put in a queue so that the application can pull samples at its own rate.
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.
If an EOS event was received before any buffers, this function returns null. Use gst_app_sink_is_eos () to check for the EOS condition.
Parameters:
a Gst.Sample or null when the appsink is stopped or EOS.
pull-sample
ret = self.emit ("pull-sample", user_data)
This function blocks until a sample or EOS becomes available or the appsink element is set to the READY/NULL state.
This function will only return samples when the appsink is in the PLAYING state. All rendered samples will be put in a queue so that the application can pull samples at its own rate.
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.
If an EOS event was received before any buffers, this function returns None. Use gst_app_sink_is_eos () to check for the EOS condition.
Parameters:
a Gst.Sample or None when the appsink is stopped or EOS.
try-pull-object
g_signal_emit_by_name (self, "try-pull-object", timeout, user_data, &ret);
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 gst_app_sink_is_eos to check for the EOS condition.
This signal is a variant of 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.
Parameters:
the maximum amount of time to wait for a sample
Since : 1.20
try-pull-object
let ret = self.emit ("try-pull-object", timeout, user_data);
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.AppSink.prototype.is_eos to check for the EOS condition.
This signal is a variant of 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.
Parameters:
the maximum amount of time to wait for a sample
a Gst.Sample or a Gst.Event or NULL when the appsink is stopped or EOS or the timeout expires.
Since : 1.20
try-pull-object
ret = self.emit ("try-pull-object", timeout, user_data)
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 None. Use GstApp.AppSink.is_eos to check for the EOS condition.
This signal is a variant of 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.
Parameters:
the maximum amount of time to wait for a sample
a Gst.Sample or a Gst.Event or NULL when the appsink is stopped or EOS or the timeout expires.
Since : 1.20
try-pull-preroll
g_signal_emit_by_name (self, "try-pull-preroll", timeout, user_data, &ret);
Get the last preroll sample in appsink. This was the sample that caused the appsink to preroll in the PAUSED state.
This function is typically used when dealing with a pipeline in the PAUSED state. Calling this function after doing a seek will give the sample right after the seek position.
Calling this function will clear the internal reference to the preroll buffer.
Note that the preroll sample will also be returned as the first sample when calling gst_app_sink_pull_sample or the "pull-sample" action signal.
If an EOS event was received before any buffers or the timeout expires, this function returns NULL. Use gst_app_sink_is_eos () to check for the EOS condition.
This function blocks until a preroll sample or EOS is received, the appsink element is set to the READY/NULL state, or the timeout expires.
Parameters:
the maximum amount of time to wait for the preroll sample
Since : 1.10
try-pull-preroll
let ret = self.emit ("try-pull-preroll", timeout, user_data);
Get the last preroll sample in appsink. This was the sample that caused the appsink to preroll in the PAUSED state.
This function is typically used when dealing with a pipeline in the PAUSED state. Calling this function after doing a seek will give the sample right after the seek position.
Calling this function will clear the internal reference to the preroll buffer.
Note that the preroll sample will also be returned as the first sample when calling GstApp.AppSink.prototype.pull_sample or the "pull-sample" action signal.
If an EOS event was received before any buffers or the timeout expires, this function returns null. Use gst_app_sink_is_eos () to check for the EOS condition.
This function blocks until a preroll sample or EOS is received, the appsink element is set to the READY/NULL state, or the timeout expires.
Parameters:
the maximum amount of time to wait for the preroll sample
a Gst.Sample or null when the appsink is stopped or EOS or the timeout expires.
Since : 1.10
try-pull-preroll
ret = self.emit ("try-pull-preroll", timeout, user_data)
Get the last preroll sample in appsink. This was the sample that caused the appsink to preroll in the PAUSED state.
This function is typically used when dealing with a pipeline in the PAUSED state. Calling this function after doing a seek will give the sample right after the seek position.
Calling this function will clear the internal reference to the preroll buffer.
Note that the preroll sample will also be returned as the first sample when calling GstApp.AppSink.pull_sample or the "pull-sample" action signal.
If an EOS event was received before any buffers or the timeout expires, this function returns None. Use gst_app_sink_is_eos () to check for the EOS condition.
This function blocks until a preroll sample or EOS is received, the appsink element is set to the READY/NULL state, or the timeout expires.
Parameters:
the maximum amount of time to wait for the preroll sample
a Gst.Sample or None when the appsink is stopped or EOS or the timeout expires.
Since : 1.10
try-pull-sample
g_signal_emit_by_name (self, "try-pull-sample", timeout, user_data, &ret);
This function blocks until a sample or EOS 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 will be put in a queue so that the application can pull samples at its own rate.
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.
If an EOS event was received before any buffers or the timeout expires, this function returns NULL. Use gst_app_sink_is_eos () to check for the EOS condition.
Parameters:
the maximum amount of time to wait for a sample
a GstSample or NULL when the appsink is stopped or EOS or the timeout expires.
Since : 1.10
try-pull-sample
let ret = self.emit ("try-pull-sample", timeout, user_data);
This function blocks until a sample or EOS 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 will be put in a queue so that the application can pull samples at its own rate.
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.
If an EOS event was received before any buffers or the timeout expires, this function returns null. Use gst_app_sink_is_eos () to check for the EOS condition.
Parameters:
the maximum amount of time to wait for a sample
a Gst.Sample or NULL when the appsink is stopped or EOS or the timeout expires.
Since : 1.10
try-pull-sample
ret = self.emit ("try-pull-sample", timeout, user_data)
This function blocks until a sample or EOS 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 will be put in a queue so that the application can pull samples at its own rate.
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.
If an EOS event was received before any buffers or the timeout expires, this function returns None. Use gst_app_sink_is_eos () to check for the EOS condition.
Parameters:
the maximum amount of time to wait for a sample
a Gst.Sample or NULL when the appsink is stopped or EOS or the timeout expires.
Since : 1.10
Properties
max-buffers
“max-buffers” guint
Maximum amount of buffers in the queue (0 = unlimited).
Flags : Read / Write
max-buffers
“max-buffers” Number
Maximum amount of buffers in the queue (0 = unlimited).
Flags : Read / Write
max_buffers
“self.props.max_buffers” int
Maximum amount of buffers in the queue (0 = unlimited).
Flags : Read / Write
max-bytes
“max-bytes” guint64
Maximum amount of bytes in the queue (0 = unlimited)
Flags : Read / Write
Since : 1.24
max-bytes
“max-bytes” Number
Maximum amount of bytes in the queue (0 = unlimited)
Flags : Read / Write
Since : 1.24
max_bytes
“self.props.max_bytes” int
Maximum amount of bytes in the queue (0 = unlimited)
Flags : Read / Write
Since : 1.24
max-time
“max-time” guint64
Maximum total duration of data in the queue (0 = unlimited)
Flags : Read / Write
Since : 1.24
max-time
“max-time” Number
Maximum total duration of data in the queue (0 = unlimited)
Flags : Read / Write
Since : 1.24
max_time
“self.props.max_time” int
Maximum total duration of data in the queue (0 = unlimited)
Flags : Read / Write
Since : 1.24
wait-on-eos
“wait-on-eos” gboolean
Wait for all buffers to be processed after receiving an EOS.
In cases where it is uncertain if an appsink will have a consumer for its buffers when it receives an EOS, set to FALSE to ensure that the appsink will not hang.
Flags : Read / Write
Since : 1.8
Virtual Methods
vfunc_eos
function vfunc_eos(appsink: GstApp.AppSink): {
// javascript implementation of the 'eos' virtual method
}
Parameters:
do_eos
def do_eos (appsink):
#python implementation of the 'eos' virtual method
Parameters:
new_preroll
GstFlowReturn new_preroll (GstAppSink * appsink)
Parameters:
appsink
–
vfunc_new_preroll
function vfunc_new_preroll(appsink: GstApp.AppSink): {
// javascript implementation of the 'new_preroll' virtual method
}
Parameters:
do_new_preroll
def do_new_preroll (appsink):
#python implementation of the 'new_preroll' virtual method
Parameters:
new_sample
GstFlowReturn new_sample (GstAppSink * appsink)
Parameters:
appsink
–
vfunc_new_sample
function vfunc_new_sample(appsink: GstApp.AppSink): {
// javascript implementation of the 'new_sample' virtual method
}
Parameters:
do_new_sample
def do_new_sample (appsink):
#python implementation of the 'new_sample' virtual method
Parameters:
pull_preroll
GstSample * pull_preroll (GstAppSink * appsink)
Parameters:
appsink
–
vfunc_pull_preroll
function vfunc_pull_preroll(appsink: GstApp.AppSink): {
// javascript implementation of the 'pull_preroll' virtual method
}
Parameters:
do_pull_preroll
def do_pull_preroll (appsink):
#python implementation of the 'pull_preroll' virtual method
Parameters:
pull_sample
GstSample * pull_sample (GstAppSink * appsink)
Parameters:
appsink
–
vfunc_pull_sample
function vfunc_pull_sample(appsink: GstApp.AppSink): {
// javascript implementation of the 'pull_sample' virtual method
}
Parameters:
do_pull_sample
def do_pull_sample (appsink):
#python implementation of the 'pull_sample' virtual method
Parameters:
try_pull_object
GstMiniObject * try_pull_object (GstAppSink * appsink, GstClockTime timeout)
See try-pull-object: signal.
Parameters:
appsink
–
timeout
–
Since : 1.20
try_pull_preroll
GstSample * try_pull_preroll (GstAppSink * appsink, GstClockTime timeout)
Parameters:
appsink
–
timeout
–
vfunc_try_pull_preroll
function vfunc_try_pull_preroll(appsink: GstApp.AppSink, timeout: Number): {
// javascript implementation of the 'try_pull_preroll' virtual method
}
Parameters:
do_try_pull_preroll
def do_try_pull_preroll (appsink, timeout):
#python implementation of the 'try_pull_preroll' virtual method
Parameters:
try_pull_sample
GstSample * try_pull_sample (GstAppSink * appsink, GstClockTime timeout)
Parameters:
appsink
–
timeout
–
vfunc_try_pull_sample
function vfunc_try_pull_sample(appsink: GstApp.AppSink, timeout: Number): {
// javascript implementation of the 'try_pull_sample' virtual method
}
Parameters:
do_try_pull_sample
def do_try_pull_sample (appsink, timeout):
#python implementation of the 'try_pull_sample' virtual method
Parameters:
GstAppSinkCallbacks
A set of callbacks that can be installed on the appsink with gst_app_sink_set_callbacks.
Function Macros
GST_APP_SINK_CAST
#define GST_APP_SINK_CAST(obj) \ ((GstAppSink*)(obj))
Constants
GST_TYPE_APP_SINK
#define GST_TYPE_APP_SINK \ (gst_app_sink_get_type())
The results of the search are