emotion: gstreamer: fix deprecation warning for g_type_class_add_private
authorStefan Schmidt <s.schmidt@samsung.com>
Wed, 16 Jan 2019 11:23:44 +0000 (11:23 +0000)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 24 Jan 2019 05:20:17 +0000 (14:20 +0900)
Summary:
Since glib 2.58 g_type_class_add_private is deprecated and this throws
an ugly warning in our build. Not being a glib expert I based this on
patch in freeverb which solves the same issue for them:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/90625953f27668bde29983e2ad3afe2f49d4133f

Videos in rage are still playing fine for me, but double checking during
review would be appreciated.

Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7638

src/modules/emotion/gstreamer1/emotion_sink.c

index 5816628..2bd9135 100644 (file)
@@ -31,6 +31,7 @@ enum {
 G_DEFINE_TYPE_WITH_CODE(EmotionVideoSink,
                      emotion_video_sink,
                      GST_TYPE_VIDEO_SINK,
+                     G_ADD_PRIVATE(EmotionVideoSink)
                      _do_init);
 
 
@@ -43,7 +44,7 @@ emotion_video_sink_init(EmotionVideoSink* sink)
    EmotionVideoSinkPrivate* priv;
 
    INF("sink init");
-   sink->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE(sink, EMOTION_TYPE_VIDEO_SINK, EmotionVideoSinkPrivate);
+   sink->priv = priv = emotion_video_sink_get_instance_private(sink);
    gst_video_info_init (&priv->info);
    priv->eheight = 0;
    priv->func = NULL;
@@ -587,8 +588,6 @@ emotion_video_sink_class_init(EmotionVideoSinkClass* klass)
    gstbase_sink_class = GST_BASE_SINK_CLASS(klass);
    gstvideo_sink_class = GST_VIDEO_SINK_CLASS(klass);
 
-   g_type_class_add_private(klass, sizeof(EmotionVideoSinkPrivate));
-
    gobject_class->set_property = emotion_video_sink_set_property;
    gobject_class->get_property = emotion_video_sink_get_property;