# 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 "leaky-type" 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) –
No description available

### Class structure

#### GstAppSinkClass

##### Fields

`basesink_class` (GstBaseSinkClass) –
No description available

### GstApp.AppSinkClass

##### Attributes

`basesink_class` (GstBase.BaseSinkClass) –
No description available

### GstApp.AppSinkClass

##### Attributes

`basesink_class` (GstBase.BaseSinkClass) –
No description available

## GstApp.AppSink

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Element
                    ╰──GstBase.BaseSink
                        ╰──GstApp.AppSink

### Members

`basesink` (GstBase.BaseSink) –
No description available

## GstApp.AppSink

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Element
                    ╰──GstBase.BaseSink
                        ╰──GstApp.AppSink

### Members

`basesink` (GstBase.BaseSink) –
No description available

### 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` –

a GstAppSink

Returns –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Number) –

true if appsink supports buffer lists.

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (bool) –

True if appsink supports buffer lists.

Since : 1.12

#### gst_app_sink_get_caps

    GstCaps *
    gst_app_sink_get_caps (GstAppSink * appsink)

Get the configured caps on appsink.

Parameters:

`appsink` –

a GstAppSink

Returns ( [nullable][transfer: full]) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Gst.Caps) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Gst.Caps) –

the Gst.Caps accepted by the sink. gst_caps_unref (not introspectable) after usage.

#### gst_app_sink_get_current_level_buffers

    guint64
    gst_app_sink_get_current_level_buffers (GstAppSink * appsink)

Get the number of currently queued buffers inside appsink.

Parameters:

`appsink` –

a GstAppSink

Returns –

The number of currently queued buffers.

Since : 1.28

#### GstApp.AppSink.prototype.get_current_level_buffers

    function GstApp.AppSink.prototype.get_current_level_buffers(): {
        // javascript wrapper for 'gst_app_sink_get_current_level_buffers'
    }

Get the number of currently queued buffers inside appsink.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Number) –

The number of currently queued buffers.

Since : 1.28

#### GstApp.AppSink.get_current_level_buffers

    def GstApp.AppSink.get_current_level_buffers (self):
        #python wrapper for 'gst_app_sink_get_current_level_buffers'

Get the number of currently queued buffers inside appsink.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (int) –

The number of currently queued buffers.

Since : 1.28

#### gst_app_sink_get_current_level_bytes

    guint64
    gst_app_sink_get_current_level_bytes (GstAppSink * appsink)

Get the number of currently queued bytes inside appsink.

Parameters:

`appsink` –

a GstAppSink

Returns –

The number of currently queued bytes.

Since : 1.28

#### GstApp.AppSink.prototype.get_current_level_bytes

    function GstApp.AppSink.prototype.get_current_level_bytes(): {
        // javascript wrapper for 'gst_app_sink_get_current_level_bytes'
    }

Get the number of currently queued bytes inside appsink.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Number) –

The number of currently queued bytes.

Since : 1.28

#### GstApp.AppSink.get_current_level_bytes

    def GstApp.AppSink.get_current_level_bytes (self):
        #python wrapper for 'gst_app_sink_get_current_level_bytes'

Get the number of currently queued bytes inside appsink.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (int) –

The number of currently queued bytes.

Since : 1.28

#### gst_app_sink_get_current_level_time

    GstClockTime
    gst_app_sink_get_current_level_time (GstAppSink * appsink)

Get the amount of currently queued time inside appsink.

Parameters:

`appsink` –

a GstAppSink

Returns –

The amount of currently queued time.

Since : 1.28

#### GstApp.AppSink.prototype.get_current_level_time

    function GstApp.AppSink.prototype.get_current_level_time(): {
        // javascript wrapper for 'gst_app_sink_get_current_level_time'
    }

Get the amount of currently queued time inside appsink.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Number) –

The amount of currently queued time.

Since : 1.28

#### GstApp.AppSink.get_current_level_time

    def GstApp.AppSink.get_current_level_time (self):
        #python wrapper for 'gst_app_sink_get_current_level_time'

Get the amount of currently queued time inside appsink.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (int) –

The amount of currently queued time.

Since : 1.28

#### 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` –

a GstAppSink

Returns –

TRUE if appsink is dropping old buffers when the queue is filled.

deprecated : 1.28: Use gst_app_src_get_leaky_type() instead.

#### 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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Number) –

true if appsink is dropping old buffers when the queue is filled.

deprecated : 1.28: Use gst_app_src_get_leaky_type() instead.

#### 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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (bool) –

True if appsink is dropping old buffers when the queue is filled.

deprecated : 1.28: Use gst_app_src_get_leaky_type() instead.

#### 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` –

a GstAppSink

Returns –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Number) –

true if appsink is emitting the "new-preroll" and "new-sample" signals.

#### 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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (bool) –

True if appsink is emitting the "new-preroll" and "new-sample" signals.

#### gst_app_sink_get_leaky_type

    GstAppLeakyType
    gst_app_sink_get_leaky_type (GstAppSink * appsink)

Returns the currently set GstAppLeakyType. See gst_app_sink_set_leaky_type for more details.

Parameters:

`appsink` –

a GstAppSink

Returns –

The currently set GstAppLeakyType.

Since : 1.28

#### GstApp.AppSink.prototype.get_leaky_type

    function GstApp.AppSink.prototype.get_leaky_type(): {
        // javascript wrapper for 'gst_app_sink_get_leaky_type'
    }

Returns the currently set GstApp.AppLeakyType. See GstApp.AppSink.prototype.set_leaky_type for more details.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (GstApp.AppLeakyType) –

The currently set GstApp.AppLeakyType.

Since : 1.28

#### GstApp.AppSink.get_leaky_type

    def GstApp.AppSink.get_leaky_type (self):
        #python wrapper for 'gst_app_sink_get_leaky_type'

Returns the currently set GstApp.AppLeakyType. See GstApp.AppSink.set_leaky_type for more details.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (GstApp.AppLeakyType) –

The currently set GstApp.AppLeakyType.

Since : 1.28

#### 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` –

a GstAppSink

Returns –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Number) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (int) –

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` –

a GstAppSink

Returns –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Number) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (int) –

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` –

a GstAppSink

Returns –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Number) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (int) –

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` –

a GstAppSink

Returns –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Number) –

true if appsink will wait for all buffers to be consumed when an EOS is received.

#### 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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (bool) –

True if appsink will wait for all buffers to be consumed when an EOS is received.

#### 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` –

