gst/tcp/gstmultifdsink.c: Convert to use the boilerplate macro.
Original commit message from CVS: 2005-10-17 Andy Wingo <wingo@pobox.com> * gst/tcp/gstmultifdsink.c: Convert to use the boilerplate macro. * gst/tcp/gsttcp.c (gst_tcp_socket_read): Comment update.
This commit is contained in:
parent
29f8d1890b
commit
afea379ffd
@ -1,5 +1,9 @@
|
|||||||
2005-10-17 Andy Wingo <wingo@pobox.com>
|
2005-10-17 Andy Wingo <wingo@pobox.com>
|
||||||
|
|
||||||
|
* gst/tcp/gstmultifdsink.c: Convert to use the boilerplate macro.
|
||||||
|
|
||||||
|
* gst/tcp/gsttcp.c (gst_tcp_socket_read): Comment update.
|
||||||
|
|
||||||
* ext/theora/theoraenc.c (theora_buffer_from_packet): Pass the
|
* ext/theora/theoraenc.c (theora_buffer_from_packet): Pass the
|
||||||
alloc_buffer flow return to callers.
|
alloc_buffer flow return to callers.
|
||||||
(theora_enc_chain, theora_enc_chain): Adapt to buffer_from_packet
|
(theora_enc_chain, theora_enc_chain): Adapt to buffer_from_packet
|
||||||
|
@ -218,9 +218,6 @@ gst_client_status_get_type (void)
|
|||||||
return client_status_type;
|
return client_status_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gst_multifdsink_base_init (gpointer g_class);
|
|
||||||
static void gst_multifdsink_class_init (GstMultiFdSinkClass * klass);
|
|
||||||
static void gst_multifdsink_init (GstMultiFdSink * multifdsink);
|
|
||||||
static void gst_multifdsink_finalize (GObject * object);
|
static void gst_multifdsink_finalize (GObject * object);
|
||||||
|
|
||||||
static void gst_multifdsink_remove_client_link (GstMultiFdSink * sink,
|
static void gst_multifdsink_remove_client_link (GstMultiFdSink * sink,
|
||||||
@ -237,36 +234,12 @@ static void gst_multifdsink_get_property (GObject * object, guint prop_id,
|
|||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
GST_BOILERPLATE (GstMultiFdSink, gst_multifdsink, GstBaseSink,
|
||||||
|
GST_TYPE_BASE_SINK);
|
||||||
|
|
||||||
|
|
||||||
static guint gst_multifdsink_signals[LAST_SIGNAL] = { 0 };
|
static guint gst_multifdsink_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
GType
|
|
||||||
gst_multifdsink_get_type (void)
|
|
||||||
{
|
|
||||||
static GType multifdsink_type = 0;
|
|
||||||
|
|
||||||
|
|
||||||
if (!multifdsink_type) {
|
|
||||||
static const GTypeInfo multifdsink_info = {
|
|
||||||
sizeof (GstMultiFdSinkClass),
|
|
||||||
gst_multifdsink_base_init,
|
|
||||||
NULL,
|
|
||||||
(GClassInitFunc) gst_multifdsink_class_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
sizeof (GstMultiFdSink),
|
|
||||||
0,
|
|
||||||
(GInstanceInitFunc) gst_multifdsink_init,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
multifdsink_type =
|
|
||||||
g_type_register_static (GST_TYPE_BASE_SINK, "GstMultiFdSink",
|
|
||||||
&multifdsink_info, 0);
|
|
||||||
}
|
|
||||||
return multifdsink_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_multifdsink_base_init (gpointer g_class)
|
gst_multifdsink_base_init (gpointer g_class)
|
||||||
@ -290,8 +263,6 @@ gst_multifdsink_class_init (GstMultiFdSinkClass * klass)
|
|||||||
gstelement_class = (GstElementClass *) klass;
|
gstelement_class = (GstElementClass *) klass;
|
||||||
gstbasesink_class = (GstBaseSinkClass *) klass;
|
gstbasesink_class = (GstBaseSinkClass *) klass;
|
||||||
|
|
||||||
parent_class = g_type_class_ref (GST_TYPE_BASE_SINK);
|
|
||||||
|
|
||||||
gobject_class->set_property = gst_multifdsink_set_property;
|
gobject_class->set_property = gst_multifdsink_set_property;
|
||||||
gobject_class->get_property = gst_multifdsink_get_property;
|
gobject_class->get_property = gst_multifdsink_get_property;
|
||||||
gobject_class->finalize = gst_multifdsink_finalize;
|
gobject_class->finalize = gst_multifdsink_finalize;
|
||||||
@ -444,7 +415,7 @@ gst_multifdsink_class_init (GstMultiFdSinkClass * klass)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_multifdsink_init (GstMultiFdSink * this)
|
gst_multifdsink_init (GstMultiFdSink * this, GstMultiFdSinkClass * klass)
|
||||||
{
|
{
|
||||||
GST_OBJECT_FLAG_UNSET (this, GST_MULTIFDSINK_OPEN);
|
GST_OBJECT_FLAG_UNSET (this, GST_MULTIFDSINK_OPEN);
|
||||||
|
|
||||||
|
@ -124,11 +124,8 @@ gst_tcp_socket_write (int socket, const void *buf, size_t count)
|
|||||||
return bytes_written;
|
return bytes_written;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read number of bytes from a socket into a given buffer incrementally.
|
/* atomically read count bytes into buf, cancellable. return val of GST_FLOW_OK
|
||||||
* Returns number of bytes read with same semantics as read(2):
|
* indicates success, anything else is failure.
|
||||||
* < 0: error, see errno
|
|
||||||
* = 0: EOF
|
|
||||||
* > 0: bytes read
|
|
||||||
*/
|
*/
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_tcp_socket_read (GstElement * this, int socket, void *buf, size_t count,
|
gst_tcp_socket_read (GstElement * this, int socket, void *buf, size_t count,
|
||||||
|
@ -59,9 +59,6 @@ enum
|
|||||||
ARG_PORT,
|
ARG_PORT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void gst_tcpserversink_base_init (gpointer g_class);
|
|
||||||
static void gst_tcpserversink_class_init (GstTCPServerSink * klass);
|
|
||||||
static void gst_tcpserversink_init (GstTCPServerSink * tcpserversink);
|
|
||||||
static void gst_tcpserversink_finalize (GObject * gobject);
|
static void gst_tcpserversink_finalize (GObject * gobject);
|
||||||
|
|
||||||
static gboolean gst_tcpserversink_handle_wait (GstMultiFdSink * sink,
|
static gboolean gst_tcpserversink_handle_wait (GstMultiFdSink * sink,
|
||||||
@ -76,34 +73,9 @@ static void gst_tcpserversink_get_property (GObject * object, guint prop_id,
|
|||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
|
||||||
|
|
||||||
static GstMultiFdSinkClass *parent_class = NULL;
|
GST_BOILERPLATE (GstTCPServerSink, gst_tcpserversink, GstMultiFdSink,
|
||||||
|
GST_TYPE_MULTIFDSINK);
|
||||||
|
|
||||||
GType
|
|
||||||
gst_tcpserversink_get_type (void)
|
|
||||||
{
|
|
||||||
static GType tcpserversink_type = 0;
|
|
||||||
|
|
||||||
|
|
||||||
if (!tcpserversink_type) {
|
|
||||||
static const GTypeInfo tcpserversink_info = {
|
|
||||||
sizeof (GstTCPServerSinkClass),
|
|
||||||
gst_tcpserversink_base_init,
|
|
||||||
NULL,
|
|
||||||
(GClassInitFunc) gst_tcpserversink_class_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
sizeof (GstTCPServerSink),
|
|
||||||
0,
|
|
||||||
(GInstanceInitFunc) gst_tcpserversink_init,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
tcpserversink_type =
|
|
||||||
g_type_register_static (GST_TYPE_MULTIFDSINK, "GstTCPServerSink",
|
|
||||||
&tcpserversink_info, 0);
|
|
||||||
}
|
|
||||||
return tcpserversink_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_tcpserversink_base_init (gpointer g_class)
|
gst_tcpserversink_base_init (gpointer g_class)
|
||||||
@ -114,18 +86,14 @@ gst_tcpserversink_base_init (gpointer g_class)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_tcpserversink_class_init (GstTCPServerSink * klass)
|
gst_tcpserversink_class_init (GstTCPServerSinkClass * klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class;
|
GObjectClass *gobject_class;
|
||||||
GstElementClass *gstelement_class;
|
|
||||||
GstMultiFdSinkClass *gstmultifdsink_class;
|
GstMultiFdSinkClass *gstmultifdsink_class;
|
||||||
|
|
||||||
gobject_class = (GObjectClass *) klass;
|
gobject_class = (GObjectClass *) klass;
|
||||||
gstelement_class = (GstElementClass *) klass;
|
|
||||||
gstmultifdsink_class = (GstMultiFdSinkClass *) klass;
|
gstmultifdsink_class = (GstMultiFdSinkClass *) klass;
|
||||||
|
|
||||||
parent_class = g_type_class_ref (GST_TYPE_MULTIFDSINK);
|
|
||||||
|
|
||||||
gobject_class->set_property = gst_tcpserversink_set_property;
|
gobject_class->set_property = gst_tcpserversink_set_property;
|
||||||
gobject_class->get_property = gst_tcpserversink_get_property;
|
gobject_class->get_property = gst_tcpserversink_get_property;
|
||||||
gobject_class->finalize = gst_tcpserversink_finalize;
|
gobject_class->finalize = gst_tcpserversink_finalize;
|
||||||
@ -146,7 +114,7 @@ gst_tcpserversink_class_init (GstTCPServerSink * klass)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_tcpserversink_init (GstTCPServerSink * this)
|
gst_tcpserversink_init (GstTCPServerSink * this, GstTCPServerSinkClass * klass)
|
||||||
{
|
{
|
||||||
this->server_port = TCP_DEFAULT_PORT;
|
this->server_port = TCP_DEFAULT_PORT;
|
||||||
/* should support as minimum 576 for IPV4 and 1500 for IPV6 */
|
/* should support as minimum 576 for IPV4 and 1500 for IPV6 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user