appsrc

The appsrc element can be used by applications to insert data into a GStreamer pipeline. Unlike most GStreamer elements, Appsrc provides external API functions.

For the documentation of the API, please see the

libgstapp section in the GStreamer Plugins Base Libraries documentation.

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseSrc
                    ╰──appsrc

Implemented interfaces

Factory details

Authors: – David Schleef , Wim Taymans

Classification:Generic/Source

Rank – none

Plugin – app

Package – GStreamer Base Plug-ins

Pad Templates

src

ANY

Presencealways

Directionsrc

Object typeGstPad


Signals

end-of-stream

GstFlowReturn *
end_of_stream_callback (GstElement * param_0,
                        gpointer udata)
def end_of_stream_callback (param_0, udata):
    #python callback for the 'end-of-stream' signal
function end_of_stream_callback(param_0: GstElement * param_0, udata: gpointer udata): {
    // javascript callback for the 'end-of-stream' signal
}

Parameters:

param_0
No description available
udata
No description available
Returns ( GstFlowReturn * ) –
No description available

Flags: Run Last / Action


enough-data

enough_data_callback (GstElement * param_0,
                      gpointer udata)
def enough_data_callback (param_0, udata):
    #python callback for the 'enough-data' signal
function enough_data_callback(param_0: GstElement * param_0, udata: gpointer udata): {
    // javascript callback for the 'enough-data' signal
}

Parameters:

param_0
No description available
udata
No description available

Flags: Run Last


need-data

need_data_callback (GstElement * param_0,
                    guint arg0,
                    gpointer udata)
def need_data_callback (param_0, arg0, udata):
    #python callback for the 'need-data' signal
function need_data_callback(param_0: GstElement * param_0, arg0: guint arg0, udata: gpointer udata): {
    // javascript callback for the 'need-data' signal
}

Parameters:

param_0
No description available
arg0
No description available
udata
No description available

Flags: Run Last


push-buffer

GstFlowReturn *
push_buffer_callback (GstElement * param_0,
                      GstBuffer * arg0,
                      gpointer udata)
def push_buffer_callback (param_0, arg0, udata):
    #python callback for the 'push-buffer' signal
function push_buffer_callback(param_0: GstElement * param_0, arg0: GstBuffer * arg0, udata: gpointer udata): {
    // javascript callback for the 'push-buffer' signal
}

Parameters:

param_0
No description available
arg0
No description available
udata
No description available
Returns ( GstFlowReturn * ) –
No description available

Flags: Run Last / Action


push-buffer-list

GstFlowReturn *
push_buffer_list_callback (GstElement * param_0,
                           GstBufferList * arg0,
                           gpointer udata)
def push_buffer_list_callback (param_0, arg0, udata):
    #python callback for the 'push-buffer-list' signal
function push_buffer_list_callback(param_0: GstElement * param_0, arg0: GstBufferList * arg0, udata: gpointer udata): {
    // javascript callback for the 'push-buffer-list' signal
}

Parameters:

param_0
No description available
arg0
No description available
udata
No description available
Returns ( GstFlowReturn * ) –
No description available

Flags: Run Last / Action


push-sample

GstFlowReturn *
push_sample_callback (GstElement * param_0,
                      GstSample * arg0,
                      gpointer udata)
def push_sample_callback (param_0, arg0, udata):
    #python callback for the 'push-sample' signal
function push_sample_callback(param_0: GstElement * param_0, arg0: GstSample * arg0, udata: gpointer udata): {
    // javascript callback for the 'push-sample' signal
}

Parameters:

param_0
No description available
arg0
No description available
udata
No description available
Returns ( GstFlowReturn * ) –
No description available

Flags: Run Last / Action


seek-data

gboolean
seek_data_callback (GstElement * param_0,
                    guint64 arg0,
                    gpointer udata)
def seek_data_callback (param_0, arg0, udata):
    #python callback for the 'seek-data' signal
function seek_data_callback(param_0: GstElement * param_0, arg0: guint64 arg0, udata: gpointer udata): {
    // javascript callback for the 'seek-data' signal
}

Parameters:

param_0
No description available
arg0
No description available
udata
No description available
Returns ( gboolean ) –
No description available

Flags: Run Last


Properties

block

“block” gboolean

When max-bytes are queued and after the enough-data signal has been emitted, block any further push-buffer calls until the amount of queued bytes drops below the max-bytes limit.

Flags : Read / Write

Default value : false


caps

“caps” GstCaps *

The GstCaps that will negotiated downstream and will be put on outgoing buffers.

Flags : Read / Write


current-level-bytes

“current-level-bytes” guint64

The number of currently queued bytes inside appsrc.

Flags : Read

Default value : 0


duration

“duration” guint64

The total duration in nanoseconds of the data stream. If the total duration is known, it is recommended to configure it with this property.

Flags : Read / Write

Default value : 18446744073709551615


emit-signals

“emit-signals” gboolean

Make appsrc emit the "need-data", "enough-data" and "seek-data" signals. This option is by default enabled for backwards compatibility reasons but can disabled when needed because signal emission is expensive.

Flags : Read / Write

Default value : true


format

“format” GstFormat *

The format to use for segment events. When the source is producing timestamped buffers this property should be set to GST_FORMAT_TIME.

Flags : Read / Write

Default value : bytes (2)


handle-segment-change

“handle-segment-change” gboolean

When enabled, appsrc will check GstSegment in GstSample which was pushed via gst_app_src_push_sample or "push-sample" signal action. If a GstSegment is changed, corresponding segment event will be followed by next data flow.

FIXME: currently only GST_FORMAT_TIME format is supported and therefore GstAppSrc::format should be time. However, possibly GstAppSrc can support other formats.

Flags : Read / Write

Default value : false


is-live

“is-live” gboolean

Instruct the source to behave like a live source. This includes that it will only push out buffers in the PLAYING state.

Flags : Read / Write

Default value : false


max-bytes

“max-bytes” guint64

The maximum amount of bytes that can be queued internally. After the maximum amount of bytes are queued, appsrc will emit the "enough-data" signal.

Flags : Read / Write

Default value : 200000


max-latency

“max-latency” gint64

The maximum latency (-1 = unlimited)

Flags : Read / Write

Default value : 18446744073709551615


min-latency

“min-latency” gint64

The minimum latency of the source. A value of -1 will use the default latency calculations of GstBaseSrc.

Flags : Read / Write

Default value : 18446744073709551615


min-percent

“min-percent” guint

Make appsrc emit the "need-data" signal when the amount of bytes in the queue drops below this percentage of max-bytes.

Flags : Read / Write

Default value : 0


size

“size” gint64

The total size in bytes of the data stream. If the total size is known, it is recommended to configure it with this property.

Flags : Read / Write

Default value : 18446744073709551615


stream-type

“stream-type” GstAppStreamType *

The type of stream that this source is producing. For seekable streams the application should connect to the seek-data signal.

Flags : Read / Write

Default value : stream (0)


The results of the search are