pulse: Use G_DECLARE_FINAL_TYPE

This commit is contained in:
Niels De Graef 2020-03-15 19:00:18 +01:00
parent 0da5b42bcc
commit a9ff9fe94e
3 changed files with 15 additions and 76 deletions

View file

@ -34,16 +34,10 @@
G_BEGIN_DECLS
typedef struct _GstPulseDeviceProvider GstPulseDeviceProvider;
typedef struct _GstPulseDeviceProviderClass GstPulseDeviceProviderClass;
#define GST_TYPE_PULSE_DEVICE_PROVIDER (gst_pulse_device_provider_get_type())
#define GST_IS_PULSE_DEVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PULSE_DEVICE_PROVIDER))
#define GST_IS_PULSE_DEVICE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PULSE_DEVICE_PROVIDER))
#define GST_PULSE_DEVICE_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PULSE_DEVICE_PROVIDER, GstPulseDeviceProviderClass))
#define GST_PULSE_DEVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PULSE_DEVICE_PROVIDER, GstPulseDeviceProvider))
#define GST_PULSE_DEVICE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE_PROVIDER, GstPulseDeviceProviderClass))
#define GST_PULSE_DEVICE_PROVIDER_CAST(obj) ((GstPulseDeviceProvider *)(obj))
#define GST_TYPE_PULSE_DEVICE_PROVIDER (gst_pulse_device_provider_get_type())
G_DECLARE_FINAL_TYPE (GstPulseDeviceProvider, gst_pulse_device_provider,
GST, PULSE_DEVICE_PROVIDER, GstDeviceProvider)
#define GST_PULSE_DEVICE_PROVIDER_CAST(obj) ((GstPulseDeviceProvider *)(obj))
struct _GstPulseDeviceProvider {
GstDeviceProvider parent;
@ -62,23 +56,11 @@ typedef enum {
GST_PULSE_DEVICE_TYPE_SINK
} GstPulseDeviceType;
struct _GstPulseDeviceProviderClass {
GstDeviceProviderClass parent_class;
};
GType gst_pulse_device_provider_get_type (void);
typedef struct _GstPulseDevice GstPulseDevice;
typedef struct _GstPulseDeviceClass GstPulseDeviceClass;
#define GST_TYPE_PULSE_DEVICE (gst_pulse_device_get_type())
#define GST_IS_PULSE_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PULSE_DEVICE))
#define GST_IS_PULSE_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PULSE_DEVICE))
#define GST_PULSE_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PULSE_DEVICE, GstPulseDeviceClass))
#define GST_PULSE_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PULSE_DEVICE, GstPulseDevice))
#define GST_PULSE_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE, GstPulseDeviceClass))
#define GST_PULSE_DEVICE_CAST(obj) ((GstPulseDevice *)(obj))
#define GST_TYPE_PULSE_DEVICE (gst_pulse_device_get_type())
G_DECLARE_FINAL_TYPE (GstPulseDevice, gst_pulse_device, GST, PULSE_DEVICE,
GstDevice)
#define GST_PULSE_DEVICE_CAST(obj) ((GstPulseDevice *)(obj))
struct _GstPulseDevice {
GstDevice parent;
@ -90,12 +72,6 @@ struct _GstPulseDevice {
const gchar *element;
};
struct _GstPulseDeviceClass {
GstDeviceClass parent_class;
};
GType gst_pulse_device_get_type (void);
G_END_DECLS
#endif /* __GST_PULSE_DEVICE_PROVIDER_H__ */

View file

@ -39,21 +39,10 @@
G_BEGIN_DECLS
#define GST_TYPE_PULSESINK \
(gst_pulsesink_get_type())
#define GST_PULSESINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PULSESINK,GstPulseSink))
#define GST_PULSESINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PULSESINK,GstPulseSinkClass))
#define GST_IS_PULSESINK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PULSESINK))
#define GST_IS_PULSESINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PULSESINK))
#define GST_PULSESINK_CAST(obj) \
((GstPulseSink *)(obj))
typedef struct _GstPulseSink GstPulseSink;
typedef struct _GstPulseSinkClass GstPulseSinkClass;
#define GST_TYPE_PULSESINK (gst_pulsesink_get_type())
G_DECLARE_FINAL_TYPE (GstPulseSink, gst_pulsesink, GST, PULSESINK,
GstAudioBaseSink)
#define GST_PULSESINK_CAST(obj) ((GstPulseSink *)(obj))
typedef struct _GstPulseDeviceInfo {
gchar *description;
@ -87,13 +76,6 @@ struct _GstPulseSink
GstClockTime format_lost_time;
};
struct _GstPulseSinkClass
{
GstAudioBaseSinkClass parent_class;
};
GType gst_pulsesink_get_type (void);
#define PULSE_SINK_TEMPLATE_CAPS \
_PULSE_CAPS_PCM \
_PULSE_CAPS_AC3 \

View file

@ -32,21 +32,9 @@
G_BEGIN_DECLS
#define GST_TYPE_PULSESRC \
(gst_pulsesrc_get_type())
#define GST_PULSESRC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PULSESRC,GstPulseSrc))
#define GST_PULSESRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PULSESRC,GstPulseSrcClass))
#define GST_IS_PULSESRC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PULSESRC))
#define GST_IS_PULSESRC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PULSESRC))
#define GST_PULSESRC_CAST(obj) \
((GstPulseSrc *)(obj))
typedef struct _GstPulseSrc GstPulseSrc;
typedef struct _GstPulseSrcClass GstPulseSrcClass;
#define GST_TYPE_PULSESRC (gst_pulsesrc_get_type())
G_DECLARE_FINAL_TYPE (GstPulseSrc, gst_pulsesrc, GST, PULSESRC, GstAudioSrc)
#define GST_PULSESRC_CAST(obj) ((GstPulseSrc *)(obj))
struct _GstPulseSrc
{
@ -86,13 +74,6 @@ struct _GstPulseSrc
pa_proplist *proplist;
};
struct _GstPulseSrcClass
{
GstAudioSrcClass parent_class;
};
GType gst_pulsesrc_get_type (void);
G_END_DECLS
#endif /* __GST_PULSESRC_H__ */