audioresample: Use G_DECLARE_FINAL_TYPE
authorNiels De Graef <nielsdegraef@gmail.com>
Thu, 12 Mar 2020 06:42:52 +0000 (07:42 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 16 Mar 2020 15:47:58 +0000 (15:47 +0000)
gst/audioresample/gstaudioresample.h

index 6092493..205512a 100644 (file)
 
 G_BEGIN_DECLS
 
-#define GST_TYPE_AUDIO_RESAMPLE \
-  (gst_audio_resample_get_type())
-#define GST_AUDIO_RESAMPLE(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_RESAMPLE,GstAudioResample))
-#define GST_AUDIO_RESAMPLE_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_RESAMPLE,GstAudioResampleClass))
-#define GST_IS_AUDIO_RESAMPLE(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_RESAMPLE))
-#define GST_IS_AUDIO_RESAMPLE_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_RESAMPLE))
-
-typedef struct _GstAudioResample GstAudioResample;
-typedef struct _GstAudioResampleClass GstAudioResampleClass;
+#define GST_TYPE_AUDIO_RESAMPLE (gst_audio_resample_get_type())
+G_DECLARE_FINAL_TYPE (GstAudioResample, gst_audio_resample, GST, AUDIO_RESAMPLE,
+    GstBaseTransform)
 
 /**
  * GstAudioResample:
@@ -75,12 +65,6 @@ struct _GstAudioResample {
   GstAudioConverter *converter;
 };
 
-struct _GstAudioResampleClass {
-  GstBaseTransformClass parent_class;
-};
-
-GType gst_audio_resample_get_type(void);
-
 G_END_DECLS
 
 #endif /* __AUDIO_RESAMPLE_H__ */