summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorEdgard Lima <edgard.lima@indt.org.br>2006-02-06 20:51:49 +0000
committerEdgard Lima <edgard.lima@indt.org.br>2006-02-06 20:51:49 +0000
commit14a0f2771ed3213c825c8f057dad8bf0b8b4f038 (patch)
treeb5f45124433663f2afa62c9e07aa67e293c3b737 /ext
parent2150a6344600487a50fd26a5f29c836662ba5e7b (diff)
downloadgst-plugins-bad-14a0f2771ed3213c825c8f057dad8bf0b8b4f038.tar.gz
gst-plugins-bad-14a0f2771ed3213c825c8f057dad8bf0b8b4f038.tar.bz2
gst-plugins-bad-14a0f2771ed3213c825c8f057dad8bf0b8b4f038.zip
Now it uses libneon 0.25.5 that supports shoutcast.
Original commit message from CVS: Now it uses libneon 0.25.5 that supports shoutcast.
Diffstat (limited to 'ext')
-rw-r--r--ext/neon/gstneonhttpsrc.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/ext/neon/gstneonhttpsrc.c b/ext/neon/gstneonhttpsrc.c
index 32c1b6d8..44c3594b 100644
--- a/ext/neon/gstneonhttpsrc.c
+++ b/ext/neon/gstneonhttpsrc.c
@@ -51,8 +51,6 @@ enum
static void oom_callback ();
-static void size_header_handler (void *userdata, const char *value);
-
static gboolean set_proxy (const char *uri, ne_uri * parsed,
gboolean set_default);
static gboolean set_uri (const char *uri, ne_uri * parsed, gboolean * ishttps,
@@ -318,6 +316,7 @@ gst_neonhttp_src_start (GstBaseSrc * bsrc)
{
gboolean ret = TRUE;
GstNeonhttpSrc *src = GST_NEONHTTP_SRC (bsrc);
+ const char *content_length;
ne_oom_callback (oom_callback);
@@ -339,14 +338,19 @@ gst_neonhttp_src_start (GstBaseSrc * bsrc)
src->request = ne_request_create (src->session, "GET", src->uri.path);
- ne_add_response_header_handler (src->request, "Content-Length",
- size_header_handler, src);
-
if (NE_OK != ne_begin_request (src->request)) {
ret = FALSE;
goto done;
}
+ content_length = ne_get_response_header (src->request, "Content-Length");
+
+ if (content_length) {
+ src->content_size = atoll (content_length);
+ } else {
+ src->content_size = -1;
+ }
+
GST_OBJECT_FLAG_SET (src, GST_NEONHTTP_SRC_OPEN);
done: