aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cli/commands.c3
-rw-r--r--src/recorder/codec_select.c1
-rw-r--r--src/utils.c5
3 files changed, 8 insertions, 1 deletions
diff --git a/src/cli/commands.c b/src/cli/commands.c
index 12de13b..bf07285 100644
--- a/src/cli/commands.c
+++ b/src/cli/commands.c
@@ -53,6 +53,9 @@ static void list_gpu_info(gsr_egl *egl) {
case GSR_GPU_VENDOR_BROADCOM:
printf("vendor|broadcom\n");
break;
+ case GSR_GPU_VENDOR_APPLE:
+ printf("vendor|apple\n");
+ break;
}
printf("card_path|%s\n", egl->card_path);
}
diff --git a/src/recorder/codec_select.c b/src/recorder/codec_select.c
index 48af0b2..38f7c61 100644
--- a/src/recorder/codec_select.c
+++ b/src/recorder/codec_select.c
@@ -71,6 +71,7 @@ bool get_supported_video_codecs(gsr_egl *egl, gsr_video_codec video_codec, bool
case GSR_GPU_VENDOR_AMD:
case GSR_GPU_VENDOR_INTEL:
case GSR_GPU_VENDOR_BROADCOM:
+ case GSR_GPU_VENDOR_APPLE:
return gsr_get_supported_video_codecs_vaapi(video_codecs, egl->card_path, cleanup);
case GSR_GPU_VENDOR_NVIDIA:
return gsr_get_supported_video_codecs_nvenc(video_codecs, cleanup);
diff --git a/src/utils.c b/src/utils.c
index 9ae34d7..71ad02d 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -389,6 +389,8 @@ bool gl_get_gpu_info(gsr_egl *egl, gsr_gpu_info *info) {
info->vendor = GSR_GPU_VENDOR_NVIDIA;
else if(strstr(gl_vendor, "Broadcom"))
info->vendor = GSR_GPU_VENDOR_BROADCOM;
+ else if(strstr(gl_vendor, "Mesa") && gl_renderer && strstr(gl_renderer, "Apple"))
+ info->vendor = GSR_GPU_VENDOR_APPLE;
else {
gsr_log(GSR_LOG_LEVEL_ERROR, "unknown gpu vendor: %s", gl_vendor);
return false;
@@ -450,7 +452,8 @@ bool try_card_has_valid_plane(const char *card_path) {
bool gsr_get_valid_card_path(gsr_egl *egl, char *output, bool is_monitor_capture) {
if(egl->dri_card_path) {
snprintf(output, 128, "%s", egl->dri_card_path);
- return is_monitor_capture ? try_card_has_valid_plane(output) : true;
+ if(!is_monitor_capture || try_card_has_valid_plane(output))
+ return true;
}
for(int i = 0; i < 10; ++i) {