diff options
| author | dec05eba <dec05eba@protonmail.com> | 2025-07-29 23:30:00 +0200 |
|---|---|---|
| committer | dec05eba <dec05eba@protonmail.com> | 2025-07-29 23:30:45 +0200 |
| commit | a4b1ff28d5e988f95e0dcd0b48b5c4862a12c293 (patch) | |
| tree | 78b59ec02e21d330ef12f14826387481b19ca6de /include | |
| parent | b7c83346798b3fe041310dd80ec79bb54f9881fc (diff) | |
Desktop portal capture: support rotated monitor capture on sway
Diffstat (limited to 'include')
| -rw-r--r-- | include/pipewire_video.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/pipewire_video.h b/include/pipewire_video.h index 0d4e60b..d22e812 100644 --- a/include/pipewire_video.h +++ b/include/pipewire_video.h @@ -1,6 +1,7 @@ #ifndef GSR_PIPEWIRE_VIDEO_H #define GSR_PIPEWIRE_VIDEO_H +#include "defs.h" #include <stdbool.h> #include <stdint.h> #include <pthread.h> @@ -49,6 +50,17 @@ typedef struct { } gsr_texture_map; typedef struct { + gsr_pipewire_video_region region; + gsr_pipewire_video_region cursor_region; + gsr_pipewire_video_dmabuf_data dmabuf_data[GSR_PIPEWIRE_VIDEO_DMABUF_MAX_PLANES]; + int num_dmabuf_data; + uint32_t fourcc; + uint64_t modifiers; + bool using_external_image; + gsr_monitor_rotation rotation; +} gsr_map_texture_output; + +typedef struct { gsr_egl *egl; int fd; uint32_t node; @@ -98,6 +110,8 @@ typedef struct { bool paused; double paused_start_secs; + + gsr_monitor_rotation rotation; } gsr_pipewire_video; /* @@ -108,8 +122,7 @@ typedef struct { bool gsr_pipewire_video_init(gsr_pipewire_video *self, int pipewire_fd, uint32_t pipewire_node, int fps, bool capture_cursor, gsr_egl *egl); void gsr_pipewire_video_deinit(gsr_pipewire_video *self); -/* |dmabuf_data| should be at least GSR_PIPEWIRE_VIDEO_DMABUF_MAX_PLANES in size */ -bool gsr_pipewire_video_map_texture(gsr_pipewire_video *self, gsr_texture_map texture_map, gsr_pipewire_video_region *region, gsr_pipewire_video_region *cursor_region, gsr_pipewire_video_dmabuf_data *dmabuf_data, int *num_dmabuf_data, uint32_t *fourcc, uint64_t *modifiers, bool *using_external_image); +bool gsr_pipewire_video_map_texture(gsr_pipewire_video *self, gsr_texture_map texture_map, gsr_map_texture_output *output); bool gsr_pipewire_video_is_damaged(gsr_pipewire_video *self); void gsr_pipewire_video_clear_damage(gsr_pipewire_video *self); bool gsr_pipewire_video_should_restart(gsr_pipewire_video *self); |
