mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
colorbalance: Add ::get_balance_type() vfunc and deprecated value inside the interface struct
Values in class/interface structs are not supported by most bindings.
This commit is contained in:
parent
17b8299df1
commit
16c3946440
2 changed files with 15 additions and 1 deletions
|
@ -102,13 +102,15 @@ gst_color_balance_class_init (GstColorBalanceClass * klass)
|
||||||
|
|
||||||
initialized = TRUE;
|
initialized = TRUE;
|
||||||
}
|
}
|
||||||
|
#ifndef GST_REMOVE_DEPRECATED
|
||||||
klass->balance_type = GST_COLOR_BALANCE_SOFTWARE;
|
klass->balance_type = GST_COLOR_BALANCE_SOFTWARE;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* default virtual functions */
|
/* default virtual functions */
|
||||||
klass->list_channels = NULL;
|
klass->list_channels = NULL;
|
||||||
klass->set_value = NULL;
|
klass->set_value = NULL;
|
||||||
klass->get_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);
|
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;
|
return klass->balance_type;
|
||||||
|
#else
|
||||||
|
g_return_val_if_reached (GST_COLOR_BALANCE_SOFTWARE);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -80,7 +80,10 @@ typedef enum
|
||||||
struct _GstColorBalanceClass {
|
struct _GstColorBalanceClass {
|
||||||
GTypeInterface klass;
|
GTypeInterface klass;
|
||||||
|
|
||||||
|
/* FIXME 0.11: Remove this */
|
||||||
|
#ifndef GST_REMOVE_DEPRECATED
|
||||||
GstColorBalanceType balance_type;
|
GstColorBalanceType balance_type;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* virtual functions */
|
/* virtual functions */
|
||||||
const GList * (* list_channels) (GstColorBalance *balance);
|
const GList * (* list_channels) (GstColorBalance *balance);
|
||||||
|
@ -96,6 +99,8 @@ struct _GstColorBalanceClass {
|
||||||
GstColorBalanceChannel *channel,
|
GstColorBalanceChannel *channel,
|
||||||
gint value);
|
gint value);
|
||||||
|
|
||||||
|
GstColorBalanceType (*get_balance_type) (GstColorBalance *balance);
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue