From e4fd51a209713e6115e5ffa089f1a3a8a4ea8522 Mon Sep 17 00:00:00 2001 From: Wouter Cloetens Date: Thu, 29 Nov 2007 10:49:18 +0000 Subject: configure.ac: Bump libsoup requirement as libsoup does not support async client operation prior to version 2.2.104 an... Original commit message from CVS: Patch by: Wouter Cloetens * configure.ac: Bump libsoup requirement as libsoup does not support async client operation prior to version 2.2.104 and it has some leaks. * ext/soup/gstsouphttpsrc.c: (gst_souphttp_src_class_init), (gst_souphttp_src_init), (gst_souphttp_src_dispose), (gst_souphttp_src_set_property), (gst_souphttp_src_create), (gst_souphttp_src_start), (gst_souphttp_src_stop), (gst_souphttp_src_unlock), (gst_souphttp_src_unlock_stop), (gst_souphttp_src_get_size), (soup_got_headers), (soup_got_body), (soup_finished), (soup_got_chunk), (soup_response), (soup_session_close): * ext/soup/gstsouphttpsrc.h: Implement unlock(). Picks up the size from the Content-Length header and emit a duration message. Don't leak the GMainContext object. Fixes #500099. --- ext/soup/gstsouphttpsrc.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'ext/soup/gstsouphttpsrc.h') diff --git a/ext/soup/gstsouphttpsrc.h b/ext/soup/gstsouphttpsrc.h index 71d1a83d..5dca307c 100644 --- a/ext/soup/gstsouphttpsrc.h +++ b/ext/soup/gstsouphttpsrc.h @@ -40,13 +40,16 @@ typedef struct _GstSouphttpSrcClass GstSouphttpSrcClass; struct _GstSouphttpSrc { GstPushSrc element; - gchar *location; /* Full URI. */ - GMainLoop *loop; /* Event loop. */ - SoupSession *session; /* Async context. */ - SoupMessage *msg; /* Request message. */ + gchar * location; /* Full URI. */ + GMainContext * context; /* I/O context. */ + GMainLoop * loop; /* Event loop. */ + SoupSession * session; /* Async context. */ + SoupMessage * msg; /* Request message. */ GstFlowReturn ret; /* Return code from callback. */ - GstBuffer **outbuf; /* Return buffer allocated by callback. */ + GstBuffer ** outbuf; /* Return buffer allocated by callback. */ gboolean interrupted; /* Signal unlock(). */ + gboolean have_size; /* Received and parsed Content-Length header. */ + guint64 content_size; /* Value of Content-Length header. */ }; struct _GstSouphttpSrcClass { -- cgit