GNOME Bugzilla – Bug 169111
[API] GstEvent NEED_RESPONSE flag
Last modified: 2005-03-10 02:34:37 UTC
Patches to the core and gst-plugins which implement a NEED_RESPONSE flag for GstEvents. The flag is true by default, ensuring current behaviour. If it is false, GstQueue will not block and wait for a response for upstream events. This fixes all sorts of stuttering and lengthy blocking in playback caused by a large number of mouse-move navigation events waving the cursor over the window.
Created attachment 38212 [details] [review] Core changes for the event NEED_RESPONSE flag
Created attachment 38213 [details] [review] gst-plugins changes for the NEED_RESPONSE flag Note that the only relevant line in x[v]imagesink.c is actually the GST_EVENT_COMMON_FLAG_UNSET (event, GST_EVENT_COMMON_FLAG_NEED_RESPONSE); All the other changes are extra modifications I've made but not yet committed and would be good to go into gst-plugins 0.8.8 (as long as the GST_EVENT_COMMON_FLAG_UNSET lines are removed or commented out)
Please don't create macros for flag setting, GST_DATA_* already has those. We use the same principles for GstObject and derived. First lines of sys/ximage/ximagesink.c: + ximagesink->need_expose = FALSE; /* Set the need_expose flag. If it's clear by the time we + * get to put the image, the stream beat us to it + */ + ximagesink->need_expose = TRUE; why? for sys/xvimage/xvimagesink.c, don't add/remove newlines, indentation, etc. Apart from that, looks OK.
the need_expose is there because putting a buffer on the screen may take some time - hence we may end up waiting on the lock which an expose is already in progress. Therefore, if we get the lock and the expose already happened, don't bother.
Oh, and the newlines/indentation stuff seems to be a difference between my gst-indent on ubuntu and the CVS server one. I assume the CVS one will fix those again when the code is committed.
Created attachment 38215 [details] [review] Updated patch for gst-plugins Updated patch for gst-plugins which fixes the mis-paste that Ronald pointed out and I still managed to miss. It is time for bed.
Created attachment 38449 [details] [review] Updated gstreamer core patch * Use GST_DATA_FLAG macros instead of aliasing them. * Don't access the event after it has given to the handler function.
Created attachment 38450 [details] [review] Update gst-plugins patch Changed to use GST_DATA_FLAG macros.
Look good as far as I'm concerned, please apply. Thanks for the work on this.
OK, committed.