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 691421 - osxvideosink doesn't wait for xwindow-id in Qt-based application
osxvideosink doesn't wait for xwindow-id in Qt-based application
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.36
Other Mac OS
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-09 14:03 UTC by Alexey Chernov
Modified: 2013-01-10 12:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexey Chernov 2013-01-09 14:03:09 UTC
osxvideosink doesn't wait for xwindow-id after posting "prepare-xwindow-id" on a bus and creates its internal window. I suffer this problem in Qt-based application, so the problem seems to be in non-Glib mainloop of application (Qt uses AppKit in its Mac version). I also rotate Glib mainloop using gst_main_context_iteration() and QTimer with timeout 0. The problem is particularly serious as osxvideosink also handles window-id assignment incorrectly (described in bug #691419).
Comment 1 Sebastian Dröge (slomo) 2013-01-10 10:22:34 UTC
Do you catch the prepare-xwindow-id message from a sync bus handler and set the window id from there? Or do you use a normal (async) message handler?
Comment 2 Alexey Chernov 2013-01-10 12:02:01 UTC
I catch it in async message handler (set using gst_bus_add_watch()). I also thought of sync handler, but as documentation reads, it's mainly for plugin developers and not for application, so I refused to do this way. Interesting that xvimagesink always manages to receive window-id while the code is quite similar (window-id check is almost right after posting bus message).
Comment 3 Sebastian Dröge (slomo) 2013-01-10 12:24:25 UTC
You must do it from a sync message handler for this message as written in the xoverlay/videooverlay documentation. Otherwise this will sometimes work, sometimes not. The sink requires the window id to be set after gst_element_post_message() returned, and this is only guaranteed with a sync handler.