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 739808 - problem with GstNavigation interface in vaapisink, registering for ButtonPressMask events
problem with GstNavigation interface in vaapisink, registering for ButtonPres...
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks: 731852
 
 
Reported: 2014-11-08 09:47 UTC by Fabrice Bellet
Modified: 2014-11-27 09:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vaapisink: Protect the X11 API invokations with proper locking (1.44 KB, patch)
2014-11-11 10:02 UTC, sreerenj
accepted-commit_now Details | Review

Description Fabrice Bellet 2014-11-08 09:47:45 UTC
Hi!

Since commit 33212d9634, I have a crash occuring in banshee (Fedora 21, banshee 2.6.2 including a patch to make it work with gst-1.0) where a playbin (vaapidecode + vaapisink) pipeline is embedded in the application. 

It seems related to the fact that vaapisink registers for ButtonPressMask events, when the banshee widget already has registered for this same event. In this case, man XChangeWindowAttributes tells that a BadAccess error occurs, which is exactly what happens here.
Comment 1 sreerenj 2014-11-11 10:02:33 UTC
Created attachment 290404 [details] [review]
vaapisink: Protect the X11 API invokations with proper locking

Could you please have a try with this patch?
Comment 2 sreerenj 2014-11-11 10:25:13 UTC
If you doesn't want the vaapisink to handle the events then use gst_video_overlay_handle_events() API to disable it from the application.

Does it make sense for your issue?
Comment 3 Fabrice Bellet 2014-11-12 13:39:33 UTC
Patch from comment#1 doesn't fix it, but comment#2 is exactly what's needed. The code for that in libbanshee already should handle this :

https://git.gnome.org/browse/banshee/tree/src/Backends/Banshee.GStreamer/libbanshee/banshee-player-video.c#n78

The code is similar to the gst-1.0 patch for banshee-2.6.2 backported in Fedora:

http://pkgs.fedoraproject.org/cgit/banshee.git/tree/Initial-port-to-GStreamer-1.0.patch#n497

However I noticed that g_object_set(G_OBJECT (player->video_overlay), "handle-events", FALSE, NULL) is not executed. And if I add your suggested gst_video_overlay_handle_events (player->video_overlay, FALSE), then it works as expected.
Comment 4 sreerenj 2014-11-12 14:55:48 UTC
The g_boject_set() could be working fine with software renderer like xvimagesink, because xvimagesink has a property like that. But vaapisink doesn't have the handle-events property, so you should use gst_video_overlay_handle_events() explicitly to disable the event handling.
Comment 5 Fabrice Bellet 2014-11-22 20:49:36 UTC
Thanks for this precision. So I reassign the bug to banshee, as it seems to also concern the master branch of banshee, not just the gstreamer-1.0 patch to banshee-2.6.2 in Fedora.
Comment 6 Gwenole Beauchesne 2014-11-27 06:20:56 UTC
Review of attachment 290404 [details] [review]:

LGTM.
Comment 7 sreerenj 2014-11-27 09:32:40 UTC
commit 267465d7d0824753c5e54a4802d8c51546b546f3
Author: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Date:   Thu Nov 27 11:14:50 2014 +0200

    vaapisink: Protect the X11 API invokations with proper locking
    
    https://bugzilla.gnome.org/show_bug.cgi?id=739808