vpx: Use G_DECLARE_FINAL_TYPE

This commit is contained in:
Niels De Graef 2020-03-15 19:26:18 +01:00
parent 5406208f0d
commit 34a934d8d4
6 changed files with 12 additions and 80 deletions

View file

@ -44,32 +44,14 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_VP8_DEC \ #define GST_TYPE_VP8_DEC (gst_vp8_dec_get_type())
(gst_vp8_dec_get_type()) G_DECLARE_FINAL_TYPE (GstVP8Dec, gst_vp8_dec, GST, VP8_DEC, GstVPXDec)
#define GST_VP8_DEC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VP8_DEC,GstVP8Dec))
#define GST_VP8_DEC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VP8_DEC,GstVP8DecClass))
#define GST_IS_VP8_DEC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VP8_DEC))
#define GST_IS_VP8_DEC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VP8_DEC))
typedef struct _GstVP8Dec GstVP8Dec;
typedef struct _GstVP8DecClass GstVP8DecClass;
struct _GstVP8Dec struct _GstVP8Dec
{ {
GstVPXDec base_vpx_decoder; GstVPXDec base_vpx_decoder;
}; };
struct _GstVP8DecClass
{
GstVPXDecClass base_vpx_class;
};
GType gst_vp8_dec_get_type (void);
G_END_DECLS G_END_DECLS
#endif #endif

View file

@ -38,19 +38,8 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_VP8_ENC \ #define GST_TYPE_VP8_ENC (gst_vp8_enc_get_type())
(gst_vp8_enc_get_type()) G_DECLARE_FINAL_TYPE (GstVP8Enc, gst_vp8_enc, GST, VP8_ENC, GstVPXEnc)
#define GST_VP8_ENC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VP8_ENC,GstVP8Enc))
#define GST_VP8_ENC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VP8_ENC,GstVP8EncClass))
#define GST_IS_VP8_ENC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VP8_ENC))
#define GST_IS_VP8_ENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VP8_ENC))
typedef struct _GstVP8Enc GstVP8Enc;
typedef struct _GstVP8EncClass GstVP8EncClass;
struct _GstVP8Enc struct _GstVP8Enc
{ {
@ -59,13 +48,6 @@ struct _GstVP8Enc
int keyframe_distance; int keyframe_distance;
}; };
struct _GstVP8EncClass
{
GstVPXEncClass base_vpxenc_class;
};
GType gst_vp8_enc_get_type (void);
G_END_DECLS G_END_DECLS
#endif #endif

View file

@ -44,32 +44,14 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_VP9_DEC \ #define GST_TYPE_VP9_DEC (gst_vp9_dec_get_type())
(gst_vp9_dec_get_type()) G_DECLARE_FINAL_TYPE (GstVP9Dec, gst_vp9_dec, GST, VP9_DEC, GstVPXDec)
#define GST_VP9_DEC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VP9_DEC,GstVP9Dec))
#define GST_VP9_DEC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VP9_DEC,GstVP9DecClass))
#define GST_IS_VP9_DEC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VP9_DEC))
#define GST_IS_VP9_DEC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VP9_DEC))
typedef struct _GstVP9Dec GstVP9Dec;
typedef struct _GstVP9DecClass GstVP9DecClass;
struct _GstVP9Dec struct _GstVP9Dec
{ {
GstVPXDec base_vpx_decoder; GstVPXDec base_vpx_decoder;
}; };
struct _GstVP9DecClass
{
GstVPXDecClass base_vpx_class;
};
GType gst_vp9_dec_get_type (void);
G_END_DECLS G_END_DECLS
#endif #endif

View file

@ -38,32 +38,14 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_VP9_ENC \ #define GST_TYPE_VP9_ENC (gst_vp9_enc_get_type())
(gst_vp9_enc_get_type()) G_DECLARE_FINAL_TYPE (GstVP9Enc, gst_vp9_enc, GST, VP9_ENC, GstVPXEnc)
#define GST_VP9_ENC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VP9_ENC,GstVP9Enc))
#define GST_VP9_ENC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VP9_ENC,GstVP9EncClass))
#define GST_IS_VP9_ENC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VP9_ENC))
#define GST_IS_VP9_ENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VP9_ENC))
typedef struct _GstVP9Enc GstVP9Enc;
typedef struct _GstVP9EncClass GstVP9EncClass;
struct _GstVP9Enc struct _GstVP9Enc
{ {
GstVPXEnc base_vpx_encoder; GstVPXEnc base_vpx_encoder;
}; };
struct _GstVP9EncClass
{
GstVPXEncClass base_vpxenc_class;
};
GType gst_vp9_enc_get_type (void);
G_END_DECLS G_END_DECLS
#endif #endif

View file

@ -106,6 +106,8 @@ struct _GstVPXDecClass
GType gst_vpx_dec_get_type (void); GType gst_vpx_dec_get_type (void);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GstVPXDec, gst_object_unref)
G_END_DECLS G_END_DECLS
#endif #endif

View file

@ -133,6 +133,8 @@ struct _GstVPXEncClass
GType gst_vpx_enc_get_type (void); GType gst_vpx_enc_get_type (void);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GstVPXEnc, gst_object_unref)
G_END_DECLS G_END_DECLS
#endif #endif