gst/tcp/: Added multifdsink, made tcpserversink a subclass of fdsink, removed one...
[platform/upstream/gstreamer.git] / gst / tcp / gsttcpplugin.c
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., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23
24 #include "gsttcpsrc.h"
25 #include "gsttcpsink.h"
26 #include "gsttcpclientsrc.h"
27 #include "gsttcpclientsink.h"
28 #include "gsttcpserversrc.h"
29 #include "gsttcpserversink.h"
30 #include "gstmultifdsink.h"
31
32 static gboolean
33 plugin_init (GstPlugin * plugin)
34 {
35   if (!gst_library_load ("gstdataprotocol"))
36     return FALSE;
37
38   if (!gst_element_register (plugin, "tcpsink", GST_RANK_NONE,
39           GST_TYPE_TCPSINK))
40     return FALSE;
41
42   if (!gst_element_register (plugin, "tcpsrc", GST_RANK_NONE, GST_TYPE_TCPSRC))
43     return FALSE;
44
45   if (!gst_element_register (plugin, "tcpclientsink", GST_RANK_NONE,
46           GST_TYPE_TCPCLIENTSINK))
47     return FALSE;
48   if (!gst_element_register (plugin, "tcpclientsrc", GST_RANK_NONE,
49           GST_TYPE_TCPCLIENTSRC))
50     return FALSE;
51   if (!gst_element_register (plugin, "tcpserversink", GST_RANK_NONE,
52           GST_TYPE_TCPSERVERSINK))
53     return FALSE;
54   if (!gst_element_register (plugin, "tcpserversrc", GST_RANK_NONE,
55           GST_TYPE_TCPSERVERSRC))
56     return FALSE;
57   if (!gst_element_register (plugin, "multifdsink", GST_RANK_NONE,
58           GST_TYPE_MULTIFDSINK))
59     return FALSE;
60
61   return TRUE;
62 }
63
64 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
65     GST_VERSION_MINOR,
66     "tcp",
67     "transfer data over the network via TCP",
68     plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)