<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'> <FONT COLOR="#00711C">// Create gstreamer elements<BR>
</FONT> pipeline = gst_pipeline_new( <FONT COLOR="#9E0006">"video"</FONT> );<BR>
source = gst_element_factory_make( <FONT COLOR="#9E0006">"filesrc"</FONT> , <FONT COLOR="#9E0006">"src"</FONT> );<BR>
decoder = gst_element_factory_make( <FONT COLOR="#9E0006">"decodebin"</FONT> , <FONT COLOR="#9E0006">"decoder"</FONT> );<BR>
colorspace1 = gst_element_factory_make( <FONT COLOR="#9E0006">"ffmpegcolorspace"</FONT> , <FONT COLOR="#9E0006">"colorspace1"</FONT> );<BR>
sink = gst_element_factory_make( <FONT COLOR="#9E0006">"ximagesink"</FONT> , <FONT COLOR="#9E0006">"sink"</FONT> );<BR>
<BR>
<FONT COLOR="#890051">if</FONT> ( !pipeline || !source || !decoder || !colorspace1 || !sink ) <BR>
{<BR>
g_printerr( <FONT COLOR="#9E0006">"One element could not be created. Exiting.\n"</FONT> );<BR>
<FONT COLOR="#890051">return</FONT> <FONT COLOR="#2300FF">-1</FONT>;<BR>
}<BR>
<BR>
<FONT COLOR="#00711C">// Set the input filename to the source element <BR>
</FONT> g_object_set( G_OBJECT( source ) , <FONT COLOR="#9E0006">"location"</FONT> , <FONT COLOR="#9E0006">"file.flv"</FONT> , <FONT COLOR="#890051">NULL</FONT> );<BR>
<BR>
<FONT COLOR="#00711C">// Add all elements into the pipeline <BR>
</FONT> gst_bin_add_many( GST_BIN( pipeline ) , source , decoder , colorspace1 , sink , <FONT COLOR="#890051">NULL</FONT> );<BR>
<BR>
<FONT COLOR="#00711C">// Start linking the elements together <BR>
</FONT> gst_element_link_many( source , decoder , colorspace1 , sink , <FONT COLOR="#890051">NULL</FONT> );<BR>
<BR>
<FONT COLOR="#00711C">// Set the pipeline to "playing" state<BR>
</FONT> 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 ‘internal data flow error’ 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> </FONT></P>
<P align=left>*** FRIEND MTS LIMITED 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. 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 (</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. Thank you.</FONT></FONT></P></FONT></HTML>