mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-02 22:46:35 +00:00
alsa: don't use GstImplementsInterface
This commit is contained in:
parent
56df7800a0
commit
c16e7321b9
3 changed files with 0 additions and 54 deletions
|
@ -93,14 +93,6 @@ void _gst_alsa_mixer_set_interface (GstAlsaMixer * mixer,
|
||||||
GstMixerFlags gst_alsa_mixer_get_mixer_flags (GstAlsaMixer *mixer);
|
GstMixerFlags gst_alsa_mixer_get_mixer_flags (GstAlsaMixer *mixer);
|
||||||
|
|
||||||
#define GST_IMPLEMENT_ALSA_MIXER_METHODS(Type, interface_as_function) \
|
#define GST_IMPLEMENT_ALSA_MIXER_METHODS(Type, interface_as_function) \
|
||||||
static gboolean \
|
|
||||||
interface_as_function ## _supported (Type *this, GType iface_type) \
|
|
||||||
{ \
|
|
||||||
g_assert (iface_type == GST_TYPE_MIXER); \
|
|
||||||
\
|
|
||||||
return (this->mixer != NULL); \
|
|
||||||
} \
|
|
||||||
\
|
|
||||||
static const GList* \
|
static const GList* \
|
||||||
interface_as_function ## _list_tracks (GstMixer * mixer) \
|
interface_as_function ## _list_tracks (GstMixer * mixer) \
|
||||||
{ \
|
{ \
|
||||||
|
|
|
@ -53,39 +53,15 @@ static void gst_alsa_mixer_element_finalize (GObject * object);
|
||||||
static GstStateChangeReturn gst_alsa_mixer_element_change_state (GstElement
|
static GstStateChangeReturn gst_alsa_mixer_element_change_state (GstElement
|
||||||
* element, GstStateChange transition);
|
* element, GstStateChange transition);
|
||||||
|
|
||||||
static gboolean
|
|
||||||
gst_alsa_mixer_element_interface_supported (GstAlsaMixerElement * this,
|
|
||||||
GType interface_type)
|
|
||||||
{
|
|
||||||
if (interface_type == GST_TYPE_MIXER) {
|
|
||||||
return gst_alsa_mixer_element_supported (this, interface_type);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_return_val_if_reached (FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_implements_interface_init (GstImplementsInterfaceClass * klass)
|
|
||||||
{
|
|
||||||
klass->supported = (gpointer) gst_alsa_mixer_element_interface_supported;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_alsa_mixer_element_init_interfaces (GType type)
|
gst_alsa_mixer_element_init_interfaces (GType type)
|
||||||
{
|
{
|
||||||
static const GInterfaceInfo implements_iface_info = {
|
|
||||||
(GInterfaceInitFunc) gst_implements_interface_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
static const GInterfaceInfo mixer_iface_info = {
|
static const GInterfaceInfo mixer_iface_info = {
|
||||||
(GInterfaceInitFunc) gst_alsa_mixer_element_interface_init,
|
(GInterfaceInitFunc) gst_alsa_mixer_element_interface_init,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE,
|
|
||||||
&implements_iface_info);
|
|
||||||
g_type_add_interface_static (type, GST_TYPE_MIXER, &mixer_iface_info);
|
g_type_add_interface_static (type, GST_TYPE_MIXER, &mixer_iface_info);
|
||||||
|
|
||||||
gst_alsa_type_add_device_property_probe_interface (type);
|
gst_alsa_type_add_device_property_probe_interface (type);
|
||||||
|
|
|
@ -152,37 +152,15 @@ gst_alsasrc_finalize (GObject * object)
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
gst_alsasrc_interface_supported (GstAlsaSrc * this, GType interface_type)
|
|
||||||
{
|
|
||||||
/* only support this one interface (wrapped by GstImplementsInterface) */
|
|
||||||
g_assert (interface_type == GST_TYPE_MIXER);
|
|
||||||
|
|
||||||
return gst_alsasrc_mixer_supported (this, interface_type);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_implements_interface_init (GstImplementsInterfaceClass * klass)
|
|
||||||
{
|
|
||||||
klass->supported = (gpointer) gst_alsasrc_interface_supported;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_alsasrc_init_interfaces (GType type)
|
gst_alsasrc_init_interfaces (GType type)
|
||||||
{
|
{
|
||||||
static const GInterfaceInfo implements_iface_info = {
|
|
||||||
(GInterfaceInitFunc) gst_implements_interface_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
static const GInterfaceInfo mixer_iface_info = {
|
static const GInterfaceInfo mixer_iface_info = {
|
||||||
(GInterfaceInitFunc) gst_alsasrc_mixer_interface_init,
|
(GInterfaceInitFunc) gst_alsasrc_mixer_interface_init,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE,
|
|
||||||
&implements_iface_info);
|
|
||||||
g_type_add_interface_static (type, GST_TYPE_MIXER, &mixer_iface_info);
|
g_type_add_interface_static (type, GST_TYPE_MIXER, &mixer_iface_info);
|
||||||
|
|
||||||
gst_alsa_type_add_device_property_probe_interface (type);
|
gst_alsa_type_add_device_property_probe_interface (type);
|
||||||
|
|
Loading…
Reference in a new issue