1 /* GStreamer
2 * Copyright (C) 2011 Axis Communications <dev-gstreamer@axis.com>
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 #ifdef HAVE_CONFIG_H
20 #include <config.h>
21 #endif
22
23 #include <gst/gst-i18n-plugin.h>
24
25 #include "gstcurlbasesink.h"
26 #include "gstcurltlssink.h"
27 #include "gstcurlhttpsink.h"
28 #include "gstcurlfilesink.h"
29 #include "gstcurlftpsink.h"
30 #include "gstcurlsmtpsink.h"
31 #ifdef HAVE_SSH2
32 #include "gstcurlsftpsink.h"
33 #endif
34 #include "gstcurlhttpsrc.h"
35
36 static gboolean
plugin_init(GstPlugin * plugin)37 plugin_init (GstPlugin * plugin)
38 {
39 #ifdef ENABLE_NLS
40 GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
41 LOCALEDIR);
42 bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
43 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
44 #endif /* ENABLE_NLS */
45
46 if (!gst_element_register (plugin, "curlhttpsink", GST_RANK_NONE,
47 GST_TYPE_CURL_HTTP_SINK))
48 return FALSE;
49
50 if (!gst_element_register (plugin, "curlfilesink", GST_RANK_NONE,
51 GST_TYPE_CURL_FILE_SINK))
52 return FALSE;
53
54 if (!gst_element_register (plugin, "curlftpsink", GST_RANK_NONE,
55 GST_TYPE_CURL_FTP_SINK))
56 return FALSE;
57
58 if (!gst_element_register (plugin, "curlsmtpsink", GST_RANK_NONE,
59 GST_TYPE_CURL_SMTP_SINK))
60 return FALSE;
61
62 #ifdef HAVE_SSH2
63 if (!gst_element_register (plugin, "curlsftpsink", GST_RANK_NONE,
64 GST_TYPE_CURL_SFTP_SINK))
65 return FALSE;
66 #endif
67 if (!gst_element_register (plugin, "curlhttpsrc", GST_RANK_SECONDARY,
68 GST_TYPE_CURLHTTPSRC))
69 return FALSE;
70
71 return TRUE;
72 }
73
74 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
75 GST_VERSION_MINOR,
76 curl,
77 "libcurl-based elements",
78 plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
79