[gupnp-dlna/wip/meson: 1/3] backend-gst: Drop deprecated privat functions



commit 14417c43caf67ccc3c0a5a64741cd93540d5a607
Author: Jens Georg <mail jensge org>
Date:   Sat Oct 26 14:24:45 2019 +0200

    backend-gst: Drop deprecated privat functions

 .../gupnp-dlna-gst-container-information.c         | 24 ++++++----------------
 .../gstreamer/gupnp-dlna-gst-image-information.c   | 22 +++++---------------
 .../gstreamer/gupnp-dlna-gst-information.c         | 19 +++++------------
 .../gstreamer/gupnp-dlna-gst-metadata-extractor.c  | 19 +++++------------
 .../gstreamer/gupnp-dlna-gst-video-information.c   | 23 ++++++---------------
 5 files changed, 27 insertions(+), 80 deletions(-)
---
diff --git a/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-container-information.c 
b/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-container-information.c
index 6ad3133..22faa26 100644
--- a/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-container-information.c
+++ b/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-container-information.c
@@ -25,16 +25,16 @@
 #include "gupnp-dlna-gst-container-information.h"
 #include "gupnp-dlna-gst-info-utils.h"
 
-G_DEFINE_TYPE (GUPnPDLNAGstContainerInformation,
-               gupnp_dlna_gst_container_information,
-               GUPNP_TYPE_DLNA_CONTAINER_INFORMATION)
-
 struct _GUPnPDLNAGstContainerInformationPrivate {
         GstDiscovererInfo *info;
         GstDiscovererStreamInfo *container_info;
         GstCaps *caps;
 };
 
+G_DEFINE_TYPE_WITH_PRIVATE (GUPnPDLNAGstContainerInformation,
+                            gupnp_dlna_gst_container_information,
+                            GUPNP_TYPE_DLNA_CONTAINER_INFORMATION)
+
 enum
 {
         PROP_0,
@@ -247,26 +247,14 @@ gupnp_dlna_gst_container_information_class_init
         g_object_class_install_property (object_class,
                                          PROP_INFO,
                                          pspec);
-
-        g_type_class_add_private
-                             (gst_info_class,
-                              sizeof (GUPnPDLNAGstContainerInformationPrivate));
 }
 
 static void
 gupnp_dlna_gst_container_information_init
                                         (GUPnPDLNAGstContainerInformation *self)
 {
-        GUPnPDLNAGstContainerInformationPrivate *priv =
-                G_TYPE_INSTANCE_GET_PRIVATE
-                                     (self,
-                                      GUPNP_TYPE_DLNA_GST_CONTAINER_INFORMATION,
-                                      GUPnPDLNAGstContainerInformationPrivate);
-
-        priv->info = NULL;
-        priv->container_info = NULL;
-        priv->caps = NULL;
-        self->priv = priv;
+        self->priv = gupnp_dlna_gst_container_information_get_instance_private
+                                        (self);
 }
 
 GUPnPDLNAGstContainerInformation *
diff --git a/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-image-information.c 
b/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-image-information.c
index 6547819..e594fff 100644
--- a/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-image-information.c
+++ b/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-image-information.c
@@ -25,10 +25,6 @@
 #include "gupnp-dlna-gst-image-information.h"
 #include "gupnp-dlna-gst-info-utils.h"
 
-G_DEFINE_TYPE (GUPnPDLNAGstImageInformation,
-               gupnp_dlna_gst_image_information,
-               GUPNP_TYPE_DLNA_IMAGE_INFORMATION)
-
 struct _GUPnPDLNAGstImageInformationPrivate {
         GstDiscovererInfo *info;
         GList *stream_list;
@@ -36,6 +32,10 @@ struct _GUPnPDLNAGstImageInformationPrivate {
         GstCaps *caps;
 };
 
+G_DEFINE_TYPE_WITH_PRIVATE (GUPnPDLNAGstImageInformation,
+                            gupnp_dlna_gst_image_information,
+                            GUPNP_TYPE_DLNA_IMAGE_INFORMATION)
+
 enum
 {
         PROP_0,
@@ -239,24 +239,12 @@ gupnp_dlna_gst_image_information_class_init
         g_object_class_install_property (object_class,
                                          PROP_INFO,
                                          pspec);
-
-        g_type_class_add_private (gst_info_class,
-                                  sizeof (GUPnPDLNAGstImageInformationPrivate));
 }
 
 static void
 gupnp_dlna_gst_image_information_init (GUPnPDLNAGstImageInformation *self)
 {
-        GUPnPDLNAGstImageInformationPrivate *priv = G_TYPE_INSTANCE_GET_PRIVATE
-                                        (self,
-                                         GUPNP_TYPE_DLNA_GST_IMAGE_INFORMATION,
-                                         GUPnPDLNAGstImageInformationPrivate);
-
-        priv->info = NULL;
-        priv->stream_list = NULL;
-        priv->image_info = NULL;
-        priv->caps = NULL;
-        self->priv = priv;
+        self->priv = gupnp_dlna_gst_image_information_get_instance_private (self);
 }
 
 GUPnPDLNAGstImageInformation *
diff --git a/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-information.c 
b/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-information.c
index bd7fc6b..08f1efa 100644
--- a/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-information.c
+++ b/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-information.c
@@ -29,14 +29,14 @@
 #include "gupnp-dlna-gst-image-information.h"
 #include "gupnp-dlna-gst-video-information.h"
 
-G_DEFINE_TYPE (GUPnPDLNAGstInformation,
-               gupnp_dlna_gst_information,
-               GUPNP_TYPE_DLNA_INFORMATION)
-
 struct _GUPnPDLNAGstInformationPrivate {
         GstDiscovererInfo* info;
 };
 
+G_DEFINE_TYPE_WITH_PRIVATE (GUPnPDLNAGstInformation,
+                            gupnp_dlna_gst_information,
+                            GUPNP_TYPE_DLNA_INFORMATION)
+
 enum {
         PROP_0,
 
@@ -174,21 +174,12 @@ gupnp_dlna_gst_information_class_init
         g_object_class_install_property (object_class,
                                          PROP_INFO,
                                          pspec);
-
-        g_type_class_add_private (gst_info_class,
-                                  sizeof (GUPnPDLNAGstInformationPrivate));
 }
 
 static void
 gupnp_dlna_gst_information_init (GUPnPDLNAGstInformation *self)
 {
-        GUPnPDLNAGstInformationPrivate *priv = G_TYPE_INSTANCE_GET_PRIVATE
-                                        (self,
-                                         GUPNP_TYPE_DLNA_GST_INFORMATION,
-                                         GUPnPDLNAGstInformationPrivate);
-
-        priv->info = NULL;
-        self->priv = priv;
+        self->priv = gupnp_dlna_gst_information_get_instance_private (self);
 }
 
 GUPnPDLNAGstInformation *
diff --git a/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-metadata-extractor.c 
b/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-metadata-extractor.c
index e76ac85..702d634 100644
--- a/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-metadata-extractor.c
+++ b/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-metadata-extractor.c
@@ -26,14 +26,14 @@
 #include "gupnp-dlna-gst-information.h"
 #include "gupnp-dlna-gst-utils.h"
 
-G_DEFINE_TYPE (GUPnPDLNAGstMetadataExtractor,
-               gupnp_dlna_gst_metadata_extractor,
-               GUPNP_TYPE_DLNA_METADATA_EXTRACTOR)
-
 struct _GUPnPDLNAGstMetadataExtractorPrivate {
         gpointer placeholder;
 };
 
+G_DEFINE_TYPE_WITH_PRIVATE (GUPnPDLNAGstMetadataExtractor,
+                            gupnp_dlna_gst_metadata_extractor,
+                            GUPNP_TYPE_DLNA_METADATA_EXTRACTOR)
+
 static gboolean
 unref_discoverer_in_idle (GstDiscoverer *discoverer)
 {
@@ -137,21 +137,12 @@ gupnp_dlna_gst_metadata_extractor_class_init
 
         extractor_class->extract_async = backend_extract_async;
         extractor_class->extract_sync = backend_extract_sync;
-
-        g_type_class_add_private
-                                (gst_extractor_class,
-                                 sizeof (GUPnPDLNAGstMetadataExtractorPrivate));
 }
 
 static void
 gupnp_dlna_gst_metadata_extractor_init (GUPnPDLNAGstMetadataExtractor *self)
 {
-        GUPnPDLNAGstMetadataExtractorPrivate *priv =
-            G_TYPE_INSTANCE_GET_PRIVATE (self,
-                                         GUPNP_TYPE_DLNA_GST_METADATA_EXTRACTOR,
-                                         GUPnPDLNAGstMetadataExtractorPrivate);
-
-        self->priv = priv;
+        self->priv = gupnp_dlna_gst_metadata_extractor_get_instance_private (self);
 }
 
 GUPnPDLNAGstMetadataExtractor *
diff --git a/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-video-information.c 
b/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-video-information.c
index 3a3b3c9..aee6a36 100644
--- a/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-video-information.c
+++ b/libgupnp-dlna/metadata-backends/gstreamer/gupnp-dlna-gst-video-information.c
@@ -25,10 +25,6 @@
 #include "gupnp-dlna-gst-video-information.h"
 #include "gupnp-dlna-gst-info-utils.h"
 
-G_DEFINE_TYPE (GUPnPDLNAGstVideoInformation,
-               gupnp_dlna_gst_video_information,
-               GUPNP_TYPE_DLNA_VIDEO_INFORMATION)
-
 struct _GUPnPDLNAGstVideoInformationPrivate {
         GstDiscovererInfo *info;
         GList *stream_list;
@@ -36,6 +32,10 @@ struct _GUPnPDLNAGstVideoInformationPrivate {
         GstCaps *caps;
 };
 
+G_DEFINE_TYPE_WITH_PRIVATE (GUPnPDLNAGstVideoInformation,
+                            gupnp_dlna_gst_video_information,
+                            GUPNP_TYPE_DLNA_VIDEO_INFORMATION)
+
 enum
 {
         PROP_0,
@@ -372,24 +372,13 @@ gupnp_dlna_gst_video_information_class_init
         g_object_class_install_property (object_class,
                                          PROP_INFO,
                                          pspec);
-
-        g_type_class_add_private (gst_info_class,
-                                  sizeof (GUPnPDLNAGstVideoInformationPrivate));
 }
 
 static void
 gupnp_dlna_gst_video_information_init (GUPnPDLNAGstVideoInformation *self)
 {
-        GUPnPDLNAGstVideoInformationPrivate *priv = G_TYPE_INSTANCE_GET_PRIVATE
-                                        (self,
-                                         GUPNP_TYPE_DLNA_GST_VIDEO_INFORMATION,
-                                         GUPnPDLNAGstVideoInformationPrivate);
-
-        priv->info = NULL;
-        priv->stream_list = NULL;
-        priv->video_info = NULL;
-        priv->caps = NULL;
-        self->priv = priv;
+        self->priv = gupnp_dlna_gst_video_information_get_instance_private
+                                        (self);
 }
 
 GUPnPDLNAGstVideoInformation *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]