[gst-devel] I need help with RTP pipeline

Tim Müller t.i.m at zen.co.uk
Fri Aug 11 10:43:43 CEST 2006


On Fri, 2006-08-11 at 11:23 +0300, Zeeshan Ali wrote:

> On 8/11/06, Deeptendu Bikash <dbikash at gmail.com> wrote:
> > I found the problem in my code: I did not set the port to listen to. But I'm
> > not able to get the stuff up. If I write:
> >  gint value = 1234;
> > g_object_get_property(G_OBJECT(udpsrc), "port", &value);
> >  I get a seg fault.
> 
>    g_object_get_property() is a vararg function and many varargs
> functions (if not all) requires a terminator argument at the end. In
> case of g_object_get_property() that terminator is 'NULL'.

Actually, g_object_get_property() is not a vararg function, but
g_object_get() - the function you're supposed to use here - is.

Assuming the property "port" is of type G_TYPE_INT, it's either

  gint port;

  g_object_get (obj, "port", &port, NULL);

or something like:

  GValue val = { 0, };
  gint port;

  g_value_init (&val, G_TYPE_INT);
  g_object_get_property (G_OBJECT (obj), "port", &val);
  port = g_value_get_int (&val);
  g_value_unset (&val);

 Cheers
  -Tim






More information about the gstreamer-devel mailing list