GStreamer Base Plugins 0.10 Plugins Reference Manual | ||||
---|---|---|---|---|
"block" gboolean : Read / Write "caps" GstCaps* : Read / Write "format" GstFormat : Read / Write "is-live" gboolean : Read / Write "max-bytes" guint64 : Read / Write "max-latency" gint64 : Read / Write "min-latency" gint64 : Read / Write "size" gint64 : Read / Write "stream-type" GstAppStreamType : Read / Write "emit-signals" gboolean : Read / Write
"end-of-stream" : Run Last / Action "enough-data" : Run Last "need-data" : Run Last "push-buffer" : Run Last / Action "seek-data" : Run Last
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.
plugin | app |
author | David Schleef <ds@schleef.org>, Wim Taymans <wim.taymans@gmail.com> |
class | Generic/Src |
"block"
property"block" gboolean : Read / Write
Block push-buffer when max-bytes are queued.
Default value: FALSE
"format"
property"format" GstFormat : Read / Write
The format of the segment events and seek.
Default value: GST_FORMAT_BYTES
"is-live"
property"is-live" gboolean : Read / Write
Whether to act as a live source.
Default value: FALSE
"max-bytes"
property"max-bytes" guint64 : Read / Write
The maximum number of bytes to queue internally (0 = unlimited).
Default value: 200000
"max-latency"
property"max-latency" gint64 : Read / Write
The maximum latency (-1 = unlimited).
Allowed values: >= -1
Default value: -1
"min-latency"
property"min-latency" gint64 : Read / Write
The minimum latency (-1 = default).
Allowed values: >= -1
Default value: -1
"size"
property"size" gint64 : Read / Write
The size of the data stream in bytes (-1 if unknown).
Allowed values: >= -1
Default value: -1
"stream-type"
property"stream-type" GstAppStreamType : Read / Write
the type of the stream.
Default value: Stream
"end-of-stream"
signalGstFlowReturn user_function (GstAppSrc *appsrc, gpointer user_data) : Run Last / Action
Notify appsrc
that no more buffer are available.
appsrc : |
the appsrc |
user_data : |
user data set when the signal handler was connected. |
"enough-data"
signalvoid user_function (GstAppSrc *appsrc, gpointer user_data) : Run Last
Signal that the source has enough data. It is recommended that the application stops calling push-buffer until the need-data signal is emited again to avoid excessive buffer queueing.
appsrc : |
the appsrc element that emited the signal |
user_data : |
user data set when the signal handler was connected. |
"need-data"
signalvoid user_function (GstAppSrc *appsrc, guint length, gpointer user_data) : Run Last
Signal that the source needs more data. In the callback or from another thread you should call push-buffer or end-of-stream.
length
is just a hint and when it is set to -1, any number of bytes can be
pushed into appsrc
.
You can call push-buffer multiple times until the enough-data signal is fired.
appsrc : |
the appsrc element that emited the signal |
length : |
the amount of bytes needed. |
user_data : |
user data set when the signal handler was connected. |
"push-buffer"
signalGstFlowReturn user_function (GstAppSrc *appsrc, GstBuffer *buffer, gpointer user_data) : Run Last / Action
Adds a buffer to the queue of buffers that the appsrc element will push to its source pad. This function does not take ownership of the buffer so the buffer needs to be unreffed after calling this function.
When the block property is TRUE, this function can block until free space becomes available in the queue.
appsrc : |
the appsrc |
buffer : |
a buffer to push |
user_data : |
user data set when the signal handler was connected. |
"seek-data"
signalgboolean user_function (GstAppSrc *appsrc, guint64 offset, gpointer user_data) : Run Last
Seek to the given offset. The next push-buffer should produce buffers from
the new offset
.
This callback is only called for seekable stream types.
appsrc : |
the appsrc element that emited the signal |
offset : |
the offset to seek to |
user_data : |
user data set when the signal handler was connected. |
Returns : | TRUE if the seek succeeded.
|