mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
gst: use G_DECLARE_FINAL_TYPE for all classes
This commit is contained in:
parent
0bde0ebad8
commit
8da35df0bf
5 changed files with 16 additions and 115 deletions
|
|
@ -13,21 +13,8 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_PIPEWIRE_CLOCK \
|
#define GST_TYPE_PIPEWIRE_CLOCK (gst_pipewire_clock_get_type())
|
||||||
(gst_pipewire_clock_get_type())
|
G_DECLARE_FINAL_TYPE (GstPipeWireClock, gst_pipewire_clock, GST, PIPEWIRE_CLOCK, GstSystemClock)
|
||||||
#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;
|
|
||||||
|
|
||||||
struct _GstPipeWireClock {
|
struct _GstPipeWireClock {
|
||||||
GstSystemClock parent;
|
GstSystemClock parent;
|
||||||
|
|
@ -38,12 +25,6 @@ struct _GstPipeWireClock {
|
||||||
GstClockTimeDiff time_offset;
|
GstClockTimeDiff time_offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstPipeWireClockClass {
|
|
||||||
GstSystemClockClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
GType gst_pipewire_clock_get_type (void);
|
|
||||||
|
|
||||||
GstClock * gst_pipewire_clock_new (GstPipeWireStream *stream,
|
GstClock * gst_pipewire_clock_new (GstPipeWireStream *stream,
|
||||||
GstClockTime last_time);
|
GstClockTime last_time);
|
||||||
void gst_pipewire_clock_reset (GstPipeWireClock *clock,
|
void gst_pipewire_clock_reset (GstPipeWireClock *clock,
|
||||||
|
|
|
||||||
|
|
@ -14,16 +14,9 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef struct _GstPipeWireDevice GstPipeWireDevice;
|
#define GST_TYPE_PIPEWIRE_DEVICE (gst_pipewire_device_get_type())
|
||||||
typedef struct _GstPipeWireDeviceClass GstPipeWireDeviceClass;
|
#define GST_PIPEWIRE_DEVICE_CAST(obj) ((GstPipeWireDevice *)(obj))
|
||||||
|
G_DECLARE_FINAL_TYPE (GstPipeWireDevice, gst_pipewire_device, GST, PIPEWIRE_DEVICE, GstDevice)
|
||||||
#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))
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_PIPEWIRE_DEVICE_TYPE_UNKNOWN,
|
GST_PIPEWIRE_DEVICE_TYPE_UNKNOWN,
|
||||||
|
|
@ -42,22 +35,9 @@ struct _GstPipeWireDevice {
|
||||||
int priority;
|
int priority;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstPipeWireDeviceClass {
|
#define GST_TYPE_PIPEWIRE_DEVICE_PROVIDER (gst_pipewire_device_provider_get_type())
|
||||||
GstDeviceClass parent_class;
|
#define GST_PIPEWIRE_DEVICE_PROVIDER_CAST(obj) ((GstPipeWireDeviceProvider *)(obj))
|
||||||
};
|
G_DECLARE_FINAL_TYPE (GstPipeWireDeviceProvider, gst_pipewire_device_provider, GST, PIPEWIRE_DEVICE_PROVIDER, GstDeviceProvider)
|
||||||
|
|
||||||
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))
|
|
||||||
|
|
||||||
struct _GstPipeWireDeviceProvider {
|
struct _GstPipeWireDeviceProvider {
|
||||||
GstDeviceProvider parent;
|
GstDeviceProvider parent;
|
||||||
|
|
@ -78,12 +58,6 @@ struct _GstPipeWireDeviceProvider {
|
||||||
GList *devices;
|
GList *devices;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstPipeWireDeviceProviderClass {
|
|
||||||
GstDeviceProviderClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
GType gst_pipewire_device_provider_get_type (void);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_PIPEWIRE_DEVICE_PROVIDER_H__ */
|
#endif /* __GST_PIPEWIRE_DEVICE_PROVIDER_H__ */
|
||||||
|
|
|
||||||
|
|
@ -15,23 +15,10 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_PIPEWIRE_POOL \
|
#define GST_TYPE_PIPEWIRE_POOL (gst_pipewire_pool_get_type())
|
||||||
(gst_pipewire_pool_get_type())
|
G_DECLARE_FINAL_TYPE (GstPipeWirePool, gst_pipewire_pool, GST, PIPEWIRE_POOL, GstBufferPool)
|
||||||
#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))
|
|
||||||
|
|
||||||
typedef struct _GstPipeWirePoolData GstPipeWirePoolData;
|
typedef struct _GstPipeWirePoolData GstPipeWirePoolData;
|
||||||
typedef struct _GstPipeWirePool GstPipeWirePool;
|
|
||||||
typedef struct _GstPipeWirePoolClass GstPipeWirePoolClass;
|
|
||||||
|
|
||||||
struct _GstPipeWirePoolData {
|
struct _GstPipeWirePoolData {
|
||||||
GstPipeWirePool *pool;
|
GstPipeWirePool *pool;
|
||||||
void *owner;
|
void *owner;
|
||||||
|
|
@ -59,12 +46,6 @@ struct _GstPipeWirePool {
|
||||||
GCond cond;
|
GCond cond;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstPipeWirePoolClass {
|
|
||||||
GstBufferPoolClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
GType gst_pipewire_pool_get_type (void);
|
|
||||||
|
|
||||||
GstPipeWirePool * gst_pipewire_pool_new (GstPipeWireStream *stream);
|
GstPipeWirePool * gst_pipewire_pool_new (GstPipeWireStream *stream);
|
||||||
|
|
||||||
void gst_pipewire_pool_wrap_buffer (GstPipeWirePool *pool, struct pw_buffer *buffer);
|
void gst_pipewire_pool_wrap_buffer (GstPipeWirePool *pool, struct pw_buffer *buffer);
|
||||||
|
|
|
||||||
|
|
@ -16,22 +16,9 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_PIPEWIRE_SINK \
|
#define GST_TYPE_PIPEWIRE_SINK (gst_pipewire_sink_get_type())
|
||||||
(gst_pipewire_sink_get_type())
|
#define GST_PIPEWIRE_SINK_CAST(obj) ((GstPipeWireSink *) (obj))
|
||||||
#define GST_PIPEWIRE_SINK(obj) \
|
G_DECLARE_FINAL_TYPE (GstPipeWireSink, gst_pipewire_sink, GST, PIPEWIRE_SINK, GstBaseSink)
|
||||||
(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;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstPipeWireSinkMode:
|
* GstPipeWireSinkMode:
|
||||||
|
|
@ -67,11 +54,6 @@ struct _GstPipeWireSink {
|
||||||
GstPipeWireSinkMode mode;
|
GstPipeWireSinkMode mode;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstPipeWireSinkClass {
|
|
||||||
GstBaseSinkClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
GType gst_pipewire_sink_get_type (void);
|
|
||||||
GType gst_pipewire_sink_mode_get_type (void);
|
GType gst_pipewire_sink_mode_get_type (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
|
||||||
|
|
@ -20,21 +20,10 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_PIPEWIRE_SRC \
|
#define GST_TYPE_PIPEWIRE_SRC (gst_pipewire_src_get_type())
|
||||||
(gst_pipewire_src_get_type())
|
#define GST_PIPEWIRE_SRC_CAST(obj) ((GstPipeWireSrc *) (obj))
|
||||||
#define GST_PIPEWIRE_SRC(obj) \
|
G_DECLARE_FINAL_TYPE (GstPipeWireSrc, gst_pipewire_src, GST, PIPEWIRE_SRC, GstPushSrc)
|
||||||
(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))
|
|
||||||
|
|
||||||
typedef struct _GstPipeWireSrc GstPipeWireSrc;
|
|
||||||
typedef struct _GstPipeWireSrcClass GstPipeWireSrcClass;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstPipeWireSrc:
|
* GstPipeWireSrc:
|
||||||
|
|
@ -78,12 +67,6 @@ struct _GstPipeWireSrc {
|
||||||
enum spa_meta_videotransform_value transform_value;
|
enum spa_meta_videotransform_value transform_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstPipeWireSrcClass {
|
|
||||||
GstPushSrcClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
GType gst_pipewire_src_get_type (void);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_PIPEWIRE_SRC_H__ */
|
#endif /* __GST_PIPEWIRE_SRC_H__ */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue