<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Please help with receiving video using Gstreamer in GTK Application</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hello, please someone respond and help me, I have really had a hard time debugging this issue and getting incoming streaming video to display in my GTK windowed application, and I need someone's help. I have built a GTK application for my Nokia N810 that sends video from the camera to another N810 device. I am now trying to get a similar GTK application built for the receiving side to accept and receive the incoming video and play it in a GTK drawing area on my window. I got the following GStreamer command line application to run, but I'm having trouble putting the pipeline elements together to get it to work in my windowed application. Here's the command line version that works:</FONT></P>
<P> <FONT SIZE=2 FACE="Arial">gst-launch udpsrc port=5434 caps=application/x-rtp,clock-rate=90000 ! rtph263depay ! hantro4100dec ! xvimagesink</FONT></P>
<P><FONT SIZE=2 FACE="Arial">The problem seems to exist in the caps and setting the clock-rate value. When I compile it and run it on my N810 it fails to link the pipeline elements with the gst_element_link_many( ) call, and when I comment out the gst_element_link_filtered( ) call to link the caps to the filter and screen sink the app complains with the following error:</FONT></P>
<P><FONT SIZE=2 FACE="Arial"> GLIB ERROR ** default - GST error: gstbasertpdepayload.c(265) : gst_base_rtp_depayload_chain () : no clock rate was specified, likely incomplete input caps.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Any ideas or help would be appreciated. Appended is my function that creates the pipeline and sets up the elements. Thanks.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">MFonnesbeck</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">/*---------- Code -------*/</FONT>
<BR><FONT SIZE=2 FACE="Arial">pipeline = gst_pipeline_new("test-camera");</FONT>
<BR>
<BR><FONT SIZE=2 FACE="Arial">input_udp = gst_element_factory_make("udpsrc", "input_udp");</FONT>
<BR><FONT SIZE=2 FACE="Arial">g_object_set (G_OBJECT (input_udp), "port", 5434, NULL);</FONT>
<BR><FONT SIZE=2 FACE="Arial">input_rtp = gst_element_factory_make("rtph263depay", "input_rtp");</FONT>
<BR><FONT SIZE=2 FACE="Arial">input_decoder = gst_element_factory_make("hantro4100dec", "input_decoder");</FONT>
<BR><FONT SIZE=2 FACE="Arial">input_screen_queue = gst_element_factory_make("queue", "input_screen_queue");</FONT>
<BR><FONT SIZE=2 FACE="Arial">csp_filter = gst_element_factory_make("ffmpegcolorspace", "csp_filter");</FONT>
<BR><FONT SIZE=2 FACE="Arial">input_screen_sink = gst_element_factory_make("xvimagesink", "input_screen_sink");</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">if(!(pipeline && input_udp && csp_filter && input_rtp && input_decoder && input_screen_queue && input_screen_sink))</FONT>
<BR><FONT SIZE=2 FACE="Arial">{</FONT>
<BR> <FONT SIZE=2 FACE="Arial">g_critical("Couldn't create pipeline elements");</FONT>
<BR> <FONT SIZE=2 FACE="Arial">return FALSE;</FONT>
<BR><FONT SIZE=2 FACE="Arial">}</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">gst_bin_add_many(GST_BIN(pipeline), input_udp, input_rtp, input_decoder, input_screen_queue, csp_filter, input_screen_sink, NULL);</FONT></P>
<P><FONT SIZE=2 FACE="Arial">caps = gst_caps_new_simple("application/x-rtp", "clock-rate", G_TYPE_INT, 90000, NULL);</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">if(!gst_element_link_filtered(csp_filter, input_screen_sink, caps))</FONT>
<BR><FONT SIZE=2 FACE="Arial">{</FONT>
<BR> <FONT SIZE=2 FACE="Arial">return FALSE;</FONT>
<BR><FONT SIZE=2 FACE="Arial">}</FONT>
<BR><FONT SIZE=2 FACE="Arial">gst_caps_unref(caps);</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">if(!gst_element_link_many(input_udp, input_rtp, input_decoder, input_screen_queue, csp_filter, input_screen_sink, NULL))</FONT></P>
<P><FONT SIZE=2 FACE="Arial">{</FONT>
<BR> <FONT SIZE=2 FACE="Arial">return FALSE;</FONT>
<BR><FONT SIZE=2 FACE="Arial">} </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">gst_element_set_state(pipeline, GST_STATE_PLAYING);</FONT>
<BR><FONT SIZE=2 FACE="Arial">/*---------- Code -------*/</FONT>
</P>
<BR>
</BODY>
</HTML>