<HTML>
<HEAD>
<TITLE>Issue with decodebin ?</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>Hi again :)<BR>
<BR>
Is there an issue with using the decodebin element programmatically ?<BR>
<BR>
This command line works fine:<BR>
gst-launch filesrc location=file.flv ! decodebin ! ffmpegcolorspace ! ximagesink<BR>
<BR>
But when I try to code it up as follows: (some code left out for clarity)<BR>
<BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:10.0px'> &nbsp;<FONT COLOR="#00711C">// Create gstreamer elements<BR>
</FONT> &nbsp;pipeline &nbsp;&nbsp;&nbsp;= gst_pipeline_new( <FONT COLOR="#9E0006">&quot;video&quot;</FONT> );<BR>
&nbsp;&nbsp;source &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= gst_element_factory_make( <FONT COLOR="#9E0006">&quot;filesrc&quot;</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;, <FONT COLOR="#9E0006">&quot;src&quot;</FONT> );<BR>
&nbsp;&nbsp;decoder &nbsp;&nbsp;&nbsp;&nbsp;= gst_element_factory_make( <FONT COLOR="#9E0006">&quot;decodebin&quot;</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;, <FONT COLOR="#9E0006">&quot;decoder&quot;</FONT> );<BR>
&nbsp;&nbsp;colorspace1 = gst_element_factory_make( <FONT COLOR="#9E0006">&quot;ffmpegcolorspace&quot;</FONT> , <FONT COLOR="#9E0006">&quot;colorspace1&quot;</FONT> );<BR>
&nbsp;&nbsp;sink &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= gst_element_factory_make( <FONT COLOR="#9E0006">&quot;ximagesink&quot;</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;, <FONT COLOR="#9E0006">&quot;sink&quot;</FONT> );<BR>
<BR>
&nbsp;&nbsp;<FONT COLOR="#890051">if</FONT> ( !pipeline || !source || !decoder || !colorspace1 || !sink ) <BR>
&nbsp;&nbsp;{<BR>
&nbsp;&nbsp;&nbsp;&nbsp;g_printerr( <FONT COLOR="#9E0006">&quot;One element could not be created. Exiting.\n&quot;</FONT> );<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR="#890051">return</FONT> <FONT COLOR="#2300FF">-1</FONT>;<BR>
&nbsp;&nbsp;}<BR>
<BR>
&nbsp;&nbsp;<FONT COLOR="#00711C">// Set the input filename to the source element <BR>
</FONT> &nbsp;g_object_set( G_OBJECT( source ) , <FONT COLOR="#9E0006">&quot;location&quot;</FONT> , <FONT COLOR="#9E0006">&quot;file.flv&quot;</FONT> , <FONT COLOR="#890051">NULL</FONT> );<BR>
<BR>
&nbsp;&nbsp;<FONT COLOR="#00711C">// Add all elements into the pipeline <BR>
</FONT> &nbsp;gst_bin_add_many( GST_BIN( pipeline ) , source , decoder , colorspace1 , sink , <FONT COLOR="#890051">NULL</FONT> );<BR>
<BR>
&nbsp;&nbsp;<FONT COLOR="#00711C">// Start linking the elements together <BR>
</FONT> &nbsp;gst_element_link_many( source , decoder , colorspace1 , sink , <FONT COLOR="#890051">NULL</FONT> );<BR>
<BR>
&nbsp;&nbsp;<FONT COLOR="#00711C">// Set the pipeline to &quot;playing&quot; state<BR>
</FONT> &nbsp;gst_element_set_state( pipeline , GST_STATE_PLAYING );<BR>
</SPAN></FONT></FONT><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'><BR>
I get an &#8216;internal data flow error&#8217; as you would see when linking failed.<BR>
<BR>
Any ideas why this might be please ? Does the uridecodebin work any better ?<BR>
<BR>
Thanks for all the help so far :D<BR>
<BR>
<BR>
Darren </SPAN></FONT>
</BODY>
<!--[object_id=#friendmts.co.uk#]--><FONT color=#0000ff>
<P align=left><FONT face=Tahoma color=#0000ff size=2><FONT size=3>&nbsp;</FONT></P>
<P align=left>*** FRIEND MTS LIMITED&nbsp;EMAIL CONFIDENTIALITY ***</FONT></P>
<P align=left><FONT color=#0000ff><FONT face=Tahoma size=2>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.&nbsp; If you are not the intended recipient, be aware that any disclosures, copying, distribution or use of the contents is prohibited.&nbsp; If you have received this email message in error, please notify our office by telephone (+44 (0)121 633 2000) or email (</FONT><A href="mailto:admin@friendmts.co.uk"><FONT face=Tahoma size=2>admin@friendmts.co.uk</FONT></A><FONT face=Tahoma size=2>) immediately.&nbsp; Thank you.</FONT></FONT></P></FONT></HTML>