summaryrefslogtreecommitdiff
path: root/sys/dshowdecwrapper/gstdshowvideodec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dshowdecwrapper/gstdshowvideodec.cpp')
-rw-r--r--sys/dshowdecwrapper/gstdshowvideodec.cpp31
1 files changed, 19 insertions, 12 deletions
diff --git a/sys/dshowdecwrapper/gstdshowvideodec.cpp b/sys/dshowdecwrapper/gstdshowvideodec.cpp
index 6be02fe45..0dcc3fa7f 100644
--- a/sys/dshowdecwrapper/gstdshowvideodec.cpp
+++ b/sys/dshowdecwrapper/gstdshowvideodec.cpp
@@ -1,6 +1,6 @@
/*
* GStreamer DirectShow codecs wrapper
- * Copyright <2006, 2007, 2008> Fluendo <gstreamer@fluendo.com>
+ * Copyright <2006, 2007, 2008, 2009, 2010> Fluendo <support@fluendo.com>
* Copyright <2006, 2007, 2008> Pioneers of the Inevitable <songbird@songbirdnest.com>
* Copyright <2007,2008> Sebastien Moutte <sebastien@moutte.net>
*
@@ -58,7 +58,6 @@ GST_DEBUG_CATEGORY_STATIC (dshowvideodec_debug);
GST_BOILERPLATE (GstDshowVideoDec, gst_dshowvideodec, GstElement,
GST_TYPE_ELEMENT);
-static const VideoCodecEntry *tmp;
static void gst_dshowvideodec_dispose (GObject * object);
static GstStateChangeReturn gst_dshowvideodec_change_state
@@ -369,16 +368,25 @@ gst_dshowvideodec_base_init (gpointer klass)
GstPadTemplate *src, *sink;
GstCaps *srccaps, *sinkcaps;
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- char *description;
+ GstElementDetails details;
+ const VideoCodecEntry *tmp;
+ gpointer qdata;
- videodec_class->entry = tmp;
+ qdata = g_type_get_qdata (G_OBJECT_CLASS_TYPE (klass), DSHOW_CODEC_QDATA);
- description = g_strdup_printf ("DirectShow %s Decoder Wrapper",
+ /* element details */
+ tmp = videodec_class->entry = (VideoCodecEntry *) qdata;
+
+ details.longname = g_strdup_printf ("DirectShow %s Decoder Wrapper",
+ tmp->element_longname);
+ details.klass = g_strdup ("Codec/Decoder/Video");
+ details.description = g_strdup_printf ("DirectShow %s Decoder Wrapper",
tmp->element_longname);
- gst_element_class_set_details_simple (element_class, description,
- "Codec/Decoder/Video", description,
- "Sebastien Moutte <sebastien@moutte.net>");
- g_free (description);
+ details.author = "Sebastien Moutte <sebastien@moutte.net>";
+ gst_element_class_set_details (element_class, &details);
+ g_free (details.longname);
+ g_free (details.klass);
+ g_free (details.description);
sinkcaps = gst_caps_from_string (tmp->sinkcaps);
gst_caps_set_simple (sinkcaps,
@@ -1193,10 +1201,9 @@ dshow_vdec_register (GstPlugin * plugin)
GST_DEBUG ("Registering %s", video_dec_codecs[i].element_name);
- tmp = &video_dec_codecs[i];
- type =
- g_type_register_static (GST_TYPE_ELEMENT,
+ type = g_type_register_static (GST_TYPE_ELEMENT,
video_dec_codecs[i].element_name, &info, (GTypeFlags)0);
+ g_type_set_qdata (type, DSHOW_CODEC_QDATA, (gpointer) (video_dec_codecs + i));
if (!gst_element_register (plugin, video_dec_codecs[i].element_name,
GST_RANK_PRIMARY, type)) {
return FALSE;