From f91659ba9251bf2308e697f9849f4d325976e17e Mon Sep 17 00:00:00 2001 From: Niels De Graef Date: Thu, 12 Mar 2020 07:41:16 +0100 Subject: [PATCH] audiotestsrc: Use G_DECLARE_FINAL_TYPE --- gst/audiotestsrc/gstaudiotestsrc.h | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/gst/audiotestsrc/gstaudiotestsrc.h b/gst/audiotestsrc/gstaudiotestsrc.h index 3253e16752..96e00900b5 100644 --- a/gst/audiotestsrc/gstaudiotestsrc.h +++ b/gst/audiotestsrc/gstaudiotestsrc.h @@ -28,17 +28,9 @@ G_BEGIN_DECLS - -#define GST_TYPE_AUDIO_TEST_SRC \ - (gst_audio_test_src_get_type()) -#define GST_AUDIO_TEST_SRC(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_TEST_SRC,GstAudioTestSrc)) -#define GST_AUDIO_TEST_SRC_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_TEST_SRC,GstAudioTestSrcClass)) -#define GST_IS_AUDIO_TEST_SRC(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_TEST_SRC)) -#define GST_IS_AUDIO_TEST_SRC_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_TEST_SRC)) +#define GST_TYPE_AUDIO_TEST_SRC (gst_audio_test_src_get_type()) +G_DECLARE_FINAL_TYPE (GstAudioTestSrc, gst_audio_test_src, GST, AUDIO_TEST_SRC, + GstBaseSrc) /** * GstAudioTestSrcWave: @@ -90,9 +82,6 @@ typedef struct { gdouble state; /* noise state */ } GstRedNoise; -typedef struct _GstAudioTestSrc GstAudioTestSrc; -typedef struct _GstAudioTestSrcClass GstAudioTestSrcClass; - typedef void (*ProcessFunc) (GstAudioTestSrc*, guint8 *); /** @@ -146,12 +135,6 @@ struct _GstAudioTestSrc { guint tick_counter; }; -struct _GstAudioTestSrcClass { - GstBaseSrcClass parent_class; -}; - -GType gst_audio_test_src_get_type (void); - G_END_DECLS #endif /* __GST_AUDIO_TEST_SRC_H__ */