Hi,
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. Plz suggest .. Thanks. Regards, Jayanth _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Once uridecodebin has selected all the elements(probably when you receive the new-decoded-pad signal), you can use the "source" property of the bin to get a handle on the xxxsrc(udpsrc in your case) element and set its properties (multicast-iface, etc).
Or you could even handle "autoplug-select" signal.
Thanks
Rohit
On Tue, Feb 22, 2011 at 8:02 PM, Jayanth K.P <[hidden email]> wrote: Hi, _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Jayanth K.P
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 _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thanks .. This should work. This is a Gobject feature
Regards, Jayanth On Wed, Feb 23, 2011 at 2:43 PM, Tim-Philipp Müller <[hidden email]> wrote: > 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 > > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |