Blame docs/libs/html/gst-plugins-base-libs-appsrc.html

Packit 971217
Packit 971217
<html>
Packit 971217
<head>
Packit 971217
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit 971217
<title>GstAppSrc: GStreamer Base Plugins 1.0 Library Reference Manual</title>
Packit 971217
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
Packit 971217
<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual">
Packit 971217
<link rel="up" href="gstreamer-app.html" title="App Library">
Packit 971217
<link rel="prev" href="gstreamer-app.html" title="App Library">
Packit 971217
<link rel="next" href="gst-plugins-base-libs-appsink.html" title="GstAppSink">
Packit 971217
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit 971217
<link rel="stylesheet" href="style.css" type="text/css">
Packit 971217
</head>
Packit 971217
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 971217
Packit 971217
Packit 971217
Top  | 
Packit 971217
                  Description
Packit 971217
Packit 971217
Home
Packit 971217
Up
Packit 971217
Prev
Packit 971217
Next
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

GstAppSrc

Packit 971217

GstAppSrc — Easy way for applications to inject buffers into a

Packit 971217
    pipeline

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Functions

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
Packit 971217
Packit 971217
gst_app_src_set_caps ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
GstCaps *
Packit 971217
Packit 971217
Packit 971217
gst_app_src_get_caps ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
Packit 971217
Packit 971217
gst_app_src_get_latency ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
Packit 971217
Packit 971217
gst_app_src_set_latency ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
Packit 971217
Packit 971217
gst_app_src_set_size ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
gint64
Packit 971217
Packit 971217
Packit 971217
gst_app_src_get_size ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
Packit 971217
Packit 971217
gst_app_src_set_duration ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
GstClockTime
Packit 971217
Packit 971217
Packit 971217
gst_app_src_get_duration ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
Packit 971217
Packit 971217
gst_app_src_set_stream_type ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
GstAppStreamType
Packit 971217
Packit 971217
Packit 971217
gst_app_src_get_stream_type ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
Packit 971217
Packit 971217
gst_app_src_set_max_bytes ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
guint64
Packit 971217
Packit 971217
Packit 971217
gst_app_src_get_max_bytes ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
guint64
Packit 971217
Packit 971217
Packit 971217
gst_app_src_get_current_level_bytes ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
gboolean
Packit 971217
Packit 971217
Packit 971217
gst_app_src_get_emit_signals ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
Packit 971217
Packit 971217
gst_app_src_set_emit_signals ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
void
Packit 971217
Packit 971217
Packit 971217
gst_app_src_set_callbacks ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
GstFlowReturn
Packit 971217
Packit 971217
Packit 971217
gst_app_src_push_buffer ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
GstFlowReturn
Packit 971217
Packit 971217
Packit 971217
gst_app_src_push_buffer_list ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
GstFlowReturn
Packit 971217
Packit 971217
Packit 971217
gst_app_src_push_sample ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
GstFlowReturn
Packit 971217
Packit 971217
Packit 971217
gst_app_src_end_of_stream ()
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Types and Values

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
enum
Packit 971217
GstAppStreamType
Packit 971217
Packit 971217
Packit 971217
 
Packit 971217
GstAppSrcCallbacks
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Includes

Packit 971217
#include <gst/app/gstappsrc.h>
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Description

Packit 971217

The appsrc element can be used by applications to insert data into a

Packit 971217
GStreamer pipeline. Unlike most GStreamer elements, appsrc provides
Packit 971217
external API functions.

Packit 971217

appsrc can be used by linking with the libgstapp library to access the

Packit 971217
methods directly or by using the appsrc action signals.

Packit 971217

Before operating appsrc, the caps property must be set to fixed caps

