• 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>GstVideoSink: GStreamer Base Plugins 1.0 Library 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 Library Reference Manual">
8<link rel="up" href="gstreamer-video.html" title="Video Library">
9<link rel="prev" href="gst-plugins-base-libs-GstVideoScaler.html" title="GstVideoScaler">
10<link rel="next" href="GstColorBalance.html" title="GstColorBalance">
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="#GstVideoSink.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span19                  <a href="#GstVideoSink.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span20                  <a href="#GstVideoSink.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="gstreamer-video.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
24<td><a accesskey="p" href="gst-plugins-base-libs-GstVideoScaler.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
25<td><a accesskey="n" href="GstColorBalance.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="GstVideoSink"></a><div class="titlepage"></div>
29<div class="refnamediv"><table width="100%"><tr>
30<td valign="top">
31<h2><span class="refentrytitle"><a name="GstVideoSink.top_of_page"></a>GstVideoSink</span></h2>
32<p>GstVideoSink — Base class for video sinks</p>
33</td>
34<td class="gallery_image" valign="top" align="right"></td>
35</tr></table></div>
36<div class="refsect1">
37<a name="GstVideoSink.functions"></a><h2>Functions</h2>
38<div class="informaltable"><table class="informaltable" width="100%" border="0">
39<colgroup>
40<col width="150px" class="functions_return">
41<col class="functions_name">
42</colgroup>
43<tbody>
44<tr>
45<td class="define_keyword">#define</td>
46<td class="function_name">
47<a class="link" href="GstVideoSink.html#GST-VIDEO-SINK-HEIGHT:CAPS" title="GST_VIDEO_SINK_HEIGHT()">GST_VIDEO_SINK_HEIGHT</a><span class="c_punctuation">()</span>
48</td>
49</tr>
50<tr>
51<td class="define_keyword">#define</td>
52<td class="function_name">
53<a class="link" href="GstVideoSink.html#GST-VIDEO-SINK-PAD:CAPS" title="GST_VIDEO_SINK_PAD()">GST_VIDEO_SINK_PAD</a><span class="c_punctuation">()</span>
54</td>
55</tr>
56<tr>
57<td class="define_keyword">#define</td>
58<td class="function_name">
59<a class="link" href="GstVideoSink.html#GST-VIDEO-SINK-WIDTH:CAPS" title="GST_VIDEO_SINK_WIDTH()">GST_VIDEO_SINK_WIDTH</a><span class="c_punctuation">()</span>
60</td>
61</tr>
62<tr>
63<td class="function_type">
64<span class="returnvalue">void</span>
65</td>
66<td class="function_name">
67<a class="link" href="GstVideoSink.html#gst-video-sink-center-rect" title="gst_video_sink_center_rect ()">gst_video_sink_center_rect</a> <span class="c_punctuation">()</span>
68</td>
69</tr>
70</tbody>
71</table></div>
72</div>
73<div class="refsect1">
74<a name="GstVideoSink.properties"></a><h2>Properties</h2>
75<div class="informaltable"><table class="informaltable" border="0">
76<colgroup>
77<col width="150px" class="properties_type">
78<col width="300px" class="properties_name">
79<col width="200px" class="properties_flags">
80</colgroup>
81<tbody><tr>
82<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
83<td class="property_name"><a class="link" href="GstVideoSink.html#GstVideoSink--show-preroll-frame" title="The “show-preroll-frame” property">show-preroll-frame</a></td>
84<td class="property_flags">Read / Write / Construct</td>
85</tr></tbody>
86</table></div>
87</div>
88<div class="refsect1">
89<a name="GstVideoSink.other"></a><h2>Types and Values</h2>
90<div class="informaltable"><table class="informaltable" width="100%" border="0">
91<colgroup>
92<col width="150px" class="name">
93<col class="description">
94</colgroup>
95<tbody>
96<tr>
97<td class="datatype_keyword">struct</td>
98<td class="function_name"><a class="link" href="GstVideoSink.html#GstVideoSink-struct" title="struct GstVideoSink">GstVideoSink</a></td>
99</tr>
100<tr>
101<td class="datatype_keyword">struct</td>
102<td class="function_name"><a class="link" href="GstVideoSink.html#GstVideoSinkClass" title="struct GstVideoSinkClass">GstVideoSinkClass</a></td>
103</tr>
104<tr>
105<td class="datatype_keyword">struct</td>
106<td class="function_name"><a class="link" href="GstVideoSink.html#GstVideoRectangle" title="struct GstVideoRectangle">GstVideoRectangle</a></td>
107</tr>
108</tbody>
109</table></div>
110</div>
111<div class="refsect1">
112<a name="GstVideoSink.object-hierarchy"></a><h2>Object Hierarchy</h2>
113<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
114    <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
115        <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a>
116            <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a>
117                <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstBaseSink.html#GstBaseSink-struct">GstBaseSink</a>
118                    <span class="lineart">╰──</span> GstVideoSink
119</pre>
120</div>
121<div class="refsect1">
122<a name="GstVideoSink.includes"></a><h2>Includes</h2>
123<pre class="synopsis">#include &lt;gst/video/video.h&gt;
124</pre>
125</div>
126<div class="refsect1">
127<a name="GstVideoSink.description"></a><h2>Description</h2>
128<p>Provides useful functions and a base class for video sinks.</p>
129<p>GstVideoSink will configure the default base sink to drop frames that
130arrive later than 20ms as this is considered the default threshold for
131observing out-of-sync frames.</p>
132</div>
133<div class="refsect1">
134<a name="GstVideoSink.functions_details"></a><h2>Functions</h2>
135<div class="refsect2">
136<a name="GST-VIDEO-SINK-HEIGHT:CAPS"></a><h3>GST_VIDEO_SINK_HEIGHT()</h3>
137<pre class="programlisting">#define GST_VIDEO_SINK_HEIGHT(obj) (GST_VIDEO_SINK_CAST (obj)-&gt;height)
138</pre>
139</div>
140<hr>
141<div class="refsect2">
142<a name="GST-VIDEO-SINK-PAD:CAPS"></a><h3>GST_VIDEO_SINK_PAD()</h3>
143<pre class="programlisting">#define GST_VIDEO_SINK_PAD(obj) GST_BASE_SINK_PAD(obj)
144</pre>
145<p>Get the sink <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstPad-struct"><span class="type">GstPad</span></a> of <em class="parameter"><code>obj</code></em>
146.</p>
147<div class="refsect3">
148<a name="GST-VIDEO-SINK-PAD.parameters"></a><h4>Parameters</h4>
149<div class="informaltable"><table class="informaltable" width="100%" border="0">
150<colgroup>
151<col width="150px" class="parameters_name">
152<col class="parameters_description">
153<col width="200px" class="parameters_annotations">
154</colgroup>
155<tbody><tr>
156<td class="parameter_name"><p>obj</p></td>
157<td class="parameter_description"><p>a <a class="link" href="GstVideoSink.html" title="GstVideoSink"><span class="type">GstVideoSink</span></a></p></td>
158<td class="parameter_annotations"> </td>
159</tr></tbody>
160</table></div>
161</div>
162</div>
163<hr>
164<div class="refsect2">
165<a name="GST-VIDEO-SINK-WIDTH:CAPS"></a><h3>GST_VIDEO_SINK_WIDTH()</h3>
166<pre class="programlisting">#define GST_VIDEO_SINK_WIDTH(obj) (GST_VIDEO_SINK_CAST (obj)-&gt;width)
167</pre>
168</div>
169<hr>
170<div class="refsect2">
171<a name="gst-video-sink-center-rect"></a><h3>gst_video_sink_center_rect ()</h3>
172<pre class="programlisting"><span class="returnvalue">void</span>
173gst_video_sink_center_rect (<em class="parameter"><code><a class="link" href="GstVideoSink.html#GstVideoRectangle" title="struct GstVideoRectangle"><span class="type">GstVideoRectangle</span></a> src</code></em>,
174                            <em class="parameter"><code><a class="link" href="GstVideoSink.html#GstVideoRectangle" title="struct GstVideoRectangle"><span class="type">GstVideoRectangle</span></a> dst</code></em>,
175                            <em class="parameter"><code><a class="link" href="GstVideoSink.html#GstVideoRectangle" title="struct GstVideoRectangle"><span class="type">GstVideoRectangle</span></a> *result</code></em>,
176                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> scaling</code></em>);</pre>
177<p>Takes <em class="parameter"><code>src</code></em>
178 rectangle and position it at the center of <em class="parameter"><code>dst</code></em>
179 rectangle with or
180without <em class="parameter"><code>scaling</code></em>
181. It handles clipping if the <em class="parameter"><code>src</code></em>
182 rectangle is bigger than
183the <em class="parameter"><code>dst</code></em>
184 one and <em class="parameter"><code>scaling</code></em>
185 is set to FALSE.</p>
186<div class="refsect3">
187<a name="gst-video-sink-center-rect.parameters"></a><h4>Parameters</h4>
188<div class="informaltable"><table class="informaltable" width="100%" border="0">
189<colgroup>
190<col width="150px" class="parameters_name">
191<col class="parameters_description">
192<col width="200px" class="parameters_annotations">
193</colgroup>
194<tbody>
195<tr>
196<td class="parameter_name"><p>src</p></td>
197<td class="parameter_description"><p>the <a class="link" href="GstVideoSink.html#GstVideoRectangle" title="struct GstVideoRectangle"><span class="type">GstVideoRectangle</span></a> describing the source area</p></td>
198<td class="parameter_annotations"> </td>
199</tr>
200<tr>
201<td class="parameter_name"><p>dst</p></td>
202<td class="parameter_description"><p>the <a class="link" href="GstVideoSink.html#GstVideoRectangle" title="struct GstVideoRectangle"><span class="type">GstVideoRectangle</span></a> describing the destination area</p></td>
203<td class="parameter_annotations"> </td>
204</tr>
205<tr>
206<td class="parameter_name"><p>result</p></td>
207<td class="parameter_description"><p>a pointer to a <a class="link" href="GstVideoSink.html#GstVideoRectangle" title="struct GstVideoRectangle"><span class="type">GstVideoRectangle</span></a> which will receive the result area</p></td>
208<td class="parameter_annotations"> </td>
209</tr>
210<tr>
211<td class="parameter_name"><p>scaling</p></td>
212<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> indicating if scaling should be applied or not</p></td>
213<td class="parameter_annotations"> </td>
214</tr>
215</tbody>
216</table></div>
217</div>
218</div>
219</div>
220<div class="refsect1">
221<a name="GstVideoSink.other_details"></a><h2>Types and Values</h2>
222<div class="refsect2">
223<a name="GstVideoSink-struct"></a><h3>struct GstVideoSink</h3>
224<pre class="programlisting">struct GstVideoSink {
225  gint width, height;
226};
227</pre>
228<p>The video sink instance structure. Derived video sinks should set the
229<em class="parameter"><code>height</code></em>
230 and <em class="parameter"><code>width</code></em>
231 members.</p>
232<div class="refsect3">
233<a name="GstVideoSink.members"></a><h4>Members</h4>
234<div class="informaltable"><table class="informaltable" width="100%" border="0">
235<colgroup>
236<col width="300px" class="struct_members_name">
237<col class="struct_members_description">
238<col width="200px" class="struct_members_annotations">
239</colgroup>
240<tbody>
241<tr>
242<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstVideoSink-struct.width"></a>width</code></em>;</p></td>
243<td class="struct_member_description"><p>video width (derived class needs to set this)</p></td>
244<td class="struct_member_annotations"> </td>
245</tr>
246<tr>
247<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstVideoSink-struct.height"></a>height</code></em>;</p></td>
248<td class="struct_member_description"><p>video height (derived class needs to set this)</p></td>
249<td class="struct_member_annotations"> </td>
250</tr>
251</tbody>
252</table></div>
253</div>
254</div>
255<hr>
256<div class="refsect2">
257<a name="GstVideoSinkClass"></a><h3>struct GstVideoSinkClass</h3>
258<pre class="programlisting">struct GstVideoSinkClass {
259  GstBaseSinkClass parent_class;
260
261  GstFlowReturn  (*show_frame) (GstVideoSink *video_sink, GstBuffer *buf);
262};
263</pre>
264<p>The video sink class structure. Derived classes should override the
265<em class="parameter"><code>show_frame</code></em>
266 virtual function.</p>
267<div class="refsect3">
268<a name="GstVideoSinkClass.members"></a><h4>Members</h4>
269<div class="informaltable"><table class="informaltable" width="100%" border="0">
270<colgroup>
271<col width="300px" class="struct_members_name">
272<col class="struct_members_description">
273<col width="200px" class="struct_members_annotations">
274</colgroup>
275<tbody><tr>
276<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoSinkClass.show-frame"></a>show_frame</code></em> ()</p></td>
277<td class="struct_member_description"><p>render a video frame. Maps to <a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstBaseSink.html#GstBaseSinkClass.render"><code class="function">GstBaseSinkClass.render()</code></a> and
278<a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstBaseSink.html#GstBaseSinkClass.preroll"><code class="function">GstBaseSinkClass.preroll()</code></a> vfuncs. Rendering during preroll will be
279suppressed if the <a class="link" href="GstVideoSink.html#GstVideoSink--show-preroll-frame" title="The “show-preroll-frame” property"><span class="type">“show-preroll-frame”</span></a> property is set to
280<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p></td>
281<td class="struct_member_annotations"> </td>
282</tr></tbody>
283</table></div>
284</div>
285</div>
286<hr>
287<div class="refsect2">
288<a name="GstVideoRectangle"></a><h3>struct GstVideoRectangle</h3>
289<pre class="programlisting">struct GstVideoRectangle {
290  gint x;
291  gint y;
292  gint w;
293  gint h;
294};
295</pre>
296<p>Helper structure representing a rectangular area.</p>
297<div class="refsect3">
298<a name="GstVideoRectangle.members"></a><h4>Members</h4>
299<div class="informaltable"><table class="informaltable" width="100%" border="0">
300<colgroup>
301<col width="300px" class="struct_members_name">
302<col class="struct_members_description">
303<col width="200px" class="struct_members_annotations">
304</colgroup>
305<tbody>
306<tr>
307<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstVideoRectangle.x"></a>x</code></em>;</p></td>
308<td class="struct_member_description"><p>X coordinate of rectangle's top-left point</p></td>
309<td class="struct_member_annotations"> </td>
310</tr>
311<tr>
312<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstVideoRectangle.y"></a>y</code></em>;</p></td>
313<td class="struct_member_description"><p>Y coordinate of rectangle's top-left point</p></td>
314<td class="struct_member_annotations"> </td>
315</tr>
316<tr>
317<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstVideoRectangle.w"></a>w</code></em>;</p></td>
318<td class="struct_member_description"><p>width of the rectangle</p></td>
319<td class="struct_member_annotations"> </td>
320</tr>
321<tr>
322<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstVideoRectangle.h"></a>h</code></em>;</p></td>
323<td class="struct_member_description"><p>height of the rectangle</p></td>
324<td class="struct_member_annotations"> </td>
325</tr>
326</tbody>
327</table></div>
328</div>
329</div>
330</div>
331<div class="refsect1">
332<a name="GstVideoSink.property-details"></a><h2>Property Details</h2>
333<div class="refsect2">
334<a name="GstVideoSink--show-preroll-frame"></a><h3>The <code class="literal">“show-preroll-frame”</code> property</h3>
335<pre class="programlisting">  “show-preroll-frame”       <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
336<p>Whether to show video frames during preroll. If set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, video
337frames will only be rendered in PLAYING state.</p>
338<p>Flags: Read / Write / Construct</p>
339<p>Default value: TRUE</p>
340</div>
341</div>
342</div>
343<div class="footer">
344<hr>Generated by GTK-Doc V1.28</div>
345</body>
346</html>