0054d939c8db6725c0fc71fb2a51cb586d288bae
[platform/upstream/gst-plugins-good.git] / sys / v4l2 / gstv4l2.c
1 /* G-Streamer Video4linux2 video-capture plugin
2  * Copyright (C) 2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
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 <gst/gst.h>
25
26 #include "gstv4l2element.h"
27 #include "gstv4l2src.h"
28
29 static gboolean
30 plugin_init (GstPlugin *plugin)
31 {
32   /* actually, we can survive without it, but I'll create
33    * that handling later on. */
34   if (!gst_library_load ("xwindowlistener"))
35     return FALSE;
36
37   if (!gst_element_register (plugin, "v4l2element",
38                              GST_RANK_NONE, GST_TYPE_V4L2ELEMENT) ||
39       !gst_element_register (plugin, "v4l2src",
40                              GST_RANK_NONE, GST_TYPE_V4L2SRC))
41     return FALSE;
42
43   return TRUE;
44 }
45
46 GST_PLUGIN_DEFINE (
47   GST_VERSION_MAJOR,
48   GST_VERSION_MINOR,
49   "video4linux2",
50   "elements for Video 4 Linux 2",
51   plugin_init,
52   VERSION,
53   GST_LICENSE,
54   GST_COPYRIGHT,
55   GST_PACKAGE,
56   GST_ORIGIN
57 )