mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
sys/xvimage/xvimagesink.*: Add option to turn off double-buffering for debugging purposes.
Original commit message from CVS: Patch by: Bastien Nocera <hadess at hadess dot net> * sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support), (gst_xvimagesink_set_property), (gst_xvimagesink_get_property), (gst_xvimagesink_init), (gst_xvimagesink_class_init): * sys/xvimage/xvimagesink.h: Add option to turn off double-buffering for debugging purposes. Fixes #437169.
This commit is contained in:
parent
877fa6035a
commit
312c0bd5ba
3 changed files with 26 additions and 2 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2007-07-14 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
|
Patch by: Bastien Nocera <hadess at hadess dot net>
|
||||||
|
|
||||||
|
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support),
|
||||||
|
(gst_xvimagesink_set_property), (gst_xvimagesink_get_property),
|
||||||
|
(gst_xvimagesink_init), (gst_xvimagesink_class_init):
|
||||||
|
* sys/xvimage/xvimagesink.h:
|
||||||
|
Add option to turn off double-buffering for debugging purposes.
|
||||||
|
Fixes #437169.
|
||||||
|
|
||||||
2007-07-14 Wim Taymans <wim.taymans@gmail.com>
|
2007-07-14 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
Patch by: Jorn Baayen <jorn at openedhand dot com>
|
Patch by: Jorn Baayen <jorn at openedhand dot com>
|
||||||
|
|
|
@ -195,7 +195,8 @@ enum
|
||||||
ARG_HANDLE_EVENTS,
|
ARG_HANDLE_EVENTS,
|
||||||
ARG_DEVICE,
|
ARG_DEVICE,
|
||||||
ARG_DEVICE_NAME,
|
ARG_DEVICE_NAME,
|
||||||
ARG_HANDLE_EXPOSE
|
ARG_HANDLE_EXPOSE,
|
||||||
|
ARG_DOUBLE_BUFFER
|
||||||
};
|
};
|
||||||
|
|
||||||
static GstVideoSinkClass *parent_class = NULL;
|
static GstVideoSinkClass *parent_class = NULL;
|
||||||
|
@ -1330,7 +1331,8 @@ gst_xvimagesink_get_xv_support (GstXvImageSink * xvimagesink,
|
||||||
if (!strcmp (attr[i].name, dbl_buffer)) {
|
if (!strcmp (attr[i].name, dbl_buffer)) {
|
||||||
const Atom atom = XInternAtom (xcontext->disp, dbl_buffer, False);
|
const Atom atom = XInternAtom (xcontext->disp, dbl_buffer, False);
|
||||||
|
|
||||||
XvSetPortAttribute (xcontext->disp, xcontext->xv_port_id, atom, 1);
|
XvSetPortAttribute (xcontext->disp, xcontext->xv_port_id, atom,
|
||||||
|
(xvimagesink->double_buffer ? 1 : 0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2854,6 +2856,9 @@ gst_xvimagesink_set_property (GObject * object, guint prop_id,
|
||||||
case ARG_HANDLE_EXPOSE:
|
case ARG_HANDLE_EXPOSE:
|
||||||
xvimagesink->handle_expose = g_value_get_boolean (value);
|
xvimagesink->handle_expose = g_value_get_boolean (value);
|
||||||
break;
|
break;
|
||||||
|
case ARG_DOUBLE_BUFFER:
|
||||||
|
xvimagesink->double_buffer = g_value_get_boolean (value);
|
||||||
|
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;
|
||||||
|
@ -2918,6 +2923,9 @@ gst_xvimagesink_get_property (GObject * object, guint prop_id,
|
||||||
case ARG_HANDLE_EXPOSE:
|
case ARG_HANDLE_EXPOSE:
|
||||||
g_value_set_boolean (value, xvimagesink->handle_expose);
|
g_value_set_boolean (value, xvimagesink->handle_expose);
|
||||||
break;
|
break;
|
||||||
|
case ARG_DOUBLE_BUFFER:
|
||||||
|
g_value_set_boolean (value, xvimagesink->double_buffer);
|
||||||
|
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;
|
||||||
|
@ -3013,6 +3021,7 @@ gst_xvimagesink_init (GstXvImageSink * xvimagesink)
|
||||||
xvimagesink->pool_lock = g_mutex_new ();
|
xvimagesink->pool_lock = g_mutex_new ();
|
||||||
|
|
||||||
xvimagesink->synchronous = FALSE;
|
xvimagesink->synchronous = FALSE;
|
||||||
|
xvimagesink->double_buffer = TRUE;
|
||||||
xvimagesink->running = FALSE;
|
xvimagesink->running = FALSE;
|
||||||
xvimagesink->keep_aspect = FALSE;
|
xvimagesink->keep_aspect = FALSE;
|
||||||
xvimagesink->handle_events = TRUE;
|
xvimagesink->handle_events = TRUE;
|
||||||
|
@ -3088,6 +3097,9 @@ gst_xvimagesink_class_init (GstXvImageSinkClass * klass)
|
||||||
g_param_spec_boolean ("handle-expose", "Handle expose", "When enabled, "
|
g_param_spec_boolean ("handle-expose", "Handle expose", "When enabled, "
|
||||||
"the current frame will always be drawn in response to X Expose "
|
"the current frame will always be drawn in response to X Expose "
|
||||||
"events", TRUE, G_PARAM_READWRITE));
|
"events", TRUE, G_PARAM_READWRITE));
|
||||||
|
g_object_class_install_property (gobject_class, ARG_DOUBLE_BUFFER,
|
||||||
|
g_param_spec_boolean ("double-buffer", "Double-buffer",
|
||||||
|
"Whether to double-buffer the output", TRUE, G_PARAM_READWRITE));
|
||||||
|
|
||||||
gobject_class->finalize = gst_xvimagesink_finalize;
|
gobject_class->finalize = gst_xvimagesink_finalize;
|
||||||
|
|
||||||
|
|
|
@ -251,6 +251,7 @@ struct _GstXvImageSink {
|
||||||
GSList *image_pool;
|
GSList *image_pool;
|
||||||
|
|
||||||
gboolean synchronous;
|
gboolean synchronous;
|
||||||
|
gboolean double_buffer;
|
||||||
gboolean keep_aspect;
|
gboolean keep_aspect;
|
||||||
gboolean draw_border;
|
gboolean draw_border;
|
||||||
gboolean handle_events;
|
gboolean handle_events;
|
||||||
|
|
Loading…
Reference in a new issue