appsrc

## appsrc appsrc — Allow the application to feed buffers to a pipeline |

## Properties

gboolean | block | Read / Write
GstCaps * | caps | 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
gint64 | size | Read / Write
GstAppStreamType | stream-type | Read / Write
gboolean | emit-signals | Read / Write
guint | min-percent | 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

## Types and Values

struct | GstAppSrc

## Object Hierarchy

        GObject
        ╰── 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.

Flags: Read / Write

Default value: FALSE

### The `“caps”` property

      “caps”                     GstCaps *

The allowed caps for the src pad.

Flags: Read / Write

### The `“format”` property

      “format”                   GstFormat

The format of the segment events and seek.

Flags: Read / Write

Default value: GST_FORMAT_BYTES

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

      “is-live”                  gboolean

Whether to act as a live source.

Flags: Read / Write

Default value: FALSE

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

      “max-bytes”                guint64

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

Flags: Read / Write

Default value: 200000

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

      “max-latency”              gint64

The maximum latency (-1 = unlimited).

Flags: Read / Write

Allowed values: >= -1

Default value: -1

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

      “min-latency”              gint64

The minimum latency (-1 = default).

Flags: Read / Write

Allowed values: >= -1

Default value: -1

### The `“size”` property

      “size”                     gint64

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

Flags: Read / Write

Allowed values: >= -1

Default value: -1

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

      “stream-type”              GstAppStreamType

the type of the stream.

Flags: Read / Write

Default value: GST_APP_STREAM_TYPE_STREAM

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

      “emit-signals”             gboolean

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

Flags: Read / Write

Default value: TRUE

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

      “min-percent”              guint

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

Flags: Read / Write

Allowed values: <= 100

Default value: 0

## Signal Details

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

    GstFlowReturn
    user_function (GstAppSrc *gstappsrc,
                   gpointer   user_data)

#### Parameters

gstappsrc | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

#### Returns

Flags: Action

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

    void
    user_function (GstAppSrc *gstappsrc,
                   gpointer   user_data)

#### Parameters

gstappsrc | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

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

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

#### Parameters

gstappsrc | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

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

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

#### Parameters

gstappsrc | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

#### Returns

Flags: Action

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

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

#### Parameters

gstappsrc | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

#### Returns

Flags: Run Last