obs-studio-plugins.obs-vaapi: init at 0.1.0

+52 -1
+2
pkgs/applications/video/obs-studio/plugins/default.nix
··· 30 30 31 31 obs-source-record = callPackage ./obs-source-record.nix { }; 32 32 33 + obs-vaapi = callPackage ./obs-vaapi { }; 34 + 33 35 obs-vkcapture = callPackage ./obs-vkcapture.nix { 34 36 obs-vkcapture32 = pkgsi686Linux.obs-studio-plugins.obs-vkcapture; 35 37 };
+49
pkgs/applications/video/obs-studio/plugins/obs-vaapi/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , gst_all_1 5 + , pciutils 6 + , pkg-config 7 + , meson 8 + , ninja 9 + , obs-studio 10 + }: 11 + 12 + stdenv.mkDerivation rec { 13 + pname = "obs-vaapi"; 14 + version = "0.1.0"; 15 + 16 + src = fetchFromGitHub { 17 + owner = "fzwoch"; 18 + repo = pname; 19 + rev = version; 20 + hash = "sha256-qA4xVVShkp40QHp2HmmRzVxQaBwskRpUNEULKetVMu8="; 21 + }; 22 + 23 + nativeBuildInputs = [ pkg-config meson ninja ]; 24 + buildInputs = with gst_all_1; [ gstreamer gst-plugins-base obs-studio pciutils ]; 25 + 26 + # - We need "getLib" instead of default derivation, otherwise it brings gstreamer-bin; 27 + # - without gst-plugins-base it won't even show proper errors in logs; 28 + # - Without gst-plugins-bad it won't find element "vapostproc"; 29 + # - gst-vaapi adds "VA-API" to "Encoder type"; 30 + # Tip: "could not link appsrc to videoconvert1" can mean a lot of things, enable GST_DEBUG=2 for help. 31 + passthru.obsWrapperArguments = 32 + let 33 + gstreamerHook = package: "--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${lib.getLib package}/lib/gstreamer-1.0"; 34 + in 35 + with gst_all_1; builtins.map gstreamerHook [ 36 + gstreamer 37 + gst-plugins-base 38 + gst-plugins-bad 39 + gst-vaapi 40 + ]; 41 + 42 + meta = with lib; { 43 + description = "OBS Studio VAAPI support via GStreamer"; 44 + homepage = "https://github.com/fzwoch/obs-vaapi"; 45 + maintainers = with maintainers; [ ahuzik pedrohlc ]; 46 + license = licenses.gpl2Plus; 47 + platforms = [ "x86_64-linux" "i686-linux" ]; 48 + }; 49 + }
+1 -1
pkgs/applications/video/obs-studio/wrapper.nix
··· 24 24 "$out/bin/obs" 25 25 ''--set OBS_PLUGINS_PATH "${pluginsJoined}/lib/obs-plugins"'' 26 26 ''--set OBS_PLUGINS_DATA_PATH "${pluginsJoined}/share/obs/obs-plugins"'' 27 - ] ++ pluginArguments; 27 + ] ++ lists.unique pluginArguments; 28 28 in '' 29 29 ${concatStringsSep " " wrapCommandLine} 30 30