libobs/graphics: Add Linux-only gs_texture_create_from_dmabuf()
DMA-BUF is a widespread Linux buffer sharing mechanism. It is what's commonly used zero-copy screen sharing by Wayland compositors. Add a new 'device_texture_create_from_dmabuf' vfunc to gs_exports, and stub implementations to libobs-opengl. Add a new public method gs_texture_create_from_dmabuf() that calls this vfunc.
This commit is contained in:
@@ -170,6 +170,16 @@ EXPORT void device_debug_marker_begin(gs_device_t *device,
|
||||
const float color[4]);
|
||||
EXPORT void device_debug_marker_end(gs_device_t *device);
|
||||
|
||||
#if __linux__
|
||||
|
||||
EXPORT gs_texture_t *device_texture_create_from_dmabuf(
|
||||
gs_device_t *device, unsigned int width, unsigned int height,
|
||||
enum gs_color_format color_format, uint32_t n_planes, const int *fds,
|
||||
const uint32_t *strides, const uint32_t *offsets,
|
||||
const uint64_t *modifiers);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user