diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | gst/videofilter/gstvideobalance.c | 26 |
2 files changed, 26 insertions, 11 deletions
@@ -1,3 +1,14 @@ +2004-01-16 David Schleef <ds@schleef.org> + + * gst/videofilter/gstvideobalance.c: Fix regression; changing a + property affects the video stream. + * sys/xvimage/xvimagesink.c: + * sys/xvimage/xvimagesink.h: + Add synchronous property for debugging. Should probably be + disabled in non-CVS builds. Make sure that the Xv attribute + exists before we set it (crash!). Fix a silly float bug that + caused colorbalance to just not work. + 2004-01-17 Christian Schaller <Uraeus@gnome.org> * tools/gst-launch-ext.in - update for new plugins diff --git a/gst/videofilter/gstvideobalance.c b/gst/videofilter/gstvideobalance.c index 5a863184..029d7d3e 100644 --- a/gst/videofilter/gstvideobalance.c +++ b/gst/videofilter/gstvideobalance.c @@ -65,6 +65,7 @@ static void gst_videobalance_interface_init (GstImplementsInterfaceClass *klass) static void gst_videobalance_colorbalance_init (GstColorBalanceClass *iface); static void gst_videobalance_dispose (GObject *object); +static void gst_videobalance_update_properties (GstVideobalance *videobalance); GType gst_videobalance_get_type (void) @@ -275,17 +276,7 @@ gst_videobalance_colorbalance_set_value (GstColorBalance *balance, else if (!g_ascii_strcasecmp (channel->label, "CONTRAST")) vb->contrast = (value + 1000.0) * 2.0 / 2000.0; - /* Maybe we should narrow values which are around median to trigger passthru - more often */ - if (vb->contrast == 1 && vb->brightness == 0 && - vb->hue == 0 && vb->saturation == 1) - { - vf->passthru = TRUE; - } - else - { - vf->passthru = FALSE; - } + gst_videobalance_update_properties (vb); } static gint @@ -321,6 +312,17 @@ gst_videobalance_colorbalance_init (GstColorBalanceClass *iface) } static void +gst_videobalance_update_properties (GstVideobalance *videobalance) +{ + if (videobalance->contrast == 1.0 && videobalance->brightness == 0.0 && + videobalance->hue == 0.0 && videobalance->saturation == 1.0) { + GST_VIDEOFILTER (videobalance)->passthru = TRUE; + } else { + GST_VIDEOFILTER (videobalance)->passthru = FALSE; + } +} + +static void gst_videobalance_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GstVideobalance *src; @@ -346,6 +348,8 @@ gst_videobalance_set_property (GObject *object, guint prop_id, const GValue *val default: break; } + + gst_videobalance_update_properties (src); } static void |