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
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2003-11-07 12:47:02 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
2003-07-17 23:04:46 +00:00
|
|
|
|
|
|
|
#include "gsttcpsrc.h"
|
|
|
|
#include "gsttcpsink.h"
|
2004-05-20 10:15:31 +00:00
|
|
|
#include "gsttcpclientsrc.h"
|
|
|
|
#include "gsttcpclientsink.h"
|
|
|
|
#include "gsttcpserversrc.h"
|
|
|
|
#include "gsttcpserversink.h"
|
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
|
|
|
#include "gstmultifdsink.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
|
|
|
{
|
2004-05-20 10:15:31 +00:00
|
|
|
if (!gst_library_load ("gstdataprotocol"))
|
|
|
|
return FALSE;
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
if (!gst_element_register (plugin, "tcpsink", GST_RANK_NONE,
|
2004-03-15 19:32:28 +00:00
|
|
|
GST_TYPE_TCPSINK))
|
2003-11-02 21:55:15 +00:00
|
|
|
return FALSE;
|
2003-07-17 23:04:46 +00:00
|
|
|
|
2003-11-02 21:55:15 +00:00
|
|
|
if (!gst_element_register (plugin, "tcpsrc", GST_RANK_NONE, GST_TYPE_TCPSRC))
|
|
|
|
return FALSE;
|
2003-07-17 23:04:46 +00:00
|
|
|
|
2004-05-20 10:15:31 +00:00
|
|
|
if (!gst_element_register (plugin, "tcpclientsink", GST_RANK_NONE,
|
|
|
|
GST_TYPE_TCPCLIENTSINK))
|
|
|
|
return FALSE;
|
|
|
|
if (!gst_element_register (plugin, "tcpclientsrc", GST_RANK_NONE,
|
|
|
|
GST_TYPE_TCPCLIENTSRC))
|
|
|
|
return FALSE;
|
|
|
|
if (!gst_element_register (plugin, "tcpserversink", GST_RANK_NONE,
|
|
|
|
GST_TYPE_TCPSERVERSINK))
|
|
|
|
return FALSE;
|
|
|
|
if (!gst_element_register (plugin, "tcpserversrc", GST_RANK_NONE,
|
|
|
|
GST_TYPE_TCPSERVERSRC))
|
|
|
|
return FALSE;
|
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
|
|
|
if (!gst_element_register (plugin, "multifdsink", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MULTIFDSINK))
|
|
|
|
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,
|
|
|
|
"tcp",
|
|
|
|
"transfer data over the network via TCP",
|
|
|
|
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
|