alsa: don't use GstImplementsInterface

This commit is contained in:
Tim-Philipp Müller 2011-06-26 22:58:17 +01:00
parent 56df7800a0
commit c16e7321b9
3 changed files with 0 additions and 54 deletions

View file

@ -93,14 +93,6 @@ void _gst_alsa_mixer_set_interface (GstAlsaMixer * mixer,
GstMixerFlags gst_alsa_mixer_get_mixer_flags (GstAlsaMixer *mixer);
#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* \
interface_as_function ## _list_tracks (GstMixer * mixer) \
{ \

View file

@ -53,39 +53,15 @@ static void gst_alsa_mixer_element_finalize (GObject * object);
static GstStateChangeReturn gst_alsa_mixer_element_change_state (GstElement
* 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
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 = {
(GInterfaceInitFunc) gst_alsa_mixer_element_interface_init,
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);
gst_alsa_type_add_device_property_probe_interface (type);

View file

@ -152,37 +152,15 @@ gst_alsasrc_finalize (GObject * 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
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 = {
(GInterfaceInitFunc) gst_alsasrc_mixer_interface_init,
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);
gst_alsa_type_add_device_property_probe_interface (type);