[gst-devel] setting http proxy userid/password with playbin

Tim-Philipp Müller t.i.m at zen.co.uk
Wed Mar 3 16:26:20 CET 2010


On Wed, 2010-03-03 at 07:01 -0800, Debsu wrote:

> But my question is how to set these information to the GstSoupHTTPSrc
> as the playbin Source property is Read Only. 

Not sure how those two things are related. You connect to playbin's
"notify::source" signal, then your callback will be called when playback
has created the source element (e.g. GstSoupHttpSrc). In the callback
you can then do something like:

 GObjectClass *klass;
 GstElement *src = NULL;

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

 klass = G_OBJECT_GET_CLASS (src);
 if (g_object_class_find_property (klass, "proxy-id") != NULL &&
     g_object_class_find_property (klass, "proxy-pw") != NULL) {
   g_object_set (src, "proxy-id", "foo", "proxy-pw", "s3cr3t", NULL);
 }

 gst_object_unref (src);

So yes, the "source" property is read-only, but that only means that you
can't tell playbin what source to use (it will find one automatically
via the URI protocol), it doesn't mean that you can't set properties on
the source object.

 Cheers
  -Tim







More information about the gstreamer-devel mailing list