Hi,<br>
<br>
I want to write a gstreamer app of the following command line:<br>
gst-launch udpsrc port=1234 ! application/x-rtp ! rtph263pdepay ! ffdec_h263 ! xvimagesink<br>
in order to play a H.263+ encoded video received from a RTP source.<br>
<br>
The code in my main function is as follows:<br>
gint main(gint argc, gchar *argv[])<br>
{<br>
GstElement *pipeline, *udpsrc, *depayloader, *decoder, *sink;<br>
GMainLoop *loop;<br>
gint value = atoi(argv[1]);<br>
<br>
gst_init(&argc, &argv);<br>
loop = g_main_loop_new(NULL, FALSE);<br>
if(argc != 2){ g_print("Usage: %s <port>\n", argv[0]); return 0; }<br>
<br>
pipeline = gst_pipeline_new("test_rtpplayer_pipeline");<br>
gst_bus_add_watch(gst_pipeline_get_bus(GST_PIPELINE(pipeline)), bus_cb, loop);<br>
<br>
udpsrc = gst_element_factory_make("udpsrc", "testrtpplayer_src");<br>
depayloader = gst_element_factory_make("rtph263pdepay", "testrtpplayer_depay");<br>
decoder = gst_element_factory_make("ffdec_h263", "testrtpplayer_dec");<br>
sink = gst_element_factory_make("xvimagesink", "testrtpplayer_sink");<br>
<br>
rtpcaps = gst_caps_new_simple("application/x-rtp", NULL);<br>
gst_element_link_pads_filtered(udpsrc, "src", depayloader, "sink", rtpcaps);<br>
gst_element_link_pads(depayloader, "src", decoder, "sink");<br>
gst_element_link_pads(decoder, "src", sink, "sink");<br>
gst_bin_add_many(GST_BIN(pipeline), udpsrc, depayloader, decoder, sink, NULL);<br>
gst_element_set_state(pipeline, GST_STATE_PLAYING);<br>
g_main_loop_run(loop);<br>
gst_element_set_state(pipeline, GST_STATE_NULL);<br>
gst_object_unref(GST_OBJECT(pipeline));<br>
return 0;<br>
}<br>
<br>
However, on running this I get the following error:<br>
GStreamer-CRITICAL **: gst_element_link_pads_filtered: assertion `GST_IS_BIN (parent)' failed<br>
Error: Internal data flow error.<br>
<br>
How could I get this working?<br>
<br>
Regards,<br>
Deeptendu<br>