From df165252fa35f8e078ae11f0ddc9003570856536 Mon Sep 17 00:00:00 2001 From: Bruno Date: Mon, 16 Aug 2021 15:52:58 +0200 Subject: [PATCH] Fixed OSX vtenc_h264_hw support for Recording --- Recorder.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Recorder.cpp b/Recorder.cpp index d373ec6..73acb73 100644 --- a/Recorder.cpp +++ b/Recorder.cpp @@ -243,7 +243,7 @@ const char* VideoRecorder::hardware_encoder[VideoRecorder::DEFAULT] = { const std::vector VideoRecorder::hardware_profile_description { // Control vtenc_h264_hw encoder "video/x-raw, format=I420 ! vtenc_h264_hw realtime=1 allow-frame-reordering=0 ! h264parse ! ", - "video/x-raw, format=I420 ! vtenc_h264_hw realtime=1 allow-frame-reordering=0 ! h264parse ! ", + "video/x-raw, format=UYVY ! vtenc_h264_hw realtime=1 allow-frame-reordering=0 quality=0.9 ! h264parse ! ", "", "", "", "", "", "" }; @@ -288,7 +288,10 @@ void VideoRecorder::init(GstCaps *caps) // test for a hardware accelerated encoder if (Settings::application.render.gpu_decoding && +#if GST_GL_HAVE_PLATFORM_GLX + glGetString(GL_VENDOR)[0] == 'N' && glGetString(GL_VENDOR)[1] == 'V' && // TODO; hack to test for NVIDIA GPU support +#endif GstToolkit::has_feature(hardware_encoder[Settings::application.record.profile]) ) { description += hardware_profile_description[Settings::application.record.profile];