a GstAppSink

Returns –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Number) –

true if no more samples can be pulled and the appsink is EOS.

#### 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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (bool) –

True if no more samples can be pulled and the appsink is EOS.

#### 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 GstAppSink

Returns ( [transfer: full][nullable]) –

a GstSample, or a GstEvent or NULL when the appsink is stopped or EOS. Call gst_mini_object_unref after usage.

Since : 1.20

#### GstApp.AppSink.prototype.pull_object

    function GstApp.AppSink.prototype.pull_object(): {
        // javascript wrapper for 'gst_app_sink_pull_object'
    }

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 GstApp.AppSink.prototype.is_eos to check for the EOS condition.

This method is a variant of GstApp.AppSink.prototype.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` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Gst.MiniObject) –

a Gst.Sample, or a Gst.Event or NULL when the appsink is stopped or EOS. Call gst_mini_object_unref (not introspectable) after usage.

Since : 1.20

#### GstApp.AppSink.pull_object

    def GstApp.AppSink.pull_object (self):
        #python wrapper for 'gst_app_sink_pull_object'

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 None. Use GstApp.AppSink.is_eos to check for the EOS condition.

This method is a variant of GstApp.AppSink.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` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Gst.MiniObject) –

a Gst.Sample, or a Gst.Event or NULL when the appsink is stopped or EOS. Call gst_mini_object_unref (not introspectable) 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 GstAppSink

Returns ( [transfer: full][nullable]) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Gst.Sample) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Gst.Sample) –

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 GstAppSink

Returns ( [transfer: full][nullable]) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Gst.Sample) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

Returns (Gst.Sample) –

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.

Parameters:

`appsink` –

a GstAppSink

`enable_lists` –

enable or disable buffer list support

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`enable_lists` (Number) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`enable_lists` (bool) –

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.

Since 1.28.3 it is allowed to set the callbacks to NULL to unset them.

Note that gst_app_sink_set_callbacks and gst_app_sink_set_simple_callbacks are mutually exclusive and setting one will unset the other.

Parameters:

`appsink` –

a GstAppSink

`callbacks` ( [nullable]) –

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.

Parameters:

`appsink` –

a GstAppSink

`caps` ( [nullable]) –

caps to set

#### 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.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`caps` (Gst.Caps) –

caps to set

#### 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.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`caps` (Gst.Caps) –

caps to set

#### 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).

Parameters:

`appsink` –

a GstAppSink

`drop` –

the new state

deprecated : 1.28: Use gst_app_src_get_leaky_type() instead.

#### 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).

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`drop` (Number) –

the new state

deprecated : 1.28: Use gst_app_src_get_leaky_type() instead.

#### 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).

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`drop` (bool) –

the new state

deprecated : 1.28: Use gst_app_src_get_leaky_type() instead.

#### 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.

Parameters:

`appsink` –

a GstAppSink

`emit` –

the new state

#### 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.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`emit` (Number) –

the new state

#### 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.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`emit` (bool) –

the new state

#### gst_app_sink_set_leaky_type

    gst_app_sink_set_leaky_type (GstAppSink * appsink,
                                 GstAppLeakyType leaky)

When set to any other value than GST_APP_LEAKY_TYPE_NONE then the appsink will drop any buffers that are pushed into it once its internal queue is full. The selected type defines whether to drop the oldest or new buffers.

Parameters:

`appsink` –

a GstAppSink

`leaky` –

the GstAppLeakyType

Since : 1.28

#### GstApp.AppSink.prototype.set_leaky_type

    function GstApp.AppSink.prototype.set_leaky_type(leaky: GstApp.AppLeakyType): {
        // javascript wrapper for 'gst_app_sink_set_leaky_type'
    }

When set to any other value than GST_APP_LEAKY_TYPE_NONE then the appsink will drop any buffers that are pushed into it once its internal queue is full. The selected type defines whether to drop the oldest or new buffers.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`leaky` (GstApp.AppLeakyType) –

the GstApp.AppLeakyType

Since : 1.28

#### GstApp.AppSink.set_leaky_type

    def GstApp.AppSink.set_leaky_type (self, leaky):
        #python wrapper for 'gst_app_sink_set_leaky_type'

When set to any other value than GST_APP_LEAKY_TYPE_NONE then the appsink will drop any buffers that are pushed into it once its internal queue is full. The selected type defines whether to drop the oldest or new buffers.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`leaky` (GstApp.AppLeakyType) –

the GstApp.AppLeakyType

Since : 1.28

#### 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.

Parameters:

`appsink` –

a GstAppSink

`max` –

the maximum number of buffers to queue

#### 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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`max` (Number) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`max` (int) –

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.

Parameters:

`appsink` –

a GstAppSink

`max` –

the maximum total size of buffers to queue, in bytes

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`max` (Number) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`max` (int) –

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.

Parameters:

`appsink` –

a GstAppSink

`max` –

the maximum total duration to queue

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`max` (Number) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`max` (int) –

the maximum total duration to queue

Since : 1.24

#### gst_app_sink_set_simple_callbacks

    gst_app_sink_set_simple_callbacks (GstAppSink * appsink,
                                       GstAppSinkSimpleCallbacks * cb)

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.

Once cb is set on an GstAppSink it is not possible anymore to change any of the callbacks inside it.

Note that gst_app_sink_set_callbacks and gst_app_sink_set_simple_callbacks are mutually exclusive and setting one will unset the other.

Parameters:

`appsink` –

a GstAppSink

`cb` ( [transfer: full][nullable]) –

the callbacks

Since : 1.28

#### GstApp.AppSink.prototype.set_simple_callbacks

    function GstApp.AppSink.prototype.set_simple_callbacks(cb: GstApp.AppSinkSimpleCallbacks): {
        // javascript wrapper for 'gst_app_sink_set_simple_callbacks'
    }

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.

Once cb is set on an GstApp.AppSink it is not possible anymore to change any of the callbacks inside it.

Note that gst_app_sink_set_callbacks (not introspectable) and GstApp.AppSink.prototype.set_simple_callbacks are mutually exclusive and setting one will unset the other.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

Since : 1.28

#### GstApp.AppSink.set_simple_callbacks

    def GstApp.AppSink.set_simple_callbacks (self, cb):
        #python wrapper for 'gst_app_sink_set_simple_callbacks'

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.

Once cb is set on an GstApp.AppSink it is not possible anymore to change any of the callbacks inside it.

Note that gst_app_sink_set_callbacks (not introspectable) and GstApp.AppSink.set_simple_callbacks are mutually exclusive and setting one will unset the other.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

Since : 1.28

#### 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.

Parameters:

`appsink` –

a GstAppSink

`wait` –

the new state

#### 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.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`wait` (Number) –

the new state

#### 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.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`wait` (bool) –

the new state

#### 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.

Parameters:

`appsink` –

a GstAppSink

`timeout` –

the maximum amount of time to wait for a sample

Returns ( [transfer: full][nullable]) –

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

#### GstApp.AppSink.prototype.try_pull_object

    function GstApp.AppSink.prototype.try_pull_object(timeout: Number): {
        // javascript wrapper for 'gst_app_sink_try_pull_object'
    }

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 GstApp.AppSink.prototype.is_eos to check for the EOS condition.

This method is a variant of GstApp.AppSink.prototype.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.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`timeout` (Number) –

the maximum amount of time to wait for a sample

Returns (Gst.MiniObject) –

a Gst.Sample, or Gst.Event or NULL when the appsink is stopped or EOS or the timeout expires. Call gst_mini_object_unref (not introspectable) after usage.

Since : 1.20

#### GstApp.AppSink.try_pull_object

    def GstApp.AppSink.try_pull_object (self, timeout):
        #python wrapper for 'gst_app_sink_try_pull_object'

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 None. Use GstApp.AppSink.is_eos to check for the EOS condition.

This method is a variant of GstApp.AppSink.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.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`timeout` (int) –

the maximum amount of time to wait for a sample

Returns (Gst.MiniObject) –

a Gst.Sample, or Gst.Event or NULL when the appsink is stopped or EOS or the timeout expires. Call gst_mini_object_unref (not introspectable) 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` –

a GstAppSink

`timeout` –

the maximum amount of time to wait for the preroll sample

Returns ( [transfer: full][nullable]) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`timeout` (Number) –

the maximum amount of time to wait for the preroll sample

Returns (Gst.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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`timeout` (int) –

the maximum amount of time to wait for the preroll sample

Returns (Gst.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.

Parameters:

`appsink` –

a GstAppSink

`timeout` –

the maximum amount of time to wait for a sample

Returns ( [transfer: full][nullable]) –

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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`timeout` (Number) –

the maximum amount of time to wait for a sample

Returns (Gst.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:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`timeout` (int) –

the maximum amount of time to wait for a sample

Returns (Gst.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` –
No description available
`user_data` –
No description available

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:

`self` (GstApp.AppSink) –
No description available
`user_data` (Object) –
No description available

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:

`self` (GstApp.AppSink) –
No description available
`user_data` (variadic) –
No description available

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` –
No description available
`user_data` –
No description available
Returns –
No description available

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:

`self` (GstApp.AppSink) –
No description available
`user_data` (Object) –
No description available
Returns (Gst.FlowReturn) –
No description available

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:

`self` (GstApp.AppSink) –
No description available
`user_data` (variadic) –
No description available
Returns (Gst.FlowReturn) –
No description available

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` –
No description available
`user_data` –
No description available
Returns –
No description available

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:

`self` (GstApp.AppSink) –
No description available
`user_data` (Object) –
No description available
Returns (Gst.FlowReturn) –
No description available

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:

`self` (GstApp.AppSink) –
No description available
`user_data` (variadic) –
No description available
Returns (Gst.FlowReturn) –
No description available

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` –
No description available
`user_data` –
No description available
Returns –
No description available

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 GstApp.AppSink.prototype.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 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:

`self` (GstApp.AppSink) –
No description available
`user_data` (Object) –
No description available
Returns (Number) –
No description available

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 GstApp.AppSink.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 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:

`self` (GstApp.AppSink) –
No description available
`user_data` (variadic) –
No description available
Returns (bool) –
No description available

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` –
No description available
`query` –

the allocation query

`user_data` –
No description available
Returns –
No description available

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:

`self` (GstApp.AppSink) –
No description available
`query` (Gst.Query) –

the allocation query

`user_data` (Object) –
No description available
Returns (Number) –
No description available

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:

`self` (GstApp.AppSink) –
No description available
`query` (Gst.Query) –

the allocation query

`user_data` (variadic) –
No description available
Returns (bool) –
No description available

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:

`self` (GstAppSink *) –
No description available
`user_data` (gpointer) –
No description available
Returns ( [nullable][transfer: full]) –

a GstSample or NULL when the appsink is stopped or EOS.

Flags: Run Last / Action

#### 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:

`self` (GstApp.AppSink) –
No description available
`user_data` (Object) –
No description available
Returns (Gst.Sample) –

a Gst.Sample or null when the appsink is stopped or EOS.

Flags: Run Last / Action

#### 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:

`self` (GstApp.AppSink) –
No description available
`user_data` (variadic) –
No description available
Returns (Gst.Sample) –

a Gst.Sample or None when the appsink is stopped or EOS.

Flags: Run Last / Action

#### 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 "leaky-type" 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:

`self` (GstAppSink *) –
No description available
`user_data` (gpointer) –
No description available
Returns ( [nullable][transfer: full]) –

a GstSample or NULL when the appsink is stopped or EOS.

Flags: Run Last / Action

#### 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 "leaky-type" 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:

`self` (GstApp.AppSink) –
No description available
`user_data` (Object) –
No description available
Returns (Gst.Sample) –

a Gst.Sample or null when the appsink is stopped or EOS.

Flags: Run Last / Action

#### 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 "leaky-type" 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:

`self` (GstApp.AppSink) –
No description available
`user_data` (variadic) –
No description available
Returns (Gst.Sample) –

a Gst.Sample or None when the appsink is stopped or EOS.

Flags: Run Last / Action

#### 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 "leaky-type" 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:

`self` (GstAppSink *) –
No description available
`timeout` (guint64) –

the maximum amount of time to wait for a sample

`user_data` (gpointer) –
No description available
Returns ( [nullable][transfer: full]) –

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

Flags: Run Last / Action

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 "leaky-type" 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:

`self` (GstApp.AppSink) –
No description available
`timeout` (Number) –

the maximum amount of time to wait for a sample

