giostreamsink

## giostreamsink giostreamsink — Write to any GIO stream |

## Synopsis

                        GstGioStreamSink;

## Object Hierarchy

      GObject
       +----GstObject
             +----GstElement
                   +----GstBaseSink
                         +----GstGioBaseSink
                               +----GstGioStreamSink

## Properties

      "stream"                   GOutputStream*        : Read / Write

## Description

This plugin writes incoming data to a custom GIO GOutputStream.

It can, for example, be used to write a stream to memory with a GMemoryOuputStream or to write to a file with a GFileOuputStream.

### 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));

    ...

## Synopsis

### Element Information

plugin | gio
author | Sebastian Dröge <sebastian.droege@collabora.co.uk>
class | Sink

### Element Pads

name | sink
direction | sink
presence | always
details | ANY

## Synopsis

### Element Information

plugin | gio
author | Sebastian Dröge <sebastian.droege@collabora.co.uk>
class | Sink

### Element Pads

name | sink
direction | sink
presence | always
details | ANY

## Details

### GstGioStreamSink

    typedef struct _GstGioStreamSink GstGioStreamSink;

Opaque data structure.

## Property Details

### The `"stream"` property

      "stream"                   GOutputStream*        : Read / Write

Stream to write to.