mpv icon indicating copy to clipboard operation
mpv copied to clipboard

[Request] Expose Vulkan and vo_dmabuf_wayland in libmpv (for third-party clients)

Open r2rX opened this issue 3 years ago • 5 comments

Hello there,

I've been using mpc-qt as the client/player (using libmpv) for viewing content. I inquired with its author if it was possible to enable Vulkan & vo_dmabuf_wayland support and he replied with the following. To summarize, if libmpv exposed these features directly then it may be possible to enable support in mpc-qt without it being complicated for the project.

Expected behavior of the wanted feature

If Wayland and vo_dmabuf_wayland are exposed via libmpv, third-party clients can incorporate the features much easier.

Alternative behavior of the wanted feature

I'm not sure what that would be but @cmdrkotori, or you wonderful devs, would have a better idea about this than I. :)

r2rX avatar Dec 20 '22 22:12 r2rX

Being able to access dmabufs would be useful for integrating with toolkit like GTK, which has recently gained support for video passthrough on Wayland.

benjamin-otte avatar Mar 24 '24 00:03 benjamin-otte

Is there any update from the team on this, or any specific blockers preventing such a feature?

brys0 avatar Nov 23 '24 17:11 brys0

There is no way for this to work other than writing a totally new api that uses subsurfaces. It's not a trivial change and even then it would require any client to write a ton of new wayland-specific code. So probably not happening anytime soon.

To be clear, you can use vo_dmabuf_wayland in libmpv like any other VO but there is no render API or embedding support. The render API is still opengl-only.

Dudemanguy avatar Nov 23 '24 17:11 Dudemanguy

There is no way for this to work other than writing a totally new api that uses subsurfaces. It's not a trivial change and even then it would require any client to write a ton of new wayland-specific code. So probably not happening anytime soon.

To be clear, you can use vo_dmabuf_wayland in libmpv like any other VO but there is no render API or embedding support. The render API is still opengl-only.

Ah, alright. Thank you for the info! I'll have to figure something else out then.

brys0 avatar Nov 23 '24 18:11 brys0

@Dudemanguy mentioned libwlembed as a potential solution in https://github.com/mpv-player/mpv/pull/12627#issuecomment-3335166707.

tbertels avatar Sep 25 '25 18:09 tbertels