`user_data` (Object) –
No description available
Returns (Gst.MiniObject) –

a Gst.Sample or a Gst.Event or NULL when the appsink is stopped or EOS or the timeout expires.

Flags: Run Last / Action

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 "leaky-type" 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:

`self` (GstApp.AppSink) –
No description available
`timeout` (int) –

the maximum amount of time to wait for a sample

`user_data` (variadic) –
No description available
Returns (Gst.MiniObject) –

a Gst.Sample or a Gst.Event or NULL when the appsink is stopped or EOS or the timeout expires.

Flags: Run Last / Action

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:

`self` (GstAppSink *) –
No description available
`timeout` (guint64) –

the maximum amount of time to wait for the preroll sample

`user_data` (gpointer) –
No description available
Returns ( [nullable][transfer: full]) –

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

Flags: Run Last / Action

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:

`self` (GstApp.AppSink) –
No description available
`timeout` (Number) –

the maximum amount of time to wait for the preroll sample

`user_data` (Object) –
No description available
Returns (Gst.Sample) –

a Gst.Sample or null when the appsink is stopped or EOS or the timeout expires.

Flags: Run Last / Action

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:

`self` (GstApp.AppSink) –
No description available
`timeout` (int) –

the maximum amount of time to wait for the preroll sample

`user_data` (variadic) –
No description available
Returns (Gst.Sample) –

a Gst.Sample or None when the appsink is stopped or EOS or the timeout expires.

Flags: Run Last / Action

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 "leaky-type" 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:

`self` (GstAppSink *) –
No description available
`timeout` (guint64) –

the maximum amount of time to wait for a sample

`user_data` (gpointer) –
No description available
Returns ( [nullable]) –

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

Flags: Run Last / Action

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 "leaky-type" 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:

`self` (GstApp.AppSink) –
No description available
`timeout` (Number) –

the maximum amount of time to wait for a sample

`user_data` (Object) –
No description available
Returns (Gst.Sample) –

a Gst.Sample or NULL when the appsink is stopped or EOS or the timeout expires.

Flags: Run Last / Action

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 "leaky-type" 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:

`self` (GstApp.AppSink) –
No description available
`timeout` (int) –

the maximum amount of time to wait for a sample

`user_data` (variadic) –
No description available
Returns (Gst.Sample) –

a Gst.Sample or NULL when the appsink is stopped or EOS or the timeout expires.

Flags: Run Last / Action

Since : 1.10

### Properties

#### buffer-list

    “buffer-list” gboolean

Flags : Read / Write

#### buffer-list

    “buffer-list” Number

Flags : Read / Write

#### buffer_list

    “self.props.buffer_list” bool

Flags : Read / Write

#### caps

    “caps” GstCaps *

Flags : Read / Write

#### caps

    “caps” Gst.Caps

Flags : Read / Write

#### caps

    “self.props.caps” Gst.Caps

Flags : Read / Write

#### current-level-buffers

    “current-level-buffers” guint64

The number of currently queued buffers inside appsink.

Flags : Read

Since : 1.28

#### current-level-buffers

    “current-level-buffers” Number

The number of currently queued buffers inside appsink.

Flags : Read

Since : 1.28

#### current_level_buffers

    “self.props.current_level_buffers” int

The number of currently queued buffers inside appsink.

Flags : Read

Since : 1.28

#### current-level-bytes

    “current-level-bytes” guint64

The number of currently queued bytes inside appsink.

Flags : Read

Since : 1.28

#### current-level-bytes

    “current-level-bytes” Number

The number of currently queued bytes inside appsink.

Flags : Read

Since : 1.28

#### current_level_bytes

    “self.props.current_level_bytes” int

The number of currently queued bytes inside appsink.

Flags : Read

Since : 1.28

#### current-level-time

    “current-level-time” guint64

The amount of currently queued time inside appsink.

Flags : Read

Since : 1.28

#### current-level-time

    “current-level-time” Number

The amount of currently queued time inside appsink.

Flags : Read

Since : 1.28

#### current_level_time

    “self.props.current_level_time” int

The amount of currently queued time inside appsink.

Flags : Read

Since : 1.28

#### drop

    “drop” gboolean

Drop old buffers when the buffer queue is filled.

Flags : Read / Write

deprecated : 1.28: Use "leaky-type" property instead.

#### drop

    “drop” Number

Drop old buffers when the buffer queue is filled.

Flags : Read / Write

deprecated : 1.28: Use "leaky-type" property instead.

#### drop

    “self.props.drop” bool

Drop old buffers when the buffer queue is filled.

Flags : Read / Write

deprecated : 1.28: Use "leaky-type" property instead.

#### dropped

    “dropped” guint64

Number of buffers that were dropped.

Flags : Read

Since : 1.28

#### dropped

    “dropped” Number

Number of buffers that were dropped.

Flags : Read

Since : 1.28

#### dropped

    “self.props.dropped” int

Number of buffers that were dropped.

Flags : Read

Since : 1.28

#### emit-signals

    “emit-signals” gboolean

Flags : Read / Write

#### emit-signals

    “emit-signals” Number

Flags : Read / Write

#### emit_signals

    “self.props.emit_signals” bool

Flags : Read / Write

#### eos

    “eos” gboolean

Flags : Read

#### eos

    “eos” Number

Flags : Read

#### eos

    “self.props.eos” bool

Flags : Read

#### in

    “in” guint64

Number of input buffers that were queued.

Flags : Read

Since : 1.28

#### in

    “in” Number

Number of input buffers that were queued.

Flags : Read

Since : 1.28

#### in

    “self.props.in” int

Number of input buffers that were queued.

Flags : Read

Since : 1.28

#### leaky-type

    “leaky-type” GstAppLeakyType *

When set to any other value than GST_APP_LEAKY_TYPE_NONE then the appsink will drop any buffers that are pushed into it once its internal queue is full. The selected type defines whether to drop the oldest or new buffers.

Flags : Read / Write

Since : 1.28

#### leaky-type

    “leaky-type” GstApp.AppLeakyType

When set to any other value than GST_APP_LEAKY_TYPE_NONE then the appsink will drop any buffers that are pushed into it once its internal queue is full. The selected type defines whether to drop the oldest or new buffers.

Flags : Read / Write

Since : 1.28

#### leaky_type

    “self.props.leaky_type” GstApp.AppLeakyType

