summaryrefslogtreecommitdiffstats
path: root/ext/xvid
diff options
context:
space:
mode:
authorIain Holmes <iain@prettypeople.org>2003-11-02 02:31:04 +0000
committerIain Holmes <iain@prettypeople.org>2003-11-02 02:31:04 +0000
commit343ee1744acb4046b84a68e012b0d5040761aff2 (patch)
tree363d9506dcd43600748db3e6c5355945707a44d1 /ext/xvid
parent61c073c5d81ebc2a05d4a1457d09110519c9332e (diff)
downloadgst-plugins-bad-343ee1744acb4046b84a68e012b0d5040761aff2.tar.gz
gst-plugins-bad-343ee1744acb4046b84a68e012b0d5040761aff2.tar.bz2
gst-plugins-bad-343ee1744acb4046b84a68e012b0d5040761aff2.zip
XVid compiles again...I'm off to bed :)
Original commit message from CVS: XVid compiles again...I'm off to bed :)
Diffstat (limited to 'ext/xvid')
-rw-r--r--ext/xvid/gstxvid.c18
-rw-r--r--ext/xvid/gstxviddec.c38
-rw-r--r--ext/xvid/gstxviddec.h3
-rw-r--r--ext/xvid/gstxvidenc.c37
-rw-r--r--ext/xvid/gstxvidenc.h3
5 files changed, 43 insertions, 56 deletions
diff --git a/ext/xvid/gstxvid.c b/ext/xvid/gstxvid.c
index 8496a9d4..74733ac3 100644
--- a/ext/xvid/gstxvid.c
+++ b/ext/xvid/gstxvid.c
@@ -85,16 +85,20 @@ gst_xvid_error (int errorcode)
}
static gboolean
-plugin_init (GModule *module,
- GstPlugin *plugin)
+plugin_init (GstPlugin *plugin)
{
- return (gst_xviddec_plugin_init(module, plugin) &&
- gst_xvidenc_plugin_init(module, plugin));
+ return (gst_xviddec_plugin_init(plugin) &&
+ gst_xvidenc_plugin_init(plugin));
}
-GstPluginDesc plugin_desc = {
+GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"xvid",
- plugin_init
-};
+ "XVid plugin library",
+ plugin_init,
+ VERSION,
+ "GPL",
+ GST_COPYRIGHT,
+ GST_PACKAGE,
+ GST_ORIGIN)
diff --git a/ext/xvid/gstxviddec.c b/ext/xvid/gstxviddec.c
index 28035fcf..161ae5be 100644
--- a/ext/xvid/gstxviddec.c
+++ b/ext/xvid/gstxviddec.c
@@ -32,11 +32,8 @@
GstElementDetails gst_xviddec_details = {
"Xvid decoder",
"Codec/Video/Decoder",
- "GPL",
"Xvid decoder based on xviddecore",
- VERSION,
"Ronald Bultje <rbultje@ronald.bitfreak.net>",
- "(C) 2003",
};
GST_PAD_TEMPLATE_FACTORY(sink_template,
@@ -91,7 +88,7 @@ enum {
/* FILL ME */
};
-
+static void gst_xviddec_base_init (gpointer g_class);
static void gst_xviddec_class_init (GstXvidDecClass *klass);
static void gst_xviddec_init (GstXvidDec *xviddec);
static void gst_xviddec_dispose (GObject *object);
@@ -114,7 +111,7 @@ gst_xviddec_get_type(void)
{
static const GTypeInfo xviddec_info = {
sizeof(GstXvidDecClass),
- NULL,
+ gst_xviddec_base_init,
NULL,
(GClassInitFunc) gst_xviddec_class_init,
NULL,
@@ -130,6 +127,16 @@ gst_xviddec_get_type(void)
return xviddec_type;
}
+static void
+gst_xviddec_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 (sink_template));
+ gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (src_template));
+
+ gst_element_class_set_details (element_class, &gst_xviddec_details);
+}
static void
gst_xviddec_class_init (GstXvidDecClass *klass)
@@ -381,25 +388,10 @@ gst_xviddec_connect (GstPad *pad,
gboolean
-gst_xviddec_plugin_init (GModule *module,
- GstPlugin *plugin)
+gst_xviddec_plugin_init (GstPlugin *plugin)
{
- GstElementFactory *factory;
-
- /* create an elementfactory for the v4lmjpegsrcparse element */
- factory = gst_element_factory_new("xviddec", GST_TYPE_XVIDDEC,
- &gst_xviddec_details);
- g_return_val_if_fail(factory != NULL, FALSE);
-
- /* add pad templates */
- gst_element_factory_add_pad_template(factory,
- GST_PAD_TEMPLATE_GET(sink_template));
- gst_element_factory_add_pad_template(factory,
- GST_PAD_TEMPLATE_GET(src_template));
-
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
-
- gst_element_factory_set_rank(factory, GST_ELEMENT_RANK_PRIMARY);
+ if (!gst_element_register (plugin, "xviddec", GST_RANK_PRIMARY, GST_TYPE_XVIDDEC))
+ return FALSE;
return TRUE;
}
diff --git a/ext/xvid/gstxviddec.h b/ext/xvid/gstxviddec.h
index d1743342..98916ce7 100644
--- a/ext/xvid/gstxviddec.h
+++ b/ext/xvid/gstxviddec.h
@@ -64,8 +64,7 @@ struct _GstXvidDecClass {
GType gst_xviddec_get_type(void);
-gboolean gst_xviddec_plugin_init (GModule *module,
- GstPlugin *plugin);
+gboolean gst_xviddec_plugin_init (GstPlugin *plugin);
#ifdef __cplusplus
}
diff --git a/ext/xvid/gstxvidenc.c b/ext/xvid/gstxvidenc.c
index 3b7b44c9..d8262eaa 100644
--- a/ext/xvid/gstxvidenc.c
+++ b/ext/xvid/gstxvidenc.c
@@ -33,11 +33,8 @@
GstElementDetails gst_xvidenc_details = {
"Xvid encoder",
"Codec/Video/Encoder",
- "GPL",
"Xvid encoder based on xvidencore",
- VERSION,
"Ronald Bultje <rbultje@ronald.bitfreak.net>",
- "(C) 2003",
};
GST_PAD_TEMPLATE_FACTORY(sink_template,
@@ -94,7 +91,7 @@ enum {
ARG_BUFSIZE
};
-
+static void gst_xvidenc_base_init (gpointer g_class);
static void gst_xvidenc_class_init (GstXvidEncClass *klass);
static void gst_xvidenc_init (GstXvidEnc *xvidenc);
static void gst_xvidenc_chain (GstPad *pad,
@@ -125,7 +122,7 @@ gst_xvidenc_get_type(void)
{
static const GTypeInfo xvidenc_info = {
sizeof(GstXvidEncClass),
- NULL,
+ gst_xvidenc_base_init,
NULL,
(GClassInitFunc) gst_xvidenc_class_init,
NULL,
@@ -141,6 +138,15 @@ gst_xvidenc_get_type(void)
return xvidenc_type;
}
+static void
+gst_xvidenc_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 (sink_template));
+ gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (src_template));
+ gst_element_class_set_details (element_class, &gst_xvidenc_details);
+}
static void
gst_xvidenc_class_init (GstXvidEncClass *klass)
@@ -479,26 +485,13 @@ gst_xvidenc_get_property (GObject *object,
gboolean
-gst_xvidenc_plugin_init (GModule *module,
- GstPlugin *plugin)
+gst_xvidenc_plugin_init (GstPlugin *plugin)
{
- GstElementFactory *factory;
-
if (!gst_library_load("gstvideo"))
return FALSE;
- /* create an elementfactory for the v4lmjpegsrcparse element */
- factory = gst_element_factory_new("xvidenc", GST_TYPE_XVIDENC,
- &gst_xvidenc_details);
- g_return_val_if_fail(factory != NULL, FALSE);
-
- /* add pad templates */
- gst_element_factory_add_pad_template(factory,
- GST_PAD_TEMPLATE_GET(sink_template));
- gst_element_factory_add_pad_template(factory,
- GST_PAD_TEMPLATE_GET(src_template));
-
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
-
+ if (!gst_element_register (plugin, "xvidenc", GST_RANK_NONE, GST_TYPE_XVIDENC))
+ return FALSE;
+
return TRUE;
}
diff --git a/ext/xvid/gstxvidenc.h b/ext/xvid/gstxvidenc.h
index 02028d83..f8266a97 100644
--- a/ext/xvid/gstxvidenc.h
+++ b/ext/xvid/gstxvidenc.h
@@ -73,8 +73,7 @@ struct _GstXvidEncClass {
GType gst_xvidenc_get_type(void);
-gboolean gst_xvidenc_plugin_init (GModule *module,
- GstPlugin *plugin);
+gboolean gst_xvidenc_plugin_init (GstPlugin *plugin);
#ifdef __cplusplus
}