<div class="gmail_quote">2010/4/23 Edward Hervey <span dir="ltr">&lt;<a href="mailto:bilboed@gmail.com">bilboed@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
The correct answer since nobody was able to come up with it (although<br>
one was very close):<br>
<br></blockquote><div><br>Could you clarify what you considered incorrect in my response?<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

--------------------------------<br>
static GstElement * createPipeline (void) {<br>
  GstElement * pipeline;<br>
<br>
  pipeline = gst_pipeline_new (&quot;mylittleponypipeline&quot;);<br>
<br>
  /* Do stuff with the pipeline, fill it in, etc... */<br>
<br>
  return pipeline;<br>
}<br>
<br>
void main (int argc, gchar **argv) {<br>
  GstElement * pipeline;<br>
<br>
  /* Initialize GStreamer, parse arguments, etc.. */<br>
<br>
  pipeline = createPipeline ();<br>
<br>
  /* Use pipeline */<br>
}<br>
---------------------------------------<br>
<br>
  I recommend everybody who replied to the list to read Kernighan &amp;<br>
Ritchie &quot;The C programming language&quot; [1] as well as reading examples and<br>
learning how to use google.<br>
<br>
   Edward<br>
<br>
[1] <a href="http://en.wikipedia.org/wiki/The_C_Programming_Language_%28book%29" target="_blank">http://en.wikipedia.org/wiki/The_C_Programming_Language_%28book%29</a><br>
<div><div></div><div class="h5"><br>
On Thu, 2010-04-22 at 10:08 +0300, Igor Mironchick wrote:<br>
&gt; Hi.<br>
&gt;<br>
&gt; I&#39;m a new with gstreamer and glib.<br>
&gt;<br>
&gt; Why can&#39;t I init pipeline in function and then use it somewhere else.<br>
&gt;<br>
&gt; Here is the code example:<br>
&gt;<br>
&gt; void initPipeline( GstElement * pipeline )<br>
&gt; {<br>
&gt;   pipeline = gst_pipeline_new( &quot;camera&quot; )<br>
&gt; }<br>
&gt;<br>
&gt; void main()<br>
&gt; {<br>
&gt;   GstElement * pipeline;<br>
&gt;<br>
&gt;   initPipeline( pipeline );<br>
&gt;<br>
&gt;   // And here pipeline == 0 !!! Why?<br>
&gt; }<br>
&gt;<br>
&gt; --<br>
&gt; Regards,<br>
&gt; Igor Mironchick<br>
</div></div><div><div></div><div class="h5">&gt; ------------------------------------------------------------------------------<br>
&gt; _______________________________________________<br>
&gt; gstreamer-devel mailing list<br>
&gt; <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
&gt; <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br>
<br>
<br>
------------------------------------------------------------------------------<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Tristan Matthews<br>email: <a href="mailto:tristan@sat.qc.ca">tristan@sat.qc.ca</a><br>web: <a href="http://tristanswork.blogspot.com">http://tristanswork.blogspot.com</a><br>