[gst-devel] Bug reports / 0.7.3 problem with ghostpads

Thomas Comiotto comiotto at rcfmedia.ch
Fri Jan 9 15:52:02 CET 2004


Hello, 

Is this list the right place to submit (possible) bugreports? -- or is there a 
bugtracker available somewhere? Nothing mentioned on the website. 

However, the following simple code snippet compiles and runs just fine on 
0.6.4, 0.7.3 cancels operation with some 'filesrc has no group' errors after 
successful compilation. Further on the aggregator / pingpong example seems to 
be broken too - same goes for code including the switch-plugin. 


best regards, 
thomas



#include <gst/gst.h>

int
main (int argc, char *argv[])
{
	GstElement *pipeline;
	GstElement *bin;
	GstElement *filesrc;
	GstElement *decoder;
	GstElement *audiosink;

	gst_init (&argc, &argv);

	if (argc != 2) {
		g_print ("usage: %s 3 <mp3 filename's>\n", argv[0]);
	}
	
	
	pipeline = gst_pipeline_new ("pipeline");
	bin = gst_bin_new ("bin");
	audiosink = gst_element_factory_make ("osssink", "audiosink");
	filesrc = gst_element_factory_make("filesrc", "filesrc");
	decoder = gst_element_factory_make ("mad", "decoder");
	
	g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
	
	gst_bin_add (GST_BIN (pipeline), filesrc);
	gst_bin_add (GST_BIN (pipeline), audiosink);
	
	gst_bin_add (GST_BIN (bin), decoder);	
	gst_element_add_ghost_pad (bin, gst_element_get_pad (decoder, "src"), "src");
	gst_element_add_ghost_pad (bin, gst_element_get_pad (decoder, "sink"), 
"sink");

	gst_element_link_pads (filesrc, "src", bin, "sink");
	gst_element_link_pads (bin, "src", audiosink, "sink");
	
	gst_bin_add (GST_BIN (pipeline), bin);
	
	gst_element_set_state(pipeline, GST_STATE_PLAYING);

	while (gst_bin_iterate (GST_BIN (pipeline)));

	exit (0);

}





More information about the gstreamer-devel mailing list