Playbin unable to play http stream

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Playbin unable to play http stream

Debsu
Hi,

I was trying to play an http stream using Playbin & gst-launch tool by giving the following command:
gst-launch-0.10 -v playbin uri=http://i.ytimg.com/vi/9lKUwBCIBzA/default.jpg

But instead of playing this picture, it gave me the following error:
ERROR: Pipeline doesn't want to pause.
ERROR: from element /playbin0/source: Could not open resource for reading.
Additional debug info:
gstgnomevfssrc.c(864): gst_gnome_vfs_src_start (): /playbin0/source:
Could not open vfs file "http://i.ytimg.com/vi/9lKUwBCIBzA/default.jpg" for reading: Generic error Setting pipeline to NULL ...

But when I gave this URL to any browser, it displayed the picture, even when I used libCurl to download the data from that URL and dumped into a file, then also I was able to see that picture.

Can anyone tell me, what mistake I made? I think Playbin has support for http plugins, then why it is unable to play the picture.

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Playbin unable to play http stream

Thiago Sousa Santos-2


On Fri, Feb 19, 2010 at 9:56 AM, Debsu <[hidden email]> wrote:

Hi,

I was trying to play an http stream using Playbin & gst-launch tool by
giving the following command:
gst-launch-0.10 -v playbin uri=http://i.ytimg.com/vi/9lKUwBCIBzA/default.jpg

But instead of playing this picture, it gave me the following error:
ERROR: Pipeline doesn't want to pause.
ERROR: from element /playbin0/source: Could not open resource for reading.
Additional debug info:
gstgnomevfssrc.c(864): gst_gnome_vfs_src_start (): /playbin0/source:
Could not open vfs file "http://i.ytimg.com/vi/9lKUwBCIBzA/default.jpg" for
reading: Generic error Setting pipeline to NULL ...

I just tested with both playbin2 and playbin and they work. Do you have a http src element
installed?

Try seeing them using
gst-inspect |grep http
 

But when I gave this URL to any browser, it displayed the picture, even when
I used libCurl to download the data from that URL and dumped into a file,
then also I was able to see that picture.

Can anyone tell me, what mistake I made? I think Playbin has support for
http plugins, then why it is unable to play the picture.

Thanks in advance.
--
View this message in context: http://n4.nabble.com/Playbin-unable-to-play-http-stream-tp1561553p1561553.html
Sent from the GStreamer-devel mailing list archive 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Thiago Sousa Santos

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Playbin unable to play http stream

Michael Trimarchi
Hi,

[hidden email] wrote:

> On Fri, Feb 19, 2010 at 9:56 AM, Debsu <[hidden email]> wrote:
>
>> Hi,
>>
>> I was trying to play an http stream using Playbin & gst-launch tool by
>> giving the following command:
>> gst-launch-0.10 -v playbin uri=
>> http://i.ytimg.com/vi/9lKUwBCIBzA/default.jpg
>>
>> But instead of playing this picture, it gave me the following error:
>> ERROR: Pipeline doesn't want to pause.
>> ERROR: from element /playbin0/source: Could not open resource for reading.
>> Additional debug info:
>> gstgnomevfssrc.c(864): gst_gnome_vfs_src_start (): /playbin0/source:
>> Could not open vfs file "http://i.ytimg.com/vi/9lKUwBCIBzA/default.jpg"
>> for
>> reading: Generic error Setting pipeline to NULL ...
>>
>
> I just tested with both playbin2 and playbin and they work. Do you have a
> http src element
> installed?
>
> Try seeing them using
> gst-inspect |grep http

Me too,
I have written an application that use a playbin2 and it works without problem.

Michael

>
>
>> But when I gave this URL to any browser, it displayed the picture, even
>> when
>> I used libCurl to download the data from that URL and dumped into a file,
>> then also I was able to see that picture.
>>
>> Can anyone tell me, what mistake I made? I think Playbin has support for
>> http plugins, then why it is unable to play the picture.
>>
>> Thanks in advance.
>> --
>> View this message in context:
>> http://n4.nabble.com/Playbin-unable-to-play-http-stream-tp1561553p1561553.html
>> Sent from the GStreamer-devel mailing list archive 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
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: Playbin unable to play http stream

Debsu
In reply to this post by Thiago Sousa Santos-2

Hi,

 

Thanks a lot for pointing out the problem, I checked that http src plugins is not installed. But when I was trying to configure my gst-plugins-bad-0.10.11, each time it was saying that neonhttpsrc would not be built, could you please tell me what exactly I should do?

 

Thanks in advance.

 

Regards,

deb


From: [hidden email] [via GStreamer-devel] [mailto:[hidden email]]
Sent: Monday, February 22, 2010 10:53 PM
To: Debojyoti Pal (WT01 - PES-Mobile-Auto-CE Practice)
Subject: Re: Playbin unable to play http stream

 

 

On Fri, Feb 19, 2010 at 9:56 AM, Debsu <[hidden email]> wrote:


Hi,

I was trying to play an http stream using Playbin & gst-launch tool by
giving the following command:
gst-launch-0.10 -v playbin uri=http://i.ytimg.com/vi/9lKUwBCIBzA/default.jpg

But instead of playing this picture, it gave me the following error:
ERROR: Pipeline doesn't want to pause.
ERROR: from element /playbin0/source: Could not open resource for reading.
Additional debug info:
gstgnomevfssrc.c(864): gst_gnome_vfs_src_start (): /playbin0/source:
Could not open vfs file "http://i.ytimg.com/vi/9lKUwBCIBzA/default.jpg" for
reading: Generic error Setting pipeline to NULL ...

 

I just tested with both playbin2 and playbin and they work. Do you have a http src element

installed?

 

Try seeing them using

gst-inspect |grep http

 


But when I gave this URL to any browser, it displayed the picture, even when
I used libCurl to download the data from that URL and dumped into a file,
then also I was able to see that picture.

Can anyone tell me, what mistake I made? I think Playbin has support for
http plugins, then why it is unable to play the picture.

Thanks in advance.
--
View this message in context: http://n4.nabble.com/Playbin-unable-to-play-http-stream-tp1561553p1561553.html
Sent from the GStreamer-devel mailing list archive 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
Thiago Sousa Santos

------------------------------------------------------------------------------
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]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


View message @ http://n4.nabble.com/Playbin-unable-to-play-http-stream-tp1561553p1564805.html
To unsubscribe from 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

Reply | Threaded
Open this post in threaded view
|

Re: Playbin unable to play http stream

Debsu
In reply to this post by Thiago Sousa Santos-2
I was trying on another m/c, where soup htp src element is avaiable, but when I tried to display the file:
gst-launch-0.10 -v playbin uri=http://i.ytimg.com/vi/9lKUwBCIBzA/default.jpg

I am getting the following errors:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = text/html
ERROR: from element /GstPlayBin:playbin0/GstSoupHTTPSrc:source: "http://i.ytimg.com/vi/9lKUwBCIBzA/default.jpg": Proxy Authentication Required
Additional debug info:
gstsouphttpsrc.c(980): gst_soup_http_src_parse_status (): /GstPlayBin:playbin0/GstSoupHTTPSrc:source:
407 Proxy Authentication Required
** Message: don't know how to handle text/html
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = NULL
FREEING pipeline ...

But the http_proxy has already set, and when we tried to use curl from command line, we can easily fetch that jpg file.
Regards,
Deb
Reply | Threaded
Open this post in threaded view
|

Re: Playbin unable to play http stream

Tim-Philipp Müller-2
In reply to this post by Debsu
On Mon, 2010-02-22 at 21:54 -0800, Debsu wrote:

