From 1b6a6cabf2ce322db9d04d1ab0f1b262e8b1f857 Mon Sep 17 00:00:00 2001 From: Niels De Graef Date: Thu, 12 Mar 2020 07:39:09 +0100 Subject: [PATCH] compositor: Use G_DECLARE_FINAL_TYPE --- gst/compositor/compositor.h | 39 ++++--------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) diff --git a/gst/compositor/compositor.h b/gst/compositor/compositor.h index 0c2c0a3ff1..18e5bb0924 100644 --- a/gst/compositor/compositor.h +++ b/gst/compositor/compositor.h @@ -30,30 +30,12 @@ G_BEGIN_DECLS #define GST_TYPE_COMPOSITOR (gst_compositor_get_type()) -#define GST_COMPOSITOR(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_COMPOSITOR, GstCompositor)) -#define GST_COMPOSITOR_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_COMPOSITOR, GstCompositorClass)) -#define GST_IS_COMPOSITOR(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_COMPOSITOR)) -#define GST_IS_COMPOSITOR_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_COMPOSITOR)) +G_DECLARE_FINAL_TYPE (GstCompositor, gst_compositor, GST, COMPOSITOR, + GstVideoAggregator) #define GST_TYPE_COMPOSITOR_PAD (gst_compositor_pad_get_type()) -#define GST_COMPOSITOR_PAD(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_COMPOSITOR_PAD, GstCompositorPad)) -#define GST_COMPOSITOR_PAD_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_COMPOSITOR_PAD, GstCompositorPadClass)) -#define GST_IS_COMPOSITOR_PAD(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_COMPOSITOR_PAD)) -#define GST_IS_COMPOSITOR_PAD_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_COMPOSITOR_PAD)) - -typedef struct _GstCompositor GstCompositor; -typedef struct _GstCompositorClass GstCompositorClass; - -typedef struct _GstCompositorPad GstCompositorPad; -typedef struct _GstCompositorPadClass GstCompositorPadClass; +G_DECLARE_FINAL_TYPE (GstCompositorPad, gst_compositor_pad, GST, COMPOSITOR_PAD, + GstVideoAggregatorConvertPad) /** * GstCompositorBackground: @@ -112,11 +94,6 @@ struct _GstCompositor FillColorFunction fill_color; }; -struct _GstCompositorClass -{ - GstVideoAggregatorClass parent_class; -}; - /** * GstCompositorPad: * @@ -134,13 +111,5 @@ struct _GstCompositorPad GstCompositorOperator op; }; -struct _GstCompositorPadClass -{ - GstVideoAggregatorConvertPadClass parent_class; -}; - -GType gst_compositor_get_type (void); -GType gst_compositor_pad_get_type (void); - G_END_DECLS #endif /* __GST_COMPOSITOR_H__ */