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

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat May 14 14:58:36 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=693911

--- Comment #6 from Dan Winship <danw at gnome.org> ---
Awesome... skimming the diff I see a few possible problems:

>-          soup_session_async_new_with_options (SOUP_SESSION_ASYNC_CONTEXT,
>+          soup_session_new_with_options (SOUP_SESSION_USER_AGENT,

Be sure to read
https://developer.gnome.org/libsoup/stable/libsoup-session-porting.html. In
particular, you don't need to add a SOUP_TYPE_PROXY_RESOLVER_DEFAULT feature
any more, since that's the default behavior (if you don't set
SOUP_SESSION_PROXY_URI), and you don't need to add a SOUP_TYPE_CONTENT_DECODER
(though you still want to remove the automatically-added one if !src->compress)

(OK, neither of those are actually *problems*, they're just places where the
code is doing stuff it doesn't have to do any more.)

>+  src->input_stream =
>+      soup_session_send (src->session, src->msg, src->cancellable, NULL);
>+  gst_soup_http_src_got_headers (src, src->msg);

That won't do the right thing if the message fails or is cancelled before
reading the headers. Note that in the old code, "got-headers" wouldn't be
emitted in that case and it would go right to "finished". So some of the error
checking code that used to be in gst_soup_http_src_finished_cb() needs to
happen before you call gst_soup_http_src_got_headers().

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