From 7e4e79bec8b4117e49ee07451b9501255408f857 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Wed, 16 Jan 2019 11:23:44 +0000 Subject: [PATCH] emotion: gstreamer: fix deprecation warning for g_type_class_add_private 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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/emotion/gstreamer1/emotion_sink.c b/src/modules/emotion/gstreamer1/emotion_sink.c index 5816628..2bd9135 100644 --- a/src/modules/emotion/gstreamer1/emotion_sink.c +++ b/src/modules/emotion/gstreamer1/emotion_sink.c @@ -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; -- 2.7.4