more borgifying

Original commit message from CVS:
more borgifying
parent f39b4773
2005-12-01 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/tcp/gstmultifdsink.c: (gst_multi_fd_sink_base_init),
(gst_multi_fd_sink_class_init), (gst_multi_fd_sink_init),
(gst_multi_fd_sink_finalize), (gst_multi_fd_sink_add),
(gst_multi_fd_sink_remove), (gst_multi_fd_sink_clear),
(gst_multi_fd_sink_get_stats),
(gst_multi_fd_sink_remove_client_link),
(gst_multi_fd_sink_handle_client_read),
(gst_multi_fd_sink_client_queue_data),
(gst_multi_fd_sink_client_queue_caps),
(gst_multi_fd_sink_client_queue_buffer),
(gst_multi_fd_sink_new_client),
(gst_multi_fd_sink_handle_client_write),
(gst_multi_fd_sink_recover_client),
(gst_multi_fd_sink_queue_buffer),
(gst_multi_fd_sink_handle_clients), (gst_multi_fd_sink_thread),
(gst_multi_fd_sink_render), (gst_multi_fd_sink_set_property),
(gst_multi_fd_sink_get_property), (gst_multi_fd_sink_start),
(gst_multi_fd_sink_stop), (gst_multi_fd_sink_change_state):
* gst/tcp/gstmultifdsink.h:
* gst/tcp/gsttcpclientsink.c: (gst_tcp_client_sink_get_type),
(gst_tcp_client_sink_base_init), (gst_tcp_client_sink_class_init),
(gst_tcp_client_sink_init), (gst_tcp_client_sink_finalize),
(gst_tcp_client_sink_setcaps), (gst_tcp_client_sink_render),
(gst_tcp_client_sink_set_property),
(gst_tcp_client_sink_get_property), (gst_tcp_client_sink_start),
(gst_tcp_client_sink_stop), (gst_tcp_client_sink_change_state):
* gst/tcp/gsttcpclientsink.h:
* gst/tcp/gsttcpclientsrc.c: (gst_tcp_client_src_base_init),
(gst_tcp_client_src_class_init), (gst_tcp_client_src_init),
(gst_tcp_client_src_finalize), (gst_tcp_client_src_getcaps),
(gst_tcp_client_src_create), (gst_tcp_client_src_set_property),
(gst_tcp_client_src_get_property), (gst_tcp_client_src_start),
(gst_tcp_client_src_stop), (gst_tcp_client_src_unlock):
* gst/tcp/gsttcpclientsrc.h:
* gst/tcp/gsttcpplugin.c: (plugin_init):
* gst/tcp/gsttcpserversink.c: (gst_tcp_server_sink_base_init),
(gst_tcp_server_sink_class_init), (gst_tcp_server_sink_init),
(gst_tcp_server_sink_finalize),
(gst_tcp_server_sink_handle_server_read),
(gst_tcp_server_sink_removed), (gst_tcp_server_sink_handle_wait),
(gst_tcp_server_sink_set_property),
(gst_tcp_server_sink_get_property),
(gst_tcp_server_sink_init_send), (gst_tcp_server_sink_close):
* gst/tcp/gsttcpserversink.h:
* gst/tcp/gsttcpserversrc.c: (gst_tcp_server_src_base_init),
(gst_tcp_server_src_class_init), (gst_tcp_server_src_init),
(gst_tcp_server_src_finalize), (gst_tcp_server_src_create),
(gst_tcp_server_src_set_property),
(gst_tcp_server_src_get_property), (gst_tcp_server_src_start),
(gst_tcp_server_src_stop), (gst_tcp_server_src_unlock):
* gst/tcp/gsttcpserversrc.h:
more borgifying
2005-12-01 Thomas Vander Stichele <thomas at apestaart dot org> 2005-12-01 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/plugins/Makefile.am: * docs/plugins/Makefile.am:
......
This diff is collapsed.
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
*/ */
#ifndef __GST_MULTIFDSINK_H__ #ifndef __GST_MULTI_FD_SINK_H__
#define __GST_MULTIFDSINK_H__ #define __GST_MULTI_FD_SINK_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/base/gstbasesink.h> #include <gst/base/gstbasesink.h>
...@@ -30,27 +30,27 @@ G_BEGIN_DECLS ...@@ -30,27 +30,27 @@ G_BEGIN_DECLS
#include "gsttcp.h" #include "gsttcp.h"
#include "gstfdset.h" #include "gstfdset.h"
#define GST_TYPE_MULTIFDSINK \ #define GST_TYPE_MULTI_FD_SINK \
(gst_multifdsink_get_type()) (gst_multi_fd_sink_get_type())
#define GST_MULTIFDSINK(obj) \ #define GST_MULTI_FD_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MULTIFDSINK,GstMultiFdSink)) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MULTI_FD_SINK,GstMultiFdSink))
#define GST_MULTIFDSINK_CLASS(klass) \ #define GST_MULTI_FD_SINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MULTIFDSINK,GstMultiFdSink)) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MULTI_FD_SINK,GstMultiFdSink))
#define GST_IS_MULTIFDSINK(obj) \ #define GST_IS_MULTI_FD_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MULTIFDSINK)) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MULTI_FD_SINK))
#define GST_IS_MULTIFDSINK_CLASS(obj) \ #define GST_IS_MULTI_FD_SINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTIFDSINK)) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTI_FD_SINK))
#define GST_MULTIFDSINK_GET_CLASS(obj) \ #define GST_MULTI_FD_SINK_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_MULTIFDSINK, GstMultiFdSinkClass)) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_MULTI_FD_SINK, GstMultiFdSinkClass))
typedef struct _GstMultiFdSink GstMultiFdSink; typedef struct _GstMultiFdSink GstMultiFdSink;
typedef struct _GstMultiFdSinkClass GstMultiFdSinkClass; typedef struct _GstMultiFdSinkClass GstMultiFdSinkClass;
typedef enum { typedef enum {
GST_MULTIFDSINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0), GST_MULTI_FD_SINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
GST_MULTIFDSINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2), GST_MULTI_FD_SINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
} GstMultiFdSinkFlags; } GstMultiFdSinkFlags;
typedef enum typedef enum
...@@ -180,13 +180,13 @@ struct _GstMultiFdSinkClass { ...@@ -180,13 +180,13 @@ struct _GstMultiFdSinkClass {
void (*client_removed) (GstElement *element, gchar *host, gint fd); void (*client_removed) (GstElement *element, gchar *host, gint fd);
}; };
GType gst_multifdsink_get_type (void); GType gst_multi_fd_sink_get_type (void);
void gst_multifdsink_add (GstMultiFdSink *sink, int fd); void gst_multi_fd_sink_add (GstMultiFdSink *sink, int fd);
void gst_multifdsink_remove (GstMultiFdSink *sink, int fd); void gst_multi_fd_sink_remove (GstMultiFdSink *sink, int fd);
void gst_multifdsink_clear (GstMultiFdSink *sink); void gst_multi_fd_sink_clear (GstMultiFdSink *sink);
GValueArray* gst_multifdsink_get_stats (GstMultiFdSink *sink, int fd); GValueArray* gst_multi_fd_sink_get_stats (GstMultiFdSink *sink, int fd);
G_END_DECLS G_END_DECLS
#endif /* __GST_MULTIFDSINK_H__ */ #endif /* __GST_MULTI_FD_SINK_H__ */
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "gsttcpclientsink.h" #include "gsttcpclientsink.h"
/* elementfactory information */ /* elementfactory information */
static GstElementDetails gst_tcpclientsink_details = static GstElementDetails gst_tcp_client_sink_details =
GST_ELEMENT_DETAILS ("TCP Client sink", GST_ELEMENT_DETAILS ("TCP Client sink",
"Sink/Network", "Sink/Network",
"Send data as a client over the network via TCP", "Send data as a client over the network via TCP",
...@@ -58,29 +58,30 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", ...@@ -58,29 +58,30 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY); GST_STATIC_CAPS_ANY);
static void gst_tcpclientsink_base_init (gpointer g_class); static void gst_tcp_client_sink_base_init (gpointer g_class);
static void gst_tcpclientsink_class_init (GstTCPClientSink * klass); static void gst_tcp_client_sink_class_init (GstTCPClientSink * klass);
static void gst_tcpclientsink_init (GstTCPClientSink * tcpclientsink); static void gst_tcp_client_sink_init (GstTCPClientSink * tcpclientsink);
static void gst_tcpclientsink_finalize (GObject * gobject); static void gst_tcp_client_sink_finalize (GObject * gobject);
static gboolean gst_tcpclientsink_setcaps (GstBaseSink * bsink, GstCaps * caps); static gboolean gst_tcp_client_sink_setcaps (GstBaseSink * bsink,
static GstFlowReturn gst_tcpclientsink_render (GstBaseSink * bsink, GstCaps * caps);
static GstFlowReturn gst_tcp_client_sink_render (GstBaseSink * bsink,
GstBuffer * buf); GstBuffer * buf);
static GstStateChangeReturn gst_tcpclientsink_change_state (GstElement * static GstStateChangeReturn gst_tcp_client_sink_change_state (GstElement *
element, GstStateChange transition); element, GstStateChange transition);
static void gst_tcpclientsink_set_property (GObject * object, guint prop_id, static void gst_tcp_client_sink_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
static void gst_tcpclientsink_get_property (GObject * object, guint prop_id, static void gst_tcp_client_sink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
/*static guint gst_tcpclientsink_signals[LAST_SIGNAL] = { 0 }; */ /*static guint gst_tcp_client_sink_signals[LAST_SIGNAL] = { 0 }; */
GType GType
gst_tcpclientsink_get_type (void) gst_tcp_client_sink_get_type (void)
{ {
static GType tcpclientsink_type = 0; static GType tcpclientsink_type = 0;
...@@ -88,14 +89,14 @@ gst_tcpclientsink_get_type (void) ...@@ -88,14 +89,14 @@ gst_tcpclientsink_get_type (void)
if (!tcpclientsink_type) { if (!tcpclientsink_type) {
static const GTypeInfo tcpclientsink_info = { static const GTypeInfo tcpclientsink_info = {
sizeof (GstTCPClientSinkClass), sizeof (GstTCPClientSinkClass),
gst_tcpclientsink_base_init, gst_tcp_client_sink_base_init,
NULL, NULL,
(GClassInitFunc) gst_tcpclientsink_class_init, (GClassInitFunc) gst_tcp_client_sink_class_init,
NULL, NULL,
NULL, NULL,
sizeof (GstTCPClientSink), sizeof (GstTCPClientSink),
0, 0,
(GInstanceInitFunc) gst_tcpclientsink_init, (GInstanceInitFunc) gst_tcp_client_sink_init,
NULL NULL
}; };
...@@ -107,18 +108,18 @@ gst_tcpclientsink_get_type (void) ...@@ -107,18 +108,18 @@ gst_tcpclientsink_get_type (void)
} }
static void static void
gst_tcpclientsink_base_init (gpointer g_class) gst_tcp_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 (&sinktemplate)); gst_static_pad_template_get (&sinktemplate));
gst_element_class_set_details (element_class, &gst_tcpclientsink_details); gst_element_class_set_details (element_class, &gst_tcp_client_sink_details);
} }
static void static void
gst_tcpclientsink_class_init (GstTCPClientSink * klass) gst_tcp_client_sink_class_init (GstTCPClientSink * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
...@@ -130,9 +131,9 @@ gst_tcpclientsink_class_init (GstTCPClientSink * klass) ...@@ -130,9 +131,9 @@ gst_tcpclientsink_class_init (GstTCPClientSink * klass)
parent_class = g_type_class_ref (GST_TYPE_BASE_SINK); parent_class = g_type_class_ref (GST_TYPE_BASE_SINK);
gobject_class->set_property = gst_tcpclientsink_set_property; gobject_class->set_property = gst_tcp_client_sink_set_property;
gobject_class->get_property = gst_tcpclientsink_get_property; gobject_class->get_property = gst_tcp_client_sink_get_property;
gobject_class->finalize = gst_tcpclientsink_finalize; gobject_class->finalize = gst_tcp_client_sink_finalize;
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HOST, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HOST,
g_param_spec_string ("host", "Host", "The host/IP to send the packets to", g_param_spec_string ("host", "Host", "The host/IP to send the packets to",
...@@ -144,39 +145,39 @@ gst_tcpclientsink_class_init (GstTCPClientSink * klass) ...@@ -144,39 +145,39 @@ gst_tcpclientsink_class_init (GstTCPClientSink * klass)
g_param_spec_enum ("protocol", "Protocol", "The protocol to wrap data in", g_param_spec_enum ("protocol", "Protocol", "The protocol to wrap data in",
GST_TYPE_TCP_PROTOCOL, GST_TCP_PROTOCOL_NONE, G_PARAM_READWRITE)); GST_TYPE_TCP_PROTOCOL, GST_TCP_PROTOCOL_NONE, G_PARAM_READWRITE));
gstelement_class->change_state = gst_tcpclientsink_change_state; gstelement_class->change_state = gst_tcp_client_sink_change_state;
gstbasesink_class->set_caps = gst_tcpclientsink_setcaps; gstbasesink_class->set_caps = gst_tcp_client_sink_setcaps;
gstbasesink_class->render = gst_tcpclientsink_render; gstbasesink_class->render = gst_tcp_client_sink_render;
GST_DEBUG_CATEGORY_INIT (tcpclientsink_debug, "tcpclientsink", 0, "TCP sink"); GST_DEBUG_CATEGORY_INIT (tcpclientsink_debug, "tcpclientsink", 0, "TCP sink");
} }
static void static void
gst_tcpclientsink_init (GstTCPClientSink * this) gst_tcp_client_sink_init (GstTCPClientSink * this)
{ {
this->host = g_strdup (TCP_DEFAULT_HOST); this->host = g_strdup (TCP_DEFAULT_HOST);
this->port = TCP_DEFAULT_PORT; this->port = TCP_DEFAULT_PORT;
this->sock_fd = -1; this->sock_fd = -1;
this->protocol = GST_TCP_PROTOCOL_NONE; this->protocol = GST_TCP_PROTOCOL_NONE;
GST_OBJECT_FLAG_UNSET (this, GST_TCPCLIENTSINK_OPEN); GST_OBJECT_FLAG_UNSET (this, GST_TCP_CLIENT_SINK_OPEN);
} }
static void static void
gst_tcpclientsink_finalize (GObject * gobject) gst_tcp_client_sink_finalize (GObject * gobject)
{ {
GstTCPClientSink *this = GST_TCPCLIENTSINK (gobject); GstTCPClientSink *this = GST_TCP_CLIENT_SINK (gobject);
g_free (this->host); g_free (this->host);
} }
static gboolean static gboolean
gst_tcpclientsink_setcaps (GstBaseSink * bsink, GstCaps * caps) gst_tcp_client_sink_setcaps (GstBaseSink * bsink, GstCaps * caps)
{ {
GstTCPClientSink *sink; GstTCPClientSink *sink;
sink = GST_TCPCLIENTSINK (bsink); sink = GST_TCP_CLIENT_SINK (bsink);
/* write the buffer header if we have one */ /* write the buffer header if we have one */
switch (sink->protocol) { switch (sink->protocol) {
...@@ -216,15 +217,15 @@ gdp_write_error: ...@@ -216,15 +217,15 @@ gdp_write_error:
} }
static GstFlowReturn static GstFlowReturn
gst_tcpclientsink_render (GstBaseSink * bsink, GstBuffer * buf) gst_tcp_client_sink_render (GstBaseSink * bsink, GstBuffer * buf)
{ {
size_t wrote = 0; size_t wrote = 0;
GstTCPClientSink *sink; GstTCPClientSink *sink;
gint size; gint size;
sink = GST_TCPCLIENTSINK (bsink); sink = GST_TCP_CLIENT_SINK (bsink);
g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (sink, GST_TCPCLIENTSINK_OPEN), g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (sink, GST_TCP_CLIENT_SINK_OPEN),
GST_FLOW_WRONG_STATE); GST_FLOW_WRONG_STATE);
size = GST_BUFFER_SIZE (buf); size = GST_BUFFER_SIZE (buf);
...@@ -271,13 +272,13 @@ write_error: ...@@ -271,13 +272,13 @@ write_error:
} }
static void static void
gst_tcpclientsink_set_property (GObject * object, guint prop_id, gst_tcp_client_sink_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec) const GValue * value, GParamSpec * pspec)
{ {
GstTCPClientSink *tcpclientsink; GstTCPClientSink *tcpclientsink;
g_return_if_fail (GST_IS_TCPCLIENTSINK (object)); g_return_if_fail (GST_IS_TCP_CLIENT_SINK (object));
tcpclientsink = GST_TCPCLIENTSINK (object); tcpclientsink = GST_TCP_CLIENT_SINK (object);
switch (prop_id) { switch (prop_id) {
case ARG_HOST: case ARG_HOST:
...@@ -302,13 +303,13 @@ gst_tcpclientsink_set_property (GObject * object, guint prop_id, ...@@ -302,13 +303,13 @@ gst_tcpclientsink_set_property (GObject * object, guint prop_id,
} }
static void static void
gst_tcpclientsink_get_property (GObject * object, guint prop_id, GValue * value, gst_tcp_client_sink_get_property (GObject * object, guint prop_id,
GParamSpec * pspec) GValue * value, GParamSpec * pspec)
{ {
GstTCPClientSink *tcpclientsink; GstTCPClientSink *tcpclientsink;
g_return_if_fail (GST_IS_TCPCLIENTSINK (object)); g_return_if_fail (GST_IS_TCP_CLIENT_SINK (object));
tcpclientsink = GST_TCPCLIENTSINK (object); tcpclientsink = GST_TCP_CLIENT_SINK (object);
switch (prop_id) { switch (prop_id) {
case ARG_HOST: case ARG_HOST:
...@@ -330,12 +331,12 @@ gst_tcpclientsink_get_property (GObject * object, guint prop_id, GValue * value, ...@@ -330,12 +331,12 @@ gst_tcpclientsink_get_property (GObject * object, guint prop_id, GValue * value,
/* create a socket for sending to remote machine */ /* create a socket for sending to remote machine */
static gboolean static gboolean
gst_tcpclientsink_start (GstTCPClientSink * this) gst_tcp_client_sink_start (GstTCPClientSink * this)
{ {
int ret; int ret;
gchar *ip; gchar *ip;
if (GST_OBJECT_FLAG_IS_SET (this, GST_TCPCLIENTSINK_OPEN)) if (GST_OBJECT_FLAG_IS_SET (this, GST_TCP_CLIENT_SINK_OPEN))
return TRUE; return TRUE;
/* reset caps_sent flag */ /* reset caps_sent flag */
...@@ -388,7 +389,7 @@ gst_tcpclientsink_start (GstTCPClientSink * this) ...@@ -388,7 +389,7 @@ gst_tcpclientsink_start (GstTCPClientSink * this)
} }
} }
GST_OBJECT_FLAG_SET (this, GST_TCPCLIENTSINK_OPEN); GST_OBJECT_FLAG_SET (this, GST_TCP_CLIENT_SINK_OPEN);
this->data_written = 0; this->data_written = 0;
...@@ -396,9 +397,9 @@ gst_tcpclientsink_start (GstTCPClientSink * this) ...@@ -396,9 +397,9 @@ gst_tcpclientsink_start (GstTCPClientSink * this)
} }
static gboolean static gboolean
gst_tcpclientsink_stop (GstTCPClientSink * this) gst_tcp_client_sink_stop (GstTCPClientSink * this)
{ {
if (!GST_OBJECT_FLAG_IS_SET (this, GST_TCPCLIENTSINK_OPEN)) if (!GST_OBJECT_FLAG_IS_SET (this, GST_TCP_CLIENT_SINK_OPEN))
return TRUE; return TRUE;
if (this->sock_fd != -1) { if (this->sock_fd != -1) {
...@@ -406,23 +407,24 @@ gst_tcpclientsink_stop (GstTCPClientSink * this) ...@@ -406,23 +407,24 @@ gst_tcpclientsink_stop (GstTCPClientSink * this)
this->sock_fd = -1; this->sock_fd = -1;
} }
GST_OBJECT_FLAG_UNSET (this, GST_TCPCLIENTSINK_OPEN); GST_OBJECT_FLAG_UNSET (this, GST_TCP_CLIENT_SINK_OPEN);
return TRUE; return TRUE;
} }
static GstStateChangeReturn static GstStateChangeReturn
gst_tcpclientsink_change_state (GstElement * element, GstStateChange transition) gst_tcp_client_sink_change_state (GstElement * element,
GstStateChange transition)
{ {
GstTCPClientSink *sink; GstTCPClientSink *sink;
GstStateChangeReturn res; GstStateChangeReturn res;
sink = GST_TCPCLIENTSINK (element); sink = GST_TCP_CLIENT_SINK (element);
switch (transition) { switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY: case GST_STATE_CHANGE_NULL_TO_READY:
case GST_STATE_CHANGE_READY_TO_PAUSED: case GST_STATE_CHANGE_READY_TO_PAUSED:
if (!gst_tcpclientsink_start (GST_TCPCLIENTSINK (element))) if (!gst_tcp_client_sink_start (GST_TCP_CLIENT_SINK (element)))
goto start_failure; goto start_failure;
break; break;
default: default:
...@@ -432,7 +434,7 @@ gst_tcpclientsink_change_state (GstElement * element, GstStateChange transition) ...@@ -432,7 +434,7 @@ gst_tcpclientsink_change_state (GstElement * element, GstStateChange transition)
switch (transition) { switch (transition) {
case GST_STATE_CHANGE_READY_TO_NULL: case GST_STATE_CHANGE_READY_TO_NULL:
gst_tcpclientsink_stop (GST_TCPCLIENTSINK (element)); gst_tcp_client_sink_stop (GST_TCP_CLIENT_SINK (element));
default: default:
break; break;
} }
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
*/ */
#ifndef __GST_TCPCLIENTSINK_H__ #ifndef __GST_TCP_CLIENT_SINK_H__
#define __GST_TCPCLIENTSINK_H__ #define __GST_TCP_CLIENT_SINK_H__
#include <gst/gst.h> #include <gst/gst.h>
...@@ -44,24 +44,24 @@ G_BEGIN_DECLS ...@@ -44,24 +44,24 @@ G_BEGIN_DECLS
#include <arpa/inet.h> #include <arpa/inet.h>
#include "gsttcp.h" #include "gsttcp.h"
#define GST_TYPE_TCPCLIENTSINK \ #define GST_TYPE_TCP_CLIENT_SINK \
(gst_tcpclientsink_get_type()) (gst_tcp_client_sink_get_type())
#define GST_TCPCLIENTSINK(obj) \ #define GST_TCP_CLIENT_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TCPCLIENTSINK,GstTCPClientSink)) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TCP_CLIENT_SINK,GstTCPClientSink))
#define GST_TCPCLIENTSINK_CLASS(klass) \ #define GST_TCP_CLIENT_SINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TCPCLIENTSINK,GstTCPClientSink)) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TCP_CLIENT_SINK,GstTCPClientSink))
#define GST_IS_TCPCLIENTSINK(obj) \ #define GST_IS_TCP_CLIENT_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TCPCLIENTSINK)) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TCP_CLIENT_SINK))
#define GST_IS_TCPCLIENTSINK_CLASS(obj) \ #define GST_IS_TCP_CLIENT_SINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TCPCLIENTSINK)) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TCP_CLIENT_SINK))
typedef struct _GstTCPClientSink GstTCPClientSink; typedef struct _GstTCPClientSink GstTCPClientSink;
typedef struct _GstTCPClientSinkClass GstTCPClientSinkClass; typedef struct _GstTCPClientSinkClass GstTCPClientSinkClass;
typedef enum { typedef enum {
GST_TCPCLIENTSINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0), GST_TCP_CLIENT_SINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
GST_TCPCLIENTSINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2), GST_TCP_CLIENT_SINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
} GstTCPClientSinkFlags; } GstTCPClientSinkFlags;
struct _GstTCPClientSink { struct _GstTCPClientSink {
...@@ -84,8 +84,8 @@ struct _GstTCPClientSinkClass { ...@@ -84,8 +84,8 @@ struct _GstTCPClientSinkClass {
GstBaseSinkClass parent_class; GstBaseSinkClass parent_class;
}; };
GType gst_tcpclientsink_get_type(void); GType gst_tcp_client_sink_get_type(void);
G_END_DECLS G_END_DECLS
#endif /* __GST_TCPCLIENTSINK_H__ */ #endif /* __GST_TCP_CLIENT_SINK_H__ */
...@@ -56,7 +56,7 @@ GST_DEBUG_CATEGORY (tcpclientsrc_debug); ...@@ -56,7 +56,7 @@ GST_DEBUG_CATEGORY (tcpclientsrc_debug);
#define MAX_READ_SIZE 4 * 1024 #define MAX_READ_SIZE 4 * 1024
static GstElementDetails gst_tcpclientsrc_details = static GstElementDetails gst_tcp_client_src_details =
GST_ELEMENT_DETAILS ("TCP Client source", GST_ELEMENT_DETAILS ("TCP Client source",
"Source/Network", "Source/Network",
"Receive data as a client over the network via TCP", "Receive data as a client over the network via TCP",
...@@ -77,39 +77,39 @@ enum ...@@ -77,39 +77,39 @@ enum
}; };
GST_BOILERPLATE (GstTCPClientSrc, gst_tcpclientsrc, GstPushSrc, GST_BOILERPLATE (GstTCPClientSrc, gst_tcp_client_src, GstPushSrc,
GST_TYPE_PUSH_SRC); GST_TYPE_PUSH_SRC);
static void gst_tcpclientsrc_finalize (GObject * gobject); static void gst_tcp_client_src_finalize (GObject * gobject);
static GstCaps *gst_tcpclientsrc_getcaps (GstBaseSrc * psrc); static GstCaps *gst_tcp_client_src_getcaps (GstBaseSrc * psrc);
static GstFlowReturn gst_tcpclientsrc_create (GstPushSrc * psrc, static GstFlowReturn gst_tcp_client_src_create (GstPushSrc * psrc,
GstBuffer ** outbuf); GstBuffer ** outbuf);
static gboolean gst_tcpclientsrc_stop (GstBaseSrc * bsrc); static gboolean gst_tcp_client_src_stop (GstBaseSrc * bsrc);
static gboolean gst_tcpclientsrc_start (GstBaseSrc * bsrc); static gboolean gst_tcp_client_src_start (GstBaseSrc * bsrc);
static gboolean gst_tcpclientsrc_unlock (GstBaseSrc * bsrc); static gboolean gst_tcp_client_src_unlock (GstBaseSrc * bsrc);
static void gst_tcpclientsrc_set_property (GObject * object, guint prop_id, static void gst_tcp_client_src_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
static void gst_tcpclientsrc_get_property (GObject * object, guint prop_id, static void gst_tcp_client_src_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static void static void
gst_tcpclientsrc_base_init (gpointer g_class) gst_tcp_client_src_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 (&srctemplate)); gst_static_pad_template_get (&srctemplate));