summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dxr3/dxr3audiosink.c43
-rw-r--r--sys/dxr3/dxr3init.c35
-rw-r--r--sys/dxr3/dxr3spusink.c39
-rw-r--r--sys/dxr3/dxr3videosink.c39
4 files changed, 66 insertions, 90 deletions
diff --git a/sys/dxr3/dxr3audiosink.c b/sys/dxr3/dxr3audiosink.c
index c13743ce..e01d370b 100644
--- a/sys/dxr3/dxr3audiosink.c
+++ b/sys/dxr3/dxr3audiosink.c
@@ -48,12 +48,9 @@
/* ElementFactory information. */
static GstElementDetails dxr3audiosink_details = {
"dxr3/Hollywood+ mpeg decoder board audio plugin",
- "audio/raw|a52",
- "GPL",
+ "Audio/Sink",
"Feeds audio to Sigma Designs em8300 based boards",
- VERSION,
- "Martin Soto <martinsoto@users.sourceforge.net>",
- "(C) 2003",
+ "Martin Soto <martinsoto@users.sourceforge.net>"
};
@@ -111,6 +108,7 @@ GST_PAD_EVENT_MASK_FUNCTION(dxr3audiosink_get_event_mask,
static void dxr3audiosink_class_init (Dxr3AudioSinkClass *klass);
+static void dxr3audiosink_base_init (Dxr3AudioSinkClass *klass);
static void dxr3audiosink_init (Dxr3AudioSink *sink);
static void dxr3audiosink_set_property (GObject *object,
@@ -160,7 +158,7 @@ dxr3audiosink_get_type (void)
if (!dxr3audiosink_type) {
static const GTypeInfo dxr3audiosink_info = {
sizeof(Dxr3AudioSinkClass),
- NULL,
+ (GBaseInitFunc) dxr3audiosink_base_init,
NULL,
(GClassInitFunc) dxr3audiosink_class_init,
NULL,
@@ -179,6 +177,19 @@ dxr3audiosink_get_type (void)
static void
+dxr3audiosink_base_init (Dxr3AudioSinkClass *klass)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+
+ gst_element_class_add_pad_template (element_class,
+ GST_PAD_TEMPLATE_GET (dxr3audiosink_pcm_sink_factory));
+ gst_element_class_add_pad_template (element_class,
+ GST_PAD_TEMPLATE_GET (dxr3audiosink_ac3_sink_factory));
+ gst_element_class_set_details (element_class,
+ &dxr3audiosink_details);
+}
+
+static void
dxr3audiosink_class_init (Dxr3AudioSinkClass *klass)
{
GObjectClass *gobject_class;
@@ -795,23 +806,3 @@ dxr3audiosink_flushed (Dxr3AudioSink *sink)
{
/* Do nothing. */
}
-
-
-extern gboolean
-dxr3audiosink_factory_init (GstPlugin *plugin)
-{
- GstElementFactory *factory;
-
- factory = gst_element_factory_new ("dxr3audiosink",
- GST_TYPE_DXR3AUDIOSINK,
- &dxr3audiosink_details);
- g_return_val_if_fail (factory != NULL, FALSE);
- gst_element_factory_add_pad_template (factory,
- GST_PAD_TEMPLATE_GET (dxr3audiosink_pcm_sink_factory));
- gst_element_factory_add_pad_template (factory,
- GST_PAD_TEMPLATE_GET (dxr3audiosink_ac3_sink_factory));
-
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
-
- return TRUE;
-}
diff --git a/sys/dxr3/dxr3init.c b/sys/dxr3/dxr3init.c
index aa090b21..341523a4 100644
--- a/sys/dxr3/dxr3init.c
+++ b/sys/dxr3/dxr3init.c
@@ -19,33 +19,36 @@
* Boston, MA 02111-1307, USA.
*/
+#include "config.h"
+
#include "dxr3videosink.h"
#include "dxr3spusink.h"
#include "dxr3audiosink.h"
static gboolean
-plugin_init (GModule *module, GstPlugin *plugin)
+plugin_init (GstPlugin *plugin)
{
- gboolean ret;
-
- ret = dxr3videosink_factory_init (plugin);
- g_return_val_if_fail (ret == TRUE, FALSE);
-
- ret = dxr3spusink_factory_init (plugin);
- g_return_val_if_fail (ret == TRUE, FALSE);
-
- ret = dxr3audiosink_factory_init (plugin);
- g_return_val_if_fail (ret == TRUE, FALSE);
+ if (!gst_element_register (plugin, "dxr3videosink",
+ GST_RANK_NONE, GST_TYPE_DXR3VIDEOSINK) ||
+ !gst_element_register (plugin, "dxr3audiosink",
+ GST_RANK_NONE, GST_TYPE_DXR3AUDIOSINK) ||
+ !gst_element_register (plugin, "dxr3spusink",
+ GST_RANK_NONE, GST_TYPE_DXR3SPUSINK))
+ return FALSE;
return TRUE;
}
-
-GstPluginDesc plugin_desc = {
+GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"dxr3",
- plugin_init
-};
-
+ "dxr3 mpeg video board elements",
+ plugin_init,
+ VERSION,
+ "GPL",
+ "(c) 2003 Martin Soto <martinsoto@users.sourceforge.net>",
+ GST_PACKAGE,
+ GST_ORIGIN
+)
diff --git a/sys/dxr3/dxr3spusink.c b/sys/dxr3/dxr3spusink.c
index 8d2044e3..b6141bb3 100644
--- a/sys/dxr3/dxr3spusink.c
+++ b/sys/dxr3/dxr3spusink.c
@@ -41,12 +41,9 @@
/* ElementFactory information. */
static GstElementDetails dxr3spusink_details = {
"dxr3/Hollywood+ mpeg decoder board subpicture element",
- "video/mpeg",
- "GPL",
+ "Sink/Video",
"Feeds subpicture information to Sigma Designs em8300 based boards",
- VERSION,
- "Martin Soto <martinsoto@users.sourceforge.net>",
- "(C) 2003",
+ "Martin Soto <martinsoto@users.sourceforge.net>"
};
@@ -80,6 +77,7 @@ GST_PAD_EVENT_MASK_FUNCTION (dxr3spusink_get_event_mask,
static void dxr3spusink_class_init (Dxr3SpuSinkClass *klass);
+static void dxr3spusink_base_init (Dxr3SpuSinkClass *klass);
static void dxr3spusink_init (Dxr3SpuSink *dxr3spusink);
static void dxr3spusink_set_property (GObject *object,
@@ -128,7 +126,7 @@ dxr3spusink_get_type (void)
if (!dxr3spusink_type) {
static const GTypeInfo dxr3spusink_info = {
sizeof (Dxr3SpuSinkClass),
- NULL,
+ (GBaseInitFunc)dxr3spusink_base_init,
NULL,
(GClassInitFunc)dxr3spusink_class_init,
NULL,
@@ -146,6 +144,17 @@ dxr3spusink_get_type (void)
static void
+dxr3spusink_base_init (Dxr3SpuSinkClass *klass)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+
+ gst_element_class_add_pad_template (element_class,
+ GST_PAD_TEMPLATE_GET (dxr3spusink_sink_factory));
+ gst_element_class_set_details (element_class,
+ &dxr3spusink_details);
+}
+
+static void
dxr3spusink_class_init (Dxr3SpuSinkClass *klass)
{
GObjectClass *gobject_class;
@@ -539,21 +548,3 @@ dxr3spusink_flushed (Dxr3SpuSink *sink)
{
/* Do nothing. */
}
-
-
-extern gboolean
-dxr3spusink_factory_init (GstPlugin *plugin)
-{
- GstElementFactory *factory;
-
- factory = gst_element_factory_new ("dxr3spusink",
- GST_TYPE_DXR3SPUSINK,
- &dxr3spusink_details);
- g_return_val_if_fail (factory != NULL, FALSE);
- gst_element_factory_add_pad_template (factory,
- GST_PAD_TEMPLATE_GET (dxr3spusink_sink_factory));
-
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
-
- return TRUE;
-}
diff --git a/sys/dxr3/dxr3videosink.c b/sys/dxr3/dxr3videosink.c
index 843f33bc..eb08aae0 100644
--- a/sys/dxr3/dxr3videosink.c
+++ b/sys/dxr3/dxr3videosink.c
@@ -41,12 +41,9 @@
/* ElementFactory information. */
static GstElementDetails dxr3videosink_details = {
"dxr3/Hollywood+ mpeg decoder board video element",
- "video/mpeg",
- "GPL",
+ "Sink/Video",
"Feeds MPEG2 video to Sigma Designs em8300 based boards",
- VERSION,
- "Martin Soto <martinsoto@users.sourceforge.net>",
- "(C) 2003",
+ "Martin Soto <martinsoto@users.sourceforge.net>"
};
@@ -108,6 +105,7 @@ GST_PAD_EVENT_MASK_FUNCTION (dxr3videosink_get_event_mask,
static void dxr3videosink_class_init (Dxr3VideoSinkClass *klass);
+static void dxr3videosink_base_init (Dxr3VideoSinkClass *klass);
static void dxr3videosink_init (Dxr3VideoSink *dxr3videosink);
static void dxr3videosink_set_property (GObject *object,
@@ -156,7 +154,7 @@ dxr3videosink_get_type (void)
if (!dxr3videosink_type) {
static const GTypeInfo dxr3videosink_info = {
sizeof (Dxr3VideoSinkClass),
- NULL,
+ (GBaseInitFunc) dxr3videosink_base_init,
NULL,
(GClassInitFunc) dxr3videosink_class_init,
NULL,
@@ -175,6 +173,17 @@ dxr3videosink_get_type (void)
static void
+dxr3videosink_base_init (Dxr3VideoSinkClass *klass)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
+
+ gst_element_class_add_pad_template (element_class,
+ GST_PAD_TEMPLATE_GET (dxr3videosink_sink_factory));
+ gst_element_class_set_details (element_class,
+ &dxr3videosink_details);
+}
+
+static void
dxr3videosink_class_init (Dxr3VideoSinkClass *klass)
{
GObjectClass *gobject_class;
@@ -747,21 +756,3 @@ dxr3videosink_flushed (Dxr3VideoSink *sink)
{
/* Do nothing. */
}
-
-
-extern gboolean
-dxr3videosink_factory_init (GstPlugin *plugin)
-{
- GstElementFactory *factory;
-
- factory = gst_element_factory_new ("dxr3videosink",
- GST_TYPE_DXR3VIDEOSINK,
- &dxr3videosink_details);
- g_return_val_if_fail (factory != NULL, FALSE);
- gst_element_factory_add_pad_template (factory,
- GST_PAD_TEMPLATE_GET (dxr3videosink_sink_factory));
-
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
-
- return TRUE;
-}