mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-16 04:54:12 +00:00
sys/ximage/ximagesink.c: Adding synchronous property for debugging.
Original commit message from CVS: 2004-01-18 Julien MOUTTE <julien@moutte.net> * sys/ximage/ximagesink.c: (gst_ximagesink_set_property), (gst_ximagesink_get_property), (gst_ximagesink_class_init): Adding synchronous property for debugging. * sys/ximage/ximagesink.h: Adding the synchronous boolean flag. * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xcontext_get), (gst_xvimagesink_set_property): Moving a pointer declaration to a smaller block, fixing indent.
This commit is contained in:
parent
1c2fe90b01
commit
63c5053a28
4 changed files with 30 additions and 3 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2004-01-18 Julien MOUTTE <julien@moutte.net>
|
||||
|
||||
* sys/ximage/ximagesink.c: (gst_ximagesink_set_property),
|
||||
(gst_ximagesink_get_property), (gst_ximagesink_class_init): Adding
|
||||
synchronous property for debugging.
|
||||
* sys/ximage/ximagesink.h: Adding the synchronous boolean flag.
|
||||
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xcontext_get),
|
||||
(gst_xvimagesink_set_property): Moving a pointer declaration to a
|
||||
smaller block, fixing indent.
|
||||
|
||||
2004-01-16 David Schleef <ds@schleef.org>
|
||||
|
||||
* gst/videofilter/gstvideobalance.c: Fix regression; changing a
|
||||
|
|
|
@ -53,7 +53,8 @@ GST_STATIC_PAD_TEMPLATE (
|
|||
|
||||
enum {
|
||||
ARG_0,
|
||||
ARG_DISPLAY
|
||||
ARG_DISPLAY,
|
||||
ARG_SYNCHRONOUS
|
||||
/* FILL ME */
|
||||
};
|
||||
|
||||
|
@ -1078,6 +1079,13 @@ gst_ximagesink_set_property (GObject *object, guint prop_id,
|
|||
case ARG_DISPLAY:
|
||||
ximagesink->display_name = g_strdup (g_value_get_string (value));
|
||||
break;
|
||||
case ARG_SYNCHRONOUS:
|
||||
ximagesink->synchronous = g_value_get_boolean (value);
|
||||
if (ximagesink->xcontext) {
|
||||
XSynchronize (ximagesink->xcontext->disp,
|
||||
ximagesink->synchronous);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
|
@ -1099,6 +1107,9 @@ gst_ximagesink_get_property (GObject *object, guint prop_id,
|
|||
case ARG_DISPLAY:
|
||||
g_value_set_string (value, g_strdup (ximagesink->display_name));
|
||||
break;
|
||||
case ARG_SYNCHRONOUS:
|
||||
g_value_set_boolean (value, ximagesink->synchronous);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
|
@ -1206,6 +1217,10 @@ gst_ximagesink_class_init (GstXImageSinkClass *klass)
|
|||
g_object_class_install_property (gobject_class, ARG_DISPLAY,
|
||||
g_param_spec_string ("display", "Display", "X Display name",
|
||||
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_ximagesink_dispose;
|
||||
gobject_class->set_property = gst_ximagesink_set_property;
|
||||
|
|
|
@ -122,6 +122,8 @@ struct _GstXImageSink {
|
|||
|
||||
GMutex *pool_lock;
|
||||
GSList *image_pool;
|
||||
|
||||
gboolean synchronous;
|
||||
};
|
||||
|
||||
struct _GstXImageSinkClass {
|
||||
|
|
|
@ -714,7 +714,6 @@ gst_xvimagesink_xcontext_get (GstXvImageSink *xvimagesink)
|
|||
/* Generate the channels list */
|
||||
for (i = 0; i < (sizeof (channels) / sizeof (char *)); i++)
|
||||
{
|
||||
GstColorBalanceChannel *channel;
|
||||
XvAttribute *matching_attr = NULL;
|
||||
|
||||
if (xv_attr != NULL)
|
||||
|
@ -725,6 +724,7 @@ gst_xvimagesink_xcontext_get (GstXvImageSink *xvimagesink)
|
|||
}
|
||||
|
||||
if (matching_attr) {
|
||||
GstColorBalanceChannel *channel;
|
||||
channel = g_object_new (GST_TYPE_COLOR_BALANCE_CHANNEL, NULL);
|
||||
channel->label = g_strdup (channels[i]);
|
||||
channel->min_value = matching_attr ? matching_attr->min_value : -1000;
|
||||
|
@ -1452,7 +1452,7 @@ gst_xvimagesink_set_property (GObject *object, guint prop_id,
|
|||
xvimagesink->synchronous = g_value_get_boolean (value);
|
||||
if (xvimagesink->xcontext) {
|
||||
XSynchronize (xvimagesink->xcontext->disp,
|
||||
xvimagesink->synchronous);
|
||||
xvimagesink->synchronous);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue