2010/4/23 Tristan Matthews <span dir="ltr">&lt;<a href="mailto:tristan@sat.qc.ca">tristan@sat.qc.ca</a>&gt;</span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="gmail_quote">2010/4/23 Edward Hervey <span dir="ltr">&lt;<a href="mailto:bilboed@gmail.com" target="_blank">bilboed@gmail.com</a>&gt;</span><div class="im"><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><div><br>Could you clarify what you considered incorrect in my response?<br></div></div></blockquote><div><br>Unless it&#39;s a mixed declarations and code issue (C90 and earlier), in which case you&#39;ll have to forgive my c++ contaminated style :)<br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_quote"><div> </div><div><div></div><div class="h5"><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><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>&gt; ------------------------------------------------------------------------------<br>
&gt; _______________________________________________<br>
&gt; gstreamer-devel mailing list<br>
&gt; <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">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" target="_blank">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></div></div><br><br clear="all"><div><div></div><div class="h5"><br>-- <br>Tristan Matthews<br>email: <a href="mailto:tristan@sat.qc.ca" target="_blank">tristan@sat.qc.ca</a><br>web: <a href="http://tristanswork.blogspot.com" target="_blank">http://tristanswork.blogspot.com</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>