qt: Use G_DECLARE_FINAL_TYPE

This commit is contained in:
Niels De Graef 2020-03-15 19:06:50 +01:00
parent a9ff9fe94e
commit 91c55bd920
2 changed files with 6 additions and 41 deletions

View file

@ -27,19 +27,13 @@
#include <gst/gl/gl.h>
#include "qtitem.h"
typedef struct _GstQtSink GstQtSink;
typedef struct _GstQtSinkClass GstQtSinkClass;
typedef struct _GstQtSinkPrivate GstQtSinkPrivate;
G_BEGIN_DECLS
GType gst_qt_sink_get_type (void);
#define GST_TYPE_QT_SINK (gst_qt_sink_get_type())
#define GST_QT_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QT_SINK,GstQtSink))
#define GST_QT_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_QT_SINK,GstQtSinkClass))
#define GST_IS_QT_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QT_SINK))
#define GST_IS_QT_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QT_SINK))
#define GST_QT_SINK_CAST(obj) ((GstQtSink*)(obj))
#define GST_TYPE_QT_SINK (gst_qt_sink_get_type())
G_DECLARE_FINAL_TYPE (GstQtSink, gst_qt_sink, GST, QT_SINK, GstVideoSink)
#define GST_QT_SINK_CAST(obj) ((GstQtSink*)(obj))
/**
* GstQtSink:
@ -61,17 +55,6 @@ struct _GstQtSink
QSharedPointer<QtGLVideoItemInterface> widget;
};
/**
* GstQtSinkClass:
*
* The #GstQtSinkClass struct only contains private data
*/
struct _GstQtSinkClass
{
/* <private> */
GstVideoSinkClass object_class;
};
GstQtSink * gst_qt_sink_new (void);
G_END_DECLS

View file

@ -27,18 +27,11 @@
#include <gst/gl/gl.h>
#include "qtwindow.h"
typedef struct _GstQtSrc GstQtSrc;
typedef struct _GstQtSrcClass GstQtSrcClass;
G_BEGIN_DECLS
GType gst_qt_src_get_type (void);
#define GST_TYPE_QT_SRC (gst_qt_src_get_type())
#define GST_QT_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QT_SRC,GstQtSrc))
#define GST_QT_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_QT_SRC,GstQtSrcClass))
#define GST_IS_QT_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QT_SRC))
#define GST_IS_QT_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QT_SRC))
#define GST_QT_SRC_CAST(obj) ((GstQtSrc*)(obj))
#define GST_TYPE_QT_SRC (gst_qt_src_get_type())
G_DECLARE_FINAL_TYPE (GstQtSrc, gst_qt_src, GST, QT_SRC, GstPushSrc)
#define GST_QT_SRC_CAST(obj) ((GstQtSrc*)(obj))
/**
* GstQtSrc:
@ -64,17 +57,6 @@ struct _GstQtSrc
gboolean pending_image_orientation;
};
/**
* GstQtSrcClass:
*
* The #GstQtSrcClass struct only contains private data
*/
struct _GstQtSrcClass
{
/* <private> */
GstPushSrcClass object_class;
};
G_END_DECLS
#endif /* __GST_QT_SRC_H__ */