GNOME Bugzilla – Bug 510708
[souphttpsrc] support for libsoup-2.4
Last modified: 2008-02-06 11:07:45 UTC
A new version of libsoup is in the works, scheduled for inclusion in Gnome 2.22. There is considerable API breakage between 2.2 and 2.4: http://mysterion.org/~danw/libsoup-2.4/libsoup-porting-2.2-2.4.html It is also dependent on glib 2.15.3. OTOH, it has Shoutcast support: bug 502325.
Created attachment 103230 [details] [review] libsoup-2.4 support Support for libsoup-2.4.
This is build-time backward compatible with libsoup-2.2. Autoconf rules detect the version of libsoup, expose a version macro, and #ifdef hell handles the rest. Tested with http, https, dav, davs, Shoutcast. Has seek support. This patch is agains CVS HEAD. If somebody commits attachment 103228 [details] [review] to bug 502335, I'll post a new patch here.
Created attachment 103231 [details] [review] libsoup-2.4 support Support for libsoup-2.4. Oh, I just always have to screw up something when I post a patch.
Created attachment 103256 [details] [review] libsoup-2.4 support libsoup-2.4 support. Updated after commit of attachment 103228 [details] [review] [edit] to bug 502335.
Do we really want/need the backwards compatibility with the old API? (If yes, please keep the comment above gst_element_register() until that is dropped). It would also be great if you could fix up the remaining %lld or %llu to use the glib macro.
I fixed the macro; easy enough. I would keep the backwards compatibility around for quite a while, considering that libsoup 2.4 is not yet released and depends on a version of glib that isn't released either. I know it's not pretty... Alternatives are a separation layer and two different files, or two different elements which could even be compiled both at build time if both library versions are available. Now, how about I set the rank to NONE for 2.2 and SECONDARY + 1, PRIMARY, HOLIER_THAN_THE_POPE or whatever for 2.4 which has Shoutcast support?
Created attachment 103391 [details] [review] Add unit test. Add a self-contained souphttpsrc unit test. This test starts an HTTP and HTTPS server. It tests normal operation, redirect, HTTPS and different failure situations, as well as Shoutcast. Supports libsoup-2.2 and libsoup-2.4.
Created attachment 103392 [details] [review] libsoup-2.4 support Add redirection, manual HTTP proxy specification and libsoup-2.4 support.
It's now functionally equivalent to neonhttpsrc. I'd like to make a play to move this to -good in the next window. What I see could still be missing is: - documentation - translation ... and this plug-in does not require a great deal of that. Anything else? Is somebody willing to sponsor this?
> I'd like to make a play to move this to -good in the next window. Even if it's async and mayeb superior to other sources feature-wise, I think moving it to -good in the upcoming cycle already would be a bit rash given how little testing it has received so far.
> I think moving it to -good in the upcoming cycle already would be a bit > rash given how little testing it has received so far. I've used it in two different projects and it's been rigorously tested there, but that's just me. Apart from perhaps expanding the range and depth of the unit test, how do we solve this? 1. It won't gain more widespread adoption if it remains at a low rank, because most people are unaware of its existence. 2. People who use it and have no issues to report, are unlikely to come forward to report success, so we do not even know how widespread its use is.
Created attachment 103986 [details] [review] libsoup-2.4 support Add libsoup-2.4 support. This removes libsoup-2.2 support. Add redirection, manual HTTP proxy specification. Add unit test. Add gtk-doc documentation.
Depends on libsoup-2.4 2.3.0, which needs glib-2.15.3 to build. I cannot for the life of me figure out why it generates a perfectly nice XML file with all the documentation of the element (xml/element-souphttpsrc.xml), but not the corresponding html file. Since libsoup-2.2 support is now removed, the Shoutcast issue is resolved. Should the rank now be bumped up from NONE?
Ok, committed (and raised the rank to marginal and fixed the docs inclusion).
Created attachment 104028 [details] [review] Pick up http_proxy env var. Pick up HTTP proxy from http_proxy environment variable.
Created attachment 104030 [details] [review] Documentation updates. Add HTTP proxy documentation, make code examples more legible. Update plug-in arguments file with automatic-redirect and proxy properties.
Created attachment 104066 [details] [review] convert from very butt-ugly style to plain butt-ugly style Make coding style consistent. Change naming scheme from souphttp to soup_http, Souphttp to SoupHTTP.
Created attachment 104543 [details] [review] Fix memory leak. Fixes a memory leak that was introduced with support for disabling automatic redirect.