2003-07-17 23:04:46 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
*
|
|
|
|
* 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
|
2012-11-03 23:05:09 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2003-07-17 23:04:46 +00:00
|
|
|
*/
|
|
|
|
|
2003-11-07 12:47:02 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
2003-07-17 23:04:46 +00:00
|
|
|
|
2014-11-03 02:47:14 +00:00
|
|
|
#include "gstsocketsrc.h"
|
2004-05-20 10:15:31 +00:00
|
|
|
#include "gsttcpclientsrc.h"
|
|
|
|
#include "gsttcpclientsink.h"
|
|
|
|
#include "gsttcpserversrc.h"
|
|
|
|
#include "gsttcpserversink.h"
|
2012-01-26 09:41:22 +00:00
|
|
|
#include "gstmultifdsink.h"
|
2012-01-16 09:08:24 +00:00
|
|
|
#include "gstmultisocketsink.h"
|
2003-07-17 23:04:46 +00:00
|
|
|
|
2004-08-11 11:42:49 +00:00
|
|
|
GST_DEBUG_CATEGORY (tcp_debug);
|
|
|
|
|
2003-07-17 23:04:46 +00:00
|
|
|
static gboolean
|
2004-03-14 22:34:34 +00:00
|
|
|
plugin_init (GstPlugin * plugin)
|
2003-07-17 23:04:46 +00:00
|
|
|
{
|
2014-11-03 02:47:14 +00:00
|
|
|
if (!gst_element_register (plugin, "socketsrc", GST_RANK_NONE,
|
|
|
|
GST_TYPE_SOCKET_SRC))
|
|
|
|
return FALSE;
|
2004-05-20 10:15:31 +00:00
|
|
|
if (!gst_element_register (plugin, "tcpclientsink", GST_RANK_NONE,
|
2005-12-01 01:21:49 +00:00
|
|
|
GST_TYPE_TCP_CLIENT_SINK))
|
2004-05-20 10:15:31 +00:00
|
|
|
return FALSE;
|
|
|
|
if (!gst_element_register (plugin, "tcpclientsrc", GST_RANK_NONE,
|
2005-12-01 01:21:49 +00:00
|
|
|
GST_TYPE_TCP_CLIENT_SRC))
|
2004-05-20 10:15:31 +00:00
|
|
|
return FALSE;
|
|
|
|
if (!gst_element_register (plugin, "tcpserversink", GST_RANK_NONE,
|
2005-12-01 01:21:49 +00:00
|
|
|
GST_TYPE_TCP_SERVER_SINK))
|
2004-05-20 10:15:31 +00:00
|
|
|
return FALSE;
|
|
|
|
if (!gst_element_register (plugin, "tcpserversrc", GST_RANK_NONE,
|
2005-12-01 01:21:49 +00:00
|
|
|
GST_TYPE_TCP_SERVER_SRC))
|
2004-05-20 10:15:31 +00:00
|
|
|
return FALSE;
|
2012-02-12 21:04:02 +00:00
|
|
|
#ifdef HAVE_SYS_SOCKET_H
|
2012-01-26 09:41:22 +00:00
|
|
|
if (!gst_element_register (plugin, "multifdsink", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MULTI_FD_SINK))
|
|
|
|
return FALSE;
|
2012-02-12 21:04:02 +00:00
|
|
|
#endif
|
2012-01-16 09:08:24 +00:00
|
|
|
if (!gst_element_register (plugin, "multisocketsink", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MULTI_SOCKET_SINK))
|
gst/tcp/: Added multifdsink, made tcpserversink a subclass of fdsink, removed one of the locks, added recovery policy...
Original commit message from CVS:
* gst/tcp/Makefile.am:
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_multifdsink_get_type), (gst_multifdsink_base_init),
(gst_multifdsink_class_init), (gst_multifdsink_init),
(gst_multifdsink_debug_fdset), (gst_multifdsink_client_remove),
(gst_multifdsink_handle_client_read),
(gst_multifdsink_client_queue_data),
(gst_multifdsink_client_queue_caps),
(gst_multifdsink_client_queue_buffer),
(gst_multifdsink_handle_client_write),
(gst_multifdsink_recover_client), (gst_multifdsink_queue_buffer),
(gst_multifdsink_handle_clients), (gst_multifdsink_thread),
(gst_multifdsink_chain), (gst_multifdsink_set_property),
(gst_multifdsink_get_property), (gst_multifdsink_init_send),
(gst_multifdsink_close), (gst_multifdsink_change_state):
* gst/tcp/gstmultifdsink.h:
* gst/tcp/gsttcpplugin.c: (plugin_init):
* gst/tcp/gsttcpserversink.c: (gst_tcpserversink_get_type),
(gst_tcpserversink_class_init), (gst_tcpserversink_init),
(gst_tcpserversink_handle_server_read),
(gst_tcpserversink_handle_select),
(gst_tcpserversink_set_property), (gst_tcpserversink_get_property),
(gst_tcpserversink_init_send), (gst_tcpserversink_close):
* gst/tcp/gsttcpserversink.h:
Added multifdsink, made tcpserversink a subclass of fdsink, removed
one of the locks, added recovery policy to multifdsink.
2004-06-26 16:49:42 +00:00
|
|
|
return FALSE;
|
2004-05-20 10:15:31 +00:00
|
|
|
|
2004-08-11 11:42:49 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (tcp_debug, "tcp", 0, "TCP calls");
|
|
|
|
|
2003-07-17 23:04:46 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
|
|
|
GST_VERSION_MINOR,
|
2012-04-05 13:11:05 +00:00
|
|
|
tcp,
|
2004-03-14 22:34:34 +00:00
|
|
|
"transfer data over the network via TCP",
|
2005-10-16 13:54:44 +00:00
|
|
|
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
|