[gst-devel] Issue with decodebin ?

Wim Taymans wim.taymans at gmail.com
Thu Jan 8 15:51:06 CET 2009


decodebin dynamically creates source pads as can be seen with
gst-inspect. Please re-read Capter 8 of the application development
manual.

Wim

On Thu, Jan 8, 2009 at 3:13 PM, Darren Staples <dstaples at friendmts.co.uk> wrote:
> Hi again :)
>
> Is there an issue with using the decodebin element programmatically ?
>
> This command line works fine:
> gst-launch filesrc location=file.flv ! decodebin ! ffmpegcolorspace !
> ximagesink
>
> But when I try to code it up as follows: (some code left out for clarity)
>
>  // Create gstreamer elements
>  pipeline    = gst_pipeline_new( "video" );
>   source      = gst_element_factory_make( "filesrc"          , "src" );
>   decoder     = gst_element_factory_make( "decodebin"        , "decoder" );
>   colorspace1 = gst_element_factory_make( "ffmpegcolorspace" , "colorspace1"
> );
>   sink        = gst_element_factory_make( "ximagesink"       , "sink" );
>
>   if ( !pipeline || !source || !decoder || !colorspace1 || !sink )
>   {
>     g_printerr( "One element could not be created. Exiting.\n" );
>     return -1;
>   }
>
>   // Set the input filename to the source element
>  g_object_set( G_OBJECT( source ) , "location" , "file.flv" , NULL );
>
>   // Add all elements into the pipeline
>  gst_bin_add_many( GST_BIN( pipeline ) , source , decoder , colorspace1 ,
> sink , NULL );
>
>   // Start linking the elements together
>  gst_element_link_many( source , decoder , colorspace1 , sink , NULL );
>
>   // Set the pipeline to "playing" state
>  gst_element_set_state( pipeline , GST_STATE_PLAYING );
>
> I get an 'internal data flow error' as you would see when linking failed.
>
> Any ideas why this might be please ? Does the uridecodebin work any better ?
>
> Thanks for all the help so far :D
>
>
> Darren
>
>
>
> *** FRIEND MTS LIMITED EMAIL CONFIDENTIALITY ***
>
> This email message and any attachments may contain information which is
> confidential or privileged and is intended for the sole use of the person to
> whom it is addressed.  If you are not the intended recipient, be aware that
> any disclosures, copying, distribution or use of the contents is
> prohibited.  If you have received this email message in error, please notify
> our office by telephone (+44 (0)121 633 2000) or email
> (admin at friendmts.co.uk) immediately.  Thank you.
>
> ------------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It is the best place to buy or sell services for
> just about anything Open Source.
> http://p.sf.net/sfu/Xq1LFB
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>




More information about the gstreamer-devel mailing list