mixer/colorbalance: Update for API changes

This commit is contained in:
Sebastian Dröge 2012-03-02 10:13:08 +01:00
parent 431ecdf6b7
commit 3299f39179
3 changed files with 25 additions and 10 deletions

View 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 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

View 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 *

View 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__ */