> Thanks a lot for pointing out the problem, I checked that http src
> plugins is not installed. But when I was trying to configure my
> gst-plugins-bad-0.10.11, each time it was saying that neonhttpsrc
> would not be built, could you please tell me what exactly I should do?

The souphttpsrc plugin is prefered anyway.

In order to build the neon plugin you will need libneon and the libneon
development headers and files installed (the package is usually called
something like libneon-dev or neon-devel or similar). This needs to work
from the command line and show a version between 0.26.0 and 0.29.99

  pkg-config --modversion neon

If that doesn't work, look if there's a neon.pc file on your system
(usually in /usr/lib/pkgconfig/ or /usr/local/lib/pkgconfig/). If no,
you need to find the package to install that. If yes, you may need to
set the PKG_CONFIG_PATH environment variable to point to the directory
with the neon.pc file before running pkg-config and/or ./configure.

Cheers
 -Tim




------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Playbin unable to play http stream

Debsu
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
Reply | Threaded
Open this post in threaded view
|

Re: Playbin unable to play http stream

Ron McOuat
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&#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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: Playbin unable to play http stream

Debsu

Thank a lot Ron. Actually my requirement is that to set the http proxy in the environment variable, but as you said that souphttpsrc doesn’t read from the environment variable, I need to rethink, whether I use soup or neon. Still I don’t know whether neon is able to read from the env variable or not.

 

In case of Picture playback, when you are getting EOS means gst-launch was able to play, that is sufficient for me. In my case I would pass a window handle to the gstreamer pipeline, on which it overlays the frame, in case of picture it will overlay and until that window is overlaid again that picture will remain in that window as it is stored in the frame buffer.

 

Regards,

Deb

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

Reply | Threaded
Open this post in threaded view
|

Re: Playbin unable to play http stream

Ron McOuat
Hi Deb

I had a look at the libsoup API again and the souphttpsrc sources to
verify some things.

http://library.gnome.org/devel/libsoup/stable/libsoup-client-howto.html

talks about various topics when using libsoup as a client. Near the
bottom of the page is Handling Authentication which is what I added.
However, at about 1/3 of the way down on the page is a section called
Session features and in libsoup-gnome is a SoupProxyResolverGNOME which
will automatically figure out the proxy if libsoup-gnome is available. I
would presume they read environment variables to make this work. The
httpsoupsrc element in gstreamer is a libsoup wrapper that is using the
library to get an HTTP connection to a source device to feed the head of
a gstreamer pipeline.

The page at the following link describes the client functionality in
more detail

http://library.gnome.org/devel/libsoup/stable/SoupSession.html

Just as a test could you set the souphttpsrc properties "proxy" which is
the proxy URI as well as "proxy-id" and "proxy-pw" in your gst-launch to
see if this method of setting the proxy actually works. You might get an
error 407 because the callback is recalled if the authentication fails
and I didn't send again if retry was set because with a static property
and no user dialog prompt I wouldn't have a different answer the second
time around. If retry is set in the callback I just return because the
API says it has already been tried once and failed, the return bubbles
the 407 or 401 error back to the application. I have seen one report
that said this didn't work at all for proxy authentication so there is
that possibility although I don't see what else could be done based on
the API description.

Using libsoup-gnome might be quite restrictive compared to the different
system types gstreamer is available on but then again I use only Gnome
versions of Ubuntu so have no idea how far ranging souphttpsrc is
(Windows, OSX, etc.). It looks like it would be easy to add a property
that enables/disables an option to the session construction to include
the SoupProxyResolverGNOME which would integrate proxy support in a very
transparent way. Does anyone have an objection to this presuming it can
be made to work?

Ron



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: Playbin unable to play http stream

Debsu
In reply to this post by Ron McOuat

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]]
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]
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

Reply | Threaded
Open this post in threaded view
|

Re: Playbin unable to play http stream

Ron McOuat
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]]
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]
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
Sent from the GStreamer-devel mailing list archive 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel