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

From: Merrick Fonnesbeck MFonnesbeck at sorenson.com
Date: Mon Aug 18 18:34:30 EEST 2008
I actually got it working, but I needed a caps on the input udp stream
in order to set the clock-rate for something on the incoming stream.
When I didn't have it in the pipeline the application crashed
complaining that I didn't set the clock-rate on the input stream or that
my pipeline was not properly linked.  I finally got it working correctly
using the following code to create the clock-rate in a caps and then set
the caps directly on the udp input source.  I don't fully understand it,
but it works.

     caps = gst_caps_new_simple( "application/x-rtp", "clock-rate",
G_TYPE_INT, 90000, NULL);
     g_object_set (G_OBJECT (input_udp), "caps", caps, NULL); 

It works great.  Thanks for your response and your suggestion, I will
try that in the future for GStreamer problems.

MFonnesbeck


-----Original Message-----
From: Stefan Kost [mailto:ensonic at hora-obscura.de] 
Sent: Saturday, August 16, 2008 9:54 AM
To: Merrick Fonnesbeck
Cc: maemo-developers at maemo.org
Subject: Re: How do you receive video in maemo application?

hi,

can you ask this on gstreamer-devel. Its no maemo specific. One comment
below still.

Stefan

Merrick Fonnesbeck schrieb:
> 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);

why are you using a caps filter? The element has a caps property. Can
you try this and link normal?

g_object_set(input_udp,"caps",caps,NULL);

> 
> 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 -------*/
> 
> 
> ----------------------------------------------------------------------
> --
> 
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers


More information about the maemo-developers mailing list