[maemo-developers] How do you receive video in maemo application?

From: Merrick Fonnesbeck MFonnesbeck at sorenson.com
Date: Tue Jul 22 19:35:58 EEST 2008
I have built a GTK application that sends video to another device to
play around with and get familiar with Gstreamer.  I am now trying to
get a similar GTK application built for the client/receiving side to
accept and receive the incoming video and play it in a 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.

	gst-launch udpsrc port=5434
caps=application/x-rtp,clock-rate=90000 ! rtph263depay ! hantro4100dec !
Xvimagesink

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 complains with the following
error:

   GLIB ERROR ** default - GST error: gstbasertpdepayload.c(265) :
gst_base_rtp_depayload_chain () :  no clock rate was specified, likely
incomplete input caps.

Any ideas or help would be appreciated.  Appended is my function that
creates the pipeline and sets up the elements.  Thanks.

MFonnesbeck

/*----------  Code -------*/
pipeline = gst_pipeline_new("test-camera");
	
input_udp = gst_element_factory_make("udpsrc", "input_udp");
g_object_set (G_OBJECT (input_udp), "port", 5434, NULL);
csp_filter = gst_element_factory_make("ffmpegcolorspace", "csp_filter");
input_rtp = gst_element_factory_make("rtph263depay", "input_rtp");
input_decoder = gst_element_factory_make("hantro4100dec",
"input_decoder");
input_screen_queue = gst_element_factory_make("queue",
"input_screen_queue");
input_screen_sink = gst_element_factory_make("xvimagesink",
"input_screen_sink");

if(!(pipeline && input_udp && csp_filter && input_rtp && input_decoder
&& input_screen_queue && input_screen_sink))
{
	g_critical("Couldn't create pipeline elements");
	return FALSE;
}

gst_bin_add_many(GST_BIN(pipeline), input_udp, input_rtp, input_decoder,
input_screen_queue, csp_filter, input_screen_sink, NULL);
caps = gst_caps_new_simple("application/x-rtp", "clock-rate",
G_TYPE_INT, 90000, NULL);

if(!gst_element_link_filtered(csp_filter, input_screen_sink, caps))
{
	return FALSE;
}
gst_caps_unref(caps);

if(!gst_element_link_many(input_udp, input_rtp, input_decoder,
input_screen_queue, csp_filter, input_screen_sink, NULL))
{
	return FALSE;
}	

gst_element_set_state(pipeline, GST_STATE_PLAYING);
/*----------  Code -------*/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20080722/b39a8c43/attachment.htm 
More information about the maemo-developers mailing list