diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2004-03-14 22:34:33 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2004-03-14 22:34:33 +0000 |
commit | 7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2 (patch) | |
tree | f863b467dea9559a6ec9c48affbfae11f8104164 /gst-libs/gst/colorbalance | |
parent | a19db4bbdc4a15ea0d8f4d28e9a1302c9c3d1657 (diff) | |
download | gst-plugins-bad-7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2.tar.gz gst-plugins-bad-7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2.tar.bz2 gst-plugins-bad-7a778ee4b7ec09a1f5b2185c9cceee3910dfbdf2.zip |
gst-indent
Original commit message from CVS:
gst-indent
Diffstat (limited to 'gst-libs/gst/colorbalance')
-rw-r--r-- | gst-libs/gst/colorbalance/colorbalance.c | 50 | ||||
-rw-r--r-- | gst-libs/gst/colorbalance/colorbalance.h | 46 | ||||
-rw-r--r-- | gst-libs/gst/colorbalance/colorbalancechannel.c | 32 | ||||
-rw-r--r-- | gst-libs/gst/colorbalance/colorbalancechannel.h | 19 |
4 files changed, 66 insertions, 81 deletions
diff --git a/gst-libs/gst/colorbalance/colorbalance.c b/gst-libs/gst/colorbalance/colorbalance.c index dd32ff8b..fbf18581 100644 --- a/gst-libs/gst/colorbalance/colorbalance.c +++ b/gst-libs/gst/colorbalance/colorbalance.c @@ -27,12 +27,13 @@ #include "colorbalance.h" #include "colorbalance-marshal.h" -enum { +enum +{ VALUE_CHANGED, LAST_SIGNAL }; -static void gst_color_balance_class_init (GstColorBalanceClass *klass); +static void gst_color_balance_class_init (GstColorBalanceClass * klass); static guint gst_color_balance_signals[LAST_SIGNAL] = { 0 }; @@ -55,35 +56,33 @@ gst_color_balance_get_type (void) }; gst_color_balance_type = g_type_register_static (G_TYPE_INTERFACE, - "GstColorBalance", - &gst_color_balance_info, 0); + "GstColorBalance", &gst_color_balance_info, 0); g_type_interface_add_prerequisite (gst_color_balance_type, - GST_TYPE_IMPLEMENTS_INTERFACE); + GST_TYPE_IMPLEMENTS_INTERFACE); } return gst_color_balance_type; } static void -gst_color_balance_class_init (GstColorBalanceClass *klass) +gst_color_balance_class_init (GstColorBalanceClass * klass) { static gboolean initialized = FALSE; - + if (!initialized) { gst_color_balance_signals[VALUE_CHANGED] = - g_signal_new ("value-changed", - GST_TYPE_COLOR_BALANCE, G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GstColorBalanceClass, value_changed), - NULL, NULL, - gst_color_balance_marshal_VOID__OBJECT_INT, - G_TYPE_NONE, 2, - GST_TYPE_COLOR_BALANCE_CHANNEL, G_TYPE_INT); - + g_signal_new ("value-changed", + GST_TYPE_COLOR_BALANCE, G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GstColorBalanceClass, value_changed), + NULL, NULL, + gst_color_balance_marshal_VOID__OBJECT_INT, + G_TYPE_NONE, 2, GST_TYPE_COLOR_BALANCE_CHANNEL, G_TYPE_INT); + initialized = TRUE; } klass->balance_type = GST_COLOR_BALANCE_SOFTWARE; - + /* default virtual functions */ klass->list_channels = NULL; klass->set_value = NULL; @@ -91,7 +90,7 @@ gst_color_balance_class_init (GstColorBalanceClass *klass) } const GList * -gst_color_balance_list_channels (GstColorBalance *balance) +gst_color_balance_list_channels (GstColorBalance * balance) { GstColorBalanceClass *klass = GST_COLOR_BALANCE_GET_CLASS (balance); @@ -103,9 +102,8 @@ gst_color_balance_list_channels (GstColorBalance *balance) } void -gst_color_balance_set_value (GstColorBalance *balance, - GstColorBalanceChannel *channel, - gint value) +gst_color_balance_set_value (GstColorBalance * balance, + GstColorBalanceChannel * channel, gint value) { GstColorBalanceClass *klass = GST_COLOR_BALANCE_GET_CLASS (balance); @@ -115,8 +113,8 @@ gst_color_balance_set_value (GstColorBalance *balance, } gint -gst_color_balance_get_value (GstColorBalance *balance, - GstColorBalanceChannel *channel) +gst_color_balance_get_value (GstColorBalance * balance, + GstColorBalanceChannel * channel) { GstColorBalanceClass *klass = GST_COLOR_BALANCE_GET_CLASS (balance); @@ -128,13 +126,11 @@ gst_color_balance_get_value (GstColorBalance *balance, } void -gst_color_balance_value_changed (GstColorBalance *balance, - GstColorBalanceChannel *channel, - gint value) +gst_color_balance_value_changed (GstColorBalance * balance, + GstColorBalanceChannel * channel, gint value) { g_signal_emit (G_OBJECT (balance), - gst_color_balance_signals[VALUE_CHANGED], - 0, channel, value); + gst_color_balance_signals[VALUE_CHANGED], 0, channel, value); g_signal_emit_by_name (G_OBJECT (channel), "value_changed", value); } diff --git a/gst-libs/gst/colorbalance/colorbalance.h b/gst-libs/gst/colorbalance/colorbalance.h index d7b92171..d0347579 100644 --- a/gst-libs/gst/colorbalance/colorbalance.h +++ b/gst-libs/gst/colorbalance/colorbalance.h @@ -27,7 +27,6 @@ #include <gst/colorbalance/colorbalance-enumtypes.h> G_BEGIN_DECLS - #define GST_TYPE_COLOR_BALANCE \ (gst_color_balance_get_type ()) #define GST_COLOR_BALANCE(obj) \ @@ -42,55 +41,48 @@ G_BEGIN_DECLS (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_COLOR_BALANCE)) #define GST_COLOR_BALANCE_GET_CLASS(inst) \ (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_COLOR_BALANCE, GstColorBalanceClass)) - #define GST_COLOR_BALANCE_TYPE(klass) (klass->balance_type) - typedef struct _GstColorBalance GstColorBalance; - + typedef enum { GST_COLOR_BALANCE_HARDWARE, GST_COLOR_BALANCE_SOFTWARE } GstColorBalanceType; -typedef struct _GstColorBalanceClass { +typedef struct _GstColorBalanceClass +{ GTypeInterface klass; GstColorBalanceType balance_type; - + /* virtual functions */ - const GList * (* list_channels) (GstColorBalance *balance); + const GList *(*list_channels) (GstColorBalance * balance); - void (* set_value) (GstColorBalance *balance, - GstColorBalanceChannel *channel, - gint value); - gint (* get_value) (GstColorBalance *balance, - GstColorBalanceChannel *channel); + void (*set_value) (GstColorBalance * balance, + GstColorBalanceChannel * channel, gint value); + gint (*get_value) (GstColorBalance * balance, + GstColorBalanceChannel * channel); /* signals */ - void (* value_changed) (GstColorBalance *balance, - GstColorBalanceChannel *channel, - gint value); + void (*value_changed) (GstColorBalance * balance, + GstColorBalanceChannel * channel, gint value); gpointer _gst_reserved[GST_PADDING]; } GstColorBalanceClass; -GType gst_color_balance_get_type (void); +GType gst_color_balance_get_type (void); /* virtual class function wrappers */ -const GList * - gst_color_balance_list_channels (GstColorBalance *balance); -void gst_color_balance_set_value (GstColorBalance *balance, - GstColorBalanceChannel *channel, - gint value); -gint gst_color_balance_get_value (GstColorBalance *balance, - GstColorBalanceChannel *channel); +const GList *gst_color_balance_list_channels (GstColorBalance * balance); +void gst_color_balance_set_value (GstColorBalance * balance, + GstColorBalanceChannel * channel, gint value); +gint gst_color_balance_get_value (GstColorBalance * balance, + GstColorBalanceChannel * channel); /* trigger signal */ -void gst_color_balance_value_changed (GstColorBalance *balance, - GstColorBalanceChannel *channel, - gint value); +void gst_color_balance_value_changed (GstColorBalance * balance, + GstColorBalanceChannel * channel, gint value); G_END_DECLS - #endif /* __GST_COLOR_BALANCE_H__ */ diff --git a/gst-libs/gst/colorbalance/colorbalancechannel.c b/gst-libs/gst/colorbalance/colorbalancechannel.c index b8a4eebd..7812ed93 100644 --- a/gst-libs/gst/colorbalance/colorbalancechannel.c +++ b/gst-libs/gst/colorbalance/colorbalancechannel.c @@ -25,15 +25,17 @@ #include "colorbalancechannel.h" -enum { +enum +{ /* FILL ME */ SIGNAL_VALUE_CHANGED, LAST_SIGNAL }; -static void gst_color_balance_channel_class_init (GstColorBalanceChannelClass *klass); -static void gst_color_balance_channel_init (GstColorBalanceChannel *balance); -static void gst_color_balance_channel_dispose (GObject *object); +static void gst_color_balance_channel_class_init (GstColorBalanceChannelClass * + klass); +static void gst_color_balance_channel_init (GstColorBalanceChannel * balance); +static void gst_color_balance_channel_dispose (GObject * object); static GObjectClass *parent_class = NULL; static guint signals[LAST_SIGNAL] = { 0 }; @@ -59,46 +61,44 @@ gst_color_balance_channel_get_type (void) gst_color_balance_channel_type = g_type_register_static (G_TYPE_OBJECT, - "GstColorBalanceChannel", - &color_balance_channel_info, 0); + "GstColorBalanceChannel", &color_balance_channel_info, 0); } return gst_color_balance_channel_type; } static void -gst_color_balance_channel_class_init (GstColorBalanceChannelClass *klass) +gst_color_balance_channel_class_init (GstColorBalanceChannelClass * klass) { GObjectClass *object_klass = (GObjectClass *) klass; parent_class = g_type_class_ref (G_TYPE_OBJECT); signals[SIGNAL_VALUE_CHANGED] = - g_signal_new ("value-changed", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GstColorBalanceChannelClass, - value_changed), - NULL, NULL, g_cclosure_marshal_VOID__INT, - G_TYPE_NONE, 1, G_TYPE_INT); + g_signal_new ("value-changed", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GstColorBalanceChannelClass, + value_changed), + NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); object_klass->dispose = gst_color_balance_channel_dispose; } static void -gst_color_balance_channel_init (GstColorBalanceChannel *channel) +gst_color_balance_channel_init (GstColorBalanceChannel * channel) { channel->label = NULL; channel->min_value = channel->max_value = 0; } static void -gst_color_balance_channel_dispose (GObject *object) +gst_color_balance_channel_dispose (GObject * object) { GstColorBalanceChannel *channel = GST_COLOR_BALANCE_CHANNEL (object); if (channel->label) g_free (channel->label); - + channel->label = NULL; if (parent_class->dispose) diff --git a/gst-libs/gst/colorbalance/colorbalancechannel.h b/gst-libs/gst/colorbalance/colorbalancechannel.h index 23f73f8e..516fb72a 100644 --- a/gst-libs/gst/colorbalance/colorbalancechannel.h +++ b/gst-libs/gst/colorbalance/colorbalancechannel.h @@ -25,7 +25,6 @@ #include <gst/gst.h> G_BEGIN_DECLS - #define GST_TYPE_COLOR_BALANCE_CHANNEL \ (gst_color_balance_channel_get_type ()) #define GST_COLOR_BALANCE_CHANNEL(obj) \ @@ -38,27 +37,25 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_COLOR_BALANCE_CHANNEL)) #define GST_IS_COLOR_BALANCE_CHANNEL_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_COLOR_BALANCE_CHANNEL)) - -typedef struct _GstColorBalanceChannel { + typedef struct _GstColorBalanceChannel +{ GObject parent; - gchar *label; - gint min_value, - max_value; + gchar *label; + gint min_value, max_value; } GstColorBalanceChannel; -typedef struct _GstColorBalanceChannelClass { +typedef struct _GstColorBalanceChannelClass +{ GObjectClass parent; /* signals */ - void (* value_changed) (GstColorBalanceChannel *channel, - gint value); + void (*value_changed) (GstColorBalanceChannel * channel, gint value); gpointer _gst_reserved[GST_PADDING]; } GstColorBalanceChannelClass; -GType gst_color_balance_channel_get_type (void); +GType gst_color_balance_channel_get_type (void); G_END_DECLS - #endif /* __GST_COLOR_BALANCE_CHANNEL_H__ */ |