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
This commit is contained in:
Ronald S. Bultje 2003-09-13 08:58:48 +00:00
parent beea17989f
commit 339635bb15
10 changed files with 79 additions and 68 deletions

View file

@ -1,27 +1,16 @@
plugin_LTLIBRARIES = libgstv4lelement.la libgstv4lsrc.la \
libgstv4lmjpegsrc.la libgstv4lmjpegsink.la
plugin_LTLIBRARIES = libgstvideo4linux.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)
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 = \

51
sys/v4l/gstv4l.c Normal file
View file

@ -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
};

View 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
};

View file

@ -117,6 +117,8 @@ struct _GstV4lElementClass {
GType gst_v4lelement_get_type(void);
gboolean gst_v4lelement_factory_init (GstPlugin *plugin);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View 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
};

View file

@ -94,6 +94,8 @@ struct _GstV4lMjpegSinkClass {
GType gst_v4lmjpegsink_get_type(void);
gboolean gst_v4lmjpegsink_factory_init (GstPlugin *plugin);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View 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
};

View file

@ -112,6 +112,8 @@ struct _GstV4lMjpegSrcClass {
GType gst_v4lmjpegsrc_get_type(void);
gboolean gst_v4lmjpegsrc_factory_init (GstPlugin *plugin);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View 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
};

View file

@ -94,6 +94,8 @@ struct _GstV4lSrcClass {
GType gst_v4lsrc_get_type(void);
gboolean gst_v4lsrc_init_init (GstPlugin *plugin);
#ifdef __cplusplus
}
#endif /* __cplusplus */