summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-09-13 08:58:49 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-09-13 08:58:49 +0000
commit68eee929ce8aaa013666825b0e5f1be59a3155e7 (patch)
tree76e9e9d386e4704004b86cdedea517a9d236deb1
parent9620e2ede907b9445bf2393b99117ad1db4f86e9 (diff)
downloadgst-plugins-bad-68eee929ce8aaa013666825b0e5f1be59a3155e7.tar.gz
gst-plugins-bad-68eee929ce8aaa013666825b0e5f1be59a3155e7.tar.bz2
gst-plugins-bad-68eee929ce8aaa013666825b0e5f1be59a3155e7.zip
Move all the several v4l/v4l2 plugins in one v4l and one v4l2 plugin
Original commit message from CVS: Move all the several v4l/v4l2 plugins in one v4l and one v4l2 plugin
-rw-r--r--sys/v4l2/Makefile.am25
-rw-r--r--sys/v4l2/gstv4l2.c46
-rw-r--r--sys/v4l2/gstv4l2element.c13
-rw-r--r--sys/v4l2/gstv4l2element.h2
-rw-r--r--sys/v4l2/gstv4l2src.c13
-rw-r--r--sys/v4l2/gstv4l2src.h2
6 files changed, 66 insertions, 35 deletions
diff --git a/sys/v4l2/Makefile.am b/sys/v4l2/Makefile.am
index 8c8f1543..6aeee4e0 100644
--- a/sys/v4l2/Makefile.am
+++ b/sys/v4l2/Makefile.am
@@ -1,22 +1,21 @@
plugin_LTLIBRARIES = \
- libgstv4l2element.la \
- libgstv4l2src.la
+ libgstvideo4linux2.la
-libgstv4l2element_la_SOURCES = gstv4l2element.c v4l2_calls.c v4l2-overlay_calls.c gstv4l2element-marshal.c
-libgstv4l2element_la_CFLAGS = $(GST_CFLAGS)
-libgstv4l2element_la_LIBADD =
-libgstv4l2element_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-
-libgstv4l2src_la_SOURCES = gstv4l2src.c v4l2src_calls.c
-libgstv4l2src_la_CFLAGS = $(GST_CFLAGS)
-libgstv4l2src_la_LIBADD = libgstv4l2element.la
-libgstv4l2src_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libgstvideo4linux2_la_SOURCES = \
+ gstv4l2element.c v4l2_calls.c \
+ v4l2-overlay_calls.c \
+ gstv4l2element-marshal.c \
+ gstv4l2src.c v4l2src_calls.c
+libgstvideo4linux2_la_CFLAGS = $(GST_CFLAGS)
+libgstvideo4linux2_la_LIBADD =
+libgstvideo4linux2_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstv4l2element.h v4l2_calls.h \
- gstv4l2src.h v4l2src_calls.h gstv4l2element-marshal.h
+ gstv4l2src.h v4l2src_calls.h \
+ gstv4l2element-marshal.h
-EXTRA_libgstv4l2element_la_SOURCES = \
+EXTRA_libgstvideo4linux2_la_SOURCES = \
gstv4l2element-marshal.list
BUILT_SOURCES = \
diff --git a/sys/v4l2/gstv4l2.c b/sys/v4l2/gstv4l2.c
new file mode 100644
index 00000000..8ad7b319
--- /dev/null
+++ b/sys/v4l2/gstv4l2.c
@@ -0,0 +1,46 @@
+/* G-Streamer Video4linux2 video-capture plugin
+ * Copyright (C) 2002 Ronald Bultje <rbultje@ronald.bitfreak.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+
+#include "gstv4l2element.h"
+#include "gstv4l2src.h"
+
+gboolean
+plugin_init (GModule *module,
+ GstPlugin *plugin)
+{
+ if (!gst_v4l2element_factory_init (plugin) ||
+ !gst_v4l2src_factory_init (plugin)) {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+GstPluginDesc plugin_desc = {
+ GST_VERSION_MAJOR,
+ GST_VERSION_MINOR,
+ "video4linux2",
+ plugin_init
+};
diff --git a/sys/v4l2/gstv4l2element.c b/sys/v4l2/gstv4l2element.c
index 926e4a51..9ff553ce 100644
--- a/sys/v4l2/gstv4l2element.c
+++ b/sys/v4l2/gstv4l2element.c
@@ -473,9 +473,8 @@ gst_v4l2element_change_state (GstElement *element)
}
-static gboolean
-plugin_init (GModule *module,
- GstPlugin *plugin)
+gboolean
+gst_v4l2element_factory_init (GstPlugin *plugin)
{
GstElementFactory *factory;
@@ -487,11 +486,3 @@ plugin_init (GModule *module,
return TRUE;
}
-
-
-GstPluginDesc plugin_desc = {
- GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "v4l2element",
- plugin_init
-};
diff --git a/sys/v4l2/gstv4l2element.h b/sys/v4l2/gstv4l2element.h
index 76ad04d4..6d86d4a9 100644
--- a/sys/v4l2/gstv4l2element.h
+++ b/sys/v4l2/gstv4l2element.h
@@ -112,4 +112,6 @@ struct _GstV4l2ElementClass {
GType gst_v4l2element_get_type (void);
+gboolean gst_v4l2element_factory_init (GstPlugin *plugin);
+
#endif /* __GST_V4L2ELEMENT_H__ */
diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c
index b7e5daba..015e3c43 100644
--- a/sys/v4l2/gstv4l2src.c
+++ b/sys/v4l2/gstv4l2src.c
@@ -1061,9 +1061,8 @@ gst_v4l2src_buffer_free (GstBufferPool *pool,
}
-static gboolean
-plugin_init (GModule *module,
- GstPlugin *plugin)
+gboolean
+gst_v4l2src_factory_init (GstPlugin *plugin)
{
GstElementFactory *factory;
@@ -1083,11 +1082,3 @@ plugin_init (GModule *module,
return TRUE;
}
-
-
-GstPluginDesc plugin_desc = {
- GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "v4l2src",
- plugin_init
-};
diff --git a/sys/v4l2/gstv4l2src.h b/sys/v4l2/gstv4l2src.h
index 1b4ab095..da9664c0 100644
--- a/sys/v4l2/gstv4l2src.h
+++ b/sys/v4l2/gstv4l2src.h
@@ -98,4 +98,6 @@ struct _GstV4l2SrcClass {
GType gst_v4l2src_get_type(void);
+gboolean gst_v4l2src_factory_init (GstPlugin *plugin);
+
#endif /* __GST_V4L2SRC_H__ */