mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
sys/ximage/gstximagesrc.*: Add use_damage property to offer ability to choose whether to use
Original commit message from CVS: 2006-07-08 Zaheer Abbas Merali <zaheerabbas at merali dot org> * sys/ximage/gstximagesrc.c: (gst_ximage_src_ximage_get), (gst_ximage_src_set_property), (gst_ximage_src_get_property), (gst_ximage_src_class_init), (gst_ximage_src_init): * sys/ximage/gstximagesrc.h: Add use_damage property to offer ability to choose whether to use XDamage or not.
This commit is contained in:
parent
cac797c2eb
commit
e6c882b767
3 changed files with 27 additions and 2 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2006-07-08 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||||
|
|
||||||
|
* sys/ximage/gstximagesrc.c: (gst_ximage_src_ximage_get),
|
||||||
|
(gst_ximage_src_set_property), (gst_ximage_src_get_property),
|
||||||
|
(gst_ximage_src_class_init), (gst_ximage_src_init):
|
||||||
|
* sys/ximage/gstximagesrc.h:
|
||||||
|
Add use_damage property to offer ability to choose whether to use
|
||||||
|
XDamage or not.
|
||||||
|
|
||||||
2006-07-07 Wim Taymans <wim@fluendo.com>
|
2006-07-07 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/goom/filters.c: (zoomFilterSetResolution):
|
* gst/goom/filters.c: (zoomFilterSetResolution):
|
||||||
|
|
|
@ -78,7 +78,8 @@ enum
|
||||||
PROP_0,
|
PROP_0,
|
||||||
PROP_DISPLAY_NAME,
|
PROP_DISPLAY_NAME,
|
||||||
PROP_SCREEN_NUM,
|
PROP_SCREEN_NUM,
|
||||||
PROP_SHOW_POINTER
|
PROP_SHOW_POINTER,
|
||||||
|
PROP_USE_DAMAGE
|
||||||
};
|
};
|
||||||
|
|
||||||
GST_BOILERPLATE (GstXImageSrc, gst_ximage_src, GstPushSrc, GST_TYPE_PUSH_SRC);
|
GST_BOILERPLATE (GstXImageSrc, gst_ximage_src, GstPushSrc, GST_TYPE_PUSH_SRC);
|
||||||
|
@ -383,7 +384,7 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc)
|
||||||
g_return_val_if_fail (GST_IS_XIMAGE_SRC (ximagesrc), NULL);
|
g_return_val_if_fail (GST_IS_XIMAGE_SRC (ximagesrc), NULL);
|
||||||
|
|
||||||
#ifdef HAVE_XDAMAGE
|
#ifdef HAVE_XDAMAGE
|
||||||
if (ximagesrc->have_xdamage) {
|
if (ximagesrc->have_xdamage && ximagesrc->use_damage) {
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (ximagesrc, "Retrieving screen using XDamage");
|
GST_DEBUG_OBJECT (ximagesrc, "Retrieving screen using XDamage");
|
||||||
|
@ -449,6 +450,10 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
} else if (ximagesrc->have_xdamage && ximagesrc->damage) {
|
||||||
|
/* Free up XDamage we allocated earlier when we did not know whether
|
||||||
|
* we wanted to use damage or not */
|
||||||
|
XDamageDestroy (ximagesrc->xcontext->disp, ximagesrc->damage);
|
||||||
} else {
|
} else {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -622,6 +627,9 @@ gst_ximage_src_set_property (GObject * object, guint prop_id,
|
||||||
case PROP_SHOW_POINTER:
|
case PROP_SHOW_POINTER:
|
||||||
src->show_pointer = g_value_get_boolean (value);
|
src->show_pointer = g_value_get_boolean (value);
|
||||||
break;
|
break;
|
||||||
|
case PROP_USE_DAMAGE:
|
||||||
|
src->use_damage = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -647,6 +655,8 @@ gst_ximage_src_get_property (GObject * object, guint prop_id, GValue * value,
|
||||||
case PROP_SHOW_POINTER:
|
case PROP_SHOW_POINTER:
|
||||||
g_value_set_boolean (value, src->show_pointer);
|
g_value_set_boolean (value, src->show_pointer);
|
||||||
break;
|
break;
|
||||||
|
case PROP_USE_DAMAGE:
|
||||||
|
g_value_set_boolean (value, src->use_damage);
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -789,6 +799,10 @@ gst_ximage_src_class_init (GstXImageSrcClass * klass)
|
||||||
g_param_spec_boolean ("show_pointer", "Show Mouse Pointer",
|
g_param_spec_boolean ("show_pointer", "Show Mouse Pointer",
|
||||||
"Show mouse pointer (if XFixes extension enabled)", TRUE,
|
"Show mouse pointer (if XFixes extension enabled)", TRUE,
|
||||||
G_PARAM_READWRITE));
|
G_PARAM_READWRITE));
|
||||||
|
g_object_class_install_property (gc, PROP_SHOW_POINTER,
|
||||||
|
g_param_spec_boolean ("use_damage", "Use XDamage",
|
||||||
|
"Use XDamage (if XDamage extension enabled)", TRUE,
|
||||||
|
G_PARAM_READWRITE));
|
||||||
|
|
||||||
parent_class = g_type_class_peek_parent (klass);
|
parent_class = g_type_class_peek_parent (klass);
|
||||||
|
|
||||||
|
@ -810,6 +824,7 @@ gst_ximage_src_init (GstXImageSrc * ximagesrc, GstXImageSrcClass * klass)
|
||||||
ximagesrc->pool_lock = g_mutex_new ();
|
ximagesrc->pool_lock = g_mutex_new ();
|
||||||
ximagesrc->x_lock = g_mutex_new ();
|
ximagesrc->x_lock = g_mutex_new ();
|
||||||
ximagesrc->show_pointer = TRUE;
|
ximagesrc->show_pointer = TRUE;
|
||||||
|
ximagesrc->use_damage = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
|
@ -75,6 +75,7 @@ struct _GstXImageSrc
|
||||||
gboolean have_xfixes;
|
gboolean have_xfixes;
|
||||||
gboolean have_xdamage;
|
gboolean have_xdamage;
|
||||||
gboolean show_pointer;
|
gboolean show_pointer;
|
||||||
|
gboolean use_damage;
|
||||||
#ifdef HAVE_XFIXES
|
#ifdef HAVE_XFIXES
|
||||||
int fixes_event_base;
|
int fixes_event_base;
|
||||||
XFixesCursorImage *cursor_image;
|
XFixesCursorImage *cursor_image;
|
||||||
|
|
Loading…
Reference in a new issue