When set to any other value than GST_APP_LEAKY_TYPE_NONE then the appsink will drop any buffers that are pushed into it once its internal queue is full. The selected type defines whether to drop the oldest or new buffers.

Flags : Read / Write

Since : 1.28

#### 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

#### out

    “out” guint64

Number of output buffers that were dequeued.

Flags : Read

Since : 1.28

#### out

    “out” Number

Number of output buffers that were dequeued.

Flags : Read

Since : 1.28

#### out

    “self.props.out” int

Number of output buffers that were dequeued.

Flags : Read

Since : 1.28

#### silent

    “silent” gboolean

Don't emit notify for input, output and dropped buffers.

Flags : Read / Write

Since : 1.28

#### silent

    “silent” Number

Don't emit notify for input, output and dropped buffers.

Flags : Read / Write

Since : 1.28

#### silent

    “self.props.silent” bool

Don't emit notify for input, output and dropped buffers.

Flags : Read / Write

Since : 1.28

#### 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

#### wait-on-eos

    “wait-on-eos” Number

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

#### wait_on_eos

    “self.props.wait_on_eos” bool

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

#### eos

    eos (GstAppSink * appsink)

Parameters:

`appsink` –
No description available

#### vfunc_eos

    function vfunc_eos(appsink: GstApp.AppSink): {
        // javascript implementation of the 'eos' virtual method
    }

Parameters:

`appsink` (GstApp.AppSink) –
No description available

#### do_eos

    def do_eos (appsink):
        #python implementation of the 'eos' virtual method

Parameters:

`appsink` (GstApp.AppSink) –
No description available

#### new_preroll

    GstFlowReturn
    new_preroll (GstAppSink * appsink)

Parameters:

`appsink` –
No description available
Returns –
No description available

#### vfunc_new_preroll

    function vfunc_new_preroll(appsink: GstApp.AppSink): {
        // javascript implementation of the 'new_preroll' virtual method
    }

Parameters:

`appsink` (GstApp.AppSink) –
No description available
Returns (Gst.FlowReturn) –
No description available

#### do_new_preroll

    def do_new_preroll (appsink):
        #python implementation of the 'new_preroll' virtual method

Parameters:

`appsink` (GstApp.AppSink) –
No description available
Returns (Gst.FlowReturn) –
No description available

#### new_sample

    GstFlowReturn
    new_sample (GstAppSink * appsink)

Parameters:

`appsink` –
No description available
Returns –
No description available

#### vfunc_new_sample

    function vfunc_new_sample(appsink: GstApp.AppSink): {
        // javascript implementation of the 'new_sample' virtual method
    }

Parameters:

`appsink` (GstApp.AppSink) –
No description available
Returns (Gst.FlowReturn) –
No description available

#### do_new_sample

    def do_new_sample (appsink):
        #python implementation of the 'new_sample' virtual method

Parameters:

`appsink` (GstApp.AppSink) –
No description available
Returns (Gst.FlowReturn) –
No description available

#### pull_preroll

    GstSample *
    pull_preroll (GstAppSink * appsink)

Parameters:

`appsink` –
No description available
Returns –
No description available

#### vfunc_pull_preroll

    function vfunc_pull_preroll(appsink: GstApp.AppSink): {
        // javascript implementation of the 'pull_preroll' virtual method
    }

Parameters:

`appsink` (GstApp.AppSink) –
No description available
Returns (Gst.Sample) –
No description available

#### do_pull_preroll

    def do_pull_preroll (appsink):
        #python implementation of the 'pull_preroll' virtual method

Parameters:

`appsink` (GstApp.AppSink) –
No description available
Returns (Gst.Sample) –
No description available

#### pull_sample

    GstSample *
    pull_sample (GstAppSink * appsink)

Parameters:

`appsink` –
No description available
Returns –
No description available

#### vfunc_pull_sample

    function vfunc_pull_sample(appsink: GstApp.AppSink): {
        // javascript implementation of the 'pull_sample' virtual method
    }

Parameters:

`appsink` (GstApp.AppSink) –
No description available
Returns (Gst.Sample) –
No description available

#### do_pull_sample

    def do_pull_sample (appsink):
        #python implementation of the 'pull_sample' virtual method

Parameters:

`appsink` (GstApp.AppSink) –
No description available
Returns (Gst.Sample) –
No description available

#### try_pull_object

    GstMiniObject *
    try_pull_object (GstAppSink * appsink,
                     GstClockTime timeout)

See try-pull-object: signal.

Parameters:

`appsink` –
No description available
`timeout` –
No description available
Returns –
No description available

Since : 1.20

#### vfunc_try_pull_object

    function vfunc_try_pull_object(appsink: GstApp.AppSink, timeout: Number): {
        // javascript implementation of the 'try_pull_object' virtual method
    }

See try-pull-object: signal.

Parameters:

`appsink` (GstApp.AppSink) –
No description available
`timeout` (Number) –
No description available
Returns (Gst.MiniObject) –
No description available

Since : 1.20

#### do_try_pull_object

    def do_try_pull_object (appsink, timeout):
        #python implementation of the 'try_pull_object' virtual method

See try-pull-object: signal.

Parameters:

`appsink` (GstApp.AppSink) –
No description available
`timeout` (int) –
No description available
Returns (Gst.MiniObject) –
No description available

Since : 1.20

#### try_pull_preroll

    GstSample *
    try_pull_preroll (GstAppSink * appsink,
                      GstClockTime timeout)

Parameters:

`appsink` –
No description available
`timeout` –
No description available
Returns –
No description available

#### vfunc_try_pull_preroll

    function vfunc_try_pull_preroll(appsink: GstApp.AppSink, timeout: Number): {
        // javascript implementation of the 'try_pull_preroll' virtual method
    }

Parameters:

`appsink` (GstApp.AppSink) –
No description available
`timeout` (Number) –
No description available
Returns (Gst.Sample) –
No description available

#### do_try_pull_preroll

    def do_try_pull_preroll (appsink, timeout):
        #python implementation of the 'try_pull_preroll' virtual method

Parameters:

`appsink` (GstApp.AppSink) –
No description available
`timeout` (int) –
No description available
Returns (Gst.Sample) –
No description available

#### try_pull_sample

    GstSample *
    try_pull_sample (GstAppSink * appsink,
                     GstClockTime timeout)

