Commit 92bb41c8 authored by Jan Schmidt's avatar Jan Schmidt
Browse files

Remove soup plugin that's moved to -good (#523124)

Original commit message from CVS:
* configure.ac:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
* docs/plugins/gst-plugins-bad-plugins-sections.txt:
* docs/plugins/gst-plugins-bad-plugins.args:
* docs/plugins/inspect/plugin-soup.xml:
* ext/Makefile.am:
* ext/soup/Makefile.am:
* ext/soup/gstsouphttpsrc.c:
* ext/soup/gstsouphttpsrc.h:
* tests/check/Makefile.am:
* tests/check/elements/souphttpsrc.c:
* tests/check/test-cert.pem:
* tests/check/test-key.pem:
Remove soup plugin that's moved to -good (#523124)
parent d5484250
2008-04-13 Jan Schmidt <jan.schmidt@sun.com>
* configure.ac:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
* docs/plugins/gst-plugins-bad-plugins-sections.txt:
* docs/plugins/gst-plugins-bad-plugins.args:
* docs/plugins/inspect/plugin-soup.xml:
* ext/Makefile.am:
* ext/soup/Makefile.am:
* ext/soup/gstsouphttpsrc.c:
* ext/soup/gstsouphttpsrc.h:
* tests/check/Makefile.am:
* tests/check/elements/souphttpsrc.c:
* tests/check/test-cert.pem:
* tests/check/test-key.pem:
Remove soup plugin that's moved to -good (#523124)
2008-04-12 Tim-Philipp Müller <tim at centricular dot net>
* gst/flv/gstflvparse.c: (gst_flv_parse_metadata_item),
......
......@@ -861,17 +861,6 @@ AG_GST_CHECK_FEATURE(OFA, [ofa plugins], ofa, [
AC_SUBST(OFA_LIBS)
])
dnl *** soup ***
translit(dnm, m, l) AM_CONDITIONAL(USE_SOUP, true)
AG_GST_CHECK_FEATURE(SOUP, [soup http client plugin (2.4)], souphttpsrc, [
PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.3.2, HAVE_SOUP="yes", [
HAVE_SOUP="no"
AC_MSG_RESULT(no)
])
AC_SUBST(SOUP_CFLAGS)
AC_SUBST(SOUP_LIBS)
])
dnl *** timidity ***
translit(dnm, m, l) AM_CONDITIONAL(USE_TIMIDITY, true)
AG_GST_CHECK_FEATURE(TIMIDITY, [timidity midi soft synth plugin], timidity, [
......@@ -1082,7 +1071,6 @@ AM_CONDITIONAL(USE_NAS, false)
AM_CONDITIONAL(USE_NEON, false)
AM_CONDITIONAL(USE_OFA, false)
AM_CONDITIONAL(USE_OSS4, false)
AM_CONDITIONAL(USE_SOUP, false)
AM_CONDITIONAL(USE_SDL, false)
AM_CONDITIONAL(USE_SNDFILE, false)
AM_CONDITIONAL(USE_SOUNDTOUCH, false)
......@@ -1234,7 +1222,6 @@ ext/musicbrainz/Makefile
ext/mythtv/Makefile
ext/neon/Makefile
ext/ofa/Makefile
ext/soup/Makefile
ext/sdl/Makefile
ext/sndfile/Makefile
ext/soundtouch/Makefile
......
......@@ -99,7 +99,6 @@ EXTRA_HFILES = \
$(top_srcdir)/ext/amrwb/gstamrwbparse.h \
$(top_srcdir)/ext/dc1394/gstdc1394.h \
$(top_srcdir)/ext/directfb/dfbvideosink.h \
$(top_srcdir)/ext/soup/gstsouphttpsrc.h \
$(top_srcdir)/ext/ivorbis/vorbisdec.h \
$(top_srcdir)/ext/jack/gstjackaudiosink.h \
$(top_srcdir)/ext/musicbrainz/gsttrm.h \
......
......@@ -42,7 +42,6 @@
<xi:include href="xml/element-sdlaudiosink.xml" />
<xi:include href="xml/element-sdlvideosink.xml" />
<xi:include href="xml/element-sdpdemux.xml" />
<xi:include href="xml/element-souphttpsrc.xml" />
<xi:include href="xml/element-speed.xml" />
<xi:include href="xml/element-speexresample.xml" />
<!--xi:include href="xml/element-theoradecexp.xml" /-->
......@@ -106,7 +105,6 @@
<xi:include href="xml/plugin-selector.xml" />
<xi:include href="xml/plugin-sndfile.xml" />
<xi:include href="xml/plugin-soundtouch.xml" />
<xi:include href="xml/plugin-soup.xml" />
<xi:include href="xml/plugin-spcdec.xml" />
<xi:include href="xml/plugin-speed.xml" />
<xi:include href="xml/plugin-speexresample.xml" />
......
......@@ -154,21 +154,6 @@ FESTIVAL_DEFAULT_SERVER_PORT
FESTIVAL_DEFAULT_TEXT_MODE
</SECTION>
<SECTION>
<FILE>element-souphttpsrc</FILE>
<TITLE>souphttpsrc</TITLE>
GstSoupHTTPSrc
<SUBSECTION Standard>
GstSoupHTTPSrcClass
GST_SOUP_HTTP_SRC
GST_SOUP_HTTP_SRC_CLASS
GST_IS_SOUP_HTTP_SRC
GST_IS_SOUP_HTTP_SRC_CLASS
GST_TYPE_SOUP_HTTP_SRC
gst_soup_http_src_get_type
</SECTION>
<SECTION>
<FILE>element-input-selector</FILE>
<TITLE>input-selector</TITLE>
GstInputSelector
......
......@@ -18408,96 +18408,6 @@
<DEFAULT>10000000</DEFAULT>
</ARG>
<ARG>
<NAME>GstSoupHTTPSrc::location</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Location</NICK>
<BLURB>Location to read from.</BLURB>
<DEFAULT>""</DEFAULT>
</ARG>
<ARG>
<NAME>GstSoupHTTPSrc::iradio-genre</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>r</FLAGS>
<NICK>iradio-genre</NICK>
<BLURB>Genre of the stream.</BLURB>
<DEFAULT>NULL</DEFAULT>
</ARG>
<ARG>
<NAME>GstSoupHTTPSrc::iradio-mode</NAME>
<TYPE>gboolean</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>iradio-mode</NICK>
<BLURB>Enable internet radio mode (extraction of shoutcast/icecast metadata).</BLURB>
<DEFAULT>FALSE</DEFAULT>
</ARG>
<ARG>
<NAME>GstSoupHTTPSrc::iradio-name</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>r</FLAGS>
<NICK>iradio-name</NICK>
<BLURB>Name of the stream.</BLURB>
<DEFAULT>NULL</DEFAULT>
</ARG>
<ARG>
<NAME>GstSoupHTTPSrc::iradio-title</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>r</FLAGS>
<NICK>iradio-title</NICK>
<BLURB>Name of currently playing song.</BLURB>
<DEFAULT>NULL</DEFAULT>
</ARG>
<ARG>
<NAME>GstSoupHTTPSrc::iradio-url</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>r</FLAGS>
<NICK>iradio-url</NICK>
<BLURB>Homepage URL for radio stream.</BLURB>
<DEFAULT>NULL</DEFAULT>
</ARG>
<ARG>
<NAME>GstSoupHTTPSrc::user-agent</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>User-Agent</NICK>
<BLURB>Value of the User-Agent HTTP request header field.</BLURB>
<DEFAULT>"GStreamer souphttpsrc"</DEFAULT>
</ARG>
<ARG>
<NAME>GstSoupHTTPSrc::automatic-redirect</NAME>
<TYPE>gboolean</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>automatic-redirect</NICK>
<BLURB>Automatically follow HTTP redirects (HTTP Status Code 3xx).</BLURB>
<DEFAULT>TRUE</DEFAULT>
</ARG>
<ARG>
<NAME>GstSoupHTTPSrc::proxy</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Proxy</NICK>
<BLURB>HTTP proxy server URI.</BLURB>
<DEFAULT>""</DEFAULT>
</ARG>
<ARG>
<NAME>GstSpeexResample::quality</NAME>
<TYPE>gint</TYPE>
......
<plugin>
<name>soup</name>
<description>libsoup HTTP client src</description>
<filename>../../ext/soup/.libs/libgstsouphttpsrc.so</filename>
<basename>libgstsouphttpsrc.so</basename>
<version>0.10.5.1</version>
<license>LGPL</license>
<source>gst-plugins-bad</source>
<package>GStreamer Bad Plug-ins CVS/prerelease</package>
<origin>Unknown package origin</origin>
<elements>
<element>
<name>souphttpsrc</name>
<longname>HTTP client source</longname>
<class>Source/Network</class>
<description>Receive data as a client over the network via HTTP using SOUP</description>
<author>Wouter Cloetens &lt;wouter@mind.be&gt;</author>
<pads>
<caps>
<name>src</name>
<direction>source</direction>
<presence>always</presence>
<details>ANY</details>
</caps>
</pads>
</element>
</elements>
</plugin>
\ No newline at end of file
......@@ -196,12 +196,6 @@ else
OFA_DIR=
endif
if USE_SOUP
SOUP_DIR=soup
else
SOUP_DIR=
endif
if USE_TIMIDITY
TIMIDITY_DIR=timidity
endif
......@@ -328,7 +322,6 @@ SUBDIRS=\
$(NAS_DIR) \
$(NEON_DIR) \
$(OFA_DIR) \
$(SOUP_DIR) \
$(POLYP_DIR) \
$(SDL_DIR) \
$(SHOUT_DIR) \
......@@ -370,7 +363,6 @@ DIST_SUBDIRS = \
nas \
neon \
ofa \
soup \
sdl \
sndfile \
soundtouch \
......
plugin_LTLIBRARIES = libgstsouphttpsrc.la
libgstsouphttpsrc_la_SOURCES = gstsouphttpsrc.c
libgstsouphttpsrc_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(SOUP_CFLAGS)
libgstsouphttpsrc_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgsttag-@GST_MAJORMINOR@ $(GST_BASE_LIBS) $(SOUP_LIBS)
libgstsouphttpsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstsouphttpsrc.h
This diff is collapsed.
/* GStreamer
* Copyright (C) 2007-2008 Wouter Cloetens <wouter@mind.be>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more
*/
#ifndef __GST_SOUP_HTTP_SRC_H__
#define __GST_SOUP_HTTP_SRC_H__
#include <gst/gst.h>
#include <gst/base/gstpushsrc.h>
#include <glib.h>
G_BEGIN_DECLS
#include <libsoup/soup.h>
#define GST_TYPE_SOUP_HTTP_SRC \
(gst_soup_http_src_get_type())
#define GST_SOUP_HTTP_SRC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SOUP_HTTP_SRC,GstSoupHTTPSrc))
#define GST_SOUP_HTTP_SRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), \
GST_TYPE_SOUP_HTTP_SRC,GstSoupHTTPSrcClass))
#define GST_IS_SOUP_HTTP_SRC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SOUP_HTTP_SRC))
#define GST_IS_SOUP_HTTP_SRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SOUP_HTTP_SRC))
typedef struct _GstSoupHTTPSrc GstSoupHTTPSrc;
typedef struct _GstSoupHTTPSrcClass GstSoupHTTPSrcClass;
typedef enum {
GST_SOUP_HTTP_SRC_SESSION_IO_STATUS_IDLE,
GST_SOUP_HTTP_SRC_SESSION_IO_STATUS_QUEUED,
GST_SOUP_HTTP_SRC_SESSION_IO_STATUS_RUNNING,
} GstSoupHTTPSrcSessionIOStatus;
struct _GstSoupHTTPSrc {
GstPushSrc element;
gchar *location; /* Full URI. */
gchar *user_agent; /* User-Agent HTTP header. */
gboolean automatic_redirect; /* Follow redirects. */
SoupURI *proxy; /* HTTP proxy URI. */
gchar **cookies; /* HTTP request cookies. */
GMainContext *context; /* I/O context. */
GMainLoop *loop; /* Event loop. */
SoupSession *session; /* Async context. */
GstSoupHTTPSrcSessionIOStatus session_io_status;
/* Async I/O status. */
SoupMessage *msg; /* Request message. */
GstFlowReturn ret; /* Return code from callback. */
GstBuffer **outbuf; /* Return buffer allocated by callback. */
gboolean interrupted; /* Signal unlock(). */
gboolean retry; /* Should attempt to reconnect. */
gboolean have_size; /* Received and parsed Content-Length
header. */
guint64 content_size; /* Value of Content-Length header. */
guint64 read_position; /* Current position. */
gboolean seekable; /* FALSE if the server does not support
Range. */
guint64 request_position; /* Seek to this position. */
/* Shoutcast/icecast metadata extraction handling. */
gboolean iradio_mode;
GstCaps *icy_caps;
gchar *iradio_name;
gchar *iradio_genre;
gchar *iradio_url;
gchar *iradio_title;
};
struct _GstSoupHTTPSrcClass {
GstPushSrcClass parent_class;
};
GType gst_soup_http_src_get_type (void);
G_END_DECLS
#endif /* __GST_SOUP_HTTP_SRC_H__ */
......@@ -53,12 +53,6 @@ else
check_ofa =
endif
if USE_SOUP
check_soup = elements/souphttpsrc
else
check_soup =
endif
if USE_TIMIDITY
check_timidity=elements/timidity
else
......@@ -80,7 +74,6 @@ check_PROGRAMS = \
$(check_mplex) \
$(check_neon) \
$(check_ofa) \
$(check_soup) \
$(check_timidity) \
elements/interleave \
elements/rganalysis \
......@@ -99,5 +92,3 @@ LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS)
elements_timidity_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS)
elements_timidity_LDADD = $(GST_BASE_LIBS) $(LDADD)
elements_souphttpsrc_CFLAGS = $(SOUP_CFLAGS) $(AM_CFLAGS)
elements_souphttpsrc_LDADD = $(SOUP_LIBS) $(LDADD)
/* GStreamer unit tests for the souphttpsrc element
* Copyright (C) 2006-2007 Tim-Philipp Müller <tim centricular net>
* Copyright (C) 2008 Wouter Cloetens <wouter@mind.be>
* Copyright (C) 2001-2003, Ximian, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <glib.h>
#include <glib/gprintf.h>
#include <libsoup/soup-address.h>
#include <libsoup/soup-message.h>
#include <libsoup/soup-server.h>
#include <gst/check/gstcheck.h>
static int http_port = 0, https_port = 0;
gboolean redirect = TRUE;
static const char **cookies = NULL;
static int run_server (int *http_port, int *https_port);
static void
handoff_cb (GstElement * fakesink, GstBuffer * buf, GstPad * pad,
GstBuffer ** p_outbuf)
{
GST_LOG ("handoff, buf = %p", buf);
if (*p_outbuf == NULL)
*p_outbuf = gst_buffer_ref (buf);
}
int
run_test (const char *format, ...)
{
GstStateChangeReturn ret;
GstElement *pipe, *src, *sink;
GstBuffer *buf = NULL;
GstMessage *msg;
gchar *url;
va_list args;
int rc = -1;
pipe = gst_pipeline_new (NULL);
src = gst_element_factory_make ("souphttpsrc", NULL);
fail_unless (src != NULL);
sink = gst_element_factory_make ("fakesink", NULL);
fail_unless (sink != NULL);
gst_bin_add (GST_BIN (pipe), src);
gst_bin_add (GST_BIN (pipe), sink);
fail_unless (gst_element_link (src, sink));
if (http_port == 0) {
GST_DEBUG ("failed to start soup http server");
}
fail_unless (http_port != 0);
va_start (args, format);
g_vasprintf (&url, format, args);
va_end (args);
fail_unless (url != NULL);
g_object_set (src, "location", url, NULL);
g_free (url);
g_object_set (src, "automatic-redirect", redirect, NULL);
if (cookies != NULL)
g_object_set (src, "cookies", cookies, NULL);
g_object_set (sink, "signal-handoffs", TRUE, NULL);
g_signal_connect (sink, "preroll-handoff", G_CALLBACK (handoff_cb), &buf);
ret = gst_element_set_state (pipe, GST_STATE_PAUSED);
if (ret != GST_STATE_CHANGE_ASYNC) {
GST_DEBUG ("failed to start up soup http src, ret = %d", ret);
goto done;
}
gst_element_set_state (pipe, GST_STATE_PLAYING);
msg = gst_bus_poll (GST_ELEMENT_BUS (pipe),
GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1);
if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
gchar *debug = NULL;
GError *err = NULL;
gst_message_parse_error (msg, &err, &debug);
GST_INFO ("error: %s", err->message);
if (g_str_has_suffix (err->message, "Not Found"))
rc = 404;
else if (g_str_has_suffix (err->message, "Forbidden"))
rc = 403;
else if (g_str_has_suffix (err->message, "Found"))
rc = 302;
GST_INFO ("debug: %s", debug);
g_error_free (err);
g_free (debug);
gst_message_unref (msg);
goto done;
}
gst_message_unref (msg);
/* don't wait for more than 10 seconds */
ret = gst_element_get_state (pipe, NULL, NULL, 10 * GST_SECOND);
GST_LOG ("ret = %u", ret);
if (buf == NULL) {
/* we want to test the buffer offset, nothing else; if there's a failure
* it might be for lots of reasons (no network connection, whatever), we're
* not interested in those */
GST_DEBUG ("didn't manage to get data within 10 seconds, skipping test");
goto done;
}
GST_DEBUG ("buffer offset = %" G_GUINT64_FORMAT, GST_BUFFER_OFFSET (buf));
/* first buffer should have a 0 offset */
fail_unless (GST_BUFFER_OFFSET (buf) == 0);
gst_buffer_unref (buf);
rc = 0;
done:
gst_element_set_state (pipe, GST_STATE_NULL);
gst_object_unref (pipe);
return rc;
}
GST_START_TEST (test_first_buffer_has_offset)
{
fail_unless (run_test ("http://127.0.0.1:%d/", http_port) == 0);
}
GST_END_TEST;
GST_START_TEST (test_not_found)
{
fail_unless (run_test ("http://127.0.0.1:%d/404", http_port) == 404);
}
GST_END_TEST;
GST_START_TEST (test_forbidden)
{
fail_unless (run_test ("http://127.0.0.1:%d/403", http_port) == 403);
}
GST_END_TEST;
GST_START_TEST (test_redirect_no)
{
redirect = FALSE;
fail_unless (run_test ("http://127.0.0.1:%d/302", http_port) == 302);
}
GST_END_TEST;
GST_START_TEST (test_redirect_yes)
{
redirect = TRUE;
fail_unless (run_test ("http://127.0.0.1:%d/302", http_port) == 0);
}
GST_END_TEST;
GST_START_TEST (test_https)
{
if (!https_port)
GST_INFO ("Failed to start an HTTPS server; let's just skip this test.");
else
fail_unless (run_test ("https://127.0.0.1:%d/", https_port) == 0);
}
GST_END_TEST;
GST_START_TEST (test_cookies)
{
static const char *biscotti[] = { "delacre=yummie", "koekje=lu", NULL };
int rc;
cookies = biscotti;
rc = run_test ("http://127.0.0.1:%d/", http_port);
cookies = NULL;
fail_unless (rc == 0);
}
GST_END_TEST;
static gboolean icy_caps = FALSE;
static void
got_buffer (GstElement * fakesink, GstBuffer * buf, GstPad * pad,
gpointer user_data)
{
GstStructure *s;
/* Caps can be anything if we don't except icy caps */
if (!icy_caps)
return;
/* Otherwise they _must_ be "application/x-icy" */
fail_unless (GST_BUFFER_CAPS (buf) != NULL);
s = gst_caps_get_structure (GST_BUFFER_CAPS (buf), 0);
fail_unless_equals_string (gst_structure_get_name (s), "application/x-icy");
}
GST_START_TEST (test_icy_stream)
{
GstElement *pipe, *src, *sink;
GstMessage *msg;
pipe = gst_pipeline_new (NULL);
src = gst_element_factory_make ("souphttpsrc", NULL);
fail_unless (src != NULL);
g_object_set (src, "iradio-mode", TRUE, NULL);