After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 356498 - XError handling for x[v]imagesink
XError handling for x[v]imagesink
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-09-18 09:18 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2006-11-13 14:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add error handling (17.98 KB, patch)
2006-09-18 09:19 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
conditionally add error handling (27.46 KB, patch)
2006-09-22 13:43 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2006-09-18 09:18:56 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().
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2006-09-18 09:19:39 UTC
Created attachment 72966 [details] [review]
add error handling
Comment 2 Jan Schmidt 2006-09-18 15:12:15 UTC
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.
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2006-09-18 15:52:05 UTC
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)?
Comment 4 David Schleef 2006-09-18 20:22:54 UTC
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.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2006-09-20 13:07:01 UTC
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 ...
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2006-09-22 13:43:58 UTC
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).
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2006-09-27 08:03:55 UTC
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.
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2006-11-13 14:58:06 UTC
closing because of no-interest