mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
gst/videofilter/gstvideobalance.c: Fix regression; changing a property affects the video stream.
Original commit message from CVS: * 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.
This commit is contained in:
parent
a62547cfe3
commit
4ac1a134ec
2 changed files with 26 additions and 11 deletions
11
ChangeLog
11
ChangeLog
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
@ -320,6 +311,17 @@ gst_videobalance_colorbalance_init (GstColorBalanceClass *iface)
|
|||
iface->get_value = gst_videobalance_colorbalance_get_value;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue