static void gst_gamma_init (GstGamma * gamma) { /* properties */ gamma->gamma = DEFAULT_PROP_GAMMA; gst_gamma_calculate_tables (gamma); }
static void gst_gamma_init (GstGamma * gamma, GstGammaClass * g_class) { GST_DEBUG_OBJECT (gamma, "gst_gamma_init"); /* properties */ gamma->gamma = DEFAULT_PROP_GAMMA; gst_gamma_calculate_tables (gamma); }
static void gst_gamma_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstGamma *gamma; g_return_if_fail (GST_IS_GAMMA (object)); gamma = GST_GAMMA (object); GST_DEBUG ("gst_gamma_set_property"); switch (prop_id) { case PROP_GAMMA: gamma->gamma = g_value_get_double (value); gst_gamma_calculate_tables (gamma); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void gst_gamma_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstGamma *gamma = GST_GAMMA (object); switch (prop_id) { case PROP_GAMMA:{ gdouble val = g_value_get_double (value); GST_DEBUG_OBJECT (gamma, "Changing gamma from %lf to %lf", gamma->gamma, val); GST_OBJECT_LOCK (gamma); gamma->gamma = val; GST_OBJECT_UNLOCK (gamma); gst_gamma_calculate_tables (gamma); break; } default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }