From: Thibault Saunier Date: Sat, 8 Sep 2018 22:24:41 +0000 (-0300) Subject: Update for g_type_class_add_private() deprecation in recent GLib X-Git-Tag: 1.19.3~491^2~493 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6457690e1cd4687e8434f115f628d0381428f6c2;p=platform%2Fupstream%2Fgstreamer.git Update for g_type_class_add_private() deprecation in recent GLib --- diff --git a/validate/gst-libs/gst/video/gssim.c b/validate/gst-libs/gst/video/gssim.c index 52d531b..cf2d4cd 100644 --- a/validate/gst-libs/gst/video/gssim.c +++ b/validate/gst-libs/gst/video/gssim.c @@ -39,17 +39,13 @@ typedef struct _SSimWindowCache gfloat element_summ; } SSimWindowCache; -/* *INDENT-OFF* */ -G_DEFINE_TYPE (Gssim, gssim, GST_TYPE_OBJECT) -/* *INDENT-ON* */ - enum { PROP_FIRST_PROP = 1, N_PROPS }; -struct _GssimPriv +struct _GssimPrivate { gint width; gint height; @@ -67,6 +63,9 @@ struct _GssimPriv GstVideoInfo in_info, out_info; }; +/* *INDENT-OFF* */ +G_DEFINE_TYPE_WITH_PRIVATE (Gssim, gssim, GST_TYPE_OBJECT) +/* *INDENT-ON* */ static void gssim_calculate_mu (Gssim * self, guint8 * buf) @@ -430,14 +429,12 @@ gssim_class_init (GssimClass * klass) oclass->get_property = gssim_get_property; oclass->set_property = gssim_set_property; oclass->finalize = gssim_finalize; - - g_type_class_add_private (klass, sizeof (GssimPriv)); } static void gssim_init (Gssim * self) { - self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GSSIM_TYPE, GssimPriv); + self->priv = gssim_get_instance_private (self); self->priv->windowsize = 11; self->priv->windowtype = 1; diff --git a/validate/gst-libs/gst/video/gssim.h b/validate/gst-libs/gst/video/gssim.h index 5d7b0fc..39962ec 100644 --- a/validate/gst-libs/gst/video/gssim.h +++ b/validate/gst-libs/gst/video/gssim.h @@ -30,12 +30,12 @@ G_BEGIN_DECLS -typedef struct _GssimPriv GssimPriv; +typedef struct _GssimPrivate GssimPrivate; typedef struct { GstObject parent; - GssimPriv *priv; + GssimPrivate *priv; } Gssim; typedef struct {