aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-03-09 15:28:17 +0100
committerdec05eba <dec05eba@protonmail.com>2024-03-09 15:36:45 +0100
commit5e05bbbbcbd45298c48af2b56a33da93d15b8f44 (patch)
treeac5ba627a63a34bfce2977e3d62344cfab46dba5 /src/main.cpp
parent3d9a7065280e64797c5a68c794a04d60fb3f767c (diff)
Refactor xcomposite
Move common code between cuda/vaapi implementations into xcomposite file. This also fixes limited/full range colors on nvidia.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 6832a9c..e65ec74 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -838,6 +838,7 @@ static void usage_full() {
fprintf(stderr, " Forcefully set to 'h264' if the file container type is 'flv'.\n");
fprintf(stderr, " Forcefully set to 'hevc' on AMD/intel if video codec is 'h264' and if the file container type is 'mkv'.\n");
fprintf(stderr, " 'hevc_hdr' and 'av1_hdr' option is not available on X11.\n");
+ fprintf(stderr, " Note: hdr metadata is not included in the video when recording with 'hevc_hdr'/'av1_hdr' because of bugs in AMD, Intel and NVIDIA drivers (amazin', they are bugged).\n");
fprintf(stderr, "\n");
fprintf(stderr, " -ac Audio codec to use. Should be either 'aac', 'opus' or 'flac'. Defaults to 'opus' for .mp4/.mkv files, otherwise defaults to 'aac'.\n");
fprintf(stderr, " 'opus' and 'flac' is only supported by .mp4/.mkv files. 'opus' is recommended for best performance and smallest audio size.\n");
@@ -1537,11 +1538,11 @@ static gsr_capture* create_capture_impl(const char *window_str, const char *scre
case GSR_GPU_VENDOR_AMD:
case GSR_GPU_VENDOR_INTEL: {
gsr_capture_xcomposite_vaapi_params xcomposite_params;
- xcomposite_params.egl = &egl;
- xcomposite_params.window = src_window_id;
- xcomposite_params.follow_focused = follow_focused;
- xcomposite_params.region_size = region_size;
- xcomposite_params.color_range = color_range;
+ xcomposite_params.base.egl = &egl;
+ xcomposite_params.base.window = src_window_id;
+ xcomposite_params.base.follow_focused = follow_focused;
+ xcomposite_params.base.region_size = region_size;
+ xcomposite_params.base.color_range = color_range;
capture = gsr_capture_xcomposite_vaapi_create(&xcomposite_params);
if(!capture)
_exit(1);
@@ -1549,10 +1550,10 @@ static gsr_capture* create_capture_impl(const char *window_str, const char *scre
}
case GSR_GPU_VENDOR_NVIDIA: {
gsr_capture_xcomposite_cuda_params xcomposite_params;
- xcomposite_params.egl = &egl;
- xcomposite_params.window = src_window_id;
- xcomposite_params.follow_focused = follow_focused;
- xcomposite_params.region_size = region_size;
+ xcomposite_params.base.egl = &egl;
+ xcomposite_params.base.window = src_window_id;
+ xcomposite_params.base.follow_focused = follow_focused;
+ xcomposite_params.base.region_size = region_size;
xcomposite_params.overclock = overclock;
capture = gsr_capture_xcomposite_cuda_create(&xcomposite_params);
if(!capture)