uridecodebin - Query

Tim-Philipp Müller t.i.m at zen.co.uk
Wed Feb 23 01:13:14 PST 2011


On Tue, 2011-02-22 at 20:02 +0530, Jayanth K.P wrote:

>    I want to set custom property for the source plugin selected based
> on the URI in uridecodebin. For example for
> uri="udp://239.0.0.1:2301", uridecodebin will select udpsrc. Now if I
> want to set "multicast-iface" property in udpsrc . How can this be
> done without modifing the uridecodebin code.

Connect to the "notify::source" signal, then in the callbck retrieve the
source element via

  GstElement *src;

  g_object_get (uridecodebin, "source", &src, NULL);

  /* set your properties (check for existance of
   * property first if you use different protocols
   * or sources) */
  g_object_set (src, ...., NULL);

  gst_object_unref (src);

Cheers
 -Tim




More information about the gstreamer-devel mailing list