[gst-devel] Playbin unable to play http stream

Ron McOuat rmcouat at smartt.com
Thu Mar 4 18:37:16 CET 2010


I explained quite a bit of this in a post on Feb 24 which was after the 
post you just replied to so hopefully you can refer to that instead of 
me repeating all of those details here. In summary, libsoup which 
httpsoupsrc layers over does not use environment variables for proxy 
unless you also have the library libsoup-gnome available. I have no idea 
what your target platform is (Linux, Windows, OS/X) and if Linux whether 
libsoup-gnome is there unless you are running a Gnome session 
environment. If that environment works for you than it should be 
possible to modify httpsoupsrc to use the SoupProxyResolverGNOME during 
the HTTP session open. Using the properties method which you added by 
callback to playbin tries to connect using the settings you supply. 
There is an authentication callback in souphttpsrc that will supply the 
values at the correct time in the protocol. If it doesn't work the 
callback is called again and since there is no user dialog assumed to 
supply a different answer there is no choice in the callback except to 
just return which will cause the 407 error to bubble up to the 
application. That callback may be wrong or libsoup could be wrong or the 
parameters could be wrong. Anything could make it fail.

To move forward it would be most helpful if you could get a wireshark 
trace of both libCurl successful open and the failed attempt to open 
from your gstreamer app. I don't have a lot of time to work on this 
right now with work pressures taking most of my free time as well as 
working hours. Once this is narrowed down a bit it would be best to file 
a bug report against either httpsoupsrc or libsoup (a different project) 
so the functionality can be fixed if it is actually broken. It seems 
none of the http source elements take sources behind a proxy right now, 
I have noticed your posts re neon as well. I don't use a proxy in my own 
environment work or home and am not sure how well streaming works 
through one. There are also many different proxy implementations out 
there so I am not sure what kind of swamp complete with alligators that 
will be to wade into.

Ron


On 10-03-04 5:28 AM, Debsu wrote:
>
> Hi Ron,
>
> I set the proxy, proxy user id and proxy passwd for authentication by 
> using the following callback:
>
> static void cb_playbin_notify_source(GObject *obj, GParamSpec *param, 
> gpointer u_data)
> {
>     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), 
> "proxy-id") && \
>             
> g_object_class_find_property(G_OBJECT_GET_CLASS(source_element), 
> "proxy-pw"))
>         {
>             g_object_set (source_element, "proxy", "proxy_ip", 
> "proxy-id", "user_id", "proxy-pw", "passwd", NULL);
>         }
>         g_object_unref(source_element);
>     }
> }
>
> connect that callback with the playbin like this:
>     g_signal_connect(G_OBJECT(playbin), "notify::source", 
> G_CALLBACK(cb_playbin_notify_source), NULL);
>
> But every time I am still getting the "Proxy Authentication Required" 
> error. I set the http_proxy environment variable, but still getting 
> the same error.
>
> Can you tell me why this error is coming again and again? What mistake 
> did I made?  I check the proxy using Curl, its fine.
>
> Regards,
>
> Deb
>
> ------------------------------------------------------------------------
>
> *From:* Ron McOuat [via GStreamer-devel] [mailto:[hidden email] 
> <http://n4.nabble.com/user/SendEmail.jtp?type=node&node=1578051&i=0>]
> *Sent:* Wednesday, February 24, 2010 11:36 AM
> *To:* Debojyoti Pal (WT01 - PES-Mobile-Auto-CE Practice)
> *Subject:* Re: Playbin unable to play http stream
>
> I added user authentication to souphttpsrc around Nov 2008 when there
> was no means to provide basic or digest authentication on direct access
> to a URL and souphttpsrc did not accept the http://user@password
> embedded format either and still does not. I had a strong need for this
> capability in my own work. Looking at the libsoup documentation it
> looked like it was possible to service error code
> SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED in the same callback routine
> as regular authentication SOUP_STATUS_UNAUTHORIZED both of which are in
> function gst_soup_http_src_authenticate_cb() so I added properties
> proxy_id and proxy_pw to the souphttpsrc element properties to source
> the values for proxy authentication. Unless libsoup reads the
> environment for these values and could do proxy authentication
> automatically I know I didn't put the code in to read the environment to
> pick up the properties from there instead of from the added element
> properties. In retrospect using the environment is likely a better
> approach because proxy settings are often a system setting. I also have
> limited ability to test this since proxy is not part of my environment.
> I suppose setting up squid is all that is really needed and force a test
> environment to use the squid setup. My workload has prevented me from
> testing this further. Maybe the best approach is to file a bug report
> and if there is someone better skilled at using a proxy environment to
> find what is wrong with this? I believe libsoup has had a number of
> issues with proxy over time but think that is not an issue now but don't
> take my word for it, I was getting this from reading the libsoup
> discussion area and not actual testing.
>
> Going back to the URL in the original request I tried the gst-launch
> command on a stock Ubuntu 9.10 Karmic system without a need for proxy
> and the pipeline says it got EOS during preroll and did not display the
> picture in a video sink which is not surprising since the URL content is
> only a single JPG image. I would normally associate using gstreamer with
> processing a sequence of video frames instead of just one image. Not to
> discourage you from gstreamer but grabbing a single image frame looks
> more like a file transfer job which libCurl you mention does quite well.
> I probably just don't know what you want to do with the image content
> after it is acquired so my comment is probably not valid.
>
> Ron
>
> On 10-02-23 8:52 PM, Debsu wrote:
>
>
> > Hi Tim,
> >
> > You are right, that using souphttpsrc element is the better way of doing
> > this. But in souphttpsrc element I am facing a strange problem.
> > I am using playbin for display image which is nothing but a http 
> source. But
> > souphttpsrc gives me the error of "proxy-authentication failure" 
> message,
> > but http_proxy is already set in the environment variable. and also from
> > commandline I can easily fetch that jpg file using libCurl.
> >
> > Regards,
> > Deb
> >
>
>
> ------------------------------------------------------------------------------ 
>
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email] 
> <http://n4.nabble.com/user/SendEmail.jtp?type=node&node=1566994&i=0>
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
> ------------------------------------------------------------------------
>
> View message @ 
> http://n4.nabble.com/Playbin-unable-to-play-http-stream-tp1561553p1566994.html 
>
> To unsubscribe from Re: Playbin unable to play http stream, click here.
>
> * Please do not print this email unless it is absolutely necessary. *
>
> The information contained in this electronic message and any 
> attachments to this message are intended for the exclusive use of the 
> addressee(s) and may contain proprietary, confidential or privileged 
> information. If you are not the intended recipient, you should not 
> disseminate, distribute or copy this e-mail. Please notify the sender 
> immediately and destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient 
> should check this email and any attachments for the presence of 
> viruses. The company accepts no liability for any damage caused by any 
> virus transmitted by this email.
>
> www.wipro.com
>
>
> ------------------------------------------------------------------------
> View this message in context: RE: Playbin unable to play http stream 
> <http://n4.nabble.com/Playbin-unable-to-play-http-stream-tp1561553p1578051.html>
> Sent from the GStreamer-devel mailing list archive 
> <http://n4.nabble.com/GStreamer-devel-f966125.html> at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100304/95057b2b/attachment.htm>


More information about the gstreamer-devel mailing list