summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2018-12-03 13:56:52 +0100
committerNiels De Graef <nielsdegraef@gmail.com>2018-12-10 10:54:53 +0100
commite73e69a48037502a7db5754f2f52b3e438e1ba05 (patch)
treee3f1bbff1116ac4377ae6488971f40caff586b1d
parent2b016fdde9ac4609ed87c686ca5f123d268ee3ee (diff)
Use G_DEFINE_TYPE_WITH_PRIVATE if applicable
This gets rid of the strange `do_init` macro and makes the intent a bit more clear.
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay_drm.c7
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay_wayland.c7
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay_x11.c7
3 files changed, 6 insertions, 15 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_drm.c b/gst-libs/gst/vaapi/gstvaapidisplay_drm.c
index f39b4b74..25707544 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay_drm.c
+++ b/gst-libs/gst/vaapi/gstvaapidisplay_drm.c
@@ -41,11 +41,8 @@
#define DEBUG_VAAPI_DISPLAY 1
#include "gstvaapidebug.h"
-#define _do_init \
- G_ADD_PRIVATE (GstVaapiDisplayDRM);
-
-G_DEFINE_TYPE_WITH_CODE (GstVaapiDisplayDRM, gst_vaapi_display_drm,
- GST_TYPE_VAAPI_DISPLAY, _do_init);
+G_DEFINE_TYPE_WITH_PRIVATE (GstVaapiDisplayDRM, gst_vaapi_display_drm,
+ GST_TYPE_VAAPI_DISPLAY);
typedef enum
{
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_wayland.c b/gst-libs/gst/vaapi/gstvaapidisplay_wayland.c
index 4b6fc1ca..6147cbab 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay_wayland.c
+++ b/gst-libs/gst/vaapi/gstvaapidisplay_wayland.c
@@ -35,11 +35,8 @@
#define DEBUG_VAAPI_DISPLAY 1
#include "gstvaapidebug.h"
-#define _do_init \
- G_ADD_PRIVATE (GstVaapiDisplayWayland);
-
-G_DEFINE_TYPE_WITH_CODE (GstVaapiDisplayWayland, gst_vaapi_display_wayland,
- GST_TYPE_VAAPI_DISPLAY, _do_init);
+G_DEFINE_TYPE_WITH_PRIVATE (GstVaapiDisplayWayland, gst_vaapi_display_wayland,
+ GST_TYPE_VAAPI_DISPLAY);
static inline const gchar *
get_default_display_name (void)
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_x11.c b/gst-libs/gst/vaapi/gstvaapidisplay_x11.c
index dbcfee4f..f5fa2fce 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay_x11.c
+++ b/gst-libs/gst/vaapi/gstvaapidisplay_x11.c
@@ -45,11 +45,8 @@
#define DEBUG_VAAPI_DISPLAY 1
#include "gstvaapidebug.h"
-#define _do_init \
- G_ADD_PRIVATE (GstVaapiDisplayX11);
-
-G_DEFINE_TYPE_WITH_CODE (GstVaapiDisplayX11, gst_vaapi_display_x11,
- GST_TYPE_VAAPI_DISPLAY, _do_init);
+G_DEFINE_TYPE_WITH_PRIVATE (GstVaapiDisplayX11, gst_vaapi_display_x11,
+ GST_TYPE_VAAPI_DISPLAY);
static inline const gchar *
get_default_display_name (void)