mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 05:59:10 +00:00
gst/videofilter/gstvideobalance.c: Implement passthru if settings are in the middle.
Original commit message from CVS: 2004-01-15 Julien MOUTTE <julien@moutte.net> * gst/videofilter/gstvideobalance.c: (gst_videobalance_init), (gst_videobalance_colorbalance_set_value): Implement passthru if settings are in the middle. * tools/gst-launch-ext.in: Stop using xvideosink, use ximagesink.
This commit is contained in:
parent
13bee94964
commit
36470772d6
3 changed files with 24 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-01-15 Julien MOUTTE <julien@moutte.net>
|
||||
|
||||
* gst/videofilter/gstvideobalance.c: (gst_videobalance_init),
|
||||
(gst_videobalance_colorbalance_set_value): Implement passthru if
|
||||
settings are in the middle.
|
||||
* tools/gst-launch-ext.in: Stop using xvideosink, use ximagesink.
|
||||
|
||||
2004-01-15 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* gst/videofilter/Makefile.am:
|
||||
|
|
|
@ -207,6 +207,8 @@ gst_videobalance_init (GTypeInstance *instance, gpointer g_class)
|
|||
videobalance->brightness = 0;
|
||||
videobalance->saturation = 1;
|
||||
videobalance->hue = 0;
|
||||
|
||||
videofilter->passthru = TRUE;
|
||||
|
||||
/* Generate the channels list */
|
||||
for (i = 0; i < (sizeof (channels) / sizeof (char *)); i++)
|
||||
|
@ -257,9 +259,11 @@ gst_videobalance_colorbalance_set_value (GstColorBalance *balance,
|
|||
gint value)
|
||||
{
|
||||
GstVideobalance *vb = GST_VIDEOBALANCE (balance);
|
||||
GstVideofilter *vf = GST_VIDEOFILTER (vb);
|
||||
|
||||
g_return_if_fail (vb != NULL);
|
||||
g_return_if_fail (GST_IS_VIDEOBALANCE (vb));
|
||||
g_return_if_fail (GST_IS_VIDEOFILTER (vf));
|
||||
g_return_if_fail (channel->label != NULL);
|
||||
|
||||
if (!g_ascii_strcasecmp (channel->label, "HUE"))
|
||||
|
@ -270,6 +274,18 @@ gst_videobalance_colorbalance_set_value (GstColorBalance *balance,
|
|||
vb->brightness = (value + 1000.0) * 2.0 / 2000.0 - 1.0;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
|
|
|
@ -56,7 +56,7 @@ sub read_config
|
|||
print "This is not an error, just a friendly reminder... Check the man page.\n\n";
|
||||
}
|
||||
if (!defined $cfg{AUDIOSINK}) { $cfg{AUDIOSINK} = "osssink"; }
|
||||
if (!defined $cfg{VIDEOSINK}) { $cfg{VIDEOSINK} = "colorspace ! xvideosink"; }
|
||||
if (!defined $cfg{VIDEOSINK}) { $cfg{VIDEOSINK} = "colorspace ! ximagesink"; }
|
||||
if (!defined $cfg{CVS_PATH}) { $cfg{CVS_PATH} = `echo -n ~`."/gst/cvs"; }
|
||||
|
||||
if ($command =~ /(.+)\/gst-launch-ext$/)
|
||||
|
|
Loading…
Reference in a new issue