[gst-devel] Playbin unable to play http stream

Debsu debojyoti.pal at wipro.com
Thu Mar 4 14:28:48 CET 2010


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:ml-node+1566994-358805328-91831 at n4.nabble.com]
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(r) 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-tp1561553p156699
4.html
To unsubscribe from Re: Playbin unable to play http stream, click here
< (link removed) 
hbEB3aXByby5jb218MTU2Njk2MXw4OTIzNTk5OTA=> .




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: http://n4.nabble.com/Playbin-unable-to-play-http-stream-tp1561553p1578051.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100304/08b1ac65/attachment.htm>


More information about the gstreamer-devel mailing list