libpng: Use G_DECLARE_FINAL_TYPE

This commit is contained in:
Niels De Graef 2020-03-15 18:52:57 +01:00
parent 2cf28f3021
commit 45d7dfedb8
3 changed files with 5 additions and 40 deletions

View file

@ -19,7 +19,5 @@
#include <gst/gst.h>
#include <png.h>
GType gst_pngenc_get_type (void);
extern GstPadTemplate *gst_png_sink_factory ();
extern GstPadTemplate *gst_png_src_factory ();

View file

@ -30,13 +30,7 @@
G_BEGIN_DECLS
#define GST_TYPE_PNGDEC (gst_pngdec_get_type())
#define GST_PNGDEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PNGDEC,GstPngDec))
#define GST_PNGDEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PNGDEC,GstPngDecClass))
#define GST_IS_PNGDEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PNGDEC))
#define GST_IS_PNGDEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PNGDEC))
typedef struct _GstPngDec GstPngDec;
typedef struct _GstPngDecClass GstPngDecClass;
G_DECLARE_FINAL_TYPE (GstPngDec, gst_pngdec, GST, PNGDEC, GstVideoDecoder)
struct _GstPngDec
{
@ -59,13 +53,6 @@ struct _GstPngDec
gsize read_data;
};
struct _GstPngDecClass
{
GstVideoDecoderClass parent_class;
};
GType gst_pngdec_get_type(void);
G_END_DECLS
#endif /* __GST_PNGDEC_H__ */

View file

@ -27,19 +27,10 @@
#include <gst/video/gstvideoencoder.h>
#include <png.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
G_BEGIN_DECLS
#define GST_TYPE_PNGENC (gst_pngenc_get_type())
#define GST_PNGENC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PNGENC,GstPngEnc))
#define GST_PNGENC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PNGENC,GstPngEncClass))
#define GST_IS_PNGENC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PNGENC))
#define GST_IS_PNGENC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PNGENC))
typedef struct _GstPngEnc GstPngEnc;
typedef struct _GstPngEncClass GstPngEncClass;
G_DECLARE_FINAL_TYPE (GstPngEnc, gst_pngenc, GST, PNGENC, GstVideoEncoder)
struct _GstPngEnc
{
@ -59,17 +50,6 @@ struct _GstPngEnc
gboolean newmedia;
};
struct _GstPngEncClass
{
GstVideoEncoderClass parent_class;
};
GType gst_pngenc_get_type(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
G_END_DECLS
#endif /* __GST_PNGENC_H__ */