audioconvert: Use G_DECLARE_FINAL_TYPE
authorNiels De Graef <nielsdegraef@gmail.com>
Thu, 12 Mar 2020 06:49:45 +0000 (07:49 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 16 Mar 2020 15:47:58 +0000 (15:47 +0000)
gst/audioconvert/gstaudioconvert.c
gst/audioconvert/gstaudioconvert.h
gst/audioconvert/plugin.c
gst/audioconvert/plugin.h [deleted file]

index 5af83cf..d2f58c5 100644 (file)
 #include <string.h>
 
 #include "gstaudioconvert.h"
-#include "plugin.h"
 
 GST_DEBUG_CATEGORY (audio_convert_debug);
 GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE);
index 8befffd..3853cfa 100644 (file)
 #include <gst/base/gstbasetransform.h>
 #include <gst/audio/audio.h>
 
-#define GST_TYPE_AUDIO_CONVERT            (gst_audio_convert_get_type())
-#define GST_AUDIO_CONVERT(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_CONVERT,GstAudioConvert))
-#define GST_AUDIO_CONVERT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_CONVERT,GstAudioConvertClass))
-#define GST_IS_AUDIO_CONVERT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_CONVERT))
-#define GST_IS_AUDIO_CONVERT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_CONVERT))
-
-typedef struct _GstAudioConvert GstAudioConvert;
-typedef struct _GstAudioConvertClass GstAudioConvertClass;
+#define GST_TYPE_AUDIO_CONVERT (gst_audio_convert_get_type())
+G_DECLARE_FINAL_TYPE (GstAudioConvert, gst_audio_convert,
+    GST, AUDIO_CONVERT, GstBaseTransform)
 
 /**
  * GstAudioConvert:
@@ -55,9 +50,4 @@ struct _GstAudioConvert
   GstAudioConverter *convert;
 };
 
-struct _GstAudioConvertClass
-{
-  GstBaseTransformClass parent_class;
-};
-
 #endif /* __GST_AUDIO_CONVERT_H__ */
index 08b516d..f9ed4c3 100644 (file)
 #include "config.h"
 #endif
 
-#include "plugin.h"
+#include "gstaudioconvert.h"
 
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
   if (!gst_element_register (plugin, "audioconvert",
-          GST_RANK_PRIMARY, gst_audio_convert_get_type ()))
+          GST_RANK_PRIMARY, GST_TYPE_AUDIO_CONVERT))
     return FALSE;
 
   return TRUE;
diff --git a/gst/audioconvert/plugin.h b/gst/audioconvert/plugin.h
deleted file mode 100644 (file)
index 6c18f6d..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* GStreamer buffer-frames conversion plugin
- * Copyright (C) 2004 Andy Wingo <wingo at pobox.com>
- *
- * plugin.h: the stubs for the buffer-frames-convert plugin
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-
-#ifndef __GST_PLUGIN_AUDIO_CONVERT_H__
-#define __GST_PLUGIN_AUDIO_CONVERT_H__
-
-
-#include <gst/gst.h>
-
-G_BEGIN_DECLS
-
-GType gst_audio_convert_get_type (void);
-
-G_END_DECLS
-
-#endif /* __GST_PLUGIN_AUDIO_CONVERT_H__ */