giostreamsink
This plugin writes incoming data to a custom GIO GOutputStream.
It can, for example, be used to write a stream to memory with a GMemoryOutputStream or to write to a file with a GFileOutputStream.
Example code
The following example writes the received data to a GMemoryOutputStream.
#include <gst/gst.h>
#include <gio/gio.h>
...
GstElement *sink;
GMemoryOuputStream *stream;
// out_data will contain the received data
guint8 *out_data;
...
stream = G_MEMORY_OUTPUT_STREAM (g_memory_output_stream_new (NULL, 0,
(GReallocFunc) g_realloc, (GDestroyNotify) g_free));
sink = gst_element_factory_make ("giostreamsink", "sink");
g_object_set (G_OBJECT (sink), "stream", stream, NULL);
...
// after processing get the written data
out_data = g_memory_ouput_stream_get_data (G_MEMORY_OUTPUT_STREAM (stream));
...
Hierarchy
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseSink ╰──GstGioBaseSink ╰──giostreamsink
Factory details
Authors: – Sebastian Dröge
Classification: – Sink
Rank – none
Plugin – gstgio
Package – GStreamer Base Plug-ins
Pad Templates
Properties
blocksize
“blocksize” guint
Size in bytes to pull per buffer (0 = default)
Flags : Read / Write
Default value : 4096
enable-last-sample
“enable-last-sample” gboolean
Enable the last-sample property
Flags : Read / Write
Default value : true
max-bitrate
“max-bitrate” guint64
The maximum bits per second to render (0 = disabled)
Flags : Read / Write
Default value : 0
max-lateness
“max-lateness” gint64
Maximum number of nanoseconds that a buffer can be late before it is dropped (-1 unlimited)
Flags : Read / Write
Default value : 18446744073709551615
processing-deadline
“processing-deadline” guint64
Maximum processing time for a buffer in nanoseconds
Flags : Read / Write
Default value : 20000000
qos
“qos” gboolean
Generate Quality-of-Service events upstream
Flags : Read / Write
Default value : false
render-delay
“render-delay” guint64
Additional render delay of the sink in nanoseconds
Flags : Read / Write
Default value : 0
stats
“stats” GstStructure *
Sink Statistics
Flags : Read
Default value :
application/x-gst-base-sink-stats, average-rate=(double)0, dropped=(guint64)0, rendered=(guint64)0;
throttle-time
“throttle-time” guint64
The time to keep between rendered buffers (0 = disabled)
Flags : Read / Write
Default value : 0
The results of the search are