soup: rename souphttpsink to souphttpclientsink

To avoid confusion, and because we might want a server
sink at some point too.

https://bugzilla.gnome.org/show_bug.cgi?id=659947
This commit is contained in:
Tim-Philipp Müller 2011-09-25 15:13:39 +01:00
parent be7cbd4c21
commit 3828537857
4 changed files with 105 additions and 99 deletions

View file

@ -1,10 +1,10 @@
plugin_LTLIBRARIES = libgstsouphttpsrc.la plugin_LTLIBRARIES = libgstsouphttpsrc.la
libgstsouphttpsrc_la_SOURCES = gstsouphttpsrc.c gstsouphttpsink.c gstsoup.c libgstsouphttpsrc_la_SOURCES = gstsouphttpsrc.c gstsouphttpclientsink.c gstsoup.c
libgstsouphttpsrc_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(SOUP_CFLAGS) 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_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgsttag-@GST_MAJORMINOR@ $(GST_BASE_LIBS) $(SOUP_LIBS)
libgstsouphttpsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstsouphttpsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstsouphttpsrc_la_LIBTOOLFLAGS = --tag=disable-static libgstsouphttpsrc_la_LIBTOOLFLAGS = --tag=disable-static
noinst_HEADERS = gstsouphttpsrc.h gstsouphttpsink.h noinst_HEADERS = gstsouphttpsrc.h gstsouphttpclientsink.h

View file

@ -19,7 +19,7 @@
#include <gst/gst-i18n-plugin.h> #include <gst/gst-i18n-plugin.h>
#include "gstsouphttpsrc.h" #include "gstsouphttpsrc.h"
#include "gstsouphttpsink.h" #include "gstsouphttpclientsink.h"
static gboolean static gboolean
@ -34,8 +34,8 @@ plugin_init (GstPlugin * plugin)
gst_element_register (plugin, "souphttpsrc", GST_RANK_PRIMARY, gst_element_register (plugin, "souphttpsrc", GST_RANK_PRIMARY,
GST_TYPE_SOUP_HTTP_SRC); GST_TYPE_SOUP_HTTP_SRC);
gst_element_register (plugin, "souphttpsink", GST_RANK_NONE, gst_element_register (plugin, "souphttpclientsink", GST_RANK_NONE,
GST_TYPE_SOUP_HTTP_SINK); GST_TYPE_SOUP_HTTP_CLIENT_SINK);
return TRUE; return TRUE;
} }

View file

