diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-09-16 02:17:29 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-09-16 23:31:53 +0200 |
commit | 4bcf976a71c3cb7660912b4e888a2197f81eb4b1 (patch) | |
tree | 3dacba98efcffd832736c5a9a3fa059253e6abe8 /include/utils.h | |
parent | 4a8544eeb321d37cdc3058305268f4c2ee177ca7 (diff) |
Improve capture performance on amd/intel when using monitor capture: capture display frame using purely vaapi unless the monitor is rotated
Diffstat (limited to 'include/utils.h')
-rw-r--r-- | include/utils.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/utils.h b/include/utils.h index 99503e2..6d58db7 100644 --- a/include/utils.h +++ b/include/utils.h @@ -7,6 +7,9 @@ #include <stdbool.h> #include <stdint.h> +typedef struct AVCodecContext AVCodecContext; +typedef struct AVFrame AVFrame; + typedef struct { const char *name; int name_len; @@ -44,5 +47,7 @@ int create_directory_recursive(char *path); /* |img_attr| needs to be at least 44 in size */ void setup_dma_buf_attrs(intptr_t *img_attr, uint32_t format, uint32_t width, uint32_t height, const int *fds, const uint32_t *offsets, const uint32_t *pitches, const uint64_t *modifiers, int num_planes, bool use_modifier); +bool video_codec_context_is_vaapi(AVCodecContext *video_codec_context); +bool vaapi_copy_drm_planes_to_video_surface(AVCodecContext *video_codec_context, AVFrame *video_frame, int x, int y, uint32_t format, uint32_t width, uint32_t height, const int *fds, const uint32_t *offsets, const uint32_t *pitches, const uint64_t *modifiers, int num_planes); #endif /* GSR_UTILS_H */ |