[maemo-developers] Please help with receiving video using Gstreamer in GTK Application
From: Merrick Fonnesbeck MFonnesbeck at sorenson.comDate: Fri Aug 1 23:43:27 EEST 2008
- Previous message: need help uploading to Extras
- Next message: Startup hardware control - Maemo - N810
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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: 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 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: 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); 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"); csp_filter = gst_element_factory_make("ffmpegcolorspace", "csp_filter"); 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/20080801/9e4f89f8/attachment.htm
- Previous message: need help uploading to Extras
- Next message: Startup hardware control - Maemo - N810
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]