@ -17,16 +17,16 @@
* Boston, MA 02110-1335, USA. * Boston, MA 02110-1335, USA.
*/ */
/** /**
* SECTION:element-gstsouphttpsink * SECTION:element-gstsouphttpclientsink
* *
* The souphttpsink element sends pipeline data to an HTTP server * The souphttpclientsink element sends pipeline data to an HTTP server
* using HTTP PUT commands. * using HTTP PUT commands.
* *
* <refsect2> * <refsect2>
* <title>Example launch line</title> * <title>Example launch line</title>
* |[ * |[
* gst-launch -v videotestsrc num-buffers=300 ! theoraenc ! oggmux ! * gst-launch -v videotestsrc num-buffers=300 ! theoraenc ! oggmux !
* souphttpsink location=http://server/filename.ogv * souphttpclientsink location=http://server/filename.ogv
* ]| * ]|
* *
* This example encodes 10 seconds of video and sends it to the HTTP * This example encodes 10 seconds of video and sends it to the HTTP
@ -40,43 +40,44 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/base/gstbasesink.h> #include <gst/base/gstbasesink.h>
#include "gstsouphttpsink.h" #include "gstsouphttpclientsink.h"
GST_DEBUG_CATEGORY_STATIC (gst_soup_http_sink_debug_category); GST_DEBUG_CATEGORY_STATIC (souphttpclientsink_dbg);
#define GST_CAT_DEFAULT gst_soup_http_sink_debug_category #define GST_CAT_DEFAULT souphttpclientsink_dbg
/* prototypes */ /* prototypes */
static void gst_soup_http_sink_set_property (GObject * object, static void gst_soup_http_client_sink_set_property (GObject * object,
guint property_id, const GValue * value, GParamSpec * pspec); guint property_id, const GValue * value, GParamSpec * pspec);
static void gst_soup_http_sink_get_property (GObject * object, static void gst_soup_http_client_sink_get_property (GObject * object,
guint property_id, GValue * value, GParamSpec * pspec); guint property_id, GValue * value, GParamSpec * pspec);
static void gst_soup_http_sink_dispose (GObject * object); static void gst_soup_http_client_sink_dispose (GObject * object);
static void gst_soup_http_sink_finalize (GObject * object); static void gst_soup_http_client_sink_finalize (GObject * object);
static gboolean gst_soup_http_sink_set_caps (GstBaseSink * sink, static gboolean gst_soup_http_client_sink_set_caps (GstBaseSink * sink,
GstCaps * caps); GstCaps * caps);
static void gst_soup_http_sink_get_times (GstBaseSink * sink, static void gst_soup_http_client_sink_get_times (GstBaseSink * sink,
GstBuffer * buffer, GstClockTime * start, GstClockTime * end); GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
static gboolean gst_soup_http_sink_start (GstBaseSink * sink); static gboolean gst_soup_http_client_sink_start (GstBaseSink * sink);
static gboolean gst_soup_http_sink_stop (GstBaseSink * sink); static gboolean gst_soup_http_client_sink_stop (GstBaseSink * sink);
static gboolean gst_soup_http_sink_unlock (GstBaseSink * sink); static gboolean gst_soup_http_client_sink_unlock (GstBaseSink * sink);
static gboolean gst_soup_http_sink_event (GstBaseSink * sink, GstEvent * event); static gboolean gst_soup_http_client_sink_event (GstBaseSink * sink,
static GstFlowReturn GstEvent * event);
gst_soup_http_sink_preroll (GstBaseSink * sink, GstBuffer * buffer); static GstFlowReturn gst_soup_http_client_sink_preroll (GstBaseSink * sink,
static GstFlowReturn GstBuffer * buffer);
gst_soup_http_sink_render (GstBaseSink * sink, GstBuffer * buffer); static GstFlowReturn gst_soup_http_client_sink_render (GstBaseSink * sink,
GstBuffer * buffer);
static void free_buffer_list (GList * list); static void free_buffer_list (GList * list);
static void gst_soup_http_sink_reset (GstSoupHttpSink * souphttpsink); static void gst_soup_http_client_sink_reset (GstSoupHttpClientSink *
souphttpsink);
static void authenticate (SoupSession * session, SoupMessage * msg, static void authenticate (SoupSession * session, SoupMessage * msg,
SoupAuth * auth, gboolean retrying, gpointer user_data); SoupAuth * auth, gboolean retrying, gpointer user_data);
static void static void callback (SoupSession * session, SoupMessage * msg,
callback (SoupSession * session, SoupMessage * msg, gpointer user_data); gpointer user_data);
static gboolean static gboolean gst_soup_http_client_sink_set_proxy (GstSoupHttpClientSink *
gst_soup_http_sink_set_proxy (GstSoupHttpSink * souphttpsink, souphttpsink, const gchar * uri);
const gchar * uri);
enum enum
{ {
@ -93,11 +94,11 @@ enum
PROP_SESSION PROP_SESSION
}; };
#define DEFAULT_USER_AGENT "GStreamer souphttpsink " #define DEFAULT_USER_AGENT "GStreamer souphttpclientsink "
/* pad templates */ /* pad templates */
static GstStaticPadTemplate gst_soup_http_sink_sink_template = static GstStaticPadTemplate gst_soup_http_client_sink_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
@ -107,19 +108,19 @@ GST_STATIC_PAD_TEMPLATE ("sink",
/* class initialization */ /* class initialization */
#define DEBUG_INIT(bla) \ #define DEBUG_INIT(bla) \
GST_DEBUG_CATEGORY_INIT (gst_soup_http_sink_debug_category, "souphttpsink", 0, \ GST_DEBUG_CATEGORY_INIT (souphttpclientsink_dbg, "souphttpclientsink", 0, \
"debug category for souphttpsink element"); "souphttpclientsink element");
GST_BOILERPLATE_FULL (GstSoupHttpSink, gst_soup_http_sink, GstBaseSink, GST_BOILERPLATE_FULL (GstSoupHttpClientSink, gst_soup_http_client_sink,
GST_TYPE_BASE_SINK, DEBUG_INIT); GstBaseSink, GST_TYPE_BASE_SINK, DEBUG_INIT);
static void static void
gst_soup_http_sink_base_init (gpointer g_class) gst_soup_http_client_sink_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_soup_http_sink_sink_template)); gst_static_pad_template_get (&gst_soup_http_client_sink_sink_template));
gst_element_class_set_details_simple (element_class, "HTTP client sink", gst_element_class_set_details_simple (element_class, "HTTP client sink",
"Generic", "Sends streams to HTTP server via PUT", "Generic", "Sends streams to HTTP server via PUT",
@ -127,26 +128,30 @@ gst_soup_http_sink_base_init (gpointer g_class)
} }
static void static void
gst_soup_http_sink_class_init (GstSoupHttpSinkClass * klass) gst_soup_http_client_sink_class_init (GstSoupHttpClientSinkClass * klass)
{ {
GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstBaseSinkClass *base_sink_class = GST_BASE_SINK_CLASS (klass); GstBaseSinkClass *base_sink_class = GST_BASE_SINK_CLASS (klass);
gobject_class->set_property = gst_soup_http_sink_set_property; gobject_class->set_property = gst_soup_http_client_sink_set_property;
gobject_class->get_property = gst_soup_http_sink_get_property; gobject_class->get_property = gst_soup_http_client_sink_get_property;
gobject_class->dispose = gst_soup_http_sink_dispose; gobject_class->dispose = gst_soup_http_client_sink_dispose;
gobject_class->finalize = gst_soup_http_sink_finalize; gobject_class->finalize = gst_soup_http_client_sink_finalize;
base_sink_class->set_caps = GST_DEBUG_FUNCPTR (gst_soup_http_sink_set_caps); base_sink_class->set_caps =
GST_DEBUG_FUNCPTR (gst_soup_http_client_sink_set_caps);
if (0) if (0)
base_sink_class->get_times = base_sink_class->get_times =
GST_DEBUG_FUNCPTR (gst_soup_http_sink_get_times); GST_DEBUG_FUNCPTR (gst_soup_http_client_sink_get_times);
base_sink_class->start = GST_DEBUG_FUNCPTR (gst_soup_http_sink_start); base_sink_class->start = GST_DEBUG_FUNCPTR (gst_soup_http_client_sink_start);
base_sink_class->stop = GST_DEBUG_FUNCPTR (gst_soup_http_sink_stop); base_sink_class->stop = GST_DEBUG_FUNCPTR (gst_soup_http_client_sink_stop);
base_sink_class->unlock = GST_DEBUG_FUNCPTR (gst_soup_http_sink_unlock); base_sink_class->unlock =
base_sink_class->event = GST_DEBUG_FUNCPTR (gst_soup_http_sink_event); GST_DEBUG_FUNCPTR (gst_soup_http_client_sink_unlock);
base_sink_class->event = GST_DEBUG_FUNCPTR (gst_soup_http_client_sink_event);
if (0) if (0)
base_sink_class->preroll = GST_DEBUG_FUNCPTR (gst_soup_http_sink_preroll); base_sink_class->preroll =
base_sink_class->render = GST_DEBUG_FUNCPTR (gst_soup_http_sink_render); GST_DEBUG_FUNCPTR (gst_soup_http_client_sink_preroll);
base_sink_class->render =
GST_DEBUG_FUNCPTR (gst_soup_http_client_sink_render);
g_object_class_install_property (gobject_class, g_object_class_install_property (gobject_class,
PROP_LOCATION, PROP_LOCATION,
@ -195,8 +200,8 @@ gst_soup_http_sink_class_init (GstSoupHttpSinkClass * klass)
} }
static void static void
gst_soup_http_sink_init (GstSoupHttpSink * souphttpsink, gst_soup_http_client_sink_init (GstSoupHttpClientSink * souphttpsink,
GstSoupHttpSinkClass * souphttpsink_class) GstSoupHttpClientSinkClass * souphttpsink_class)
{ {
const char *proxy; const char *proxy;
@ -213,17 +218,17 @@ gst_soup_http_sink_init (GstSoupHttpSink * souphttpsink,
souphttpsink->prop_session = NULL; souphttpsink->prop_session = NULL;
souphttpsink->timeout = 1; souphttpsink->timeout = 1;
proxy = g_getenv ("http_proxy"); proxy = g_getenv ("http_proxy");
if (proxy && !gst_soup_http_sink_set_proxy (souphttpsink, proxy)) { if (proxy && !gst_soup_http_client_sink_set_proxy (souphttpsink, proxy)) {
GST_WARNING_OBJECT (souphttpsink, GST_WARNING_OBJECT (souphttpsink,
"The proxy in the http_proxy env var (\"%s\") cannot be parsed.", "The proxy in the http_proxy env var (\"%s\") cannot be parsed.",
proxy); proxy);
} }
gst_soup_http_sink_reset (souphttpsink); gst_soup_http_client_sink_reset (souphttpsink);
} }
static void static void
gst_soup_http_sink_reset (GstSoupHttpSink * souphttpsink) gst_soup_http_client_sink_reset (GstSoupHttpClientSink * souphttpsink)
{ {
g_free (souphttpsink->reason_phrase); g_free (souphttpsink->reason_phrase);
souphttpsink->reason_phrase = NULL; souphttpsink->reason_phrase = NULL;
@ -233,7 +238,8 @@ gst_soup_http_sink_reset (GstSoupHttpSink * souphttpsink)
} }
static gboolean static gboolean
gst_soup_http_sink_set_proxy (GstSoupHttpSink * souphttpsink, const gchar * uri) gst_soup_http_client_sink_set_proxy (GstSoupHttpClientSink * souphttpsink,
const gchar * uri)
{ {
if (souphttpsink->proxy) { if (souphttpsink->proxy) {
soup_uri_free (souphttpsink->proxy); soup_uri_free (souphttpsink->proxy);
@ -252,10 +258,10 @@ gst_soup_http_sink_set_proxy (GstSoupHttpSink * souphttpsink, const gchar * uri)
} }
void void
gst_soup_http_sink_set_property (GObject * object, guint property_id, gst_soup_http_client_sink_set_property (GObject * object, guint property_id,
const GValue * value, GParamSpec * pspec) const GValue * value, GParamSpec * pspec)
{ {
GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (object); GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (object);
g_mutex_lock (souphttpsink->mutex); g_mutex_lock (souphttpsink->mutex);
switch (property_id) { switch (property_id) {
@ -303,7 +309,7 @@ gst_soup_http_sink_set_property (GObject * object, guint property_id,
GST_WARNING ("proxy property cannot be NULL"); GST_WARNING ("proxy property cannot be NULL");
goto done; goto done;
} }
if (!gst_soup_http_sink_set_proxy (souphttpsink, proxy)) { if (!gst_soup_http_client_sink_set_proxy (souphttpsink, proxy)) {
GST_WARNING ("badly formatted proxy URI"); GST_WARNING ("badly formatted proxy URI");
goto done; goto done;
} }
@ -322,10 +328,10 @@ done:
} }
void void
gst_soup_http_sink_get_property (GObject * object, guint property_id, gst_soup_http_client_sink_get_property (GObject * object, guint property_id,
GValue * value, GParamSpec * pspec) GValue * value, GParamSpec * pspec)
{ {
GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (object); GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (object);
switch (property_id) { switch (property_id) {
case PROP_SESSION: case PROP_SESSION:
@ -372,9 +378,9 @@ gst_soup_http_sink_get_property (GObject * object, guint property_id,
} }
void void
gst_soup_http_sink_dispose (GObject * object) gst_soup_http_client_sink_dispose (GObject * object)
{ {
GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (object); GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (object);
/* clean up as possible. may be called multiple times */ /* clean up as possible. may be called multiple times */
if (souphttpsink->prop_session) if (souphttpsink->prop_session)
@ -385,9 +391,9 @@ gst_soup_http_sink_dispose (GObject * object)
} }
void void
gst_soup_http_sink_finalize (GObject * object) gst_soup_http_client_sink_finalize (GObject * object)
{ {
GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (object); GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (object);
/* clean up object here */ /* clean up object here */
@ -409,9 +415,9 @@ gst_soup_http_sink_finalize (GObject * object)
static gboolean static gboolean
gst_soup_http_sink_set_caps (GstBaseSink * sink, GstCaps * caps) gst_soup_http_client_sink_set_caps (GstBaseSink * sink, GstCaps * caps)
{ {
GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (sink); GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (sink);
GstStructure *structure; GstStructure *structure;
const GValue *value_array; const GValue *value_array;
int i, n; int i, n;
@ -438,7 +444,7 @@ gst_soup_http_sink_set_caps (GstBaseSink * sink, GstCaps * caps)
} }
static void static void
gst_soup_http_sink_get_times (GstBaseSink * sink, GstBuffer * buffer, gst_soup_http_client_sink_get_times (GstBaseSink * sink, GstBuffer * buffer,
GstClockTime * start, GstClockTime * end) GstClockTime * start, GstClockTime * end)
{ {
@ -447,7 +453,7 @@ gst_soup_http_sink_get_times (GstBaseSink * sink, GstBuffer * buffer,
static gpointer static gpointer
thread_func (gpointer ptr) thread_func (gpointer ptr)
{ {
GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (ptr); GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (ptr);
GST_DEBUG ("thread start"); GST_DEBUG ("thread start");
@ -460,9 +466,9 @@ thread_func (gpointer ptr)
} }
static gboolean static gboolean
gst_soup_http_sink_start (GstBaseSink * sink) gst_soup_http_client_sink_start (GstBaseSink * sink)
{ {
GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (sink); GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (sink);
if (souphttpsink->prop_session) { if (souphttpsink->prop_session) {
souphttpsink->session = souphttpsink->prop_session; souphttpsink->session = souphttpsink->prop_session;
@ -491,9 +497,9 @@ gst_soup_http_sink_start (GstBaseSink * sink)
} }
static gboolean static gboolean
gst_soup_http_sink_stop (GstBaseSink * sink) gst_soup_http_client_sink_stop (GstBaseSink * sink)
{ {
GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (sink); GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (sink);
GST_DEBUG ("stop"); GST_DEBUG ("stop");
@ -513,13 +519,13 @@ gst_soup_http_sink_stop (GstBaseSink * sink)
souphttpsink->context = NULL; souphttpsink->context = NULL;
} }
gst_soup_http_sink_reset (souphttpsink); gst_soup_http_client_sink_reset (souphttpsink);
return TRUE; return TRUE;
} }
static gboolean static gboolean
gst_soup_http_sink_unlock (GstBaseSink * sink) gst_soup_http_client_sink_unlock (GstBaseSink * sink)
{ {
GST_DEBUG ("unlock"); GST_DEBUG ("unlock");
@ -527,9 +533,9 @@ gst_soup_http_sink_unlock (GstBaseSink * sink)
} }
static gboolean static gboolean
gst_soup_http_sink_event (GstBaseSink * sink, GstEvent * event) gst_soup_http_client_sink_event (GstBaseSink * sink, GstEvent * event)
{ {
GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (sink); GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (sink);
GST_DEBUG_OBJECT (souphttpsink, "event"); GST_DEBUG_OBJECT (souphttpsink, "event");
@ -548,7 +554,7 @@ gst_soup_http_sink_event (GstBaseSink * sink, GstEvent * event)
} }
static GstFlowReturn static GstFlowReturn
gst_soup_http_sink_preroll (GstBaseSink * sink, GstBuffer * buffer) gst_soup_http_client_sink_preroll (GstBaseSink * sink, GstBuffer * buffer)
{ {
GST_DEBUG ("preroll"); GST_DEBUG ("preroll");
@ -567,7 +573,7 @@ free_buffer_list (GList * list)
} }
static void static void
send_message_locked (GstSoupHttpSink * souphttpsink) send_message_locked (GstSoupHttpClientSink * souphttpsink)
{ {
GList *g; GList *g;
guint64 n; guint64 n;
@ -636,7 +642,7 @@ send_message_locked (GstSoupHttpSink * souphttpsink)
} }
static gboolean static gboolean
send_message (GstSoupHttpSink * souphttpsink) send_message (GstSoupHttpClientSink * souphttpsink)
{ {
g_mutex_lock (souphttpsink->mutex); g_mutex_lock (souphttpsink->mutex);
send_message_locked (souphttpsink); send_message_locked (souphttpsink);
@ -648,7 +654,7 @@ send_message (GstSoupHttpSink * souphttpsink)
static void static void
callback (SoupSession * session, SoupMessage * msg, gpointer user_data) callback (SoupSession * session, SoupMessage * msg, gpointer user_data)
{ {
GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (user_data); GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (user_data);
GST_DEBUG_OBJECT (souphttpsink, "callback status=%d %s", GST_DEBUG_OBJECT (souphttpsink, "callback status=%d %s",
msg->status_code, msg->reason_phrase); msg->status_code, msg->reason_phrase);
@ -672,9 +678,9 @@ callback (SoupSession * session, SoupMessage * msg, gpointer user_data)
} }
static GstFlowReturn static GstFlowReturn
gst_soup_http_sink_render (GstBaseSink * sink, GstBuffer * buffer) gst_soup_http_client_sink_render (GstBaseSink * sink, GstBuffer * buffer)
{ {
GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (sink); GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (sink);
GSource *source; GSource *source;
gboolean wake; gboolean wake;
@ -710,7 +716,7 @@ static void
authenticate (SoupSession * session, SoupMessage * msg, authenticate (SoupSession * session, SoupMessage * msg,
SoupAuth * auth, gboolean retrying, gpointer user_data) SoupAuth * auth, gboolean retrying, gpointer user_data)
{ {
GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (user_data); GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (user_data);
if (!retrying) { if (!retrying) {
if (souphttpsink->user_id && souphttpsink->user_pw) { if (souphttpsink->user_id && souphttpsink->user_pw) {

View file

@ -1,5 +1,5 @@
/* GStreamer /* GStreamer
* Copyright (C) 2011 FIXME <fixme@example.com> * Copyright (C) 2011 David Schleef <ds@entropywave.com>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
@ -17,24 +17,24 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifndef _GST_SOUP_HTTP_SINK_H_ #ifndef _GST_SOUP_HTTP_CLIENT_SINK_H_
#define _GST_SOUP_HTTP_SINK_H_ #define _GST_SOUP_HTTP_CLIENT_SINK_H_
#include <gst/base/gstbasesink.h> #include <gst/base/gstbasesink.h>
#include <libsoup/soup.h> #include <libsoup/soup.h>
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_SOUP_HTTP_SINK (gst_soup_http_sink_get_type()) #define GST_TYPE_SOUP_HTTP_CLIENT_SINK (gst_soup_http_client_sink_get_type())
#define GST_SOUP_HTTP_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SOUP_HTTP_SINK,GstSoupHttpSink)) #define GST_SOUP_HTTP_CLIENT_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SOUP_HTTP_CLIENT_SINK,GstSoupHttpClientSink))
#define GST_SOUP_HTTP_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SOUP_HTTP_SINK,GstSoupHttpSinkClass)) #define GST_SOUP_HTTP_CLIENT_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SOUP_HTTP_CLIENT_SINK,GstSoupHttpClientSinkClass))
#define GST_IS_SOUP_HTTP_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SOUP_HTTP_SINK)) #define GST_IS_SOUP_HTTP_CLIENT_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SOUP_HTTP_CLIENT_SINK))
#define GST_IS_SOUP_HTTP_SINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SOUP_HTTP_SINK)) #define GST_IS_SOUP_HTTP_CLIENT_SINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SOUP_HTTP_CLIENT_SINK))
typedef struct _GstSoupHttpSink GstSoupHttpSink; typedef struct _GstSoupHttpClientSink GstSoupHttpClientSink;
typedef struct _GstSoupHttpSinkClass GstSoupHttpSinkClass; typedef struct _GstSoupHttpClientSinkClass GstSoupHttpClientSinkClass;
struct _GstSoupHttpSink struct _GstSoupHttpClientSink
{ {
GstBaseSink base_souphttpsink; GstBaseSink base_souphttpsink;
@ -69,12 +69,12 @@ struct _GstSoupHttpSink
}; };
struct _GstSoupHttpSinkClass struct _GstSoupHttpClientSinkClass
{ {
GstBaseSinkClass base_souphttpsink_class; GstBaseSinkClass base_souphttpsink_class;
}; };
GType gst_soup_http_sink_get_type (void); GType gst_soup_http_client_sink_get_type (void);
G_END_DECLS G_END_DECLS