Move all the several v4l/v4l2 plugins in one v4l and one v4l2 plugin
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>
Sat, 13 Sep 2003 08:58:48 +0000 (08:58 +0000)
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>
Sat, 13 Sep 2003 08:58:48 +0000 (08:58 +0000)
Original commit message from CVS:
Move all the several v4l/v4l2 plugins in one v4l and one v4l2 plugin

sys/v4l/Makefile.am
sys/v4l/gstv4l.c [new file with mode: 0644]
sys/v4l/gstv4lelement.c
sys/v4l/gstv4lelement.h
sys/v4l/gstv4lmjpegsink.c
sys/v4l/gstv4lmjpegsink.h
sys/v4l/gstv4lmjpegsrc.c
sys/v4l/gstv4lmjpegsrc.h
sys/v4l/gstv4lsrc.c
sys/v4l/gstv4lsrc.h

index 50cd1e2..dad907f 100644 (file)
@@ -1,27 +1,16 @@
 
-plugin_LTLIBRARIES = libgstv4lelement.la libgstv4lsrc.la \
-       libgstv4lmjpegsrc.la libgstv4lmjpegsink.la
-
-libgstv4lelement_la_SOURCES = gstv4lelement.c v4l_calls.c \
-               v4l-overlay_calls.c gstv4lelement-marshal.c
-libgstv4lelement_la_CFLAGS = $(GST_CFLAGS)
-libgstv4lelement_la_LIBADD =
-libgstv4lelement_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-
-libgstv4lsrc_la_SOURCES = gstv4lsrc.c v4lsrc_calls.c
-libgstv4lsrc_la_CFLAGS = $(GST_CFLAGS)
-libgstv4lsrc_la_LIBADD = libgstv4lelement.la
-libgstv4lsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-
-libgstv4lmjpegsrc_la_SOURCES = gstv4lmjpegsrc.c v4lmjpegsrc_calls.c
-libgstv4lmjpegsrc_la_CFLAGS = $(GST_CFLAGS)
-libgstv4lmjpegsrc_la_LIBADD = libgstv4lelement.la
-libgstv4lmjpegsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-
-libgstv4lmjpegsink_la_SOURCES = gstv4lmjpegsink.c v4lmjpegsink_calls.c
-libgstv4lmjpegsink_la_CFLAGS = $(GST_CFLAGS)
-libgstv4lmjpegsink_la_LIBADD = libgstv4lelement.la
-libgstv4lmjpegsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+plugin_LTLIBRARIES = libgstvideo4linux.la
+
+libgstvideo4linux_la_SOURCES = \
+       gstv4lelement.c v4l_calls.c \
+       v4l-overlay_calls.c \
+       gstv4lelement-marshal.c \
+       gstv4lsrc.c v4lsrc_calls.c \
+       gstv4lmjpegsrc.c v4lmjpegsrc_calls.c \
+       gstv4lmjpegsink.c v4lmjpegsink_calls.c
+libgstvideo4linux_la_CFLAGS = $(GST_CFLAGS)
+libgstvideo4linux_la_LIBADD =
+libgstvideo4linux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 
 noinst_HEADERS = gstv4lelement.h v4l_calls.h \
                gstv4lsrc.h v4lsrc_calls.h \
@@ -29,7 +18,7 @@ noinst_HEADERS = gstv4lelement.h v4l_calls.h \
                gstv4lmjpegsink.h v4lmjpegsink_calls.h \
                videodev_mjpeg.h gstv4lelement-marshal.h
 
-EXTRA_libgstv4lelement_la_SOURCES = \
+EXTRA_libgstvideo4linux_la_SOURCES = \
        gstv4lelement-marshal.list
 
 BUILT_SOURCES = \
