• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title>giostreamsink: GStreamer Base Plugins 1.0 Plugins Reference Manual</title>
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Plugins Reference Manual">
8<link rel="up" href="ch01.html" title="gst-plugins-base Elements">
9<link rel="prev" href="gst-plugins-base-plugins-giosrc.html" title="giosrc">
10<link rel="next" href="gst-plugins-base-plugins-giostreamsrc.html" title="giostreamsrc">
11<meta name="generator" content="GTK-Doc V1.28 (XML mode)">
12<link rel="stylesheet" href="style.css" type="text/css">
13</head>
14<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16<td width="100%" align="left" class="shortcuts">
17<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span18                  <a href="#gst-plugins-base-plugins-giostreamsink.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span19                  <a href="#gst-plugins-base-plugins-giostreamsink.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span20                  <a href="#gst-plugins-base-plugins-giostreamsink.properties" class="shortcut">Properties</a></span>
21</td>
22<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
23<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
24<td><a accesskey="p" href="gst-plugins-base-plugins-giosrc.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
25<td><a accesskey="n" href="gst-plugins-base-plugins-giostreamsrc.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
26</tr></table>
27<div class="refentry">
28<a name="gst-plugins-base-plugins-giostreamsink"></a><div class="titlepage"></div>
29<div class="refnamediv"><table width="100%"><tr>
30<td valign="top">
31<h2><span class="refentrytitle"><a name="gst-plugins-base-plugins-giostreamsink.top_of_page"></a>giostreamsink</span></h2>
32<p>giostreamsink</p>
33</td>
34<td class="gallery_image" valign="top" align="right"></td>
35</tr></table></div>
36<div class="refsect1">
37<a name="gst-plugins-base-plugins-giostreamsink.properties"></a><h2>Properties</h2>
38<div class="informaltable"><table class="informaltable" border="0">
39<colgroup>
40<col width="150px" class="properties_type">
41<col width="300px" class="properties_name">
42<col width="200px" class="properties_flags">
43</colgroup>
44<tbody><tr>
45<td class="property_type">
46<a href="/usr/share/gtk-doc/html/gio/GOutputStream.html#GOutputStream-struct"><span class="type">GOutputStream</span></a> *</td>
47<td class="property_name"><a class="link" href="gst-plugins-base-plugins-giostreamsink.html#GstGioStreamSink--stream" title="The “stream” property">stream</a></td>
48<td class="property_flags">Read / Write</td>
49</tr></tbody>
50</table></div>
51</div>
52<a name="GstGioStreamSink"></a><div class="refsect1">
53<a name="gst-plugins-base-plugins-giostreamsink.other"></a><h2>Types and Values</h2>
54<div class="informaltable"><table class="informaltable" width="100%" border="0">
55<colgroup>
56<col width="150px" class="name">
57<col class="description">
58</colgroup>
59<tbody><tr>
60<td class="datatype_keyword">struct</td>
61<td class="function_name"><a class="link" href="gst-plugins-base-plugins-giostreamsink.html#GstGioStreamSink-struct" title="struct GstGioStreamSink">GstGioStreamSink</a></td>
62</tr></tbody>
63</table></div>
64</div>
65<div class="refsect1">
66<a name="gst-plugins-base-plugins-giostreamsink.object-hierarchy"></a><h2>Object Hierarchy</h2>
67<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
68    <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
69        <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a>
70            <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a>
71                <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstBaseSink.html#GstBaseSink-struct">GstBaseSink</a>
72                    <span class="lineart">╰──</span> GstGioBaseSink
73                        <span class="lineart">╰──</span> GstGioStreamSink
74</pre>
75</div>
76<div class="refsect1">
77<a name="gst-plugins-base-plugins-giostreamsink.description"></a><h2>Description</h2>
78<p>This plugin writes incoming data to a custom GIO <a href="/usr/share/gtk-doc/html/gio/GOutputStream.html#GOutputStream-struct"><span class="type">GOutputStream</span></a>.</p>
79<p>It can, for example, be used to write a stream to memory with a
80<span class="type">GMemoryOuputStream</span> or to write to a file with a <span class="type">GFileOuputStream</span>.</p>
81<div class="refsect3">
82<a name="id-1.2.22.7.4"></a><h4>Example code</h4>
83<p>The following example writes the received data to a <a href="/usr/share/gtk-doc/html/gio/GMemoryOutputStream.html#GMemoryOutputStream-struct"><span class="type">GMemoryOutputStream</span></a>.</p>
84<div class="informalexample">
85  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
86    <tbody>
87      <tr>
88        <td class="listing_lines" align="right"><pre>1
892
903
914
925
936
947
958
969
9710
9811
9912
10013
10114
10215
10316
10417
10518
10619
10720
10821
10922
11023</pre></td>
111        <td class="listing_code"><pre class="programlisting"><span class="gtkdoc ppc">#include &lt;gst/gst.h&gt;</span>
112<span class="gtkdoc ppc">#include &lt;gio/gio.h&gt;</span>
113
114<span class="gtkdoc opt">...</span>
115
116GstElement <span class="gtkdoc opt">*</span>sink<span class="gtkdoc opt">;</span>
117GMemoryOuputStream <span class="gtkdoc opt">*</span>stream<span class="gtkdoc opt">;</span>
118<span class="gtkdoc slc">// out_data will contain the received data</span>
119guint8 <span class="gtkdoc opt">*</span>out_data<span class="gtkdoc opt">;</span>
120
121<span class="gtkdoc opt">...</span>
122
123stream <span class="gtkdoc opt">=</span> <span class="function">G_MEMORY_OUTPUT_STREAM</span> <span class="gtkdoc opt">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gio/GMemoryOutputStream.html#g-memory-output-stream-new">g_memory_output_stream_new</a></span> <span class="gtkdoc opt">(</span>NULL<span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">,</span>
124          <span class="gtkdoc opt">(</span>GReallocFunc<span class="gtkdoc opt">)</span> g_realloc<span class="gtkdoc opt">, (</span>GDestroyNotify<span class="gtkdoc opt">)</span> g_free<span class="gtkdoc opt">));</span>
125sink <span class="gtkdoc opt">=</span> <span class="function"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElementFactory.html#gst-element-factory-make">gst_element_factory_make</a></span> <span class="gtkdoc opt">(</span><span class="string">&quot;giostreamsink&quot;</span><span class="gtkdoc opt">,</span> <span class="string">&quot;sink&quot;</span><span class="gtkdoc opt">);</span>
126<span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-set">g_object_set</a></span> <span class="gtkdoc opt">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span> <span class="gtkdoc opt">(</span>sink<span class="gtkdoc opt">),</span> <span class="string">&quot;stream&quot;</span><span class="gtkdoc opt">,</span> stream<span class="gtkdoc opt">,</span> NULL<span class="gtkdoc opt">);</span>
127
128<span class="gtkdoc opt">...</span>
129
130<span class="gtkdoc slc">// after processing get the written data</span>
131out_data <span class="gtkdoc opt">=</span> <span class="function">g_memory_ouput_stream_get_data</span> <span class="gtkdoc opt">(</span><span class="function">G_MEMORY_OUTPUT_STREAM</span> <span class="gtkdoc opt">(</span>stream<span class="gtkdoc opt">));</span>
132
133<span class="gtkdoc opt">...</span></pre></td>
134      </tr>
135    </tbody>
136  </table>
137</div>
138
139<p></p>
140</div>
141<div class="refsynopsisdiv">
142<h2>Synopsis</h2>
143<div class="refsect2">
144<a name="id-1.2.22.7.5.1"></a><h3>Element Information</h3>
145<div class="variablelist"><table border="0" class="variablelist">
146<colgroup>
147<col align="left" valign="top">
148<col>
149</colgroup>
150<tbody>
151<tr>
152<td><p><span class="term">plugin</span></p></td>
153<td>
154            <a class="link" href="gst-plugins-base-plugins-plugin-gio.html#plugin-gio">gio</a>
155          </td>
156</tr>
157<tr>
158<td><p><span class="term">author</span></p></td>
159<td>Sebastian Dröge &lt;sebastian.droege@collabora.co.uk&gt;</td>
160</tr>
161<tr>
162<td><p><span class="term">class</span></p></td>
163<td>Sink</td>
164</tr>
165</tbody>
166</table></div>
167</div>
168<hr>
169<div class="refsect2">
170<a name="id-1.2.22.7.5.2"></a><h3>Element Pads</h3>
171<div class="variablelist"><table border="0" class="variablelist">
172<colgroup>
173<col align="left" valign="top">
174<col>
175</colgroup>
176<tbody>
177<tr>
178<td><p><span class="term">name</span></p></td>
179<td>sink</td>
180</tr>
181<tr>
182<td><p><span class="term">direction</span></p></td>
183<td>sink</td>
184</tr>
185<tr>
186<td><p><span class="term">presence</span></p></td>
187<td>always</td>
188</tr>
189<tr>
190<td><p><span class="term">details</span></p></td>
191<td>ANY</td>
192</tr>
193</tbody>
194</table></div>
195</div>
196</div>
197</div>
198<div class="refsect1">
199<a name="gst-plugins-base-plugins-giostreamsink.functions_details"></a><h2>Functions</h2>
200<p></p>
201</div>
202<div class="refsect1">
203<a name="gst-plugins-base-plugins-giostreamsink.other_details"></a><h2>Types and Values</h2>
204<div class="refsect2">
205<a name="GstGioStreamSink-struct"></a><h3>struct GstGioStreamSink</h3>
206<pre class="programlisting">struct GstGioStreamSink;</pre>
207<p>Opaque data structure.</p>
208</div>
209</div>
210<div class="refsect1">
211<a name="gst-plugins-base-plugins-giostreamsink.property-details"></a><h2>Property Details</h2>
212<div class="refsect2">
213<a name="GstGioStreamSink--stream"></a><h3>The <code class="literal">“stream”</code> property</h3>
214<pre class="programlisting">  “stream”                   <a href="/usr/share/gtk-doc/html/gio/GOutputStream.html#GOutputStream-struct"><span class="type">GOutputStream</span></a> *</pre>
215<p>Stream to write to.</p>
216<p>Flags: Read / Write</p>
217</div>
218</div>
219</div>
220<div class="footer">
221<hr>Generated by GTK-Doc V1.28</div>
222</body>
223</html>