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>
+
Patch by: Jorn Baayen <jorn at openedhand dot com>
* sys/ximage/ximagesink.c: (gst_ximagesink_handle_xevents),
ARG_HANDLE_EVENTS,
ARG_DEVICE,
ARG_DEVICE_NAME,
- ARG_HANDLE_EXPOSE
+ ARG_HANDLE_EXPOSE,
+ ARG_DOUBLE_BUFFER
};
static GstVideoSinkClass *parent_class = NULL;
if (!strcmp (attr[i].name, dbl_buffer)) {
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;
}
case ARG_HANDLE_EXPOSE:
xvimagesink->handle_expose = g_value_get_boolean (value);
break;
+ case ARG_DOUBLE_BUFFER:
+ xvimagesink->double_buffer = g_value_get_boolean (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
case ARG_HANDLE_EXPOSE:
g_value_set_boolean (value, xvimagesink->handle_expose);
break;
+ case ARG_DOUBLE_BUFFER:
+ g_value_set_boolean (value, xvimagesink->double_buffer);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
xvimagesink->pool_lock = g_mutex_new ();
xvimagesink->synchronous = FALSE;
+ xvimagesink->double_buffer = TRUE;
xvimagesink->running = FALSE;
xvimagesink->keep_aspect = FALSE;
xvimagesink->handle_events = TRUE;
g_param_spec_boolean ("handle-expose", "Handle expose", "When enabled, "
"the current frame will always be drawn in response to X Expose "
"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;