[gst-devel] elements linkage error

gael neuez gneuez at hotmail.com
Tue Sep 4 16:24:16 CEST 2007


Hi All,
I encounter a problem as I have different behaviors running a pipeline 
either from command line or using a VC6 project:

gst-launch.exe filesrc location="c:/test.avi" ! decodebin ! ffmpegcolorspace 
! directdrawsink will indeed show me my video playing in a window.

But if I write a piece of code with:
[...]
GstElement * file_avi = gst_element_factory_make("filesrc", "file_avi");
g_object_set(G_OBJECT(file_avi),"location", "c:/test.avi");
GstElement * decode_avi = gst_element_factory_make("decodebin", 
"decode_avi");
GstElement * ffm_avi = gst_element_factory_make("ffmpegcolorspace", 
"ffm_avi");
GstElement * draw_avi = gst_element_factory_make("directdrawsink", 
"draw_avi");
gst_bin_add_many(GST_BIN (my_pipeline), file_avi, decode_avi, ffm_avi, 
draw_avi, NULL);
result = gst_element_link(file_avi, decode_avi); // returns TRUE
result = gst_element_link(decode_avi, ffm_avi); // returns FALSE!
result = gst_element_link(ffm_avi, draw_avi); // returns TRUE


then I get a FALSE result when I try to link the decodebin and 
ffmpegcolorspace elements.

I don't get why it is working in the command line, and not in my program...
Any hint?

Regards,
Gael

_________________________________________________________________
Windows Live Messenger sur i-mode™ : dialoguez avec vos amis depuis votre 
mobile comme sur PC ! http://mobile.live.fr/messenger/bouygues/





More information about the gstreamer-devel mailing list