GNOME Bugzilla – Bug 356498
XError handling for x[v]imagesink
Last modified: 2006-11-13 14:58:06 UTC
It would be very supportive for the development, if x[v]imagesink could handle xerrors. As an action it should throw an GstGError on the bus and return GST_FLOW_UNECPECTED/GST_FLOW_ERROR in _show_frame().
Created attachment 72966 [details] [review] add error handling
Taking over a global callback is pretty scary - that's the reason the current XError handling is restricted to a fairly small window, I believe.
The hook can also be installed and removed for _show_frame(), but that sounds like quite some overhead. Does it make sense to make this behaviour conditional (property)?
If you want this behavior, convert x[v]imagesink to use XCB instead of Xlib. It really makes no sense to even attempt to do this with Xlib.
XCB is no option right now :) What are you thinking about making this patch dependent on a gobject-property (suggestion 'handle-xerrors'). Developers and people who can ensure that overiding the global handler is okay, can than make use of it. A cleaned up version of the patch will follow ...
Created attachment 73209 [details] [review] conditionally add error handling The new patch only installs the handler, when setting the "handle-xerrors" property. It also frees the xvport as soon as it can after the error occured. Finnaly the logging has been cleaned up. The is also a test application to demonstrate the error handling (which is not included in the patch).
Just to clarify this a bit. The case where this will be used is in a daemon. There is no gdk snatching away the error-handler. There is no uncertainity about order the handlers get installed or uninstalled. I know that is isn't a nice thing and I am aware of the thousand cases where it can go wrong. But please also see how this can be beneficary for the developer in debug situations.
closing because of no-interest