Packit 971217
describing the format of the data that will be pushed with appsrc. An
Packit 971217
exception to this is when pushing buffers with unknown caps, in which case no
Packit 971217
caps should be set. This is typically true of file-like sources that push raw
Packit 971217
byte buffers. If you don't want to explicitly set the caps, you can use
Packit 971217
gst_app_src_push_sample. This method gets the caps associated with the
Packit 971217
sample and sets them on the appsrc replacing any previously set caps (if
Packit 971217
different from sample's caps).

Packit 971217

The main way of handing data to the appsrc element is by calling the

Packit 971217
gst_app_src_push_buffer() method or by emitting the push-buffer action signal.
Packit 971217
This will put the buffer onto a queue from which appsrc will read from in its
Packit 971217
streaming thread. It is important to note that data transport will not happen
Packit 971217
from the thread that performed the push-buffer call.

Packit 971217

The "max-bytes" property controls how much data can be queued in appsrc

Packit 971217
before appsrc considers the queue full. A filled internal queue will always
Packit 971217
signal the "enough-data" signal, which signals the application that it should
Packit 971217
stop pushing data into appsrc. The "block" property will cause appsrc to
Packit 971217
block the push-buffer method until free data becomes available again.

Packit 971217

When the internal queue is running out of data, the "need-data" signal is

Packit 971217
emitted, which signals the application that it should start pushing more data
Packit 971217
into appsrc.

Packit 971217

In addition to the "need-data" and "enough-data" signals, appsrc can emit the

Packit 971217
"seek-data" signal when the "stream-mode" property is set to "seekable" or
Packit 971217
"random-access". The signal argument will contain the new desired position in
Packit 971217
the stream expressed in the unit set with the "format" property. After
Packit 971217
receiving the seek-data signal, the application should push-buffers from the
Packit 971217
new position.

Packit 971217

These signals allow the application to operate the appsrc in two different

Packit 971217
ways:

Packit 971217

The push mode, in which the application repeatedly calls the push-buffer/push-sample

Packit 971217
method with a new buffer/sample. Optionally, the queue size in the appsrc
Packit 971217
can be controlled with the enough-data and need-data signals by respectively
Packit 971217
stopping/starting the push-buffer/push-sample calls. This is a typical
Packit 971217
mode of operation for the stream-type "stream" and "seekable". Use this
Packit 971217
mode when implementing various network protocols or hardware devices.

Packit 971217

The pull mode, in which the need-data signal triggers the next push-buffer call.

Packit 971217
This mode is typically used in the "random-access" stream-type. Use this
Packit 971217
mode for file access or other randomly accessable sources. In this mode, a
Packit 971217
buffer of exactly the amount of bytes given by the need-data signal should be
Packit 971217
pushed into appsrc.

Packit 971217

In all modes, the size property on appsrc should contain the total stream

Packit 971217
size in bytes. Setting this property is mandatory in the random-access mode.
Packit 971217
For the stream and seekable modes, setting this property is optional but
Packit 971217
recommended.

Packit 971217

When the application has finished pushing data into appsrc, it should call

Packit 971217
gst_app_src_end_of_stream() or emit the end-of-stream action signal. After
Packit 971217
this call, no more buffers can be pushed into appsrc until a flushing seek
Packit 971217
occurs or the state of the appsrc has gone through READY.

Packit 971217
Packit 971217
Packit 971217

Functions

Packit 971217
Packit 971217

gst_app_src_set_caps ()

Packit 971217
void
Packit 971217
gst_app_src_set_caps (GstAppSrc *appsrc,
Packit 971217
                      const GstCaps *caps);
Packit 971217

Set the capabilities on the appsrc element. This function takes

Packit 971217
a copy of the caps structure. After calling this method, the source will
Packit 971217
only produce caps that match caps
Packit 971217
. caps
Packit 971217
 must be fixed and the caps on the
Packit 971217
buffers must match the caps or left NULL.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

caps

Packit 971217

caps to set

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_get_caps ()

Packit 971217
GstCaps *
Packit 971217
gst_app_src_get_caps (GstAppSrc *appsrc);
Packit 971217

Get the configured caps on appsrc

Packit 971217
.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

the GstCaps produced by the source. gst_caps_unref() after usage.

Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_get_latency ()

Packit 971217
void
Packit 971217
gst_app_src_get_latency (GstAppSrc *appsrc,
Packit 971217
                         guint64 *min,
Packit 971217
                         guint64 *max);
Packit 971217

Retrieve the min and max latencies in min

Packit 971217
 and max
Packit 971217
 respectively.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

min

Packit 971217

the min latency.

Packit 971217
[out]
Packit 971217
Packit 971217
Packit 971217

max

Packit 971217

the max latency.

Packit 971217
[out]
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_set_latency ()

Packit 971217
void
Packit 971217
gst_app_src_set_latency (GstAppSrc *appsrc,
Packit 971217
                         guint64 min,
Packit 971217
                         guint64 max);
Packit 971217

Configure the min

Packit 971217
 and max
Packit 971217
 latency in src
Packit 971217
. If min
Packit 971217
 is set to -1, the
Packit 971217
default latency calculations for pseudo-live sources will be used.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

min

Packit 971217

the min latency

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

max

Packit 971217

the max latency

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_set_size ()

Packit 971217
void
Packit 971217
gst_app_src_set_size (GstAppSrc *appsrc,
Packit 971217
                      gint64 size);
Packit 971217

Set the size of the stream in bytes. A value of -1 means that the size is

Packit 971217
not known.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

size

Packit 971217

the size to set

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_get_size ()

Packit 971217
gint64
Packit 971217
gst_app_src_get_size (GstAppSrc *appsrc);
Packit 971217

Get the size of the stream in bytes. A value of -1 means that the size is

Packit 971217
not known.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

the size of the stream previously set with gst_app_src_set_size();

Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_set_duration ()

Packit 971217
void
Packit 971217
gst_app_src_set_duration (GstAppSrc *appsrc,
Packit 971217
                          GstClockTime duration);
Packit 971217

Set the duration of the stream in nanoseconds. A value of GST_CLOCK_TIME_NONE means that the duration is

Packit 971217
not known.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

duration

Packit 971217

the duration to set

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Since: 1.10

Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_get_duration ()

Packit 971217
GstClockTime
Packit 971217
gst_app_src_get_duration (GstAppSrc *appsrc);
Packit 971217

Get the duration of the stream in nanoseconds. A value of GST_CLOCK_TIME_NONE means that the duration is

Packit 971217
not known.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

the duration of the stream previously set with gst_app_src_set_duration();

Packit 971217
Packit 971217

Since: 1.10

Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_set_stream_type ()

Packit 971217
void
Packit 971217
gst_app_src_set_stream_type (GstAppSrc *appsrc,
Packit 971217
                             GstAppStreamType type);
Packit 971217

Set the stream type on appsrc

Packit 971217
. For seekable streams, the "seek" signal must
Packit 971217
be connected to.

Packit 971217

A stream_type stream

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

type

Packit 971217

the new state

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_get_stream_type ()

Packit 971217
GstAppStreamType
Packit 971217
gst_app_src_get_stream_type (GstAppSrc *appsrc);
Packit 971217

Get the stream type. Control the stream type of appsrc

Packit 971217
Packit 971217
with gst_app_src_set_stream_type().

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

the stream type.

Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_set_max_bytes ()

Packit 971217
void
Packit 971217
gst_app_src_set_max_bytes (GstAppSrc *appsrc,
Packit 971217
                           guint64 max);
Packit 971217

Set the maximum amount of bytes that can be queued in appsrc

Packit 971217
.
Packit 971217
After the maximum amount of bytes are queued, appsrc
Packit 971217
 will emit the
Packit 971217
"enough-data" signal.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

max

Packit 971217

the maximum number of bytes to queue

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_get_max_bytes ()

Packit 971217
guint64
Packit 971217
gst_app_src_get_max_bytes (GstAppSrc *appsrc);
Packit 971217

Get the maximum amount of bytes that can be queued in appsrc

Packit 971217
.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

The maximum amount of bytes that can be queued.

Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_get_current_level_bytes ()

Packit 971217
guint64
Packit 971217
gst_app_src_get_current_level_bytes (GstAppSrc *appsrc);
Packit 971217

Get the number of currently queued bytes inside appsrc

Packit 971217
.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

The number of currently queued bytes.

Packit 971217
Packit 971217

Since: 1.2

Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_get_emit_signals ()

Packit 971217
gboolean
Packit 971217
gst_app_src_get_emit_signals (GstAppSrc *appsrc);
Packit 971217

Check if appsrc will emit the "new-preroll" and "new-buffer" signals.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

TRUE if appsrc

Packit 971217
is emitting the "new-preroll" and "new-buffer"
Packit 971217
signals.

Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_set_emit_signals ()

Packit 971217
void
Packit 971217
gst_app_src_set_emit_signals (GstAppSrc *appsrc,
Packit 971217
                              gboolean emit);
Packit 971217

Make appsrc emit the "new-preroll" and "new-buffer" signals. This option is

Packit 971217
by default disabled because signal emission is expensive and unneeded when
Packit 971217
the application prefers to operate in pull mode.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

emit

Packit 971217

the new state

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_set_callbacks ()

Packit 971217
void
Packit 971217
gst_app_src_set_callbacks (GstAppSrc *appsrc,
Packit 971217
                           GstAppSrcCallbacks *callbacks,
Packit 971217
                           gpointer user_data,
Packit 971217
                           GDestroyNotify notify);
Packit 971217

Set callbacks which will be executed when data is needed, enough data has

Packit 971217
been collected or when a seek should be performed.
Packit 971217
This is an alternative to using the signals, it has lower overhead and is thus
Packit 971217
less expensive, but also less flexible.

Packit 971217

If callbacks are installed, no signals will be emitted for performance

Packit 971217
reasons.

Packit 971217

[skip]

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

callbacks

Packit 971217

the callbacks

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

user_data

Packit 971217

a user_data argument for the callbacks

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

notify

Packit 971217

a destroy notify function

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_push_buffer ()

Packit 971217
GstFlowReturn
Packit 971217
gst_app_src_push_buffer (GstAppSrc *appsrc,
Packit 971217
                         GstBuffer *buffer);
Packit 971217

Adds a buffer to the queue of buffers that the appsrc element will

Packit 971217
push to its source pad.  This function takes ownership of the buffer.

Packit 971217

When the block property is TRUE, this function can block until free

Packit 971217
space becomes available in the queue.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

buffer

Packit 971217

a GstBuffer to push.

Packit 971217
[transfer full]
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

GST_FLOW_OK when the buffer was successfuly queued.

Packit 971217
GST_FLOW_FLUSHING when appsrc
Packit 971217
is not PAUSED or PLAYING.
Packit 971217
GST_FLOW_EOS when EOS occured.

Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_push_buffer_list ()

Packit 971217
GstFlowReturn
Packit 971217
gst_app_src_push_buffer_list (GstAppSrc *appsrc,
Packit 971217
                              GstBufferList *buffer_list);
Packit 971217

Adds a buffer list to the queue of buffers and buffer lists that the

Packit 971217
appsrc element will push to its source pad.  This function takes ownership
Packit 971217
of buffer_list
Packit 971217
.

Packit 971217

When the block property is TRUE, this function can block until free

Packit 971217
space becomes available in the queue.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

buffer_list

Packit 971217

a GstBufferList to push.

Packit 971217
[transfer full]
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

GST_FLOW_OK when the buffer list was successfuly queued.

Packit 971217
GST_FLOW_FLUSHING when appsrc
Packit 971217
is not PAUSED or PLAYING.
Packit 971217
GST_FLOW_EOS when EOS occured.

Packit 971217
Packit 971217

Since: 1.14

Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_push_sample ()

Packit 971217
GstFlowReturn
Packit 971217
gst_app_src_push_sample (GstAppSrc *appsrc,
Packit 971217
                         GstSample *sample);
Packit 971217

Extract a buffer from the provided sample and adds it to the queue of

Packit 971217
buffers that the appsrc element will push to its source pad. Any
Packit 971217
previous caps that were set on appsrc will be replaced by the caps
Packit 971217
associated with the sample if not equal.

Packit 971217

When the block property is TRUE, this function can block until free

Packit 971217
space becomes available in the queue.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

sample

Packit 971217

a GstSample from which buffer and caps may be

Packit 971217
extracted. 

Packit 971217
[transfer none]
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

GST_FLOW_OK when the buffer was successfuly queued.

Packit 971217
GST_FLOW_FLUSHING when appsrc
Packit 971217
is not PAUSED or PLAYING.
Packit 971217
GST_FLOW_EOS when EOS occured.

Packit 971217
Packit 971217

Since: 1.6

Packit 971217
Packit 971217

Packit 971217
Packit 971217

gst_app_src_end_of_stream ()

Packit 971217
GstFlowReturn
Packit 971217
gst_app_src_end_of_stream (GstAppSrc *appsrc);
Packit 971217

Indicates to the appsrc element that the last buffer queued in the

Packit 971217
element is the last buffer of the stream.

Packit 971217
Packit 971217

Parameters

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

appsrc

Packit 971217

a GstAppSrc

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Returns

Packit 971217

GST_FLOW_OK when the EOS was successfuly queued.

Packit 971217
GST_FLOW_FLUSHING when appsrc
Packit 971217
is not PAUSED or PLAYING.

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Types and Values

Packit 971217
Packit 971217

enum GstAppStreamType

Packit 971217

The stream type.

Packit 971217
Packit 971217

Members

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

GST_APP_STREAM_TYPE_STREAM

Packit 971217
Packit 971217

No seeking is supported in the stream, such as a

Packit 971217
live stream.

Packit 971217
Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

GST_APP_STREAM_TYPE_SEEKABLE

Packit 971217
Packit 971217

The stream is seekable but seeking might not

Packit 971217
be very fast, such as data from a webserver.

Packit 971217
Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

GST_APP_STREAM_TYPE_RANDOM_ACCESS

Packit 971217
Packit 971217

The stream is seekable and seeking is fast,

Packit 971217
such as in a local file.

Packit 971217
Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

GstAppSrcCallbacks

Packit 971217
typedef struct {
Packit 971217
  void      (*need_data)    (GstAppSrc *src, guint length, gpointer user_data);
Packit 971217
  void      (*enough_data)  (GstAppSrc *src, gpointer user_data);
Packit 971217
  gboolean  (*seek_data)    (GstAppSrc *src, guint64 offset, gpointer user_data);
Packit 971217
} GstAppSrcCallbacks;
Packit 971217
Packit 971217

A set of callbacks that can be installed on the appsrc with

Packit 971217
gst_app_src_set_callbacks().

Packit 971217
Packit 971217

Members

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

need_data ()

Packit 971217

Called when the appsrc needs more data. A buffer or EOS should be

Packit 971217
pushed to appsrc from this thread or another thread. length
Packit 971217
is just a hint
Packit 971217
and when it is set to -1, any number of bytes can be pushed into appsrc
Packit 971217
.

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

enough_data ()

Packit 971217

Called when appsrc has enough data. It is recommended that the

Packit 971217
application stops calling push-buffer until the need_data callback is
Packit 971217
emitted again to avoid excessive buffer queueing.

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217

seek_data ()

Packit 971217

Called when a seek should be performed to the offset.

Packit 971217
The next push-buffer should produce buffers from the new offset
Packit 971217
.
Packit 971217
This callback is only called for seekable stream types.

Packit 971217
 
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

See Also

Packit 971217

GstBaseSrc, appsink

Packit 971217
Packit 971217
Packit 971217
Packit 971217

Generated by GTK-Doc V1.27
Packit 971217
</body>
Packit 971217
</html>