diff options
Diffstat (limited to 'src/gstducatih264dec.c')
-rw-r--r-- | src/gstducatih264dec.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/src/gstducatih264dec.c b/src/gstducatih264dec.c index a4c6870..beeaf9c 100644 --- a/src/gstducatih264dec.c +++ b/src/gstducatih264dec.c @@ -41,18 +41,16 @@ #define PADY 24 -GST_BOILERPLATE (GstDucatiH264Dec, gst_ducati_h264dec, GstDucatiVidDec, - GST_TYPE_DUCATIVIDDEC); +#define gst_ducati_h264dec_parent_class parent_class +G_DEFINE_TYPE (GstDucatiH264Dec, gst_ducati_h264dec, GST_TYPE_DUCATIVIDDEC); static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-h264, " - "stream-format = byte-stream, " /* only byte-stream */ + GST_STATIC_CAPS ("video/x-h264, " "stream-format = byte-stream, " /* only byte-stream */ "align = au, " /* only entire frames */ "width = (int)[ 16, 2048 ], " - "height = (int)[ 16, 2048 ], " - "framerate = (fraction)[ 0, max ];") + "height = (int)[ 16, 2048 ], " "framerate = (fraction)[ 0, max ];") ); /* GstDucatiVidDec vmethod implementations */ @@ -73,7 +71,8 @@ static gboolean gst_ducati_h264dec_allocate_params (GstDucatiVidDec * self, gint params_sz, gint dynparams_sz, gint status_sz, gint inargs_sz, gint outargs_sz) { - gboolean ret = parent_class->allocate_params (self, + gboolean ret = + GST_DUCATIVIDDEC_GET_CLASS (parent_class)->allocate_params (self, sizeof (IH264VDEC_Params), sizeof (IH264VDEC_DynamicParams), sizeof (IH264VDEC_Status), sizeof (IH264VDEC_InArgs), sizeof (IH264VDEC_OutArgs)); @@ -94,9 +93,10 @@ gst_ducati_h264dec_allocate_params (GstDucatiVidDec * self, gint params_sz, /* GObject vmethod implementations */ static void -gst_ducati_h264dec_base_init (gpointer gclass) +gst_ducati_h264dec_class_init (GstDucatiH264DecClass * klass) { - GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); + GstElementClass *element_class = GST_ELEMENT_CLASS (klass); + GstDucatiVidDecClass *bclass = GST_DUCATIVIDDEC_CLASS (klass); gst_element_class_set_details_simple (element_class, "DucatiH264Dec", @@ -106,12 +106,7 @@ gst_ducati_h264dec_base_init (gpointer gclass) gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&sink_factory)); -} -static void -gst_ducati_h264dec_class_init (GstDucatiH264DecClass * klass) -{ - GstDucatiVidDecClass *bclass = GST_DUCATIVIDDEC_CLASS (klass); bclass->codec_name = "ivahd_h264dec"; bclass->update_buffer_size = GST_DEBUG_FUNCPTR (gst_ducati_h264dec_update_buffer_size); @@ -120,7 +115,6 @@ gst_ducati_h264dec_class_init (GstDucatiH264DecClass * klass) } static void -gst_ducati_h264dec_init (GstDucatiH264Dec * self, - GstDucatiH264DecClass * gclass) +gst_ducati_h264dec_init (GstDucatiH264Dec * self) { } |