mixer/colorbalance: Update for API changes
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 2 Mar 2012 09:13:08 +0000 (10:13 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 2 Mar 2012 09:13:08 +0000 (10:13 +0100)
ext/pulse/pulsemixerctrl.h
gst/videofilter/gstvideobalance.c
sys/v4l2/gstv4l2colorbalance.h

index 077b884..dbb0f99 100644 (file)
@@ -92,7 +92,7 @@ void gst_pulsemixer_ctrl_set_record (GstPulseMixerCtrl * mixer,
     GstMixerTrack * track, gboolean record);
 GstMixerFlags gst_pulsemixer_ctrl_get_mixer_flags (GstPulseMixerCtrl * mixer);
 
-#define GST_IMPLEMENT_PULSEMIXER_CTRL_METHODS(Type, interface_as_function)     \
+#define GST_IMPLEMENT_PULSEMIXER_CTRL_METHODS(Type, interface_as_function)      \
 static const GList*                                                             \
 interface_as_function ## _list_tracks (GstMixer * mixer)                        \
 {                                                                               \
@@ -155,19 +155,23 @@ interface_as_function ## _get_mixer_flags (GstMixer * mixer)
   g_return_val_if_fail (this != NULL, GST_MIXER_FLAG_NONE);                     \
   g_return_val_if_fail (this->mixer != NULL, GST_MIXER_FLAG_NONE);              \
                                                                                 \
-  return gst_pulsemixer_ctrl_get_mixer_flags (this->mixer);                          \
+  return gst_pulsemixer_ctrl_get_mixer_flags (this->mixer);                     \
 } \
+static GstMixerType                                                             \
+interface_as_function ## _get_mixer_type (GstMixer * mixer)                     \
+{                                                                               \
+  return GST_MIXER_HARDWARE;                                                    \
+}                                                                               \
 static void                                                                     \
-interface_as_function ## _mixer_interface_init (GstMixerInterface * iface)          \
+interface_as_function ## _mixer_interface_init (GstMixerInterface * iface)      \
 {                                                                               \
-  GST_MIXER_TYPE (iface) = GST_MIXER_HARDWARE;                                  \
-                                                                                \
   iface->list_tracks = interface_as_function ## _list_tracks;                   \
   iface->set_volume  = interface_as_function ## _set_volume;                    \
   iface->get_volume  = interface_as_function ## _get_volume;                    \
   iface->set_mute    = interface_as_function ## _set_mute;                      \
   iface->set_record  = interface_as_function ## _set_record;                    \
-  iface->get_mixer_flags = interface_as_function ## _get_mixer_flags; \
+  iface->get_mixer_flags = interface_as_function ## _get_mixer_flags;           \
+  iface->get_mixer_type = interface_as_function ## _get_mixer_type;             \
 }
 
 G_END_DECLS
index 2716c8f..9d76c70 100644 (file)
@@ -637,13 +637,19 @@ gst_video_balance_colorbalance_get_value (GstColorBalance * balance,
   return value;
 }
 
+static GstColorBalanceType
+gst_video_balance_colorbalance_get_balance_type (GstColorBalance * balance)
+{
+  return GST_COLOR_BALANCE_SOFTWARE;
+}
+
 static void
 gst_video_balance_colorbalance_init (GstColorBalanceInterface * iface)
 {
-  GST_COLOR_BALANCE_TYPE (iface) = GST_COLOR_BALANCE_SOFTWARE;
   iface->list_channels = gst_video_balance_colorbalance_list_channels;
   iface->set_value = gst_video_balance_colorbalance_set_value;
   iface->get_value = gst_video_balance_colorbalance_get_value;
+  iface->get_balance_type = gst_video_balance_colorbalance_get_balance_type;
 }
 
 static GstColorBalanceChannel *
index 4e6a75e..7bf47e1 100644 (file)
@@ -90,15 +90,20 @@ interface_as_function ## _color_balance_get_value (GstColorBalance * balance,
   return gst_v4l2_color_balance_get_value(this->v4l2object, channel);                 \
 }                                                                                     \
                                                                                       \
+static GstColorBalanceType                                                            \
+interface_as_function ## _color_balance_get_balance_type (GstColorBalance * balance)  \
+{                                                                                     \
+  return GST_COLOR_BALANCE_HARDWARE;                                                  \
+}                                                                                     \
+                                                                                      \
 static void                                                                           \
 interface_as_function ## _color_balance_interface_init (GstColorBalanceInterface * iface) \
 {                                                                                     \
-  GST_COLOR_BALANCE_TYPE (iface) = GST_COLOR_BALANCE_HARDWARE;                        \
-                                                                                      \
   /* default virtual functions */                                                     \
   iface->list_channels = interface_as_function ## _color_balance_list_channels;       \
   iface->set_value = interface_as_function ## _color_balance_set_value;               \
   iface->get_value = interface_as_function ## _color_balance_get_value;               \
+  iface->get_balance_type = interface_as_function ## _color_balance_get_balance_type; \
 }                                                                                     \
 
 #endif /* __GST_V4L2_COLOR_BALANCE_H__ */