1 /* GStreamer
2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23
24 #include "gstsocketsrc.h"
25 #include "gsttcpclientsrc.h"
26 #include "gsttcpclientsink.h"
27 #include "gsttcpserversrc.h"
28 #include "gsttcpserversink.h"
29 #include "gstmultifdsink.h"
30 #include "gstmultisocketsink.h"
31
32 GST_DEBUG_CATEGORY (tcp_debug);
33
34 static gboolean
plugin_init(GstPlugin * plugin)35 plugin_init (GstPlugin * plugin)
36 {
37 if (!gst_element_register (plugin, "socketsrc", GST_RANK_NONE,
38 GST_TYPE_SOCKET_SRC))
39 return FALSE;
40 if (!gst_element_register (plugin, "tcpclientsink", GST_RANK_NONE,
41 GST_TYPE_TCP_CLIENT_SINK))
42 return FALSE;
43 if (!gst_element_register (plugin, "tcpclientsrc", GST_RANK_NONE,
44 GST_TYPE_TCP_CLIENT_SRC))
45 return FALSE;
46 if (!gst_element_register (plugin, "tcpserversink", GST_RANK_NONE,
47 GST_TYPE_TCP_SERVER_SINK))
48 return FALSE;
49 if (!gst_element_register (plugin, "tcpserversrc", GST_RANK_NONE,
50 GST_TYPE_TCP_SERVER_SRC))
51 return FALSE;
52 #ifdef HAVE_SYS_SOCKET_H
53 if (!gst_element_register (plugin, "multifdsink", GST_RANK_NONE,
54 GST_TYPE_MULTI_FD_SINK))
55 return FALSE;
56 #endif
57 if (!gst_element_register (plugin, "multisocketsink", GST_RANK_NONE,
58 GST_TYPE_MULTI_SOCKET_SINK))
59 return FALSE;
60
61 GST_DEBUG_CATEGORY_INIT (tcp_debug, "tcp", 0, "TCP calls");
62
63 return TRUE;
64 }
65
66 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
67 GST_VERSION_MINOR,
68 tcp,
69 "transfer data over the network via TCP",
70 plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
71