diff options
author | Daniel Nagy <danielnagy@posteo.de> | 2022-12-29 13:00:00 +0100 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2022-12-31 12:13:22 +0100 |
commit | e999f057050463ae9257cae9336e8e1d29c28e2b (patch) | |
tree | 9a0d4ae03ed2a7ce3d31064b40bbc989e8f79c7f /pkgs/applications/video/obs-studio | |
parent | d6ec92f8bf9461d83441e2d230906ef1f7582afd (diff) |
obs-studio-plugins.obs-backgroundremoval: remove
Diffstat (limited to 'pkgs/applications/video/obs-studio')
4 files changed, 2 insertions, 121 deletions
diff --git a/pkgs/applications/video/obs-studio/plugins/default.nix b/pkgs/applications/video/obs-studio/plugins/default.nix index d1a3cc988a50..493079a25bba 100644 --- a/pkgs/applications/video/obs-studio/plugins/default.nix +++ b/pkgs/applications/video/obs-studio/plugins/default.nix @@ -10,8 +10,6 @@ looking-glass-obs = callPackage ./looking-glass-obs.nix { }; - obs-backgroundremoval = callPackage ./obs-backgroundremoval { }; - obs-gstreamer = callPackage ./obs-gstreamer.nix { }; obs-hyperion = qt6Packages.callPackage ./obs-hyperion/default.nix { }; @@ -34,5 +32,7 @@ obs-websocket = throw "obs-websocket has been removed: Functionality has been integrated into obs-studio itself."; + obs-backgroundremoval = throw "obs-backgroundremoval has been removed: It does not work anymore and is unmaintained."; + wlrobs = callPackage ./wlrobs.nix { }; } diff --git a/pkgs/applications/video/obs-studio/plugins/obs-backgroundremoval/default.nix b/pkgs/applications/video/obs-studio/plugins/obs-backgroundremoval/default.nix deleted file mode 100644 index 79a3f82fec87..000000000000 --- a/pkgs/applications/video/obs-studio/plugins/obs-backgroundremoval/default.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, obs-studio -, onnxruntime -, opencv -}: - -stdenv.mkDerivation rec { - pname = "obs-backgroundremoval"; - version = "unstable-2022-05-02"; - - src = fetchFromGitHub { - owner = "royshil"; - repo = "obs-backgroundremoval"; - rev = "cc9d4a5711f9388ed110230f9f793bb071577a23"; - hash = "sha256-xkVZ4cB642p4DvZAPwI2EVhkfVl5lJhgOQobjNMqpec="; - }; - - patches = [ - # Fix c++ include directives - ./includes.patch - - # Use CPU backend instead of CUDA/DirectML - ./use-cpu-backend.patch - ]; - - nativeBuildInputs = [ cmake ]; - buildInputs = [ obs-studio onnxruntime opencv ]; - - dontWrapQtApps = true; - - cmakeFlags = [ - "-DLIBOBS_INCLUDE_DIR=${obs-studio.src}/libobs" - "-DOnnxruntime_INCLUDE_DIRS=${onnxruntime.dev}/include/onnxruntime/core/session" - ]; - - - prePatch = '' - sed -i 's/version_from_git()/set(VERSION "0.4.0")/' CMakeLists.txt - ''; - - meta = with lib; { - description = "OBS plugin to replace the background in portrait images and video"; - homepage = "https://github.com/royshil/obs-backgroundremoval"; - maintainers = with maintainers; [ puffnfresh ]; - license = licenses.mit; - platforms = [ "x86_64-linux" "i686-linux" ]; - }; -} diff --git a/pkgs/applications/video/obs-studio/plugins/obs-backgroundremoval/includes.patch b/pkgs/applications/video/obs-studio/plugins/obs-backgroundremoval/includes.patch deleted file mode 100644 index b99fc1181881..000000000000 --- a/pkgs/applications/video/obs-studio/plugins/obs-backgroundremoval/includes.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/src/Model.h b/src/Model.h -index 6a73745..6bb8a7d 100644 ---- a/src/Model.h -+++ b/src/Model.h -@@ -1,13 +1,8 @@ - #ifndef MODEL_H - #define MODEL_H - --#if defined(__APPLE__) - #include <onnxruntime/core/session/onnxruntime_cxx_api.h> - #include <onnxruntime/core/providers/cpu/cpu_provider_factory.h> --#else --#include <onnxruntime_cxx_api.h> --#include <cpu_provider_factory.h> --#endif - - #ifdef WITH_CUDA - #include <cuda_provider_factory.h> -diff --git a/src/background-filter.cpp b/src/background-filter.cpp -index 0853818..32c6483 100644 ---- a/src/background-filter.cpp -+++ b/src/background-filter.cpp -@@ -1,13 +1,8 @@ - #include <obs-module.h> - #include <media-io/video-scaler.h> - --#if defined(__APPLE__) - #include <onnxruntime/core/session/onnxruntime_cxx_api.h> - #include <onnxruntime/core/providers/cpu/cpu_provider_factory.h> --#else --#include <onnxruntime_cxx_api.h> --#include <cpu_provider_factory.h> --#endif - #ifdef WITH_CUDA - #include <cuda_provider_factory.h> - #endif diff --git a/pkgs/applications/video/obs-studio/plugins/obs-backgroundremoval/use-cpu-backend.patch b/pkgs/applications/video/obs-studio/plugins/obs-backgroundremoval/use-cpu-backend.patch deleted file mode 100644 index 0db5592e5cdb..000000000000 --- a/pkgs/applications/video/obs-studio/plugins/obs-backgroundremoval/use-cpu-backend.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d04e167f9081a3ec8c49f0967b5b0cec79e40e4d Mon Sep 17 00:00:00 2001 -From: Raphael Robatsch <raphael-git@tapesoftware.net> -Date: Fri, 14 Oct 2022 16:55:36 +0200 -Subject: [PATCH] unix: use CPU backend instead of DirectML - ---- - src/background-filter.cpp | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/background-filter.cpp b/src/background-filter.cpp -index 32c6483..55e838f 100644 ---- a/src/background-filter.cpp -+++ b/src/background-filter.cpp -@@ -205,10 +205,14 @@ static void createOrtSession(struct background_removal_filter *tf) { - if (tf->useGPU == USEGPU_CUDA) { - Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_CUDA(sessionOptions, 0)); - } --#else -+#elseif _WIN32 - if (tf->useGPU == USEGPU_DML) { - Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_DML(sessionOptions, 0)); - } -+#else -+ if (tf->useGPU == USEGPU_CPU) { -+ Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_CPU(sessionOptions, 0)); -+ } - #endif - tf->session.reset(new Ort::Session(*tf->env, tf->modelFilepath, sessionOptions)); - } catch (const std::exception& e) { --- -2.37.3 - |