| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>GstSurfaceConverter</title> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> |
| <link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual"> |
| <link rel="up" href="video.html" title="Base video element classes"> |
| <link rel="prev" href="gst-plugins-bad-libs-GstSurfaceBuffer.html" title="GstSurfaceBuffer"> |
| <link rel="next" href="gstreamer-libs-hierarchy.html" title="Part II. Object Hierarchy"> |
| <meta name="generator" content="GTK-Doc V1.18 (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="2"> |
| <tr valign="middle"> |
| <td><a accesskey="p" href="gst-plugins-bad-libs-GstSurfaceBuffer.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> |
| <td><a accesskey="u" href="video.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
| <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
| <th width="100%" align="center">GStreamer Bad Plugins 1.0 Library Reference Manual</th> |
| <td><a accesskey="n" href="gstreamer-libs-hierarchy.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> |
| </tr> |
| <tr><td colspan="5" class="shortcuts"> |
| <a href="#gst-plugins-bad-libs-GstSurfaceConverter.synopsis" class="shortcut">Top</a> |
| | |
| <a href="#gst-plugins-bad-libs-GstSurfaceConverter.description" class="shortcut">Description</a> |
| </td></tr> |
| </table> |
| <div class="refentry"> |
| <a name="gst-plugins-bad-libs-GstSurfaceConverter"></a><div class="titlepage"></div> |
| <div class="refnamediv"><table width="100%"><tr> |
| <td valign="top"> |
| <h2><span class="refentrytitle"><a name="gst-plugins-bad-libs-GstSurfaceConverter.top_of_page"></a>GstSurfaceConverter</span></h2> |
| <p>GstSurfaceConverter — Interface for <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-libs/html/gst-plugins-bad-libs-GstSurfaceBuffer.html#GstSurfaceBuffer"><span class="type">GstSurfaceBuffer</span></a> convertion</p> |
| </td> |
| <td valign="top" align="right"></td> |
| </tr></table></div> |
| <div class="refsynopsisdiv"> |
| <a name="gst-plugins-bad-libs-GstSurfaceConverter.synopsis"></a><h2>Synopsis</h2> |
| <pre class="synopsis"> <a class="link" href="gst-plugins-bad-libs-GstSurfaceConverter.html#GstSurfaceConverter" title="GstSurfaceConverter">GstSurfaceConverter</a>; |
| struct <a class="link" href="gst-plugins-bad-libs-GstSurfaceConverter.html#GstSurfaceConverterInterface" title="struct GstSurfaceConverterInterface">GstSurfaceConverterInterface</a>; |
| <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> <a class="link" href="gst-plugins-bad-libs-GstSurfaceConverter.html#gst-surface-converter-get-type" title="gst_surface_converter_get_type ()">gst_surface_converter_get_type</a> (<em class="parameter"><code><span class="type">void</span></code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gst-plugins-bad-libs-GstSurfaceConverter.html#gst-surface-converter-upload" title="gst_surface_converter_upload ()">gst_surface_converter_upload</a> (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstSurfaceConverter.html#GstSurfaceConverter" title="GstSurfaceConverter"><span class="type">GstSurfaceConverter</span></a> *converter</code></em>, |
| <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>); |
| </pre> |
| </div> |
| <div class="refsect1"> |
| <a name="gst-plugins-bad-libs-GstSurfaceConverter.description"></a><h2>Description</h2> |
| <p> |
| Objects implementing this interface are used as a convertion context. This |
| allow element optimizing the upload by keeping required resources between |
| uploads. The context must be discarded when the pipeline goes to |
| <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#GST-STATE-NULL:CAPS"><span class="type">GST_STATE_NULL</span></a> or renewed whenever the caps are changed. |
| </p> |
| <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> |
| <h3 class="title">Note</h3> |
| The GstSurfaceConverter interface is unstable API and may change in future. |
| One can define GST_USE_UNSTABLE_API to acknowledge and avoid this warning. |
| </div> |
| <p> |
| </p> |
| <p> |
| </p> |
| <div class="refsect2"> |
| <a name="idp5621824"></a><h3>Example uploading to GL texture</h3> |
| <div class="informalexample"> |
| <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
| <tbody> |
| <tr> |
| <td class="listing_lines" align="right"><pre>1 |
| 2 |
| 3 |
| 4</pre></td> |
| <td class="listing_code"><pre class="programlisting"><span class="keyword">if</span> <span class="gtkdoc opt">(</span><span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Macros.html#G-UNLIKELY:CAPS">G_UNLIKELY</a></span> <span class="gtkdoc opt">(</span>priv<span class="gtkdoc opt">-></span>converter <span class="gtkdoc opt">==</span> NULL<span class="gtkdoc opt">))</span> |
| priv<span class="gtkdoc opt">-></span>converter <span class="gtkdoc opt">=</span> <span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-libs/html/gst-plugins-bad-libs-GstSurfaceBuffer.html#gst-surface-buffer-create-converter">gst_surface_buffer_create_converter</a></span> <span class="gtkdoc opt">(</span>surface<span class="gtkdoc opt">,</span> <span class="string">"opengl"</span><span class="gtkdoc opt">, &</span>value<span class="gtkdoc opt">);</span> |
| |
| <span class="function">gst_surface_converter_uplaod</span> <span class="gtkdoc opt">(</span>priv<span class="gtkdoc opt">-></span>converter<span class="gtkdoc opt">,</span> surface<span class="gtkdoc opt">);</span></pre></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| |
| </div> |
| <p> |
| </p> |
| </div> |
| <div class="refsect1"> |
| <a name="gst-plugins-bad-libs-GstSurfaceConverter.details"></a><h2>Details</h2> |
| <div class="refsect2"> |
| <a name="GstSurfaceConverter"></a><h3>GstSurfaceConverter</h3> |
| <pre class="programlisting">typedef struct _GstSurfaceConverter GstSurfaceConverter;</pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GstSurfaceConverterInterface"></a><h3>struct GstSurfaceConverterInterface</h3> |
| <pre class="programlisting">struct GstSurfaceConverterInterface { |
| GTypeInterface parent; |
| |
| gboolean (*upload) (GstSurfaceConverter *converter, |
| GstBuffer *buffer); |
| }; |
| </pre> |
| <p> |
| <a class="link" href="gst-plugins-bad-libs-GstSurfaceConverter.html#GstSurfaceConverterInterface" title="struct GstSurfaceConverterInterface"><span class="type">GstSurfaceConverterInterface</span></a> interface. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GstSurfaceConverterInterface.parent"></a>parent</code></em>;</span></p></td> |
| <td>parent interface type.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="structfield"><code><a name="GstSurfaceConverterInterface.upload"></a>upload</code></em> ()</span></p></td> |
| <td>vmethod to upload <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-libs/html/gst-plugins-bad-libs-GstSurfaceBuffer.html#GstSurfaceBuffer"><span class="type">GstSurfaceBuffer</span></a>.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-surface-converter-get-type"></a><h3>gst_surface_converter_get_type ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> gst_surface_converter_get_type (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-surface-converter-upload"></a><h3>gst_surface_converter_upload ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_surface_converter_upload (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstSurfaceConverter.html#GstSurfaceConverter" title="GstSurfaceConverter"><span class="type">GstSurfaceConverter</span></a> *converter</code></em>, |
| <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre> |
| <p> |
| Convert and uploads the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-libs/html/gst-plugins-bad-libs-GstSurfaceBuffer.html#GstSurfaceBuffer"><span class="type">GstSurfaceBuffer</span></a> to the converter destination. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>converter</code></em> :</span></p></td> |
| <td>a <a class="link" href="gst-plugins-bad-libs-GstSurfaceConverter.html#GstSurfaceConverter" title="GstSurfaceConverter"><span class="type">GstSurfaceConverter</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
| <td>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> to upload</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><span class="type">FALSE</span></a> otherwise</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| </div> |
| </div> |
| <div class="footer"> |
| <hr> |
| Generated by GTK-Doc V1.18</div> |
| </body> |
| </html> |