alsa: don't use GstImplementsInterface
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 26 Jun 2011 21:58:17 +0000 (22:58 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 26 Jun 2011 21:58:17 +0000 (22:58 +0100)
ext/alsa/gstalsamixer.h
ext/alsa/gstalsamixerelement.c
ext/alsa/gstalsasrc.c

index ccc3784..3165ff5 100644 (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)                        \
 {                                                                               \
index 66e9135..1993cc4 100644 (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);
index 14eb95d..350c9a7 100644 (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);