summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2003-11-02 14:47:52 +0000
committerBenjamin Otte <otte@gnome.org>2003-11-02 14:47:52 +0000
commiteabfbf13fc047855e176732caad160f4f12d1fe0 (patch)
treea3fa2787c0db39a23f956d35ec8dc93e7f261407
parent59e0556a9044dcdd447386790997e360e39e46bf (diff)
downloadgst-plugins-bad-eabfbf13fc047855e176732caad160f4f12d1fe0.tar.gz
gst-plugins-bad-eabfbf13fc047855e176732caad160f4f12d1fe0.tar.bz2
gst-plugins-bad-eabfbf13fc047855e176732caad160f4f12d1fe0.zip
fix most of sys dir. v4l2 and dxr3 pending, as I don't have them
Original commit message from CVS: fix most of sys dir. v4l2 and dxr3 pending, as I don't have them
-rw-r--r--sys/cdrom/gstcdplayer.c46
-rw-r--r--sys/qcam/gstqcamsrc.c50
-rw-r--r--sys/vcd/vcdsrc.c46
3 files changed, 74 insertions, 68 deletions
diff --git a/sys/cdrom/gstcdplayer.c b/sys/cdrom/gstcdplayer.c
index 2efeb992..dccf4cba 100644
--- a/sys/cdrom/gstcdplayer.c
+++ b/sys/cdrom/gstcdplayer.c
@@ -41,6 +41,7 @@ enum
LAST_SIGNAL,
};
+static void cdplayer_base_init (gpointer g_class);
static void cdplayer_class_init (CDPlayerClass *klass);
static void cdplayer_init (CDPlayer *cdp);
static void cdplayer_dispose (GObject *object);
@@ -57,16 +58,13 @@ static GstElementStateReturn
static GstElementClass *parent_class;
static guint cdplayer_signals[LAST_SIGNAL] = { 0 };
-static GstElementDetails cdplayer_details = {
+static GstElementDetails cdplayer_details = GST_ELEMENT_DETAILS (
"CD Player",
"Generic/Bin",
- "LGPL", /* ? */
"Play CD audio through the CD Drive",
- VERSION,
- "Charles Schmidt <cbschmid@uiuc.edu>\n"
- "Wim Taymans <wim.taymans@chello.be>",
- "(C) 2002",
-};
+ "Charles Schmidt <cbschmid@uiuc.edu>, "
+ "Wim Taymans <wim.taymans@chello.be>"
+);
GType
@@ -77,7 +75,7 @@ cdplayer_get_type (void)
if (!cdplayer_type) {
static const GTypeInfo cdplayer_info = {
sizeof (CDPlayerClass),
- NULL,
+ cdplayer_base_init,
NULL,
(GClassInitFunc) cdplayer_class_init,
NULL,
@@ -95,6 +93,13 @@ cdplayer_get_type (void)
}
static void
+cdplayer_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_set_details (element_class, &cdplayer_details);
+}
+static void
cdplayer_class_init (CDPlayerClass * klass)
{
GObjectClass *gobject_klass;
@@ -349,23 +354,20 @@ cdplayer_change_state (GstElement * element)
static gboolean
-plugin_init (GModule * module, GstPlugin * plugin)
+plugin_init (GstPlugin * plugin)
{
- GstElementFactory *factory;
-
- factory = gst_element_factory_new ("cdplayer", GST_TYPE_CDPLAYER, &cdplayer_details);
- g_return_val_if_fail (factory != NULL, FALSE);
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
-
- gst_plugin_set_longname (plugin, "CD Player");
-
- return TRUE;
-
+ return gst_element_register (plugin, "cdplayer", GST_RANK_NONE, GST_TYPE_CDPLAYER);
}
-GstPluginDesc plugin_desc = {
+GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"cdplayer",
- plugin_init
-};
+ "CD Player",
+ plugin_init,
+ VERSION,
+ GST_LICENSE, /* ? */
+ GST_COPYRIGHT,
+ GST_PACKAGE,
+ GST_ORIGIN
+);
diff --git a/sys/qcam/gstqcamsrc.c b/sys/qcam/gstqcamsrc.c
index b7f1a6f9..e53485a3 100644
--- a/sys/qcam/gstqcamsrc.c
+++ b/sys/qcam/gstqcamsrc.c
@@ -34,17 +34,12 @@
#include "qcamip.h"
/* elementfactory information */
-static GstElementDetails
-gst_qcamsrc_details =
-{
+static GstElementDetails gst_qcamsrc_details = GST_ELEMENT_DETAILS (
"QCam Source",
"Source/Video",
- "LGPL",
"Read from a QuickCam device",
- VERSION,
- "Wim Taymans <wim.taymans@chello.be>",
- "(C) 2001",
-};
+ "Wim Taymans <wim.taymans@chello.be>"
+);
#define AE_NONE 3
@@ -111,6 +106,7 @@ enum {
ARG_AUTOEXP,
};
+static void gst_qcamsrc_base_init (gpointer g_class);
static void gst_qcamsrc_class_init (GstQCamSrcClass *klass);
static void gst_qcamsrc_init (GstQCamSrc *qcamsrc);
@@ -136,7 +132,7 @@ gst_qcamsrc_get_type (void)
if (!qcamsrc_type) {
static const GTypeInfo qcamsrc_info = {
sizeof(GstQCamSrcClass),
- NULL,
+ gst_qcamsrc_base_init,
NULL,
(GClassInitFunc)gst_qcamsrc_class_init,
NULL,
@@ -150,7 +146,14 @@ gst_qcamsrc_get_type (void)
}
return qcamsrc_type;
}
-
+static void
+gst_qcamsrc_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (gst_qcamsrc_src_factory));
+ gst_element_class_set_details (element_class, &gst_qcamsrc_details);
+}
static void
gst_qcamsrc_class_init (GstQCamSrcClass *klass)
{
@@ -424,27 +427,24 @@ gst_qcamsrc_close (GstQCamSrc *src)
}
static gboolean
-plugin_init (GModule *module, GstPlugin *plugin)
+plugin_init (GstPlugin *plugin)
{
- GstElementFactory *factory;
-
- /* create an elementfactory for the qcamsrcparse element */
- factory = gst_element_factory_new("qcamsrc",GST_TYPE_QCAMSRC,
- &gst_qcamsrc_details);
- g_return_val_if_fail(factory != NULL, FALSE);
-
- gst_element_factory_add_pad_template (factory,
- GST_PAD_TEMPLATE_GET (gst_qcamsrc_src_factory));
-
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
+ if (!gst_element_register (plugin, "qcamsrc", GST_RANK_NONE, GST_TYPE_QCAMSRC))
+ return FALSE;
return TRUE;
}
-GstPluginDesc plugin_desc = {
+GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"qcamsrc",
- plugin_init
-};
+ "Read from a QuickCam device",
+ plugin_init,
+ VERSION,
+ GST_LICENSE,
+ GST_COPYRIGHT,
+ GST_PACKAGE,
+ GST_ORIGIN
+)
diff --git a/sys/vcd/vcdsrc.c b/sys/vcd/vcdsrc.c
index 1ee3a83d..0f559a8a 100644
--- a/sys/vcd/vcdsrc.c
+++ b/sys/vcd/vcdsrc.c
@@ -37,15 +37,12 @@
#include <vcdsrc.h>
-static GstElementDetails vcdsrc_details = {
+static GstElementDetails vcdsrc_details = GST_ELEMENT_DETAILS (
"VCD Source",
"Source/File",
- "LGPL",
"Asynchronous read from VCD disk",
- VERSION,
- "Erik Walthinsen <omega@cse.ogi.edu>",
- "(C) 1999",
-};
+ "Erik Walthinsen <omega@cse.ogi.edu>"
+);
/* VCDSrc signals and args */
@@ -63,6 +60,7 @@ enum {
ARG_MAX_ERRORS,
};
+static void vcdsrc_base_init (gpointer g_class);
static void vcdsrc_class_init (VCDSrcClass *klass);
static void vcdsrc_init (VCDSrc *vcdsrc);
static void vcdsrc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
@@ -85,7 +83,8 @@ vcdsrc_get_type (void)
if (!vcdsrc_type) {
static const GTypeInfo vcdsrc_info = {
- sizeof(VCDSrcClass), NULL,
+ sizeof(VCDSrcClass),
+ vcdsrc_base_init,
NULL,
(GClassInitFunc)vcdsrc_class_init,
NULL,
@@ -100,6 +99,13 @@ vcdsrc_get_type (void)
}
static void
+vcdsrc_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_set_details (element_class, &vcdsrc_details);
+}
+static void
vcdsrc_class_init (VCDSrcClass *klass)
{
GObjectClass *gobject_class;
@@ -108,7 +114,7 @@ vcdsrc_class_init (VCDSrcClass *klass)
gobject_class = (GObjectClass*)klass;
gstelement_class = (GstElementClass*)klass;
- parent_class = g_type_class_ref(GST_TYPE_ELEMENT);
+ parent_class = g_type_class_peek_parent (klass);
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_LOCATION,
g_param_spec_string("location","location","location",
@@ -391,22 +397,20 @@ vcdsrc_recalculate (VCDSrc *vcdsrc)
}
static gboolean
-plugin_init (GModule *module, GstPlugin *plugin)
+plugin_init (GstPlugin *plugin)
{
- GstElementFactory *factory;
-
- /* create an elementfactory for the vcdsrc element */
- factory = gst_element_factory_new("vcdsrc",GST_TYPE_VCDSRC,
- &vcdsrc_details);
- g_return_val_if_fail(factory != NULL, FALSE);
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
-
- return TRUE;
+ return gst_element_register (plugin, "vcdsrc", GST_RANK_NONE, GST_TYPE_VCDSRC);
}
-GstPluginDesc plugin_desc = {
+GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"vcdsrc",
- plugin_init
-};
+ "Asynchronous read from VCD disk",
+ plugin_init,
+ VERSION,
+ GST_LICENSE,
+ GST_COPYRIGHT,
+ GST_PACKAGE,
+ GST_ORIGIN
+)