upload tizen1.0 source
[framework/multimedia/gst-plugins-good0.10.git] / docs / plugins / html / gst-plugins-good-plugins-gdkpixbufsink.html
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>gdkpixbufsink</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="GStreamer Good Plugins 0.10 Plugins Reference Manual">
8 <link rel="up" href="ch01.html" title="gst-plugins-good Elements">
9 <link rel="prev" href="gst-plugins-good-plugins-gconfvideosink.html" title="gconfvideosink">
10 <link rel="next" href="gst-plugins-good-plugins-goom.html" title="goom">
11 <meta name="generator" content="GTK-Doc V1.17 (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="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="gst-plugins-good-plugins-gconfvideosink.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GStreamer Good Plugins 0.10 Plugins Reference Manual</th>
21 <td><a accesskey="n" href="gst-plugins-good-plugins-goom.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gst-plugins-good-plugins-gdkpixbufsink.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gst-plugins-good-plugins-gdkpixbufsink.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#gst-plugins-good-plugins-gdkpixbufsink.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#gst-plugins-good-plugins-gdkpixbufsink.properties" class="shortcut">Properties</a>
31 </td></tr>
32 </table>
33 <div class="refentry">
34 <a name="gst-plugins-good-plugins-gdkpixbufsink"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
36 <td valign="top">
37 <h2><span class="refentrytitle"><a name="gst-plugins-good-plugins-gdkpixbufsink.top_of_page"></a>gdkpixbufsink</span></h2>
38 <p>gdkpixbufsink — Output images as GdkPixbuf objects in bus messages</p>
39 </td>
40 <td valign="top" align="right"></td>
41 </tr></table></div>
42 <div class="refsynopsisdiv">
43 <a name="gst-plugins-good-plugins-gdkpixbufsink.synopsis"></a><h2>Synopsis</h2>
44 <a name="GstGdkPixbufSink"></a><pre class="synopsis">struct              <a class="link" href="gst-plugins-good-plugins-gdkpixbufsink.html#GstGdkPixbufSink-struct" title="struct GstGdkPixbufSink">GstGdkPixbufSink</a>;
45 </pre>
46 </div>
47 <div class="refsect1">
48 <a name="gst-plugins-good-plugins-gdkpixbufsink.object-hierarchy"></a><h2>Object Hierarchy</h2>
49 <pre class="synopsis">
50   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
51    +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
52          +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
53                +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseSink.html">GstBaseSink</a>
54                      +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideosink.html#GstVideoSink">GstVideoSink</a>
55                            +----GstGdkPixbufSink
56 </pre>
57 </div>
58 <div class="refsect1">
59 <a name="gst-plugins-good-plugins-gdkpixbufsink.properties"></a><h2>Properties</h2>
60 <pre class="synopsis">
61   "<a class="link" href="gst-plugins-good-plugins-gdkpixbufsink.html#GstGdkPixbufSink--last-pixbuf" title='The "last-pixbuf" property'>last-pixbuf</a>"              <span class="type">GdkPixbuf</span>*            : Read
62   "<a class="link" href="gst-plugins-good-plugins-gdkpixbufsink.html#GstGdkPixbufSink--send-messages" title='The "send-messages" property'>send-messages</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
63   "<a class="link" href="gst-plugins-good-plugins-gdkpixbufsink.html#GstGdkPixbufSink--post-messages" title='The "post-messages" property'>post-messages</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
64 </pre>
65 </div>
66 <div class="refsect1">
67 <a name="gst-plugins-good-plugins-gdkpixbufsink.description"></a><h2>Description</h2>
68 <p>
69 This sink element takes RGB or RGBA images as input and wraps them into
70 <span class="type">GdkPixbuf</span> objects, for easy saving to file via the
71 GdkPixbuf library API or displaying in Gtk+ applications (e.g. using
72 the <a href="http://library.gnome.org/devel/gtk3/GtkImage.html"><span class="type">GtkImage</span></a> widget).
73 </p>
74 <p>
75 There are two ways to use this element and obtain the <span class="type">GdkPixbuf</span> objects
76 created:
77 </p>
78 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
79 <li class="listitem">
80 Watching for element messages named <code class="classname">"preroll-pixbuf"
81 </code> or <code class="classname">"pixbuf"</code> on the bus, which
82 will be posted whenever an image would usually be rendered. See below for
83 more details on these messages and how to extract the pixbuf object
84 contained in them.
85 </li>
86 <li class="listitem">
87 Retrieving the current pixbuf via the <a class="link" href="gst-plugins-good-plugins-gdkpixbufsink.html#GstGdkPixbufSink--last-pixbuf" title='The "last-pixbuf" property'><span class="type">"last-pixbuf"</span></a> property
88 when needed.
89 </li>
90 </ul></div>
91 <p>
92 </p>
93 <p>
94 The primary purpose of this element is to abstract away the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> to
95 <span class="type">GdkPixbuf</span> conversion. Other than that it's very similar to the fakesink
96 element.
97 </p>
98 <p>
99 This element is meant for easy no-hassle video snapshotting. It is not
100 suitable for video playback or video display at high framerates. Use
101 ximagesink, xvimagesink or some other suitable video sink in connection
102 with the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstxoverlay.html#GstXOverlay"><span class="type">GstXOverlay</span></a> interface instead if you want to do video playback.
103 </p>
104 <p>
105 </p>
106 <div class="refsect2">
107 <a name="idp13635200"></a><h3>Message details</h3>
108 As mentioned above, this element will by default post element messages
109 containing structures named <code class="classname">"preroll-pixbuf"
110 </code> or <code class="classname">"pixbuf"</code> on the bus (this
111 can be disabled by setting the <a class="link" href="gst-plugins-good-plugins-gdkpixbufsink.html#GstGdkPixbufSink--post-messages" title='The "post-messages" property'><span class="type">"post-messages"</span></a> property
112 to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><span class="type">FALSE</span></a> though). The element message structure has the following fields:
113 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
114 <li class="listitem">
115 <code class="classname">"pixbuf"</code>: the <span class="type">GdkPixbuf</span> object
116 </li>
117 <li class="listitem">
118 <code class="classname">"pixel-aspect-ratio"</code>: the pixel aspect
119   ratio (PAR) of the input image (this field contains a <span class="type">GstFraction</span>); the
120   PAR is usually 1:1 for images, but is often something non-1:1 in the case
121   of video input. In this case the image may be distorted and you may need
122   to rescale it accordingly before saving it to file or displaying it. This
123   can easily be done using <code class="function">gdk_pixbuf_scale()</code> (the reason this is not done
124   automatically is that the application will often scale the image anyway
125   according to the size of the output window, in which case it is much more
126   efficient to only scale once rather than twice). You can put a videoscale
127   element and a capsfilter element with
128   <code class="literal">video/x-raw-rgb,pixel-aspect-ratio=(fraction)1/1</code> caps
129   in front of this element to make sure the pixbufs always have a 1:1 PAR.
130 </li>
131 </ul></div>
132 </div>
133 <p>
134 </p>
135 <p>
136 </p>
137 <div class="refsect2">
138 <a name="idp8350544"></a><h3>Example pipeline</h3>
139 <div class="informalexample">
140   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
141     <tbody>
142       <tr>
143         <td class="listing_lines" align="right"><pre>1</pre></td>
144         <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>m <span class="gtkdoc opt">-</span>v videotestsrc num<span class="gtkdoc opt">-</span>buffers<span class="gtkdoc opt">=</span><span class="number">1</span> <span class="gtkdoc opt">!</span> gdkpixbufsink</pre></td>
145       </tr>
146     </tbody>
147   </table>
148 </div>
149  Process one single test image as pixbuf (note that the output you see will
150 be slightly misleading. The message structure does contain a valid pixbuf
151 object even if the structure string says '(NULL)').
152 </div>
153 <p>
154 </p>
155 <div class="refsynopsisdiv">
156 <h2>Synopsis</h2>
157 <div class="refsect2">
158 <a name="idp9808304"></a><h3>Element Information</h3>
159 <div class="variablelist"><table border="0">
160 <col align="left" valign="top">
161 <tbody>
162 <tr>
163 <td><p><span class="term">plugin</span></p></td>
164 <td>
165             <a class="link" href="gst-plugins-good-plugins-plugin-gdkpixbuf.html#plugin-gdkpixbuf">gdkpixbuf</a>
166           </td>
167 </tr>
168 <tr>
169 <td><p><span class="term">author</span></p></td>
170 <td>Tim-Philipp Müller &lt;tim centricular net&gt;</td>
171 </tr>
172 <tr>
173 <td><p><span class="term">class</span></p></td>
174 <td>Sink/Video</td>
175 </tr>
176 </tbody>
177 </table></div>
178 </div>
179 <hr>
180 <div class="refsect2">
181 <a name="idp14571776"></a><h3>Element Pads</h3>
182 <div class="variablelist"><table border="0">
183 <col align="left" valign="top">
184 <tbody>
185 <tr>
186 <td><p><span class="term">name</span></p></td>
187 <td>sink</td>
188 </tr>
189 <tr>
190 <td><p><span class="term">direction</span></p></td>
191 <td>sink</td>
192 </tr>
193 <tr>
194 <td><p><span class="term">presence</span></p></td>
195 <td>always</td>
196 </tr>
197 <tr>
198 <td><p><span class="term">details</span></p></td>
199 <td>video/x-raw-rgb, bpp=(int)24, depth=(int)24, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
200 </tr>
201 <tr>
202 <td><p><span class="term"></span></p></td>
203 <td> video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, alpha_mask=(int)255, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
204 </tr>
205 </tbody>
206 </table></div>
207 </div>
208 </div>
209 <p>
210 </p>
211 </div>
212 <div class="refsect1">
213 <a name="gst-plugins-good-plugins-gdkpixbufsink.details"></a><h2>Details</h2>
214 <div class="refsect2">
215 <a name="GstGdkPixbufSink-struct"></a><h3>struct GstGdkPixbufSink</h3>
216 <pre class="programlisting">struct GstGdkPixbufSink;</pre>
217 <p>
218 Opaque element structure.
219 </p>
220 </div>
221 </div>
222 <div class="refsect1">
223 <a name="gst-plugins-good-plugins-gdkpixbufsink.property-details"></a><h2>Property Details</h2>
224 <div class="refsect2">
225 <a name="GstGdkPixbufSink--last-pixbuf"></a><h3>The <code class="literal">"last-pixbuf"</code> property</h3>
226 <pre class="programlisting">  "last-pixbuf"              <span class="type">GdkPixbuf</span>*            : Read</pre>
227 <p>Last GdkPixbuf object rendered.</p>
228 </div>
229 <hr>
230 <div class="refsect2">
231 <a name="GstGdkPixbufSink--send-messages"></a><h3>The <code class="literal">"send-messages"</code> property</h3>
232 <pre class="programlisting">  "send-messages"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
233 <p>Whether to post messages containing pixbufs on the bus  (deprecated, use post-messages).</p>
234 <p>Default value: TRUE</p>
235 </div>
236 <hr>
237 <div class="refsect2">
238 <a name="GstGdkPixbufSink--post-messages"></a><h3>The <code class="literal">"post-messages"</code> property</h3>
239 <pre class="programlisting">  "post-messages"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
240 <p>Whether to post messages containing pixbufs on the bus.</p>
241 <p>Default value: TRUE</p>
242 </div>
243 </div>
244 </div>
245 <div class="footer">
246 <hr>
247           Generated by GTK-Doc V1.17</div>
248 </body>
249 </html>