After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 510708 - [souphttpsrc] support for libsoup-2.4
[souphttpsrc] support for libsoup-2.4
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal enhancement
: 0.10.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-20 00:50 UTC by Wouter Cloetens
Modified: 2008-02-06 11:07 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
libsoup-2.4 support (26.74 KB, patch)
2008-01-20 00:55 UTC, Wouter Cloetens
none Details | Review
libsoup-2.4 support (26.48 KB, patch)
2008-01-20 01:04 UTC, Wouter Cloetens
none Details | Review
libsoup-2.4 support (25.74 KB, patch)
2008-01-20 13:15 UTC, Wouter Cloetens
none Details | Review
Add unit test. (18.31 KB, patch)
2008-01-22 04:04 UTC, Wouter Cloetens
none Details | Review
libsoup-2.4 support (31.14 KB, patch)
2008-01-22 04:07 UTC, Wouter Cloetens
none Details | Review
libsoup-2.4 support (50.18 KB, patch)
2008-01-29 21:50 UTC, Wouter Cloetens
committed Details | Review
Pick up http_proxy env var. (1.08 KB, patch)
2008-01-30 13:21 UTC, Wouter Cloetens
committed Details | Review
Documentation updates. (3.49 KB, patch)
2008-01-30 14:03 UTC, Wouter Cloetens
committed Details | Review
convert from very butt-ugly style to plain butt-ugly style (39.25 KB, patch)
2008-01-30 21:07 UTC, Wouter Cloetens
committed Details | Review
Fix memory leak. (1.15 KB, patch)
2008-02-06 09:20 UTC, Wouter Cloetens
committed Details | Review

Description Wouter Cloetens 2008-01-20 00:50:44 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.
Comment 1 Wouter Cloetens 2008-01-20 00:55:51 UTC
Created attachment 103230 [details] [review]
libsoup-2.4 support

Support for libsoup-2.4.
Comment 2 Wouter Cloetens 2008-01-20 01:00:59 UTC
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.
Comment 3 Wouter Cloetens 2008-01-20 01:04:22 UTC
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.
Comment 4 Wouter Cloetens 2008-01-20 13:15:16 UTC
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.
Comment 5 Tim-Philipp Müller 2008-01-20 15:59:10 UTC
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.
Comment 6 Wouter Cloetens 2008-01-20 18:30:15 UTC
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?
Comment 7 Wouter Cloetens 2008-01-22 04:04:59 UTC
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.
Comment 8 Wouter Cloetens 2008-01-22 04:07:22 UTC
Created attachment 103392 [details] [review]
libsoup-2.4 support

Add redirection, manual HTTP proxy specification and libsoup-2.4 support.
Comment 9 Wouter Cloetens 2008-01-22 04:14:11 UTC
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?
Comment 10 Tim-Philipp Müller 2008-01-22 09:02:09 UTC
> 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.
Comment 11 Wouter Cloetens 2008-01-22 09:24:06 UTC
> 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.
Comment 12 Wouter Cloetens 2008-01-29 21:50:03 UTC
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.
Comment 13 Wouter Cloetens 2008-01-29 21:58:05 UTC
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?
Comment 14 Sebastian Dröge (slomo) 2008-01-30 13:01:12 UTC
Ok, committed (and raised the rank to marginal and fixed the docs inclusion).
Comment 15 Wouter Cloetens 2008-01-30 13:21:28 UTC
Created attachment 104028 [details] [review]
Pick up http_proxy env var.

Pick up HTTP proxy from http_proxy environment variable.
Comment 16 Wouter Cloetens 2008-01-30 14:03:26 UTC
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.
Comment 17 Wouter Cloetens 2008-01-30 21:07:28 UTC
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.
Comment 18 Wouter Cloetens 2008-02-06 09:20:32 UTC
Created attachment 104543 [details] [review]
Fix memory leak.

Fixes a memory leak that was introduced with support for disabling automatic redirect.