summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-11-02 22:11:30 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-11-02 22:11:30 +0000
commit26f632e6309e9796d08ada0b490c0289913d5a98 (patch)
tree39006dd9df666c6033c4eb55288693e41cd921a4 /gst
parent7d62325204cf7a6d96ab5a4e7c933b7505e84a3a (diff)
downloadgst-plugins-bad-26f632e6309e9796d08ada0b490c0289913d5a98.tar.gz
gst-plugins-bad-26f632e6309e9796d08ada0b490c0289913d5a98.tar.bz2
gst-plugins-bad-26f632e6309e9796d08ada0b490c0289913d5a98.zip
... almost done now
Original commit message from CVS: ... almost done now
Diffstat (limited to 'gst')
-rw-r--r--gst/rtjpeg/gstrtjpeg.c40
-rw-r--r--gst/rtjpeg/gstrtjpegdec.c17
-rw-r--r--gst/rtjpeg/gstrtjpegenc.c17
3 files changed, 39 insertions, 35 deletions
diff --git a/gst/rtjpeg/gstrtjpeg.c b/gst/rtjpeg/gstrtjpeg.c
index 4284b8dd..68e113b4 100644
--- a/gst/rtjpeg/gstrtjpeg.c
+++ b/gst/rtjpeg/gstrtjpeg.c
@@ -21,37 +21,27 @@
#include <gstrtjpegenc.h>
#include <gstrtjpegdec.h>
-/* elementfactory information */
-extern GstElementDetails gst_rtjpegenc_details;
-extern GstElementDetails gst_rtjpegdec_details;
-
static gboolean
-plugin_init (GModule *module, GstPlugin *plugin)
+plugin_init (GstPlugin *plugin)
{
- GstElementFactory *enc, *dec;
-
- gst_plugin_set_longname(plugin,"Justin Schoeman's RTjpeg codec and \
-conversion utilities");
-
- /* create an elementfactory for the rtjpegenc element */
- enc = gst_element_factory_new("rtjpegenc",GST_TYPE_RTJPEGENC,
- &gst_rtjpegenc_details);
- g_return_val_if_fail(enc != NULL, FALSE);
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (enc));
-
- /* create an elementfactory for the rtjpegdec element */
- dec = gst_element_factory_new("rtjpegdec",GST_TYPE_RTJPEGDEC,
- &gst_rtjpegdec_details);
- g_return_val_if_fail(dec != NULL, FALSE);
- gst_element_factory_set_rank (dec, GST_ELEMENT_RANK_PRIMARY);
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (dec));
+ if (!gst_element_register (plugin, "rtjpegenc",
+ GST_RANK_NONE, GST_TYPE_RTJPEGENC) ||
+ !gst_element_register (plugin, "rtjpegdec",
+ GST_RANK_NONE, GST_TYPE_RTJPEGDEC))
+ return FALSE;
return TRUE;
}
-GstPluginDesc plugin_desc = {
+GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"rtjpeg",
- plugin_init
-};
+ "Justin Schoeman's RTjpeg codec",
+ plugin_init,
+ VERSION,
+ "GPL",
+ "(c) 2000 Justin Schoeman <justin@suntiger.ee.up.ac.za>",
+ GST_PACKAGE,
+ GST_ORIGIN
+)
diff --git a/gst/rtjpeg/gstrtjpegdec.c b/gst/rtjpeg/gstrtjpegdec.c
index 6ffa8287..ab87a36e 100644
--- a/gst/rtjpeg/gstrtjpegdec.c
+++ b/gst/rtjpeg/gstrtjpegdec.c
@@ -29,11 +29,8 @@
GstElementDetails gst_rtjpegdec_details = {
"RTjpeg decoder",
"Codec/Video/Decoder",
- "GPL",
"Decodes video in RTjpeg format",
- VERSION,
- "Erik Walthinsen <omega@cse.ogi.edu>",
- "(C) 1999",
+ "Erik Walthinsen <omega@cse.ogi.edu>"
};
/* GstRTJpegDec signals and args */
@@ -49,6 +46,7 @@ enum {
static void gst_rtjpegdec_class_init (GstRTJpegDecClass *klass);
+static void gst_rtjpegdec_base_init (GstRTJpegDecClass *klass);
static void gst_rtjpegdec_init (GstRTJpegDec *rtjpegdec);
static void gst_rtjpegdec_chain (GstPad *pad, GstData *_data);
@@ -63,7 +61,8 @@ gst_rtjpegdec_get_type (void)
if (!rtjpegdec_type) {
static const GTypeInfo rtjpegdec_info = {
- sizeof(GstRTJpegDecClass), NULL,
+ sizeof(GstRTJpegDecClass),
+ (GBaseInitFunc)gst_rtjpegdec_base_init,
NULL,
(GClassInitFunc)gst_rtjpegdec_class_init,
NULL,
@@ -78,6 +77,14 @@ gst_rtjpegdec_get_type (void)
}
static void
+gst_rtjpegdec_base_init (GstRTJpegDecClass *klass)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+
+ gst_element_class_set_details (element_class, &gst_rtjpegdec_details);
+}
+
+static void
gst_rtjpegdec_class_init (GstRTJpegDecClass *klass)
{
GstElementClass *gstelement_class;
diff --git a/gst/rtjpeg/gstrtjpegenc.c b/gst/rtjpeg/gstrtjpegenc.c
index 0aa90577..1ff510bc 100644
--- a/gst/rtjpeg/gstrtjpegenc.c
+++ b/gst/rtjpeg/gstrtjpegenc.c
@@ -27,11 +27,8 @@
GstElementDetails gst_rtjpegenc_details = {
"RTjpeg encoder",
"Codec/Video/Encoder",
- "GPL",
"Encodes video in RTjpeg format",
- VERSION,
- "Erik Walthinsen <omega@cse.ogi.edu>",
- "(C) 1999",
+ "Erik Walthinsen <omega@cse.ogi.edu>"
};
/* GstRTJpegEnc signals and args */
@@ -47,6 +44,7 @@ enum {
static void gst_rtjpegenc_class_init (GstRTJpegEncClass *klass);
+static void gst_rtjpegenc_base_init (GstRTJpegEncClass *klass);
static void gst_rtjpegenc_init (GstRTJpegEnc *rtjpegenc);
static void gst_rtjpegenc_chain (GstPad *pad, GstData *_data);
@@ -61,7 +59,8 @@ gst_rtjpegenc_get_type (void)
if (!rtjpegenc_type) {
static const GTypeInfo rtjpegenc_info = {
- sizeof(GstRTJpegEncClass), NULL,
+ sizeof(GstRTJpegEncClass),
+ (GBaseInitFunc)gst_rtjpegenc_base_init,
NULL,
(GClassInitFunc)gst_rtjpegenc_class_init,
NULL,
@@ -76,6 +75,14 @@ gst_rtjpegenc_get_type (void)
}
static void
+gst_rtjpegenc_base_init (GstRTJpegEncClass *klass)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+
+ gst_element_class_set_details (element_class, &gst_rtjpegenc_details);
+}
+
+static void
gst_rtjpegenc_class_init (GstRTJpegEncClass *klass)
{
GstElementClass *gstelement_class;