[gst-devel] Init pipeline in the function
Tristan Matthews
tristan at sat.qc.ca
Fri Apr 23 16:45:19 CEST 2010
2010/4/23 Edward Hervey <bilboed at gmail.com>
> The correct answer since nobody was able to come up with it (although
> one was very close):
>
>
Could you clarify what you considered incorrect in my response?
> --------------------------------
> static GstElement * createPipeline (void) {
> GstElement * pipeline;
>
> pipeline = gst_pipeline_new ("mylittleponypipeline");
>
> /* Do stuff with the pipeline, fill it in, etc... */
>
> return pipeline;
> }
>
> void main (int argc, gchar **argv) {
> GstElement * pipeline;
>
> /* Initialize GStreamer, parse arguments, etc.. */
>
> pipeline = createPipeline ();
>
> /* Use pipeline */
> }
> ---------------------------------------
>
> I recommend everybody who replied to the list to read Kernighan &
> Ritchie "The C programming language" [1] as well as reading examples and
> learning how to use google.
>
> Edward
>
> [1] http://en.wikipedia.org/wiki/The_C_Programming_Language_%28book%29
>
> On Thu, 2010-04-22 at 10:08 +0300, Igor Mironchick wrote:
> > Hi.
> >
> > I'm a new with gstreamer and glib.
> >
> > Why can't I init pipeline in function and then use it somewhere else.
> >
> > Here is the code example:
> >
> > void initPipeline( GstElement * pipeline )
> > {
> > pipeline = gst_pipeline_new( "camera" )
> > }
> >
> > void main()
> > {
> > GstElement * pipeline;
> >
> > initPipeline( pipeline );
> >
> > // And here pipeline == 0 !!! Why?
> > }
> >
> > --
> > Regards,
> > Igor Mironchick
> >
> ------------------------------------------------------------------------------
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
--
Tristan Matthews
email: tristan at sat.qc.ca
web: http://tristanswork.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100423/d1fab334/attachment.htm>
More information about the gstreamer-devel
mailing list