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 169111 - [API] GstEvent NEED_RESPONSE flag
[API] GstEvent NEED_RESPONSE flag
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.9
Other Linux
: Normal normal
: 0.8.10
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-03-03 17:05 UTC by Jan Schmidt
Modified: 2005-03-10 02:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Core changes for the event NEED_RESPONSE flag (8.05 KB, patch)
2005-03-03 18:02 UTC, Jan Schmidt
none Details | Review
gst-plugins changes for the NEED_RESPONSE flag (26.41 KB, patch)
2005-03-03 18:06 UTC, Jan Schmidt
none Details | Review
Updated patch for gst-plugins (26.42 KB, patch)
2005-03-03 18:37 UTC, Jan Schmidt
none Details | Review
Updated gstreamer core patch (7.14 KB, patch)
2005-03-09 06:10 UTC, Jan Schmidt
none Details | Review
Update gst-plugins patch (26.39 KB, patch)
2005-03-09 06:16 UTC, Jan Schmidt
none Details | Review

Description Jan Schmidt 2005-03-03 17:05:49 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.
Comment 1 Jan Schmidt 2005-03-03 18:02:40 UTC
Created attachment 38212 [details] [review]
Core changes for the event NEED_RESPONSE flag
Comment 2 Jan Schmidt 2005-03-03 18:06:30 UTC
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)
Comment 3 Ronald Bultje 2005-03-03 18:12:15 UTC
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.
Comment 4 Jan Schmidt 2005-03-03 18:15:03 UTC
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.
Comment 5 Jan Schmidt 2005-03-03 18:21:36 UTC
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.
Comment 6 Jan Schmidt 2005-03-03 18:37:24 UTC
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.
Comment 7 Jan Schmidt 2005-03-09 06:10:19 UTC
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.
Comment 8 Jan Schmidt 2005-03-09 06:16:04 UTC
Created attachment 38450 [details] [review]
Update gst-plugins patch

Changed to use GST_DATA_FLAG macros.
Comment 9 Ronald Bultje 2005-03-09 08:46:28 UTC
Look good as far as I'm concerned, please apply. Thanks for the work on this.
Comment 10 Jan Schmidt 2005-03-10 02:34:37 UTC
OK, committed.