blob: a7398c318ba23422c670ae1759ab6dc84c34c53b [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>glimagesink: GStreamer Bad Plugins 1.0 Plugins Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Plugins Reference Manual">
<link rel="up" href="ch01.html" title="gst-plugins-bad Elements">
<link rel="prev" href="gst-plugins-bad-plugins-glimagesinkelement.html" title="glimagesinkelement">
<link rel="next" href="gst-plugins-bad-plugins-glmixerbin.html" title="glmixerbin">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#gst-plugins-bad-plugins-glimagesink.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gst-plugins-bad-plugins-glimagesinkelement.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gst-plugins-bad-plugins-glmixerbin.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gst-plugins-bad-plugins-glimagesink"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-glimagesink.top_of_page"></a>glimagesink</span></h2>
<p>glimagesink</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gst-plugins-bad-plugins-glimagesink.description"></a><h2>Description</h2>
<p>glimagesink renders video frames to a drawable on a local or remote
display using OpenGL. This element can receive a Window ID from the
application through the VideoOverlay interface and will then render video
frames in this drawable.
If no Window ID was provided by the application, the element will
create its own internal window and render into it.</p>
<p>See the <a href="/usr/share/gtk-doc/html/gst-plugins-bad-libs-1.0GstGLDisplay.html#GstGLDisplay-struct"><span class="type">GstGLDisplay</span></a> documentation for a list of environment variables that
can override window/platform detection.</p>
<div class="refsect2">
<a name="id-1.2.73.3.4"></a><h3>Scaling</h3>
<p>
Depends on the driver, OpenGL handles hardware accelerated
scaling of video frames. This means that the element will just accept
incoming video frames no matter their geometry and will then put them to the
drawable scaling them on the fly. Using the <a class="link" href="gst-plugins-bad-plugins-glimagesinkelement.html#GstGLImageSink--force-aspect-ratio" title="The “force-aspect-ratio” property"><span class="type">“force-aspect-ratio”</span></a>
property it is possible to enforce scaling with a constant aspect ratio,
which means drawing black borders around the video frame.
</p>
</div>
<hr>
<div class="refsect2">
<a name="id-1.2.73.3.5"></a><h3>Events</h3>
<p>
Through the gl thread, glimagesink handle some events coming from the drawable
to manage its appearance even when the data is not flowing (GST_STATE_PAUSED).
That means that even when the element is paused, it will receive expose events
from the drawable and draw the latest frame with correct borders/aspect-ratio.
</p>
</div>
<hr>
<div class="refsect2">
<a name="id-1.2.73.3.6"></a><h3>Examples</h3>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
<td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v videotestsrc <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw <span class="gtkdoc opt">!</span> glimagesink</pre></td>
</tr>
</tbody>
</table>
</div>
A pipeline to test hardware scaling.
No special opengl extension is used in this pipeline, that's why it should work
with OpenGL &gt;= 1.1. That's the case if you are using the MESA3D driver v1.3.
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
<td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v videotestsrc <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span>format<span class="gtkdoc opt">=</span>I420 <span class="gtkdoc opt">!</span> glimagesink</pre></td>
</tr>
</tbody>
</table>
</div>
A pipeline to test hardware scaling and hardware colorspace conversion.
When your driver supports GLSL (OpenGL Shading Language needs OpenGL &gt;= 2.1),
the 4 following format YUY2, UYVY, I420, YV12 and AYUV are converted to RGB32
through some fragment shaders and using one framebuffer (FBO extension OpenGL &gt;= 1.4).
If your driver does not support GLSL but supports MESA_YCbCr extension then
the you can use YUY2 and UYVY. In this case the colorspace conversion is automatically
made when loading the texture and therefore no framebuffer is used.
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
<td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v gltestsrc <span class="gtkdoc opt">!</span> glimagesink</pre></td>
</tr>
</tbody>
</table>
</div>
A pipeline 100% OpenGL.
No special opengl extension is used in this pipeline, that's why it should work
with OpenGL &gt;= 1.1. That's the case if you are using the MESA3D driver v1.3.
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
<td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>plugins<span class="gtkdoc opt">-</span>bas<span class="gtkdoc opt">/</span>tests<span class="gtkdoc opt">/</span>examples<span class="gtkdoc opt">/</span>gl<span class="gtkdoc opt">/</span>generic<span class="gtkdoc opt">/</span>cube</pre></td>
</tr>
</tbody>
</table>
</div>
The graphic FPS scene can be greater than the input video FPS.
The graphic scene can be written from a client code through the
two glfilterapp properties.
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="refsect2">
<a name="id-1.2.73.3.7.1"></a><h3>Element Information</h3>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">plugin</span></p></td>
<td>
<a class="link" href="gst-plugins-bad-plugins-plugin-opengl.html#plugin-opengl">opengl</a>
</td>
</tr>
<tr>
<td><p><span class="term">author</span></p></td>
<td>Matthew Waters &lt;matthew@centricular.com&gt;</td>
</tr>
<tr>
<td><p><span class="term">class</span></p></td>
<td>Sink/Video</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="id-1.2.73.3.7.2"></a><h3>Element Pads</h3>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">name</span></p></td>
<td>sink</td>
</tr>
<tr>
<td><p><span class="term">direction</span></p></td>
<td>sink</td>
</tr>
<tr>
<td><p><span class="term">presence</span></p></td>
<td>always</td>
</tr>
<tr>
<td><p><span class="term">details</span></p></td>
<td>video/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
</tr>
<tr>
<td><p><span class="term"></span></p></td>
<td> video/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
</tr>
<tr>
<td><p><span class="term"></span></p></td>
<td> video/x-raw(meta:GstVideoGLTextureUploadMeta, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
</tr>
<tr>
<td><p><span class="term"></span></p></td>
<td> video/x-raw(memory:GLMemory), format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
</tr>
<tr>
<td><p><span class="term"></span></p></td>
<td> video/x-raw, format=(string){ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
</tr>
<tr>
<td><p><span class="term"></span></p></td>
<td> video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-plugins-glimagesink.functions_details"></a><h2>Functions</h2>
<p></p>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-plugins-glimagesink.other_details"></a><h2>Types and Values</h2>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>