Parameters:

`appsink` –
No description available
`timeout` –
No description available
Returns –
No description available

#### vfunc_try_pull_sample

    function vfunc_try_pull_sample(appsink: GstApp.AppSink, timeout: Number): {
        // javascript implementation of the 'try_pull_sample' virtual method
    }

Parameters:

`appsink` (GstApp.AppSink) –
No description available
`timeout` (Number) –
No description available
Returns (Gst.Sample) –
No description available

#### do_try_pull_sample

    def do_try_pull_sample (appsink, timeout):
        #python implementation of the 'try_pull_sample' virtual method

Parameters:

`appsink` (GstApp.AppSink) –
No description available
`timeout` (int) –
No description available
Returns (Gst.Sample) –
No description available

## GstAppSinkCallbacks

A set of callbacks that can be installed on the appsink with gst_app_sink_set_callbacks.

## GstAppSinkSimpleCallbacks

A set of callbacks that can be installed on the appsink with gst_app_sink_set_simple_callbacks.

Unlike GstAppSinkCallbacks this can also be used from bindings.

Since : 1.28

## GstApp.AppSinkSimpleCallbacks

A set of callbacks that can be installed on the appsink with GstApp.AppSink.prototype.set_simple_callbacks.

Unlike GstAppSinkCallbacks this can also be used from bindings.

Since : 1.28

## GstApp.AppSinkSimpleCallbacks

A set of callbacks that can be installed on the appsink with GstApp.AppSink.set_simple_callbacks.

Unlike GstAppSinkCallbacks this can also be used from bindings.

Since : 1.28

### Constructors

#### gst_app_sink_simple_callbacks_new

    GstAppSinkSimpleCallbacks *
    gst_app_sink_simple_callbacks_new ()

Creates a new instance of callbacks.

Returns ( [transfer: full]) –

New empty GstAppSinkSimpleCallbacks

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.prototype.new

    function GstApp.AppSinkSimpleCallbacks.prototype.new(): {
        // javascript wrapper for 'gst_app_sink_simple_callbacks_new'
    }

Creates a new instance of callbacks.

Returns (GstApp.AppSinkSimpleCallbacks) –

New empty GstAppSinkSimpleCallbacks

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.new

    def GstApp.AppSinkSimpleCallbacks.new ():
        #python wrapper for 'gst_app_sink_simple_callbacks_new'

Creates a new instance of callbacks.

Returns (GstApp.AppSinkSimpleCallbacks) –

New empty GstAppSinkSimpleCallbacks

Since : 1.28

### Methods

#### gst_app_sink_simple_callbacks_ref

    GstAppSinkSimpleCallbacks *
    gst_app_sink_simple_callbacks_ref (GstAppSinkSimpleCallbacks * cb)

Increases the reference count of cb.

Parameters:

`cb` –

the callbacks

Returns ( [transfer: full]) –

the callbacks

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.prototype.ref

    function GstApp.AppSinkSimpleCallbacks.prototype.ref(): {
        // javascript wrapper for 'gst_app_sink_simple_callbacks_ref'
    }

Increases the reference count of cb.

Parameters:

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

Returns (GstApp.AppSinkSimpleCallbacks) –

the callbacks

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.ref

    def GstApp.AppSinkSimpleCallbacks.ref (self):
        #python wrapper for 'gst_app_sink_simple_callbacks_ref'

Increases the reference count of cb.

Parameters:

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

Returns (GstApp.AppSinkSimpleCallbacks) –

the callbacks

Since : 1.28

#### gst_app_sink_simple_callbacks_set_eos

    gst_app_sink_simple_callbacks_set_eos (GstAppSinkSimpleCallbacks * cb,
                                           GstAppSinkEosCallback eos_cb,
                                           gpointer user_data,
                                           GDestroyNotify destroy_notify)

Sets the EOS callback on cb.

Once cb is set on an GstAppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` –

the callbacks

`eos_cb` ( [scope notified][closure]) –

EOS callback

`user_data` –

the user data

`destroy_notify` –

GDestroyNotify to free the user data

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.prototype.set_eos

    function GstApp.AppSinkSimpleCallbacks.prototype.set_eos(eos_cb: GstApp.AppSinkEosCallback, user_data: Object): {
        // javascript wrapper for 'gst_app_sink_simple_callbacks_set_eos'
    }

Sets the EOS callback on cb.

Once cb is set on an GstApp.AppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

`eos_cb` (GstApp.AppSinkEosCallback) –

EOS callback

`user_data` (Object) –

the user data

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.set_eos

    def GstApp.AppSinkSimpleCallbacks.set_eos (self, eos_cb, *user_data):
        #python wrapper for 'gst_app_sink_simple_callbacks_set_eos'

Sets the EOS callback on cb.

Once cb is set on an GstApp.AppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

`eos_cb` (GstApp.AppSinkEosCallback) –

EOS callback

`user_data` (variadic) –

the user data

Since : 1.28

#### gst_app_sink_simple_callbacks_set_new_event

    gst_app_sink_simple_callbacks_set_new_event (GstAppSinkSimpleCallbacks * cb,
                                                 GstAppSinkNewEventCallback new_event_cb,
                                                 gpointer user_data,
                                                 GDestroyNotify destroy_notify)

Sets the new event callback on cb.

Once cb is set on an GstAppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` –

the callbacks

`new_event_cb` ( [scope notified][closure]) –

new event callback

`user_data` –

the user data

`destroy_notify` –

GDestroyNotify to free the user data

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.prototype.set_new_event

    function GstApp.AppSinkSimpleCallbacks.prototype.set_new_event(new_event_cb: GstApp.AppSinkNewEventCallback, user_data: Object): {
        // javascript wrapper for 'gst_app_sink_simple_callbacks_set_new_event'
    }

Sets the new event callback on cb.

Once cb is set on an GstApp.AppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

`new_event_cb` (GstApp.AppSinkNewEventCallback) –

new event callback

`user_data` (Object) –

the user data

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.set_new_event

    def GstApp.AppSinkSimpleCallbacks.set_new_event (self, new_event_cb, *user_data):
        #python wrapper for 'gst_app_sink_simple_callbacks_set_new_event'

Sets the new event callback on cb.

Once cb is set on an GstApp.AppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

`new_event_cb` (GstApp.AppSinkNewEventCallback) –

new event callback

`user_data` (variadic) –

