enable hardware encode/decode
This commit is contained in:
@@ -33,6 +33,7 @@ in {
|
||||
Domain radio is hosted on
|
||||
'';
|
||||
};
|
||||
enableVideoAcceleration = lib.mkEnableOption "enable video acceleration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
@@ -70,4 +71,17 @@ in {
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# hardware accelerated video encoding/decoding (on intel)
|
||||
nixpkgs.config.packageOverrides = lib.mkIf cfg.enableVideoAcceleration pkgs: {
|
||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||
};
|
||||
hardware.opengl = lib.mkIf cfg.enableVideoAcceleration {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
vaapiIntel # LIBVA_DRIVER_NAME=i965
|
||||
];
|
||||
extraPackages32 = with pkgs.pkgsi686Linux; [ vaapiIntel ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user