From: Sebastian Dröge Date: Wed, 22 Feb 2012 09:15:15 +0000 (+0100) Subject: colorbalance: Add ::get_balance_type() vfunc and deprecated value inside the interfac... X-Git-Tag: RELEASE-0.11.3~1^2~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=16c39464409fa8d23abbce7e184f2c863a85707e;p=platform%2Fupstream%2Fgst-plugins-base.git colorbalance: Add ::get_balance_type() vfunc and deprecated value inside the interface struct Values in class/interface structs are not supported by most bindings. --- diff --git a/gst-libs/gst/interfaces/colorbalance.c b/gst-libs/gst/interfaces/colorbalance.c index 0bf52a9..464d737 100644 --- a/gst-libs/gst/interfaces/colorbalance.c +++ b/gst-libs/gst/interfaces/colorbalance.c @@ -102,13 +102,15 @@ gst_color_balance_class_init (GstColorBalanceClass * klass) initialized = TRUE; } - +#ifndef GST_REMOVE_DEPRECATED klass->balance_type = GST_COLOR_BALANCE_SOFTWARE; +#endif /* default virtual functions */ klass->list_channels = NULL; klass->set_value = NULL; klass->get_value = NULL; + klass->get_balance_type = NULL; } /** @@ -212,7 +214,14 @@ gst_color_balance_get_balance_type (GstColorBalance * balance) klass = GST_COLOR_BALANCE_GET_CLASS (balance); + if (klass->get_balance_type) + return klass->get_balance_type (balance); + +#ifndef GST_REMOVE_DEPRECATED return klass->balance_type; +#else + g_return_val_if_reached (GST_COLOR_BALANCE_SOFTWARE); +#endif } /** diff --git a/gst-libs/gst/interfaces/colorbalance.h b/gst-libs/gst/interfaces/colorbalance.h index 62771b5..fd8ceaa 100644 --- a/gst-libs/gst/interfaces/colorbalance.h +++ b/gst-libs/gst/interfaces/colorbalance.h @@ -80,7 +80,10 @@ typedef enum struct _GstColorBalanceClass { GTypeInterface klass; +/* FIXME 0.11: Remove this */ +#ifndef GST_REMOVE_DEPRECATED GstColorBalanceType balance_type; +#endif /* virtual functions */ const GList * (* list_channels) (GstColorBalance *balance); @@ -96,6 +99,8 @@ struct _GstColorBalanceClass { GstColorBalanceChannel *channel, gint value); + GstColorBalanceType (*get_balance_type) (GstColorBalance *balance); + /*< private >*/ gpointer _gst_reserved[GST_PADDING]; };