Hi,
I am trying to stream an Internet Radio Channel with playbin. I am going through a proxy and can use gst-launch in this way to successfully play the station: gst-launch souphttpsrc proxy=http://proxyURL location=http://myIRadio.com. ! mad ! alsasink I do not need to use gst-launch and am actually building my own software media player .... When i do not setup proxy but just run my mediaplayer with playbin, I just wait on an endless loop and get the following debug message on cancelling.. gstsouphttpsrc.c(683): gst_soup_http_src_finished_cb(): /play/source libsoup status code 1 Error: Cancelled So playbin is trying to use souphttpsrc but Im assuming the error is becoz the proxy is not set ..... Can someone plz suggest how to set the proxy property with souphttpsrc and still use playbin v1 ? Thanks, raj ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi, Raj:
That's easy. First, connect `notify::source' signal of playbin: // connect signal g_signal_connect(G_OBJECT(playbin), "notify::source", G_CALLBACK(cb_playbin_notify_source), NULL); Then the callback function(I am working on rtsp recently so the example source below is a rtspsrc. In your program, this should be souphttpsrc): static void cb_playbin_notify_source(GObject *obj, GParamSpec *param, gpointer u_data) { // check whether this is rtsp source gchar *objname = GST_OBJECT_NAME(obj); g_message("objname is %s", objname); // check whether has a `protocols' property if (g_object_class_find_property(G_OBJECT_GET_CLASS(obj), "source")) { GObject *source_element; g_object_get(obj, "source", &source_element, NULL); if (g_object_class_find_property(G_OBJECT_GET_CLASS(source_element), "protocols")) { g_object_set(source_element, "protocols", 1, NULL); } g_object_unref(source_element); } } Eric Zhang 2008/9/12 Raj Swaminathan <[hidden email]>
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Raj Swaminathan
On Thu, 2008-09-11 at 15:44 -0500, Raj Swaminathan wrote:
Hi, > So playbin is trying to use souphttpsrc but Im assuming the error is > becoz the proxy is not set ..... > Can someone plz suggest how to set the proxy property with souphttpsrc > and still use playbin v1 ? One possibility already mentioned by Eric is to connect to the notify::source signal and set up the source in the callback. This is the recommended way of configuring playbin sources (also for things like "device" properties and the like). In your case you could also just set the http_proxy environment variable (g_set_env) - if you're lucky souphttpsrc will take that into account and configure itself accordingly. Cheers -Tim ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Eric, Tim,
Both methods beautifully.... Thanks a lot for your help. regards, raj On Fri, Sep 12, 2008 at 4:53 AM, Tim-Philipp Müller <[hidden email]> wrote: On Thu, 2008-09-11 at 15:44 -0500, Raj Swaminathan wrote: ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |