diff --git a/ext/pulse/pulsemixerctrl.h b/ext/pulse/pulsemixerctrl.h index 077b8841aa..dbb0f99aa1 100644 --- a/ext/pulse/pulsemixerctrl.h +++ b/ext/pulse/pulsemixerctrl.h @@ -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 void \ -interface_as_function ## _mixer_interface_init (GstMixerInterface * iface) \ +static GstMixerType \ +interface_as_function ## _get_mixer_type (GstMixer * mixer) \ +{ \ + return GST_MIXER_HARDWARE; \ +} \ +static void \ +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 diff --git a/gst/videofilter/gstvideobalance.c b/gst/videofilter/gstvideobalance.c index 2716c8fe30..9d76c70331 100644 --- a/gst/videofilter/gstvideobalance.c +++ b/gst/videofilter/gstvideobalance.c @@ -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 * diff --git a/sys/v4l2/gstv4l2colorbalance.h b/sys/v4l2/gstv4l2colorbalance.h index 4e6a75e369..7bf47e1fb4 100644 --- a/sys/v4l2/gstv4l2colorbalance.h +++ b/sys/v4l2/gstv4l2colorbalance.h @@ -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__ */