mixer/colorbalance: Update for API changes
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 2 Mar 2012 09:00:59 +0000 (10:00 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 2 Mar 2012 09:00:59 +0000 (10:00 +0100)
ext/alsa/gstalsamixer.h
gst/volume/gstvolume.c
sys/xvimage/xvimagesink.c

index b3c3ab9..c62c9bf 100644 (file)
@@ -189,11 +189,15 @@ interface_as_function ## _get_mixer_flags (GstMixer * mixer)
   return gst_alsa_mixer_get_mixer_flags (this->mixer);                          \
 }                                                                               \
                                                                                 \
+static GstMixerType                                                             \
+interface_as_function ## _get_mixer_type (GstMixer * mixer)                     \
+{                                                                               \
+  return GST_MIXER_HARDWARE;                                                    \
+}                                                                               \
+                                                                                \
 static void                                                                     \
 interface_as_function ## _interface_init (GstMixerInterface * iface)            \
 {                                                                               \
-  GST_MIXER_TYPE (iface) = GST_MIXER_HARDWARE;                                  \
-                                                                                \
   /* set up the interface hooks */                                              \
   iface->list_tracks = interface_as_function ## _list_tracks;                   \
   iface->set_volume = interface_as_function ## _set_volume;                     \
@@ -203,6 +207,7 @@ interface_as_function ## _interface_init (GstMixerInterface * iface)
   iface->set_option = interface_as_function ## _set_option;                     \
   iface->get_option = interface_as_function ## _get_option;                     \
   iface->get_mixer_flags = interface_as_function ## _get_mixer_flags;           \
+  iface->get_mixer_type = interface_as_function ## _get_mixer_type;             \
 }
 
 
index 8c529bf..8bda5a0 100644 (file)
@@ -332,16 +332,21 @@ gst_volume_set_mute (GstMixer * mixer, GstMixerTrack * track, gboolean mute)
   GST_OBJECT_UNLOCK (self);
 }
 
+static GstMixerType
+gst_volume_get_mixer_type (GstMixer * mixer)
+{
+  return GST_MIXER_SOFTWARE;
+}
+
 static void
 gst_volume_mixer_init (GstMixerInterface * iface)
 {
-  GST_MIXER_TYPE (iface) = GST_MIXER_SOFTWARE;
-
   /* default virtual functions */
   iface->list_tracks = gst_volume_list_tracks;
   iface->set_volume = gst_volume_set_volume;
   iface->get_volume = gst_volume_get_volume;
   iface->set_mute = gst_volume_set_mute;
+  iface->get_mixer_type = gst_volume_get_mixer_type;
 }
 
 /* Element class */
index b0e62e3..4d5c9d7 100644 (file)
@@ -2309,13 +2309,19 @@ gst_xvimagesink_colorbalance_get_value (GstColorBalance * balance,
   return value;
 }
 
+static GstColorBalanceType
+gst_xvimagesink_colorbalance_get_balance_type (GstColorBalance * balance)
+{
+  return GST_COLOR_BALANCE_HARDWARE;
+}
+
 static void
 gst_xvimagesink_colorbalance_init (GstColorBalanceInterface * iface)
 {
-  GST_COLOR_BALANCE_TYPE (iface) = GST_COLOR_BALANCE_HARDWARE;
   iface->list_channels = gst_xvimagesink_colorbalance_list_channels;
   iface->set_value = gst_xvimagesink_colorbalance_set_value;
   iface->get_value = gst_xvimagesink_colorbalance_get_value;
+  iface->get_balance_type = gst_xvimagesink_colorbalance_get_balance_type;
 }
 
 #if 0