~ubuntu-branches/ubuntu/precise/gst-plugins-base0.10/precise-updates

« back to all changes in this revision

Viewing changes to docs/plugins/html/gst-plugins-base-plugins-giostreamsink.html

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2011-12-12 12:40:13 UTC
  • mfrom: (36.1.15 experimental)
  • Revision ID: package-import@ubuntu.com-20111212124013-onyadfb150d8c5dk
Tags: 0.10.35.2-2
* debian/libgstreamer-plugins-base.install:
  + Add license translations file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>giostreamsink</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7
7
<link rel="home" href="index.html" title="GStreamer Base Plugins 0.10 Plugins Reference Manual">
8
8
<link rel="up" href="ch01.html" title="gst-plugins-base Elements">
9
9
<link rel="prev" href="gst-plugins-base-plugins-giosrc.html" title="giosrc">
10
10
<link rel="next" href="gst-plugins-base-plugins-giostreamsrc.html" title="giostreamsrc">
11
 
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
</head>
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
63
63
</div>
64
64
<div class="refsect1">
65
65
<a name="gst-plugins-base-plugins-giostreamsink.description"></a><h2>Description</h2>
66
 
<p>
67
 
This plugin writes incoming data to a custom GIO <a href="http://library.gnome.org/devel/gio/unstable/GOutputStream.html"><span class="type">GOutputStream</span></a>.
68
 
</p>
69
 
<p>
70
 
It can, for example, be used to write a stream to memory with a
71
 
<span class="type">GMemoryOuputStream</span> or to write to a file with a <span class="type">GFileOuputStream</span>.
72
 
</p>
73
 
<p>
74
 
</p>
75
 
<div class="refsect2">
76
 
<a name="idp11080288"></a><h3>Example code</h3>
77
 
<p>
78
 
The following example writes the received data to a <a href="http://library.gnome.org/devel/gio/unstable/GMemoryOutputStream.html"><span class="type">GMemoryOutputStream</span></a>.
79
 
</p>
80
 
<div class="informalexample">
81
 
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
82
 
    <tbody>
83
 
      <tr>
84
 
        <td class="listing_lines" align="right"><pre>1
85
 
2
86
 
3
87
 
4
88
 
5
89
 
6
90
 
7
91
 
8
92
 
9
93
 
10
94
 
11
95
 
12
96
 
13
97
 
14
98
 
15
99
 
16
100
 
17
101
 
18
102
 
19
103
 
20
104
 
21
105
 
22
106
 
23</pre></td>
107
 
        <td class="listing_code"><pre class="programlisting"><span class="gtkdoc ppc">#include &lt;gst/gst.h&gt;</span>
108
 
<span class="gtkdoc ppc">#include &lt;gio/gio.h&gt;</span>
109
 
 
110
 
<span class="gtkdoc opt">...</span>
111
 
 
112
 
GstElement <span class="gtkdoc opt">*</span>sink<span class="gtkdoc opt">;</span>
113
 
GMemoryOuputStream <span class="gtkdoc opt">*</span>stream<span class="gtkdoc opt">;</span>
114
 
<span class="gtkdoc slc">// out_data will contain the received data</span>
115
 
guint8 <span class="gtkdoc opt">*</span>out_data<span class="gtkdoc opt">;</span>
116
 
 
117
 
<span class="gtkdoc opt">...</span>
118
 
 
119
 
stream <span class="gtkdoc opt">=</span> <span class="function">G_MEMORY_OUTPUT_STREAM</span> <span class="gtkdoc opt">(</span><span class="function"><a href="http://library.gnome.org/devel/gio/unstable/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>
120
 
          <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>
121
 
sink <span class="gtkdoc opt">=</span> <span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/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>
122
 
<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-set">g_object_set</a></span> <span class="gtkdoc opt">(</span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/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>
123
 
 
124
 
<span class="gtkdoc opt">...</span>
125
 
 
126
 
<span class="gtkdoc slc">// after processing get the written data</span>
127
 
out_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>
128
 
 
129
 
<span class="gtkdoc opt">...</span></pre></td>
130
 
      </tr>
131
 
    </tbody>
132
 
  </table>
133
 
</div>
134
 
 
135
 
<p>
136
 
</p>
137
 
</div>
138
 
<p>
139
 
</p>
140
66
<div class="refsynopsisdiv">
141
67
<h2>Synopsis</h2>
142
68
<div class="refsect2">
143
 
<a name="idp11084752"></a><h3>Element Information</h3>
 
69
<a name="idp7444832"></a><h3>Element Information</h3>
144
70
<div class="variablelist"><table border="0">
145
71
<col align="left" valign="top">
146
72
<tbody>
163
89
</div>
164
90
<hr>
165
91
<div class="refsect2">
166
 
<a name="idp11141680"></a><h3>Element Pads</h3>
 
92
<a name="idp11074048"></a><h3>Element Pads</h3>
167
93
<div class="variablelist"><table border="0">
168
94
<col align="left" valign="top">
169
95
<tbody>
196
122
<a name="GstGioStreamSink-struct"></a><h3>struct GstGioStreamSink</h3>
197
123
<pre class="programlisting">struct GstGioStreamSink;</pre>
198
124
<p>
199
 
Opaque data structure.
200
125
</p>
201
126
</div>
202
127
</div>
211
136
</div>
212
137
<div class="footer">
213
138
<hr>
214
 
          Generated by GTK-Doc V1.17</div>
 
139
          Generated by GTK-Doc V1.18</div>
215
140
</body>
216
141
</html>
 
 
b'\\ No newline at end of file'