rawparse: Use G_DECLARE_FINAL_TYPE

This commit is contained in:
Niels De Graef 2020-03-12 13:20:51 +01:00 committed by GStreamer Merge Bot
parent 2917f9fb2d
commit 2daf748b61
7 changed files with 18 additions and 85 deletions

View file

@ -26,24 +26,14 @@
G_BEGIN_DECLS
#define GST_TYPE_RAW_AUDIO_PARSE \
(gst_raw_audio_parse_get_type())
#define GST_RAW_AUDIO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_RAW_AUDIO_PARSE, GstRawAudioParse))
#define GST_RAW_AUDIO_PARSE_CAST(obj) \
((GstRawAudioParse *)(obj))
#define GST_RAW_AUDIO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_RAW_AUDIO_PARSE, GstRawAudioParseClass))
#define GST_IS_RAW_AUDIO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_RAW_AUDIO_PARSE))
#define GST_IS_RAW_AUDIO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_RAW_AUDIO_PARSE))
#define GST_TYPE_RAW_AUDIO_PARSE (gst_raw_audio_parse_get_type())
#define GST_RAW_AUDIO_PARSE_CAST(obj) ((GstRawAudioParse *)(obj))
G_DECLARE_FINAL_TYPE (GstRawAudioParse, gst_raw_audio_parse,
GST, RAW_AUDIO_PARSE, GstRawBaseParse)
typedef enum _GstRawAudioParseFormat GstRawAudioParseFormat;
typedef struct _GstRawAudioParseConfig GstRawAudioParseConfig;
typedef struct _GstRawAudioParse GstRawAudioParse;
typedef struct _GstRawAudioParseClass GstRawAudioParseClass;
enum _GstRawAudioParseFormat
{
@ -111,12 +101,6 @@ struct _GstRawAudioParse
GstRawAudioParseConfig *current_config;
};
struct _GstRawAudioParseClass
{
GstRawBaseParseClass parent_class;
};
GType gst_raw_audio_parse_get_type (void);
GType gst_raw_audio_parse_format_get_type (void);
G_END_DECLS

View file

@ -198,6 +198,8 @@ void gst_raw_base_parse_invalidate_src_caps (GstRawBaseParse * raw_base_parse);
GType gst_raw_base_parse_get_type (void);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstRawBaseParse, gst_object_unref)
G_END_DECLS
#endif

View file

@ -26,22 +26,12 @@
G_BEGIN_DECLS
#define GST_TYPE_RAW_VIDEO_PARSE \
(gst_raw_video_parse_get_type())
#define GST_RAW_VIDEO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_RAW_VIDEO_PARSE, GstRawVideoParse))
#define GST_RAW_VIDEO_PARSE_CAST(obj) \
((GstRawVideoParse *)(obj))
#define GST_RAW_VIDEO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_RAW_VIDEO_PARSE, GstRawVideoParseClass))
#define GST_IS_RAW_VIDEO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_RAW_VIDEO_PARSE))
#define GST_IS_RAW_VIDEO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_RAW_VIDEO_PARSE))
#define GST_TYPE_RAW_VIDEO_PARSE (gst_raw_video_parse_get_type())
#define GST_RAW_VIDEO_PARSE_CAST(obj) ((GstRawVideoParse *)(obj))
G_DECLARE_FINAL_TYPE (GstRawVideoParse, gst_raw_video_parse,
GST, RAW_VIDEO_PARSE, GstRawBaseParse)
typedef struct _GstRawVideoParseConfig GstRawVideoParseConfig;
typedef struct _GstRawVideoParse GstRawVideoParse;
typedef struct _GstRawVideoParseClass GstRawVideoParseClass;
/* Contains information about the video frame format. */
struct _GstRawVideoParseConfig
@ -101,13 +91,6 @@ struct _GstRawVideoParse
GstRawVideoParseConfig *current_config;
};
struct _GstRawVideoParseClass
{
GstRawBaseParseClass parent_class;
};
GType gst_raw_video_parse_get_type (void);
G_END_DECLS
#endif

View file

@ -35,11 +35,6 @@ struct _GstUnalignedAudioParse
GstElement *inner_parser;
};
struct _GstUnalignedAudioParseClass
{
GstBinClass parent_class;
};
static GstStaticPadTemplate static_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,

View file

@ -26,23 +26,10 @@
G_BEGIN_DECLS
#define GST_TYPE_UNALIGNED_AUDIO_PARSE \
(gst_unaligned_audio_parse_get_type())
#define GST_UNALIGNED_AUDIO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_UNALIGNED_AUDIO_PARSE, GstUnalignedAudioParse))
#define GST_UNALIGNED_AUDIO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_UNALIGNED_AUDIO_PARSE, GstUnalignedAudioParseClass))
#define GST_UNALIGNED_AUDIO_PARSE_CAST(obj) \
((GstUnalignedAudioParse *)(obj))
#define GST_IS_UNALIGNED_AUDIO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_UNALIGNED_AUDIO_PARSE))
#define GST_IS_UNALIGNED_AUDIO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_UNALIGNED_AUDIO_PARSE))
typedef struct _GstUnalignedAudioParse GstUnalignedAudioParse;
typedef struct _GstUnalignedAudioParseClass GstUnalignedAudioParseClass;
GType gst_unaligned_audio_parse_get_type (void);
#define GST_TYPE_UNALIGNED_AUDIO_PARSE (gst_unaligned_audio_parse_get_type())
#define GST_UNALIGNED_AUDIO_PARSE_CAST(obj) ((GstRawAudioParse *)(obj))
G_DECLARE_FINAL_TYPE (GstUnalignedAudioParse, gst_unaligned_audio_parse,
GST, UNALIGNED_AUDIO_PARSE, GstBin)
G_END_DECLS

View file

@ -35,11 +35,6 @@ struct _GstUnalignedVideoParse
GstElement *inner_parser;
};
struct _GstUnalignedVideoParseClass
{
GstBinClass parent_class;
};
static GstStaticPadTemplate static_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,

View file

@ -26,23 +26,10 @@
G_BEGIN_DECLS
#define GST_TYPE_UNALIGNED_VIDEO_PARSE \
(gst_unaligned_video_parse_get_type())
#define GST_UNALIGNED_VIDEO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_UNALIGNED_VIDEO_PARSE, GstUnalignedVideoParse))
#define GST_UNALIGNED_VIDEO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_UNALIGNED_VIDEO_PARSE, GstUnalignedVideoParseClass))
#define GST_UNALIGNED_VIDEO_PARSE_CAST(obj) \
((GstUnalignedVideoParse *)(obj))
#define GST_IS_UNALIGNED_VIDEO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_UNALIGNED_VIDEO_PARSE))
#define GST_IS_UNALIGNED_VIDEO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_UNALIGNED_VIDEO_PARSE))
typedef struct _GstUnalignedVideoParse GstUnalignedVideoParse;
typedef struct _GstUnalignedVideoParseClass GstUnalignedVideoParseClass;
GType gst_unaligned_video_parse_get_type (void);
#define GST_TYPE_UNALIGNED_VIDEO_PARSE (gst_unaligned_video_parse_get_type())
#define GST_UNALIGNED_VIDEO_PARSE_CAST(obj) ((GstRawAudioParse *)(obj))
G_DECLARE_FINAL_TYPE (GstUnalignedVideoParse, gst_unaligned_video_parse,
GST, UNALIGNED_VIDEO_PARSE, GstBin)
G_END_DECLS