obs-studio/patches/remove-ffmpeg-vaapi.patch
2023-03-04 21:20:25 +03:00

70 lines
2.2 KiB
Diff

diff '--color=auto' -ru a/plugins/obs-ffmpeg/CMakeLists.txt b/plugins/obs-ffmpeg/CMakeLists.txt
--- a/plugins/obs-ffmpeg/CMakeLists.txt 2023-02-04 13:17:10.000000000 +0300
+++ b/plugins/obs-ffmpeg/CMakeLists.txt 2023-03-04 21:06:23.506168096 +0300
@@ -121,7 +121,7 @@
elseif(OS_POSIX AND NOT OS_MACOS)
find_package(Libva REQUIRED)
find_package(Libpci REQUIRED)
- target_sources(obs-ffmpeg PRIVATE obs-ffmpeg-vaapi.c vaapi-utils.c
+ target_sources(obs-ffmpeg PRIVATE vaapi-utils.c
vaapi-utils.h)
target_link_libraries(obs-ffmpeg PRIVATE Libva::va Libva::drm LIBPCI::LIBPCI)
endif()
Only in b/plugins/obs-ffmpeg: CMakeLists.txt.orig
diff '--color=auto' -ru a/plugins/obs-ffmpeg/obs-ffmpeg.c b/plugins/obs-ffmpeg/obs-ffmpeg.c
--- a/plugins/obs-ffmpeg/obs-ffmpeg.c 2023-02-04 13:17:10.000000000 +0300
+++ b/plugins/obs-ffmpeg/obs-ffmpeg.c 2023-03-04 21:06:23.506168096 +0300
@@ -43,10 +43,6 @@
extern struct obs_encoder_info svt_av1_encoder_info;
extern struct obs_encoder_info aom_av1_encoder_info;
-#ifdef LIBAVUTIL_VAAPI_AVAILABLE
-extern struct obs_encoder_info vaapi_encoder_info;
-#endif
-
#ifndef __APPLE__
static const char *nvenc_check_name = "nvenc_check";
@@ -322,19 +318,6 @@
#endif
-#ifdef LIBAVUTIL_VAAPI_AVAILABLE
-static bool h264_vaapi_supported(void)
-{
- const AVCodec *vaenc = avcodec_find_encoder_by_name("h264_vaapi");
-
- if (!vaenc)
- return false;
-
- /* NOTE: If default device is NULL, it means there is no device
- * that support H264. */
- return vaapi_get_h264_default_device() != NULL;
-}
-#endif
#ifdef _WIN32
extern void jim_nvenc_load(bool h264, bool hevc, bool av1);
@@ -412,20 +395,6 @@
amf_load();
#endif
-#ifdef LIBAVUTIL_VAAPI_AVAILABLE
- const char *libva_env = getenv("LIBVA_DRIVER_NAME");
- if (!!libva_env)
- blog(LOG_WARNING,
- "LIBVA_DRIVER_NAME variable is set,"
- " this could prevent FFmpeg VAAPI from working correctly");
-
- if (h264_vaapi_supported()) {
- blog(LOG_INFO, "FFmpeg VAAPI H264 encoding supported");
- obs_register_encoder(&vaapi_encoder_info);
- } else {
- blog(LOG_INFO, "FFmpeg VAAPI H264 encoding not supported");
- }
-#endif
#endif
#if ENABLE_FFMPEG_LOGGING
Only in a/plugins/obs-ffmpeg: obs-ffmpeg-vaapi.c