the user data

Since : 1.28

#### gst_app_sink_simple_callbacks_set_new_preroll

    gst_app_sink_simple_callbacks_set_new_preroll (GstAppSinkSimpleCallbacks * cb,
                                                   GstAppSinkNewPrerollCallback new_preroll_cb,
                                                   gpointer user_data,
                                                   GDestroyNotify destroy_notify)

Sets the new preroll callback on cb.

Once cb is set on an GstAppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` –

the callbacks

`new_preroll_cb` ( [scope notified][closure]) –

new preroll callback

`user_data` –

the user data

`destroy_notify` –

GDestroyNotify to free the user data

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.prototype.set_new_preroll

    function GstApp.AppSinkSimpleCallbacks.prototype.set_new_preroll(new_preroll_cb: GstApp.AppSinkNewPrerollCallback, user_data: Object): {
        // javascript wrapper for 'gst_app_sink_simple_callbacks_set_new_preroll'
    }

Sets the new preroll callback on cb.

Once cb is set on an GstApp.AppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

`new_preroll_cb` (GstApp.AppSinkNewPrerollCallback) –

new preroll callback

`user_data` (Object) –

the user data

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.set_new_preroll

    def GstApp.AppSinkSimpleCallbacks.set_new_preroll (self, new_preroll_cb, *user_data):
        #python wrapper for 'gst_app_sink_simple_callbacks_set_new_preroll'

Sets the new preroll callback on cb.

Once cb is set on an GstApp.AppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

`new_preroll_cb` (GstApp.AppSinkNewPrerollCallback) –

new preroll callback

`user_data` (variadic) –

the user data

Since : 1.28

#### gst_app_sink_simple_callbacks_set_new_sample

    gst_app_sink_simple_callbacks_set_new_sample (GstAppSinkSimpleCallbacks * cb,
                                                  GstAppSinkNewSampleCallback new_sample_cb,
                                                  gpointer user_data,
                                                  GDestroyNotify destroy_notify)

Sets the new sample callback on cb.

Once cb is set on an GstAppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` –

the callbacks

`new_sample_cb` ( [scope notified][closure]) –

new sample callback

`user_data` –

the user data

`destroy_notify` –

GDestroyNotify to free the user data

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.prototype.set_new_sample

    function GstApp.AppSinkSimpleCallbacks.prototype.set_new_sample(new_sample_cb: GstApp.AppSinkNewSampleCallback, user_data: Object): {
        // javascript wrapper for 'gst_app_sink_simple_callbacks_set_new_sample'
    }

Sets the new sample callback on cb.

Once cb is set on an GstApp.AppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

`new_sample_cb` (GstApp.AppSinkNewSampleCallback) –

new sample callback

`user_data` (Object) –

the user data

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.set_new_sample

    def GstApp.AppSinkSimpleCallbacks.set_new_sample (self, new_sample_cb, *user_data):
        #python wrapper for 'gst_app_sink_simple_callbacks_set_new_sample'

Sets the new sample callback on cb.

Once cb is set on an GstApp.AppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

`new_sample_cb` (GstApp.AppSinkNewSampleCallback) –

new sample callback

`user_data` (variadic) –

the user data

Since : 1.28

#### gst_app_sink_simple_callbacks_set_propose_allocation

    gst_app_sink_simple_callbacks_set_propose_allocation (GstAppSinkSimpleCallbacks * cb,
                                                          GstAppSinkProposeAllocationCallback propose_allocation_cb,
                                                          gpointer user_data,
                                                          GDestroyNotify destroy_notify)

Sets the new event callback on cb.

