diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-09-13 08:58:48 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-09-13 08:58:48 +0000 |
commit | 339635bb1561c47c72166a8c5175cea9677ea31c (patch) | |
tree | 356077aff3b914f409899007065a07bf63353aa9 | |
parent | beea17989f82e811759f30ce71ac32a2594eb9c4 (diff) | |
download | gstreamer-plugins-base-339635bb1561c47c72166a8c5175cea9677ea31c.tar.gz |
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/v4l/Makefile.am | 37 | ||||
-rw-r--r-- | sys/v4l/gstv4l.c | 51 | ||||
-rw-r--r-- | sys/v4l/gstv4lelement.c | 15 | ||||
-rw-r--r-- | sys/v4l/gstv4lelement.h | 2 | ||||
-rw-r--r-- | sys/v4l/gstv4lmjpegsink.c | 13 | ||||
-rw-r--r-- | sys/v4l/gstv4lmjpegsink.h | 2 | ||||
-rw-r--r-- | sys/v4l/gstv4lmjpegsrc.c | 12 | ||||
-rw-r--r-- | sys/v4l/gstv4lmjpegsrc.h | 2 | ||||
-rw-r--r-- | sys/v4l/gstv4lsrc.c | 13 | ||||
-rw-r--r-- | sys/v4l/gstv4lsrc.h | 2 |
10 files changed, 80 insertions, 69 deletions
diff --git a/sys/v4l/Makefile.am b/sys/v4l/Makefile.am index 50cd1e23b..dad907f91 100644 --- a/sys/v4l/Makefile.am +++ b/sys/v4l/Makefile.am @@ -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 index 000000000..096887220 --- /dev/null +++ b/sys/v4l/gstv4l.c @@ -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 +}; diff --git a/sys/v4l/gstv4lelement.c b/sys/v4l/gstv4lelement.c index 7c14d5f45..62b85331e 100644 --- a/sys/v4l/gstv4lelement.c +++ b/sys/v4l/gstv4lelement.c @@ -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 -}; diff --git a/sys/v4l/gstv4lelement.h b/sys/v4l/gstv4lelement.h index f4c9f07d9..455998345 100644 --- a/sys/v4l/gstv4lelement.h +++ b/sys/v4l/gstv4lelement.h @@ -117,6 +117,8 @@ struct _GstV4lElementClass { GType gst_v4lelement_get_type(void); +gboolean gst_v4lelement_factory_init (GstPlugin *plugin); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/sys/v4l/gstv4lmjpegsink.c b/sys/v4l/gstv4lmjpegsink.c index a3226cd64..b1103a0e9 100644 --- a/sys/v4l/gstv4lmjpegsink.c +++ b/sys/v4l/gstv4lmjpegsink.c @@ -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 -}; diff --git a/sys/v4l/gstv4lmjpegsink.h b/sys/v4l/gstv4lmjpegsink.h index fee447e65..d8ed50a37 100644 --- a/sys/v4l/gstv4lmjpegsink.h +++ b/sys/v4l/gstv4lmjpegsink.h @@ -94,6 +94,8 @@ struct _GstV4lMjpegSinkClass { GType gst_v4lmjpegsink_get_type(void); +gboolean gst_v4lmjpegsink_factory_init (GstPlugin *plugin); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/sys/v4l/gstv4lmjpegsrc.c b/sys/v4l/gstv4lmjpegsrc.c index c0721d146..73582890a 100644 --- a/sys/v4l/gstv4lmjpegsrc.c +++ b/sys/v4l/gstv4lmjpegsrc.c @@ -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 -}; diff --git a/sys/v4l/gstv4lmjpegsrc.h b/sys/v4l/gstv4lmjpegsrc.h index bd86c1c8a..ad923cae2 100644 --- a/sys/v4l/gstv4lmjpegsrc.h +++ b/sys/v4l/gstv4lmjpegsrc.h @@ -112,6 +112,8 @@ struct _GstV4lMjpegSrcClass { GType gst_v4lmjpegsrc_get_type(void); +gboolean gst_v4lmjpegsrc_factory_init (GstPlugin *plugin); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/sys/v4l/gstv4lsrc.c b/sys/v4l/gstv4lsrc.c index 11f9aa911..cc022756f 100644 --- a/sys/v4l/gstv4lsrc.c +++ b/sys/v4l/gstv4lsrc.c @@ -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 -}; diff --git a/sys/v4l/gstv4lsrc.h b/sys/v4l/gstv4lsrc.h index 39304767e..81376dc01 100644 --- a/sys/v4l/gstv4lsrc.h +++ b/sys/v4l/gstv4lsrc.h @@ -94,6 +94,8 @@ struct _GstV4lSrcClass { GType gst_v4lsrc_get_type(void); +gboolean gst_v4lsrc_init_init (GstPlugin *plugin); + #ifdef __cplusplus } #endif /* __cplusplus */ |