## appsrc

appsrc

## Properties

gboolean | block | Read / Write
GstCaps * | caps | Read / Write
guint64 | current-level-bytes | Read
gboolean | emit-signals | Read / Write
GstFormat | format | Read / Write
gboolean | is-live | Read / Write
guint64 | max-bytes | Read / Write
gint64 | max-latency | Read / Write
gint64 | min-latency | Read / Write
guint | min-percent | Read / Write
gint64 | size | Read / Write
GstAppStreamType | stream-type | Read / Write
guint64 | duration | Read / Write

## Signals

GstFlowReturn | end-of-stream | Action
void | enough-data | Run Last
void | need-data | Run Last
GstFlowReturn | push-buffer | Action
gboolean | seek-data | Run Last
GstFlowReturn | push-sample | Action
GstFlowReturn | push-buffer-list | Action

## Types and Values

struct | GstAppSrc

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstBaseSrc
                        ╰── GstAppSrc

## Implemented Interfaces

GstAppSrc implements GstURIHandler.

## Description

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.

## Synopsis

### Element Information

plugin | app
author | David Schleef <ds@schleef.org>, Wim Taymans <wim.taymans@gmail.com>
class | Generic/Source

### Element Pads

name | src
direction | source
presence | always
details | ANY

## Functions

## Types and Values

### struct GstAppSrc

    struct GstAppSrc;

## Property Details

### The `“block”` property

      “block”                    gboolean

Block push-buffer when max-bytes are queued.

Owner: GstAppSrc

Flags: Read / Write

Default value: FALSE

### The `“caps”` property

      “caps”                     GstCaps *

The allowed caps for the src pad.

Owner: GstAppSrc

Flags: Read / Write

### The `“current-level-bytes”` property

      “current-level-bytes”      guint64

The number of currently queued bytes.

Owner: GstAppSrc

Flags: Read

Default value: 0

### The `“emit-signals”` property

      “emit-signals”             gboolean

Emit need-data, enough-data and seek-data signals.

Owner: GstAppSrc

Flags: Read / Write

Default value: TRUE

### The `“format”` property

      “format”                   GstFormat

The format of the segment events and seek.

Owner: GstAppSrc

Flags: Read / Write

Default value: GST_FORMAT_BYTES

### The `“is-live”` property

      “is-live”                  gboolean

Whether to act as a live source.

Owner: GstAppSrc

Flags: Read / Write

Default value: FALSE

### The `“max-bytes”` property

      “max-bytes”                guint64

The maximum number of bytes to queue internally (0 = unlimited).

Owner: GstAppSrc

Flags: Read / Write

Default value: 200000

### The `“max-latency”` property

      “max-latency”              gint64

The maximum latency (-1 = unlimited).

Owner: GstAppSrc

Flags: Read / Write

Allowed values: >= G_MAXULONG

Default value: -1

### The `“min-latency”` property

      “min-latency”              gint64

The minimum latency (-1 = default).

Owner: GstAppSrc

Flags: Read / Write

Allowed values: >= G_MAXULONG

Default value: -1

### The `“min-percent”` property

      “min-percent”              guint

Emit need-data when queued bytes drops below this percent of max-bytes.

Owner: GstAppSrc

Flags: Read / Write

Allowed values: <= 100

Default value: 0

### The `“size”` property

      “size”                     gint64

The size of the data stream in bytes (-1 if unknown).

Owner: GstAppSrc

Flags: Read / Write

Allowed values: >= G_MAXULONG

Default value: -1

### The `“stream-type”` property

      “stream-type”              GstAppStreamType

the type of the stream.

Owner: GstAppSrc

Flags: Read / Write

Default value: GST_APP_STREAM_TYPE_STREAM

### The `“duration”` property

      “duration”                 guint64

The duration of the data stream in nanoseconds (GST_CLOCK_TIME_NONE if unknown).

Owner: GstAppSrc

Flags: Read / Write

Default value: 18446744073709551615

## Signal Details

### The `“end-of-stream”` signal

    GstFlowReturn
    user_function (GstAppSrc *gstappsrc,
                   gpointer   user_data)

Flags: Action

### The `“enough-data”` signal

    void
    user_function (GstAppSrc *gstappsrc,
                   gpointer   user_data)

Flags: Run Last

### The `“need-data”` signal

    void
    user_function (GstAppSrc *gstappsrc,
                   guint      arg1,
                   gpointer   user_data)

Flags: Run Last

### The `“push-buffer”` signal

    GstFlowReturn
    user_function (GstAppSrc *gstappsrc,
                   GstBuffer *arg1,
                   gpointer   user_data)

Flags: Action

### The `“seek-data”` signal

    gboolean
    user_function (GstAppSrc *gstappsrc,
                   guint64    arg1,
                   gpointer   user_data)

Flags: Run Last

### The `“push-sample”` signal

    GstFlowReturn
    user_function (GstAppSrc *gstappsrc,
                   GstSample *arg1,
                   gpointer   user_data)

Flags: Action

### The `“push-buffer-list”` signal

    GstFlowReturn
    user_function (GstAppSrc     *gstappsrc,
                   GstBufferList *arg1,
                   gpointer       user_data)

Flags: Action