[Bug 693911] souphttpsrc: rewrite using new session/request API

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Sep 29 15:33:08 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=693911
  GStreamer | gst-plugins-good | git

Dan Winship <danw> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |danw at gnome.org

--- Comment #3 from Dan Winship <danw at gnome.org> 2013-09-29 22:33:00 UTC ---
(In reply to comment #2)
> As I understand it, we should really rewrite the plugin based on the newer API
> which might also simplify things.

I suspect "might also simplify things" is a huge understatement. souphttpsrc
has to jump through a lot of hoops to turn the old push-based libsoup API into
a pull-based API for gstreamer.

In particular, you could completely get rid of all the callbacks and signal
handlers and GMainContext/GMainLoop fiddling, and just use synchronous I/O
instead. And you don't need to do the chunk allocator stuff, because you can
just g_input_stream_read() directly into your buffers, and (assuming you aren't
using SSL or compression), that operation shouldn't involve any additional
copying of the data (beyond the eventual read(2) call itself).


gst-plugins-good currently requires libsoup >= 2.38 (which was released in
March 2012). You would want to require at least 2.40 (from September 2012; the
request API existed in 2.38, but it was doing the same hacks souphttpsrc does).

With 2.40, you can #define SOUP_USE_UNSTABLE_REQUEST_API, and use SoupRequester
and SoupRequest.

Alternatively, you could bump the requirement to 2.42 (March 2013), and then
you don't need a #define, and you can bypass SoupRequest and use
soup_session_send() (which takes a SoupMessage and returns a GInputStream).

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list