diff options
author | Edgard Lima <edgard.lima@indt.org.br> | 2006-05-11 17:59:59 +0000 |
---|---|---|
committer | Edgard Lima <edgard.lima@indt.org.br> | 2006-05-11 17:59:59 +0000 |
commit | 9edc0c0365f79ab07ff2e65461c6696e3931a3f0 (patch) | |
tree | eb081684e6e2b5e8f88d7ef2672f5cef07fcb841 /sys/v4l2/gstv4l2colorbalance.h | |
parent | a3c4acecbd4e9abd29b9a0f0f65a270f3913cc05 (diff) |
Changes proposed by Wingo in bug #338818.
Original commit message from CVS:
Changes proposed by Wingo in bug #338818.
Diffstat (limited to 'sys/v4l2/gstv4l2colorbalance.h')
-rw-r--r-- | sys/v4l2/gstv4l2colorbalance.h | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/sys/v4l2/gstv4l2colorbalance.h b/sys/v4l2/gstv4l2colorbalance.h index 358270fc..761360fa 100644 --- a/sys/v4l2/gstv4l2colorbalance.h +++ b/sys/v4l2/gstv4l2colorbalance.h @@ -1,5 +1,6 @@ /* G-Streamer generic V4L2 element - Color Balance interface implementation * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net> + * Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br> * * gstv4l2colorbalance.h: color balance interface implementation for V4L2 * @@ -53,6 +54,52 @@ typedef struct _GstV4l2ColorBalanceChannelClass { GType gst_v4l2_color_balance_channel_get_type (void); -void gst_v4l2_color_balance_interface_init (GstColorBalanceClass *klass); +extern const GList * +gst_v4l2_color_balance_list_channels (GstV4l2Object * v4l2object); + +extern void +gst_v4l2_color_balance_set_value (GstV4l2Object * v4l2object, + GstColorBalanceChannel * channel, gint value); + +extern gint +gst_v4l2_color_balance_get_value (GstV4l2Object * v4l2object, + GstColorBalanceChannel * channel); + +#define GST_IMPLEMENT_V4L2_COLOR_BALANCE_METHODS(Type, interface_as_function) \ + \ +static const GList * \ +interface_as_function ## _color_balance_list_channels (GstColorBalance * balance) \ +{ \ + Type *this = (Type*) balance; \ + return gst_v4l2_color_balance_list_channels(this->v4l2object); \ +} \ + \ +static void \ +interface_as_function ## _color_balance_set_value (GstColorBalance * balance, \ + GstColorBalanceChannel * channel, \ + gint value) \ +{ \ + Type *this = (Type*) balance; \ + return gst_v4l2_color_balance_set_value(this->v4l2object, channel, value); \ +} \ + \ +static gint \ +interface_as_function ## _color_balance_get_value (GstColorBalance * balance, \ + GstColorBalanceChannel * channel) \ +{ \ + Type *this = (Type*) balance; \ + return gst_v4l2_color_balance_get_value(this->v4l2object, channel); \ +} \ + \ +void \ +interface_as_function ## _color_balance_interface_init (GstColorBalanceClass * klass) \ +{ \ + GST_COLOR_BALANCE_TYPE (klass) = GST_COLOR_BALANCE_HARDWARE; \ + \ + /* default virtual functions */ \ + klass->list_channels = interface_as_function ## _color_balance_list_channels; \ + klass->set_value = interface_as_function ## _color_balance_set_value; \ + klass->get_value = interface_as_function ## _color_balance_get_value; \ +} \ #endif /* __GST_V4L2_COLOR_BALANCE_H__ */ |