wayland: do a roundtrip to wait for image description creation#17495
wayland: do a roundtrip to wait for image description creation#17495kasper93 merged 2 commits intompv-player:masterfrom
Conversation
Also switch to a different event queue to ensure there are no other events in the queue.
Not needed after previous commit
|
I don't believe this is correct. wl_display_roundtrip_queue performs one roundtrip on the queue. But if the image_description callbacks are not called within that roundtrip, the queue will never be dispatched again and the callbacks will never be invoked. |
|
I'm aware, but this was sufficient on every compositor I tested on. In fact the Of course I'm perfectly fine with doing a dispatch until the callback is invoked, but there was some aversion among mpv maintainers with that approach. @Dudemanguy thoughts? |
|
Am I trippin or didn't you add the "VO is ready" state to handle the image description not being ready while allowing the rest of mpv to run normally? |
There were several problems with it. If the callback didn't get invoked within the next two draw_frame calls, mpv would end up in a permanent deadlock. Fixing it would be far more complex than it is worth. I didn't like the idea of littering the rest of the codebase just because Wayland being special. It's better for Waylandisms to be contained in one place instead of in mpv core. |
|
Mesa loops until the image description is ready. If that was good enough for waylandvk until now, then it should also be good enough for the rest of mpv. |
I completely agree, but I'm not mpv maintainer and I've already made that PR before and it was rejected. Something like llyyr@d330627 would be my preference |
I don't want to add an api that spans three layers of abstraction, only to wait on some internal Wayland queue. Why not just put Alternatively, we can wait in other entry points, like flip_page or draw_frame. |
This is fine too, in fact that was the first version of the PR I made. I can change it to that if that's fine, it's exactly what Mesa does |
No description provided.