Once cb is set on an GstAppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` –

the callbacks

`propose_allocation_cb` ( [scope notified][closure]) –

propose allocation callback

`user_data` –

the user data

`destroy_notify` –

GDestroyNotify to free the user data

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.prototype.set_propose_allocation

    function GstApp.AppSinkSimpleCallbacks.prototype.set_propose_allocation(propose_allocation_cb: GstApp.AppSinkProposeAllocationCallback, user_data: Object): {
        // javascript wrapper for 'gst_app_sink_simple_callbacks_set_propose_allocation'
    }

Sets the new event callback on cb.

Once cb is set on an GstApp.AppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

`propose_allocation_cb` (GstApp.AppSinkProposeAllocationCallback) –

propose allocation callback

`user_data` (Object) –

the user data

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.set_propose_allocation

    def GstApp.AppSinkSimpleCallbacks.set_propose_allocation (self, propose_allocation_cb, *user_data):
        #python wrapper for 'gst_app_sink_simple_callbacks_set_propose_allocation'

Sets the new event callback on cb.

Once cb is set on an GstApp.AppSink it is not possible anymore to change any of the callbacks inside it.

Parameters:

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

`propose_allocation_cb` (GstApp.AppSinkProposeAllocationCallback) –

propose allocation callback

`user_data` (variadic) –

the user data

Since : 1.28

#### gst_app_sink_simple_callbacks_unref

    gst_app_sink_simple_callbacks_unref (GstAppSinkSimpleCallbacks * cb)

Decreases the reference count of cb and frees it after the last reference is dropped.

Parameters:

`cb` –

the callbacks

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.prototype.unref

    function GstApp.AppSinkSimpleCallbacks.prototype.unref(): {
        // javascript wrapper for 'gst_app_sink_simple_callbacks_unref'
    }

Decreases the reference count of cb and frees it after the last reference is dropped.

Parameters:

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

Since : 1.28

#### GstApp.AppSinkSimpleCallbacks.unref

    def GstApp.AppSinkSimpleCallbacks.unref (self):
        #python wrapper for 'gst_app_sink_simple_callbacks_unref'

Decreases the reference count of cb and frees it after the last reference is dropped.

Parameters:

`cb` (GstApp.AppSinkSimpleCallbacks) –

the callbacks

Since : 1.28

## 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())

### GST_TYPE_APP_SINK_SIMPLE_CALLBACKS

    #define GST_TYPE_APP_SINK_SIMPLE_CALLBACKS (gst_app_sink_simple_callbacks_get_type ())

Since : 1.28

## Callbacks

### GstAppSinkEosCallback

    (*GstAppSinkEosCallback) (GstAppSink * appsink,
                              gpointer user_data)

Called when the end-of-stream has been reached. This callback is called from the streaming thread.

Parameters:

`appsink` –

a GstAppSink

`user_data` –

callback user data

Since : 1.28

### GstApp.AppSinkEosCallback

    function GstApp.AppSinkEosCallback(appsink: GstApp.AppSink, user_data: Object): {
        // javascript wrapper for 'GstAppSinkEosCallback'
    }

Called when the end-of-stream has been reached. This callback is called from the streaming thread.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`user_data` (Object) –

callback user data

Since : 1.28

### GstApp.AppSinkEosCallback

    def GstApp.AppSinkEosCallback (appsink, *user_data):
        #python wrapper for 'GstAppSinkEosCallback'

Called when the end-of-stream has been reached. This callback is called from the streaming thread.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`user_data` (variadic) –

callback user data

Since : 1.28

### GstAppSinkNewEventCallback

    gboolean
    (*GstAppSinkNewEventCallback) (GstAppSink * appsink,
                                   gpointer user_data)

Called when a new event is available. This callback is called from the streaming thread. The new event can be retrieved with gst_app_sink_pull_object either from this callback or from any other thread.

The callback should return TRUE if the event has been handled, FALSE otherwise.

Parameters:

`appsink` –

a GstAppSink

`user_data` –

callback user data

Returns –

TRUE when the event has been handled.

Since : 1.28

### GstApp.AppSinkNewEventCallback

    function GstApp.AppSinkNewEventCallback(appsink: GstApp.AppSink, user_data: Object): {
        // javascript wrapper for 'GstAppSinkNewEventCallback'
    }

Called when a new event is available. This callback is called from the streaming thread. The new event can be retrieved with GstApp.AppSink.prototype.pull_object either from this callback or from any other thread.

The callback should return true if the event has been handled, false otherwise.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`user_data` (Object) –

callback user data

Returns (Number) –

true when the event has been handled.

Since : 1.28

### GstApp.AppSinkNewEventCallback

    def GstApp.AppSinkNewEventCallback (appsink, *user_data):
        #python wrapper for 'GstAppSinkNewEventCallback'

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 True if the event has been handled, False otherwise.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`user_data` (variadic) –

callback user data

Returns (bool) –

True when the event has been handled.

Since : 1.28

### GstAppSinkNewPrerollCallback

    GstFlowReturn
    (*GstAppSinkNewPrerollCallback) (GstAppSink * appsink,
                                     gpointer user_data)

Called when a new preroll sample is available. This callback is called from the streaming thread. The new preroll sample can be retrieved with gst_app_sink_pull_preroll either from this callback or from any other thread.

Parameters:

`appsink` –

a GstAppSink

`user_data` –

callback user data

Returns –

GST_FLOW_OK on success.

Since : 1.28

### GstApp.AppSinkNewPrerollCallback

    function GstApp.AppSinkNewPrerollCallback(appsink: GstApp.AppSink, user_data: Object): {
        // javascript wrapper for 'GstAppSinkNewPrerollCallback'
    }

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.prototype.pull_preroll either from this callback or from any other thread.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`user_data` (Object) –

callback user data

Returns (Gst.FlowReturn) –

Gst.FlowReturn.OK on success.

Since : 1.28

### GstApp.AppSinkNewPrerollCallback

    def GstApp.AppSinkNewPrerollCallback (appsink, *user_data):
        #python wrapper for 'GstAppSinkNewPrerollCallback'

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.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`user_data` (variadic) –

callback user data

Returns (Gst.FlowReturn) –

Gst.FlowReturn.OK on success.

Since : 1.28

### GstAppSinkNewSampleCallback

    GstFlowReturn
    (*GstAppSinkNewSampleCallback) (GstAppSink * appsink,
                                    gpointer user_data)

Called when a new sample is available. This callback is called from the streaming thread. The new sample can be retrieved with gst_app_sink_pull_sample either from this callback or from any other thread.

Parameters:

`appsink` –

a GstAppSink

`user_data` –

callback user data

Returns –

GST_FLOW_OK on success.

Since : 1.28

### GstApp.AppSinkNewSampleCallback

    function GstApp.AppSinkNewSampleCallback(appsink: GstApp.AppSink, user_data: Object): {
        // javascript wrapper for 'GstAppSinkNewSampleCallback'
    }

Called when a new sample is available. This callback is called from the streaming thread. The new sample can be retrieved with GstApp.AppSink.prototype.pull_sample either from this callback or from any other thread.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`user_data` (Object) –

callback user data

Returns (Gst.FlowReturn) –

Gst.FlowReturn.OK on success.

Since : 1.28

### GstApp.AppSinkNewSampleCallback

    def GstApp.AppSinkNewSampleCallback (appsink, *user_data):
        #python wrapper for 'GstAppSinkNewSampleCallback'

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.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`user_data` (variadic) –

callback user data

Returns (Gst.FlowReturn) –

Gst.FlowReturn.OK on success.

Since : 1.28

### GstAppSinkProposeAllocationCallback

    gboolean
    (*GstAppSinkProposeAllocationCallback) (GstAppSink * appsink,
                                            GstQuery * query,
                                            gpointer user_data)

Called when the propose_allocation query is available. This callback is called from the streaming thread.

Parameters:

`appsink` –

a GstAppSink

`query` –

An ALLOCATION query

`user_data` –

callback user data

Returns –

TRUE when the query has been handled.

Since : 1.28

### GstApp.AppSinkProposeAllocationCallback

    function GstApp.AppSinkProposeAllocationCallback(appsink: GstApp.AppSink, query: Gst.Query, user_data: Object): {
        // javascript wrapper for 'GstAppSinkProposeAllocationCallback'
    }

Called when the propose_allocation query is available. This callback is called from the streaming thread.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`query` (Gst.Query) –

An ALLOCATION query

`user_data` (Object) –

callback user data

Returns (Number) –

true when the query has been handled.

Since : 1.28

### GstApp.AppSinkProposeAllocationCallback

    def GstApp.AppSinkProposeAllocationCallback (appsink, query, *user_data):
        #python wrapper for 'GstAppSinkProposeAllocationCallback'

Called when the propose_allocation query is available. This callback is called from the streaming thread.

Parameters:

`appsink` (GstApp.AppSink) –

a GstApp.AppSink

`query` (Gst.Query) –

An ALLOCATION query

`user_data` (variadic) –

callback user data

Returns (bool) –

True when the query has been handled.

Since : 1.28

The results of the search are