audiotestsrc: fix rounding errors that might cause segments to be one sample too...
[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., 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 "gsttcpclientsrc.h"
25 #include "gsttcpclientsink.h"
26 #include "gsttcpserversrc.h"
27 #include "gsttcpserversink.h"
28 #include "gstmultifdsink.h"
29 #include "gstmultisocketsink.h"
30
31 GST_DEBUG_CATEGORY (tcp_debug);
32
33 static gboolean
34 plugin_init (GstPlugin * plugin)
35 {
36   if (!gst_element_register (plugin, "tcpclientsink", GST_RANK_NONE,
37           GST_TYPE_TCP_CLIENT_SINK))
38     return FALSE;
39   if (!gst_element_register (plugin, "tcpclientsrc", GST_RANK_NONE,
40           GST_TYPE_TCP_CLIENT_SRC))
41     return FALSE;
42   if (!gst_element_register (plugin, "tcpserversink", GST_RANK_NONE,
43           GST_TYPE_TCP_SERVER_SINK))
44     return FALSE;
45   if (!gst_element_register (plugin, "tcpserversrc", GST_RANK_NONE,
46           GST_TYPE_TCP_SERVER_SRC))
47     return FALSE;
48 #ifdef HAVE_SYS_SOCKET_H
49   if (!gst_element_register (plugin, "multifdsink", GST_RANK_NONE,
50           GST_TYPE_MULTI_FD_SINK))
51     return FALSE;
52 #endif
53   if (!gst_element_register (plugin, "multisocketsink", GST_RANK_NONE,
54           GST_TYPE_MULTI_SOCKET_SINK))
55     return FALSE;
56
57   GST_DEBUG_CATEGORY_INIT (tcp_debug, "tcp", 0, "TCP calls");
58
59   return TRUE;
60 }
61
62 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
63     GST_VERSION_MINOR,
64     tcp,
65     "transfer data over the network via TCP",
66     plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)