• 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>proxysrc: GStreamer Bad Plugins 1.0 Plugins Reference Manual</title>
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Plugins Reference Manual">
8<link rel="up" href="ch01.html" title="gst-plugins-bad Elements">
9<link rel="prev" href="gst-plugins-bad-plugins-proxysink.html" title="proxysink">
10<link rel="next" href="gst-plugins-bad-plugins-rawaudioparse.html" title="rawaudioparse">
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="#gst-plugins-bad-plugins-proxysrc.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span19                  <a href="#gst-plugins-bad-plugins-proxysrc.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span20                  <a href="#gst-plugins-bad-plugins-proxysrc.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span21                  <a href="#gst-plugins-bad-plugins-proxysrc.properties" class="shortcut">Properties</a></span>
22</td>
23<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
24<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
25<td><a accesskey="p" href="gst-plugins-bad-plugins-proxysink.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
26<td><a accesskey="n" href="gst-plugins-bad-plugins-rawaudioparse.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
27</tr></table>
28<div class="refentry">
29<a name="gst-plugins-bad-plugins-proxysrc"></a><div class="titlepage"></div>
30<div class="refnamediv"><table width="100%"><tr>
31<td valign="top">
32<h2><span class="refentrytitle"><a name="gst-plugins-bad-plugins-proxysrc.top_of_page"></a>proxysrc</span></h2>
33<p>proxysrc</p>
34</td>
35<td class="gallery_image" valign="top" align="right"></td>
36</tr></table></div>
37<div class="refsect1">
38<a name="gst-plugins-bad-plugins-proxysrc.properties"></a><h2>Properties</h2>
39<div class="informaltable"><table class="informaltable" border="0">
40<colgroup>
41<col width="150px" class="properties_type">
42<col width="300px" class="properties_name">
43<col width="200px" class="properties_flags">
44</colgroup>
45<tbody><tr>
46<td class="property_type">
47<a class="link" href="gst-plugins-bad-plugins-proxysink.html#GstProxySink"><span class="type">GstProxySink</span></a> *</td>
48<td class="property_name"><a class="link" href="gst-plugins-bad-plugins-proxysrc.html#GstProxySrc--proxysink" title="The “proxysink” property">proxysink</a></td>
49<td class="property_flags">Read / Write</td>
50</tr></tbody>
51</table></div>
52</div>
53<a name="GstProxySrc"></a><div class="refsect1">
54<a name="gst-plugins-bad-plugins-proxysrc.other"></a><h2>Types and Values</h2>
55<div class="informaltable"><table class="informaltable" width="100%" border="0">
56<colgroup>
57<col width="150px" class="name">
58<col class="description">
59</colgroup>
60<tbody><tr>
61<td class="datatype_keyword">struct</td>
62<td class="function_name"><a class="link" href="gst-plugins-bad-plugins-proxysrc.html#GstProxySrc-struct" title="struct GstProxySrc">GstProxySrc</a></td>
63</tr></tbody>
64</table></div>
65</div>
66<div class="refsect1">
67<a name="gst-plugins-bad-plugins-proxysrc.object-hierarchy"></a><h2>Object Hierarchy</h2>
68<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
69    <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
70        <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a>
71            <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a>
72                <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBin.html#GstBin-struct">GstBin</a>
73                    <span class="lineart">╰──</span> GstProxySrc
74</pre>
75</div>
76<div class="refsect1">
77<a name="gst-plugins-bad-plugins-proxysrc.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
78<p>
79GstProxySrc implements
80 <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstChildProxy.html#GstChildProxy-struct">GstChildProxy</a>.</p>
81</div>
82<div class="refsect1">
83<a name="gst-plugins-bad-plugins-proxysrc.description"></a><h2>Description</h2>
84<p>Proxysrc is a source element that proxies events, queries, and buffers from
85another pipeline that contains a matching proxysink element. The purpose is
86to allow two decoupled pipelines to function as though they are one without
87having to manually shuttle buffers, events, queries, etc between the two.</p>
88<p>The element queues buffers from the matching proxysink to an internal queue,
89so everything downstream is properly decoupled from the upstream pipeline.
90However, the queue may get filled up if the downstream pipeline does not
91accept buffers quickly enough; perhaps because it is not yet PLAYING.</p>
92<div class="refsect3">
93<a name="id-1.2.173.8.4"></a><h4>Usage</h4>
94<div class="informalexample">
95  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
96    <tbody>
97      <tr>
98        <td class="listing_lines" align="right"><pre>1
992
1003
1014
1025
1036
1047
1058
1069
10710
10811
10912
11013
11114
11215
11316
11417
11518
11619
11720
11821
11922
12023
12124
12225
12326
12427
12528
12629
12730
12831
12932</pre></td>
130        <td class="listing_code"><pre class="programlisting">GstElement <span class="gtkdoc opt">*</span>pipe1<span class="gtkdoc opt">, *</span>pipe2<span class="gtkdoc opt">, *</span>psink<span class="gtkdoc opt">, *</span>psrc<span class="gtkdoc opt">;</span>
131GstClock <span class="gtkdoc opt">*</span>clock<span class="gtkdoc opt">;</span>
132
133pipe1 <span class="gtkdoc opt">=</span> <span class="function"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstParse.html#gst-parse-launch">gst_parse_launch</a></span> <span class="gtkdoc opt">(</span><span class="string">&quot;audiotestsrc ! proxysink name=psink&quot;</span><span class="gtkdoc opt">,</span> NULL<span class="gtkdoc opt">);</span>
134psink <span class="gtkdoc opt">=</span> <span class="function"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBin.html#gst-bin-get-by-name">gst_bin_get_by_name</a></span> <span class="gtkdoc opt">(</span><span class="function">GST_BIN</span> <span class="gtkdoc opt">(</span>pipe1<span class="gtkdoc opt">),</span> <span class="string">&quot;psink&quot;</span><span class="gtkdoc opt">);</span>
135
136pipe2 <span class="gtkdoc opt">=</span> <span class="function"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstParse.html#gst-parse-launch">gst_parse_launch</a></span> <span class="gtkdoc opt">(</span><span class="string">&quot;proxysrc name=psrc ! autoaudiosink&quot;</span><span class="gtkdoc opt">,</span> NULL<span class="gtkdoc opt">);</span>
137psrc <span class="gtkdoc opt">=</span> <span class="function"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBin.html#gst-bin-get-by-name">gst_bin_get_by_name</a></span> <span class="gtkdoc opt">(</span><span class="function">GST_BIN</span> <span class="gtkdoc opt">(</span>pipe2<span class="gtkdoc opt">),</span> <span class="string">&quot;psrc&quot;</span><span class="gtkdoc opt">);</span>
138
139<span class="gtkdoc slc">// Connect the two pipelines</span>
140<span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-set">g_object_set</a></span> <span class="gtkdoc opt">(</span>psrc<span class="gtkdoc opt">,</span> <span class="string">&quot;proxysink&quot;</span><span class="gtkdoc opt">,</span> psink<span class="gtkdoc opt">,</span> NULL<span class="gtkdoc opt">);</span>
141
142<span class="gtkdoc slc">// Both pipelines must agree on the timing information or we&apos;ll get glitches</span>
143<span class="gtkdoc slc">// or overruns/underruns. Ideally, we should tell pipe1 to use the same clock</span>
144<span class="gtkdoc slc">// as pipe2, but since that will be set asynchronously to the audio clock, it</span>
145<span class="gtkdoc slc">// is simpler and likely accurate enough to use the system clock for both</span>
146<span class="gtkdoc slc">// pipelines. If no element in either pipeline will provide a clock, this</span>
147<span class="gtkdoc slc">// is not needed.</span>
148clock <span class="gtkdoc opt">=</span> <span class="function"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstSystemClock.html#gst-system-clock-obtain">gst_system_clock_obtain</a></span> <span class="gtkdoc opt">();</span>
149<span class="function"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPipeline.html#gst-pipeline-use-clock">gst_pipeline_use_clock</a></span> <span class="gtkdoc opt">(</span><span class="function">GST_PIPELINE</span> <span class="gtkdoc opt">(</span>pipe1<span class="gtkdoc opt">),</span> clock<span class="gtkdoc opt">);</span>
150<span class="function"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPipeline.html#gst-pipeline-use-clock">gst_pipeline_use_clock</a></span> <span class="gtkdoc opt">(</span><span class="function">GST_PIPELINE</span> <span class="gtkdoc opt">(</span>pipe2<span class="gtkdoc opt">),</span> clock<span class="gtkdoc opt">);</span>
151<span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> <span class="gtkdoc opt">(</span>clock<span class="gtkdoc opt">);</span>
152
153<span class="gtkdoc slc">// This is not really needed in this case since the pipelines are created and</span>
154<span class="gtkdoc slc">// started at the same time. However, an application that dynamically</span>
155<span class="gtkdoc slc">// generates pipelines must ensure that all the pipelines that will be</span>
156<span class="gtkdoc slc">// connected together share the same base time.</span>
157<span class="function"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#gst-element-set-base-time">gst_element_set_base_time</a></span> <span class="gtkdoc opt">(</span>pipe1<span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">);</span>
158<span class="function"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#gst-element-set-base-time">gst_element_set_base_time</a></span> <span class="gtkdoc opt">(</span>pipe2<span class="gtkdoc opt">,</span> <span class="number">0</span><span class="gtkdoc opt">);</span>
159
160<span class="function"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#gst-element-set-state">gst_element_set_state</a></span> <span class="gtkdoc opt">(</span>pipe1<span class="gtkdoc opt">,</span> GST_STATE_PLAYING<span class="gtkdoc opt">);</span>
161<span class="function"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#gst-element-set-state">gst_element_set_state</a></span> <span class="gtkdoc opt">(</span>pipe2<span class="gtkdoc opt">,</span> GST_STATE_PLAYING<span class="gtkdoc opt">);</span></pre></td>
162      </tr>
163    </tbody>
164  </table>
165</div>
166
167<p></p>
168</div>
169<div class="refsynopsisdiv">
170<h2>Synopsis</h2>
171<div class="refsect2">
172<a name="id-1.2.173.8.5.1"></a><h3>Element Information</h3>
173<div class="variablelist"><table border="0" class="variablelist">
174<colgroup>
175<col align="left" valign="top">
176<col>
177</colgroup>
178<tbody>
179<tr>
180<td><p><span class="term">plugin</span></p></td>
181<td>
182            <a class="link" href="gst-plugins-bad-plugins-plugin-proxy.html#plugin-proxy">proxy</a>
183          </td>
184</tr>
185<tr>
186<td><p><span class="term">author</span></p></td>
187<td>Sebastian Dröge &lt;sebastian@centricular.com&gt;</td>
188</tr>
189<tr>
190<td><p><span class="term">class</span></p></td>
191<td>Source</td>
192</tr>
193</tbody>
194</table></div>
195</div>
196<hr>
197<div class="refsect2">
198<a name="id-1.2.173.8.5.2"></a><h3>Element Pads</h3>
199<div class="variablelist"><table border="0" class="variablelist">
200<colgroup>
201<col align="left" valign="top">
202<col>
203</colgroup>
204<tbody>
205<tr>
206<td><p><span class="term">name</span></p></td>
207<td>src</td>
208</tr>
209<tr>
210<td><p><span class="term">direction</span></p></td>
211<td>source</td>
212</tr>
213<tr>
214<td><p><span class="term">presence</span></p></td>
215<td>always</td>
216</tr>
217<tr>
218<td><p><span class="term">details</span></p></td>
219<td>ANY</td>
220</tr>
221</tbody>
222</table></div>
223</div>
224</div>
225</div>
226<div class="refsect1">
227<a name="gst-plugins-bad-plugins-proxysrc.functions_details"></a><h2>Functions</h2>
228<p></p>
229</div>
230<div class="refsect1">
231<a name="gst-plugins-bad-plugins-proxysrc.other_details"></a><h2>Types and Values</h2>
232<div class="refsect2">
233<a name="GstProxySrc-struct"></a><h3>struct GstProxySrc</h3>
234<pre class="programlisting">struct GstProxySrc;</pre>
235</div>
236</div>
237<div class="refsect1">
238<a name="gst-plugins-bad-plugins-proxysrc.property-details"></a><h2>Property Details</h2>
239<div class="refsect2">
240<a name="GstProxySrc--proxysink"></a><h3>The <code class="literal">“proxysink”</code> property</h3>
241<pre class="programlisting">  “proxysink”                <a class="link" href="gst-plugins-bad-plugins-proxysink.html#GstProxySink"><span class="type">GstProxySink</span></a> *</pre>
242<p>Matching proxysink.</p>
243<p>Flags: Read / Write</p>
244</div>
245</div>
246</div>
247<div class="footer">
248<hr>Generated by GTK-Doc V1.28</div>
249</body>
250</html>