diff --git a/sys/v4l/gstv4l.c b/sys/v4l/gstv4l.c
new file mode 100644 (file)
index 0000000..0968872
--- /dev/null
@@ -0,0 +1,51 @@
+/* G-Streamer video4linux plugins
+ * Copyright (C) 2001-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 "gstv4lelement.h"
+#include "gstv4lsrc.h"
+#include "gstv4lmjpegsrc.h"
+#include "gstv4lmjpegsink.h"
+
+static gboolean
+plugin_init (GModule   *module,
+            GstPlugin *plugin)
+{
+  if (!gst_v4lelement_factory_init (plugin) ||
+      !gst_v4lsrc_factory_init (plugin) ||
+      !gst_v4lmjpegsrc_factory_init (plugin) ||
+      !gst_v4lmjpegsink_factory_init (plugin)) {
+    return FALSE;
+  }
+
+  return TRUE;
+
+}
+
+GstPluginDesc plugin_desc = {
+  GST_VERSION_MAJOR,
+  GST_VERSION_MINOR,
+  "video4linux",
+  plugin_init
+};
index 7c14d5f..62b8533 100644 (file)
@@ -85,8 +85,6 @@ static void                  gst_v4lelement_get_property (GObject            *ob
                                                           GValue             *value,
                                                           GParamSpec         *pspec);
 static GstElementStateReturn gst_v4lelement_change_state (GstElement         *element);
-static gboolean              plugin_init                 (GModule            *module,
-                                                          GstPlugin          *plugin);
 
 
 static GstElementClass *parent_class = NULL;
@@ -554,9 +552,8 @@ gst_v4lelement_change_state (GstElement *element)
 }
 
 
-static gboolean
-plugin_init (GModule   *module,
-             GstPlugin *plugin)
+gboolean
+gst_v4lelement_factory_init (GstPlugin *plugin)
 {
   GstElementFactory *factory;
 
@@ -568,11 +565,3 @@ plugin_init (GModule   *module,
 
   return TRUE;
 }
-
-
-GstPluginDesc plugin_desc = {
-  GST_VERSION_MAJOR,
-  GST_VERSION_MINOR,
-  "v4lelement",
-  plugin_init
-};
index f4c9f07..4559983 100644 (file)
@@ -117,6 +117,8 @@ struct _GstV4lElementClass {
 
 GType gst_v4lelement_get_type(void);
 
+gboolean gst_v4lelement_factory_init (GstPlugin *plugin);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
index a3226cd..b1103a0 100644 (file)
@@ -470,9 +470,8 @@ gst_v4lmjpegsink_change_state (GstElement *element)
 }
 
 
-static gboolean
-plugin_init (GModule   *module,
-             GstPlugin *plugin)
+gboolean
+gst_v4lmjpegsink_factory_init (GstPlugin *plugin)
 {
   GstElementFactory *factory;
   GstCaps *caps;
@@ -504,11 +503,3 @@ plugin_init (GModule   *module,
 
   return TRUE;
 }
-
-
-GstPluginDesc plugin_desc = {
-  GST_VERSION_MAJOR,
-  GST_VERSION_MINOR,
-  "v4lmjpegsink",
-  plugin_init
-};
index fee447e..d8ed50a 100644 (file)
@@ -94,6 +94,8 @@ struct _GstV4lMjpegSinkClass {
 
 GType gst_v4lmjpegsink_get_type(void);
 
+gboolean gst_v4lmjpegsink_factory_init (GstPlugin *plugin);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
index c0721d1..7358289 100644 (file)
@@ -848,8 +848,8 @@ gst_v4lmjpegsrc_buffer_free (GstBufferPool *pool, GstBuffer *buf, gpointer user_
 }
 
 
-static gboolean
-plugin_init (GModule *module, GstPlugin *plugin)
+gboolean
+gst_v4lmjpegsrc_factory_init (GstPlugin *plugin)
 {
   GstElementFactory *factory;
   GstCaps *caps;
@@ -881,11 +881,3 @@ plugin_init (GModule *module, GstPlugin *plugin)
 
   return TRUE;
 }
-
-
-GstPluginDesc plugin_desc = {
-  GST_VERSION_MAJOR,
-  GST_VERSION_MINOR,
-  "v4lmjpegsrc",
-  plugin_init
-};
index bd86c1c..ad923ca 100644 (file)
@@ -112,6 +112,8 @@ struct _GstV4lMjpegSrcClass {
 
 GType gst_v4lmjpegsrc_get_type(void);
 
+gboolean gst_v4lmjpegsrc_factory_init (GstPlugin *plugin);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
index 11f9aa9..cc02275 100644 (file)
@@ -827,9 +827,8 @@ gst_v4lsrc_set_clock (GstElement *element,
 }
 
 
-static gboolean
-plugin_init (GModule   *module,
-             GstPlugin *plugin)
+gboolean
+gst_v4lsrc_init_init (GstPlugin *plugin)
 {
   GstElementFactory *factory;
 
@@ -850,11 +849,3 @@ plugin_init (GModule   *module,
 
   return TRUE;
 }
-
-
-GstPluginDesc plugin_desc = {
-  GST_VERSION_MAJOR,
-  GST_VERSION_MINOR,
-  "v4lsrc",
-  plugin_init
-};
index 3930476..81376dc 100644 (file)
@@ -94,6 +94,8 @@ struct _GstV4lSrcClass {
 
 GType gst_v4lsrc_get_type(void);
 
+gboolean gst_v4lsrc_init_init (GstPlugin *plugin);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */