mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-23 09:04:15 +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
700e02e97c
commit
112f838c18
3 changed files with 39 additions and 9 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>
|
2004-01-17 Christian Schaller <Uraeus@gnome.org>
|
||||||
|
|
||||||
* tools/gst-launch-ext.in - update for new plugins
|
* tools/gst-launch-ext.in - update for new plugins
|
||||||
|
|
|
@ -64,7 +64,8 @@ enum {
|
||||||
ARG_BRIGHTNESS,
|
ARG_BRIGHTNESS,
|
||||||
ARG_HUE,
|
ARG_HUE,
|
||||||
ARG_SATURATION,
|
ARG_SATURATION,
|
||||||
ARG_DISPLAY
|
ARG_DISPLAY,
|
||||||
|
ARG_SYNCHRONOUS
|
||||||
/* FILL ME */
|
/* FILL ME */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -338,7 +339,7 @@ gst_xvimagesink_update_colorbalance (GstXvImageSink *xvimagesink)
|
||||||
g_object_ref (channel);
|
g_object_ref (channel);
|
||||||
|
|
||||||
/* Our range conversion coef */
|
/* Our range conversion coef */
|
||||||
convert_coef = (channel->max_value - channel->min_value) / 2000;
|
convert_coef = (channel->max_value - channel->min_value) / 2000.0;
|
||||||
|
|
||||||
if (g_ascii_strcasecmp (channel->label, "XV_HUE") == 0)
|
if (g_ascii_strcasecmp (channel->label, "XV_HUE") == 0)
|
||||||
{
|
{
|
||||||
|
@ -723,13 +724,15 @@ gst_xvimagesink_xcontext_get (GstXvImageSink *xvimagesink)
|
||||||
matching_attr = xv_attr + j;
|
matching_attr = xv_attr + j;
|
||||||
}
|
}
|
||||||
|
|
||||||
channel = g_object_new (GST_TYPE_COLOR_BALANCE_CHANNEL, NULL);
|
if (matching_attr) {
|
||||||
channel->label = g_strdup (channels[i]);
|
channel = g_object_new (GST_TYPE_COLOR_BALANCE_CHANNEL, NULL);
|
||||||
channel->min_value = matching_attr ? matching_attr->min_value : -1000;
|
channel->label = g_strdup (channels[i]);
|
||||||
channel->max_value = matching_attr ? matching_attr->max_value : 1000;
|
channel->min_value = matching_attr ? matching_attr->min_value : -1000;
|
||||||
|
channel->max_value = matching_attr ? matching_attr->max_value : 1000;
|
||||||
xcontext->channels_list = g_list_append (xcontext->channels_list,
|
|
||||||
channel);
|
xcontext->channels_list = g_list_append (xcontext->channels_list,
|
||||||
|
channel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xv_attr)
|
if (xv_attr)
|
||||||
|
@ -1445,6 +1448,13 @@ gst_xvimagesink_set_property (GObject *object, guint prop_id,
|
||||||
case ARG_DISPLAY:
|
case ARG_DISPLAY:
|
||||||
xvimagesink->display_name = g_strdup (g_value_get_string (value));
|
xvimagesink->display_name = g_strdup (g_value_get_string (value));
|
||||||
break;
|
break;
|
||||||
|
case ARG_SYNCHRONOUS:
|
||||||
|
xvimagesink->synchronous = g_value_get_boolean (value);
|
||||||
|
if (xvimagesink->xcontext) {
|
||||||
|
XSynchronize (xvimagesink->xcontext->disp,
|
||||||
|
xvimagesink->synchronous);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -1478,6 +1488,9 @@ gst_xvimagesink_get_property (GObject *object, guint prop_id,
|
||||||
case ARG_DISPLAY:
|
case ARG_DISPLAY:
|
||||||
g_value_set_string (value, g_strdup (xvimagesink->display_name));
|
g_value_set_string (value, g_strdup (xvimagesink->display_name));
|
||||||
break;
|
break;
|
||||||
|
case ARG_SYNCHRONOUS:
|
||||||
|
g_value_set_boolean (value, xvimagesink->synchronous);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -1600,6 +1613,10 @@ gst_xvimagesink_class_init (GstXvImageSinkClass *klass)
|
||||||
g_object_class_install_property (gobject_class, ARG_DISPLAY,
|
g_object_class_install_property (gobject_class, ARG_DISPLAY,
|
||||||
g_param_spec_string ("display", "Display", "X Display name",
|
g_param_spec_string ("display", "Display", "X Display name",
|
||||||
NULL, G_PARAM_READWRITE));
|
NULL, G_PARAM_READWRITE));
|
||||||
|
g_object_class_install_property (gobject_class, ARG_SYNCHRONOUS,
|
||||||
|
g_param_spec_boolean ("synchronous", "Synchronous", "When enabled, runs "
|
||||||
|
"the X display in synchronous mode. (used only for debugging)", FALSE,
|
||||||
|
G_PARAM_READWRITE));
|
||||||
|
|
||||||
gobject_class->dispose = gst_xvimagesink_dispose;
|
gobject_class->dispose = gst_xvimagesink_dispose;
|
||||||
gobject_class->set_property = gst_xvimagesink_set_property;
|
gobject_class->set_property = gst_xvimagesink_set_property;
|
||||||
|
|
|
@ -144,6 +144,8 @@ struct _GstXvImageSink {
|
||||||
|
|
||||||
GMutex *pool_lock;
|
GMutex *pool_lock;
|
||||||
GSList *image_pool;
|
GSList *image_pool;
|
||||||
|
|
||||||
|
gboolean synchronous;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstXvImageSinkClass {
|
struct _GstXvImageSinkClass {
|
||||||
|
|
Loading…
Reference in a new issue