diff --git a/src/gst/gstpipewireclock.h b/src/gst/gstpipewireclock.h index f6019dd55..8b41598ef 100644 --- a/src/gst/gstpipewireclock.h +++ b/src/gst/gstpipewireclock.h @@ -13,21 +13,8 @@ G_BEGIN_DECLS -#define GST_TYPE_PIPEWIRE_CLOCK \ - (gst_pipewire_clock_get_type()) -#define GST_PIPEWIRE_CLOCK(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PIPEWIRE_CLOCK,GstPipeWireClock)) -#define GST_PIPEWIRE_CLOCK_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PIPEWIRE_CLOCK,GstPipeWireClockClass)) -#define GST_IS_PIPEWIRE_CLOCK(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PIPEWIRE_CLOCK)) -#define GST_IS_PIPEWIRE_CLOCK_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEWIRE_CLOCK)) -#define GST_PIPEWIRE_CLOCK_GET_CLASS(klass) \ - (G_TYPE_INSTANCE_GET_CLASS ((klass), GST_TYPE_PIPEWIRE_CLOCK, GstPipeWireClockClass)) - -typedef struct _GstPipeWireClock GstPipeWireClock; -typedef struct _GstPipeWireClockClass GstPipeWireClockClass; +#define GST_TYPE_PIPEWIRE_CLOCK (gst_pipewire_clock_get_type()) +G_DECLARE_FINAL_TYPE (GstPipeWireClock, gst_pipewire_clock, GST, PIPEWIRE_CLOCK, GstSystemClock) struct _GstPipeWireClock { GstSystemClock parent; @@ -38,12 +25,6 @@ struct _GstPipeWireClock { GstClockTimeDiff time_offset; }; -struct _GstPipeWireClockClass { - GstSystemClockClass parent_class; -}; - -GType gst_pipewire_clock_get_type (void); - GstClock * gst_pipewire_clock_new (GstPipeWireStream *stream, GstClockTime last_time); void gst_pipewire_clock_reset (GstPipeWireClock *clock, diff --git a/src/gst/gstpipewiredeviceprovider.h b/src/gst/gstpipewiredeviceprovider.h index a2d1faced..f909cc49f 100644 --- a/src/gst/gstpipewiredeviceprovider.h +++ b/src/gst/gstpipewiredeviceprovider.h @@ -14,16 +14,9 @@ G_BEGIN_DECLS -typedef struct _GstPipeWireDevice GstPipeWireDevice; -typedef struct _GstPipeWireDeviceClass GstPipeWireDeviceClass; - -#define GST_TYPE_PIPEWIRE_DEVICE (gst_pipewire_device_get_type()) -#define GST_IS_PIPEWIRE_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PIPEWIRE_DEVICE)) -#define GST_IS_PIPEWIRE_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PIPEWIRE_DEVICE)) -#define GST_PIPEWIRE_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PIPEWIRE_DEVICE, GstPipeWireDeviceClass)) -#define GST_PIPEWIRE_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PIPEWIRE_DEVICE, GstPipeWireDevice)) -#define GST_PIPEWIRE_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE, GstPipeWireDeviceClass)) -#define GST_PIPEWIRE_DEVICE_CAST(obj) ((GstPipeWireDevice *)(obj)) +#define GST_TYPE_PIPEWIRE_DEVICE (gst_pipewire_device_get_type()) +#define GST_PIPEWIRE_DEVICE_CAST(obj) ((GstPipeWireDevice *)(obj)) +G_DECLARE_FINAL_TYPE (GstPipeWireDevice, gst_pipewire_device, GST, PIPEWIRE_DEVICE, GstDevice) typedef enum { GST_PIPEWIRE_DEVICE_TYPE_UNKNOWN, @@ -42,22 +35,9 @@ struct _GstPipeWireDevice { int priority; }; -struct _GstPipeWireDeviceClass { - GstDeviceClass parent_class; -}; - -GType gst_pipewire_device_get_type (void); - -typedef struct _GstPipeWireDeviceProvider GstPipeWireDeviceProvider; -typedef struct _GstPipeWireDeviceProviderClass GstPipeWireDeviceProviderClass; - -#define GST_TYPE_PIPEWIRE_DEVICE_PROVIDER (gst_pipewire_device_provider_get_type()) -#define GST_IS_PIPEWIRE_DEVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PIPEWIRE_DEVICE_PROVIDER)) -#define GST_IS_PIPEWIRE_DEVICE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PIPEWIRE_DEVICE_PROVIDER)) -#define GST_PIPEWIRE_DEVICE_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PIPEWIRE_DEVICE_PROVIDER, GstPipeWireDeviceProviderClass)) -#define GST_PIPEWIRE_DEVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PIPEWIRE_DEVICE_PROVIDER, GstPipeWireDeviceProvider)) -#define GST_PIPEWIRE_DEVICE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE_PROVIDER, GstPipeWireDeviceProviderClass)) -#define GST_PIPEWIRE_DEVICE_PROVIDER_CAST(obj) ((GstPipeWireDeviceProvider *)(obj)) +#define GST_TYPE_PIPEWIRE_DEVICE_PROVIDER (gst_pipewire_device_provider_get_type()) +#define GST_PIPEWIRE_DEVICE_PROVIDER_CAST(obj) ((GstPipeWireDeviceProvider *)(obj)) +G_DECLARE_FINAL_TYPE (GstPipeWireDeviceProvider, gst_pipewire_device_provider, GST, PIPEWIRE_DEVICE_PROVIDER, GstDeviceProvider) struct _GstPipeWireDeviceProvider { GstDeviceProvider parent; @@ -78,12 +58,6 @@ struct _GstPipeWireDeviceProvider { GList *devices; }; -struct _GstPipeWireDeviceProviderClass { - GstDeviceProviderClass parent_class; -}; - -GType gst_pipewire_device_provider_get_type (void); - G_END_DECLS #endif /* __GST_PIPEWIRE_DEVICE_PROVIDER_H__ */ diff --git a/src/gst/gstpipewirepool.h b/src/gst/gstpipewirepool.h index 2c085f259..b629f8a8d 100644 --- a/src/gst/gstpipewirepool.h +++ b/src/gst/gstpipewirepool.h @@ -15,23 +15,10 @@ G_BEGIN_DECLS -#define GST_TYPE_PIPEWIRE_POOL \ - (gst_pipewire_pool_get_type()) -#define GST_PIPEWIRE_POOL(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PIPEWIRE_POOL,GstPipeWirePool)) -#define GST_PIPEWIRE_POOL_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PIPEWIRE_POOL,GstPipeWirePoolClass)) -#define GST_IS_PIPEWIRE_POOL(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PIPEWIRE_POOL)) -#define GST_IS_PIPEWIRE_POOL_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEWIRE_POOL)) -#define GST_PIPEWIRE_POOL_GET_CLASS(klass) \ - (G_TYPE_INSTANCE_GET_CLASS ((klass), GST_TYPE_PIPEWIRE_POOL, GstPipeWirePoolClass)) +#define GST_TYPE_PIPEWIRE_POOL (gst_pipewire_pool_get_type()) +G_DECLARE_FINAL_TYPE (GstPipeWirePool, gst_pipewire_pool, GST, PIPEWIRE_POOL, GstBufferPool) typedef struct _GstPipeWirePoolData GstPipeWirePoolData; -typedef struct _GstPipeWirePool GstPipeWirePool; -typedef struct _GstPipeWirePoolClass GstPipeWirePoolClass; - struct _GstPipeWirePoolData { GstPipeWirePool *pool; void *owner; @@ -59,12 +46,6 @@ struct _GstPipeWirePool { GCond cond; }; -struct _GstPipeWirePoolClass { - GstBufferPoolClass parent_class; -}; - -GType gst_pipewire_pool_get_type (void); - GstPipeWirePool * gst_pipewire_pool_new (GstPipeWireStream *stream); void gst_pipewire_pool_wrap_buffer (GstPipeWirePool *pool, struct pw_buffer *buffer); diff --git a/src/gst/gstpipewiresink.h b/src/gst/gstpipewiresink.h index b9d128b35..74e6667e6 100644 --- a/src/gst/gstpipewiresink.h +++ b/src/gst/gstpipewiresink.h @@ -16,22 +16,9 @@ G_BEGIN_DECLS -#define GST_TYPE_PIPEWIRE_SINK \ - (gst_pipewire_sink_get_type()) -#define GST_PIPEWIRE_SINK(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PIPEWIRE_SINK,GstPipeWireSink)) -#define GST_PIPEWIRE_SINK_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PIPEWIRE_SINK,GstPipeWireSinkClass)) -#define GST_IS_PIPEWIRE_SINK(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PIPEWIRE_SINK)) -#define GST_IS_PIPEWIRE_SINK_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEWIRE_SINK)) -#define GST_PIPEWIRE_SINK_CAST(obj) \ - ((GstPipeWireSink *) (obj)) - -typedef struct _GstPipeWireSink GstPipeWireSink; -typedef struct _GstPipeWireSinkClass GstPipeWireSinkClass; - +#define GST_TYPE_PIPEWIRE_SINK (gst_pipewire_sink_get_type()) +#define GST_PIPEWIRE_SINK_CAST(obj) ((GstPipeWireSink *) (obj)) +G_DECLARE_FINAL_TYPE (GstPipeWireSink, gst_pipewire_sink, GST, PIPEWIRE_SINK, GstBaseSink) /** * GstPipeWireSinkMode: @@ -67,11 +54,6 @@ struct _GstPipeWireSink { GstPipeWireSinkMode mode; }; -struct _GstPipeWireSinkClass { - GstBaseSinkClass parent_class; -}; - -GType gst_pipewire_sink_get_type (void); GType gst_pipewire_sink_mode_get_type (void); G_END_DECLS diff --git a/src/gst/gstpipewiresrc.h b/src/gst/gstpipewiresrc.h index 11fe7bf1c..d8533c78a 100644 --- a/src/gst/gstpipewiresrc.h +++ b/src/gst/gstpipewiresrc.h @@ -20,21 +20,10 @@ G_BEGIN_DECLS -#define GST_TYPE_PIPEWIRE_SRC \ - (gst_pipewire_src_get_type()) -#define GST_PIPEWIRE_SRC(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PIPEWIRE_SRC,GstPipeWireSrc)) -#define GST_PIPEWIRE_SRC_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PIPEWIRE_SRC,GstPipeWireSrcClass)) -#define GST_IS_PIPEWIRE_SRC(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PIPEWIRE_SRC)) -#define GST_IS_PIPEWIRE_SRC_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEWIRE_SRC)) -#define GST_PIPEWIRE_SRC_CAST(obj) \ - ((GstPipeWireSrc *) (obj)) +#define GST_TYPE_PIPEWIRE_SRC (gst_pipewire_src_get_type()) +#define GST_PIPEWIRE_SRC_CAST(obj) ((GstPipeWireSrc *) (obj)) +G_DECLARE_FINAL_TYPE (GstPipeWireSrc, gst_pipewire_src, GST, PIPEWIRE_SRC, GstPushSrc) -typedef struct _GstPipeWireSrc GstPipeWireSrc; -typedef struct _GstPipeWireSrcClass GstPipeWireSrcClass; /** * GstPipeWireSrc: @@ -78,12 +67,6 @@ struct _GstPipeWireSrc { enum spa_meta_videotransform_value transform_value; }; -struct _GstPipeWireSrcClass { - GstPushSrcClass parent_class; -}; - -GType gst_pipewire_src_get_type (void); - G_END_DECLS #endif /* __GST_PIPEWIRE_SRC_H__ */