diff options
Diffstat (limited to 'docs/gst/html/GstPadTemplate.html')
-rw-r--r-- | docs/gst/html/GstPadTemplate.html | 108 |
1 files changed, 74 insertions, 34 deletions
diff --git a/docs/gst/html/GstPadTemplate.html b/docs/gst/html/GstPadTemplate.html index 18d2787..6786bf0 100644 --- a/docs/gst/html/GstPadTemplate.html +++ b/docs/gst/html/GstPadTemplate.html @@ -3,8 +3,8 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>GstPadTemplate</title> -<meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> -<link rel="home" href="index.html" title="GStreamer 0.11 Core Reference Manual"> +<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<link rel="home" href="index.html" title="GStreamer 1.0 Core Reference Manual"> <link rel="up" href="libgstreamer.html" title="GStreamer Core Library"> <link rel="prev" href="GstPad.html" title="GstPad"> <link rel="next" href="gstreamer-GstParamSpec.html" title="GstParamSpec"> @@ -17,7 +17,7 @@ <td><a accesskey="p" href="GstPad.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> <td><a accesskey="u" href="libgstreamer.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 0.11 Core Reference Manual</th> +<th width="100%" align="center">GStreamer 1.0 Core Reference Manual</th> <td><a accesskey="n" href="gstreamer-GstParamSpec.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> <tr><td colspan="5" class="shortcuts"> @@ -132,26 +132,50 @@ or <a class="link" href="GstPad.html#gst-pad-new-from-static-template" title="gs The following code example shows the code to create a pad from a padtemplate. </p> <div class="example"> -<a name="id520784"></a><p class="title"><b>Example 12. Create a pad from a padtemplate</b></p> -<div class="example-contents"><pre class="programlisting"> - GstStaticPadTemplate my_template = - GST_STATIC_PAD_TEMPLATE ( - "sink", // the name of the pad - GST_PAD_SINK, // the direction of the pad - GST_PAD_ALWAYS, // when this pad will be present - GST_STATIC_CAPS ( // the capabilities of the padtemplate - "audio/x-raw-int, " - "channels = (int) [ 1, 6 ]" - ) - ); - void - my_method (void) - { - GstPad *pad; - pad = gst_pad_new_from_static_template (&my_template, "sink"); - ... - } - </pre></div> +<a name="idp9782048"></a><p class="title"><b>Example 11. Create a pad from a padtemplate</b></p> +<div class="example-contents"> + <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> + <tbody> + <tr> + <td class="listing_lines" align="right"><pre>1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17</pre></td> + <td class="listing_code"><pre class="programlisting">GstStaticPadTemplate my_template <span class="gtkdoc opt">=</span> +<span class="function"><a href="../gstreamer-1.0/GstPadTemplate.html#GST-STATIC-PAD-TEMPLATE:CAPS">GST_STATIC_PAD_TEMPLATE</a></span> <span class="gtkdoc opt">(</span> + <span class="string">"sink"</span><span class="gtkdoc opt">,</span> <span class="gtkdoc slc">// the name of the pad</span> + GST_PAD_SINK<span class="gtkdoc opt">,</span> <span class="gtkdoc slc">// the direction of the pad</span> + GST_PAD_ALWAYS<span class="gtkdoc opt">,</span> <span class="gtkdoc slc">// when this pad will be present</span> + <span class="function"><a href="../gstreamer-1.0/gstreamer-GstCaps.html#GST-STATIC-CAPS">GST_STATIC_CAPS</a></span> <span class="gtkdoc opt">(</span> <span class="gtkdoc slc">// the capabilities of the padtemplate</span> + <span class="string">"audio/x-raw, "</span> + <span class="string">"channels = (int) [ 1, 6 ]"</span> + <span class="gtkdoc opt">)</span> +<span class="gtkdoc opt">);</span> +<span class="gtkdoc kwb">void</span> +<span class="function">my_method</span> <span class="gtkdoc opt">(</span><span class="gtkdoc kwb">void</span><span class="gtkdoc opt">)</span> +<span class="gtkdoc opt">{</span> + GstPad <span class="gtkdoc opt">*</span>pad<span class="gtkdoc opt">;</span> + pad <span class="gtkdoc opt">=</span> <span class="function"><a href="../gstreamer-1.0/GstPad.html#gst-pad-new-from-static-template">gst_pad_new_from_static_template</a></span> <span class="gtkdoc opt">(&</span>my_template<span class="gtkdoc opt">,</span> <span class="string">"sink"</span><span class="gtkdoc opt">);</span> + <span class="gtkdoc opt">...</span> +<span class="gtkdoc opt">}</span></pre></td> + </tr> + </tbody> + </table> +</div> + </div> <p><br class="example-break"> </p> @@ -159,16 +183,31 @@ The following code example shows the code to create a pad from a padtemplate. The following example shows you how to add the padtemplate to an element class, this is usually done in the class_init of the class: </p> -<div class="informalexample"><pre class="programlisting"> - static void - my_element_class_init (GstMyElementClass *klass) - { - GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); +<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 +5 +6 +7 +8</pre></td> + <td class="listing_code"><pre class="programlisting"><span class="gtkdoc kwb">static void</span> +<span class="function">my_element_class_init</span> <span class="gtkdoc opt">(</span>GstMyElementClass <span class="gtkdoc opt">*</span>klass<span class="gtkdoc opt">)</span> +<span class="gtkdoc opt">{</span> + GstElementClass <span class="gtkdoc opt">*</span>gstelement_class <span class="gtkdoc opt">=</span> <span class="function">GST_ELEMENT_CLASS</span> <span class="gtkdoc opt">(</span>klass<span class="gtkdoc opt">);</span> + + <span class="function"><a href="../gstreamer-1.0/GstElement.html#gst-element-class-add-pad-template">gst_element_class_add_pad_template</a></span> <span class="gtkdoc opt">(</span>gstelement_class<span class="gtkdoc opt">,</span> + <span class="function"><a href="../gstreamer-1.0/GstPadTemplate.html#gst-static-pad-template-get">gst_static_pad_template_get</a></span> <span class="gtkdoc opt">(&</span>my_template<span class="gtkdoc opt">));</span> +<span class="gtkdoc opt">}</span></pre></td> + </tr> + </tbody> + </table> +</div> - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&my_template)); - } - </pre></div> <p> </p> <p> @@ -458,11 +497,12 @@ and with the given arguments. </tr> <tr> <td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td> -<td>a <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> set for the template.</td> +<td>a <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> set for the template. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span> +</td> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a new <a class="link" href="GstPadTemplate.html" title="GstPadTemplate"><span class="type">GstPadTemplate</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> +<td>a new <a class="link" href="GstPadTemplate.html" title="GstPadTemplate"><span class="type">GstPadTemplate</span></a>. <span class="annotation">[transfer floating]</span> </td> </tr> </tbody> |