libobs/graphics: unbreak DMABUF on FreeBSD
Description
Trying to build wlrobs >= 1.1 I get the following error:
ld: error: undefined symbol: gs_texture_create_from_dmabuf
>>> referenced by dmabuf_source.c
>>> libwlrobs.so.p/src_dmabuf_source.c.o:(ready)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
despite https://github.com/obsproject/obs-studio/blob/88ea0bbb56b0a020b60c908a706cbe2403a13fd8/libobs/graphics/graphics.h#L970-L976
Motivation and Context
wlroots (Wayland) support on FreeBSD and DragonFly. wlrobs-1.0 already works fine but wlrobs-1.1 needs this change.
wlroots + wlrobs are also supported on DragonFly, so expose DMABUF API there as well.
How Has This Been Tested?
$ pkg install sway wlrobs glx-utils
$ sway
$ glxgears &
$ obs
<Sources>
<Add Source>
<Wayland output(dmabuf)>
<OK>
<Sources>
<Add Source>
<Window Capture (Xcomposite)>
<Window: glxgears>
<OK>
<Start recording>
<Stop recording>
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch.
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [x] I have included updates to all appropriate documentation.
libobs/graphics: properly expose DMABUF API on BSDs after c50c625
Required under Wayland (wlrobs) on FreeBSD and DragonFly.
Change that by something like:
libobs/graphics: Enable DMABUF on FreeBSD and DragonFly
"BSDs" cover more than just FreeBSD and DragonFly.
Ping. Anything else?
It's been holidays and we haven't caught up with all new the PR's yet that came in over the last few weeks. Please give us some time, your PR will get looked at.
No regressions reported after 3 weeks of dogfooding downstream:
If you want to test yourself use real hardware or pass-through GPU. DMABUF requires DRM but virtual GPU kernel drivers haven't been ported.