aboutsummaryrefslogtreecommitdiff
path: root/include/pipewire.h
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-07-22 04:58:41 +0200
committerdec05eba <dec05eba@protonmail.com>2024-07-22 04:58:41 +0200
commitb5b4d6b2bdd1809b2e8af0b7ddec32a8d4f88e9a (patch)
tree4046ff268eb26106a8030e40a619d7ff96d7a27f /include/pipewire.h
parentb077177081c61bce1b1e5247389a09383369a827 (diff)
Fix portal capture on intel, support multiple planes in one egl image (might fix capture on intel iris)
Diffstat (limited to 'include/pipewire.h')
-rw-r--r--include/pipewire.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/pipewire.h b/include/pipewire.h
index 2a53423..4e486fc 100644
--- a/include/pipewire.h
+++ b/include/pipewire.h
@@ -9,7 +9,8 @@
#include <spa/param/video/format.h>
#define GSR_PIPEWIRE_MAX_MODIFIERS 1024
-#define GSR_PIPEWIRE_NUM_VIDEO_FORMATS 10
+#define GSR_PIPEWIRE_NUM_VIDEO_FORMATS 6
+#define GSR_PIPEWIRE_DMABUF_MAX_PLANES 4
typedef struct gsr_egl gsr_egl;
@@ -78,7 +79,8 @@ typedef struct {
gsr_pipewire_data_version server_version;
gsr_pipewire_video_info video_info;
- gsr_pipewire_dmabuf_data dmabuf_data;
+ gsr_pipewire_dmabuf_data dmabuf_data[GSR_PIPEWIRE_DMABUF_MAX_PLANES];
+ size_t dmabuf_num_planes;
bool started;
bool stopped;
@@ -95,7 +97,8 @@ typedef struct {
bool gsr_pipewire_init(gsr_pipewire *self, int pipewire_fd, uint32_t pipewire_node, int fps, bool capture_cursor, gsr_egl *egl);
void gsr_pipewire_deinit(gsr_pipewire *self);
-bool gsr_pipewire_map_texture(gsr_pipewire *self, unsigned int texture_id, unsigned int cursor_texture_id, gsr_pipewire_region *region, gsr_pipewire_region *cursor_region, int *plane_fd);
+/* |plane_fds| should be at GSR_PIPEWIRE_DMABUF_MAX_PLANES in size */
+bool gsr_pipewire_map_texture(gsr_pipewire *self, unsigned int texture_id, unsigned int cursor_texture_id, gsr_pipewire_region *region, gsr_pipewire_region *cursor_region, int *plane_fds, int *num_plane_fds);
bool gsr_pipewire_recording_stopped(gsr_pipewire *self);
#endif /* GSR_PIPEWIRE_H */