Rename HW engine for Raspberry

This commit is contained in:
Alexey Khit
2022-12-18 10:25:04 +03:00
parent dc21a04da7
commit 097fdfbbb8
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ import (
const ( const (
EngineSoftware = "software" EngineSoftware = "software"
EngineVAAPI = "vaapi" // Intel iGPU and AMD GPU EngineVAAPI = "vaapi" // Intel iGPU and AMD GPU
EngineV4L2 = "v4l2" // Raspberry Pi 3 and 4 EngineV4L2M2M = "v4l2m2m" // Raspberry Pi 3 and 4
EngineCUDA = "cuda" // NVidia on Windows and Linux EngineCUDA = "cuda" // NVidia on Windows and Linux
EngineDXVA2 = "dxva2" // Intel on Windows EngineDXVA2 = "dxva2" // Intel on Windows
EngineVideoToolbox = "videotoolbox" // macOS EngineVideoToolbox = "videotoolbox" // macOS
@@ -85,7 +85,7 @@ func MakeHardware(args *Args, engine string) {
args.input = "-hwaccel videotoolbox -hwaccel_output_format videotoolbox_vld " + args.input args.input = "-hwaccel videotoolbox -hwaccel_output_format videotoolbox_vld " + args.input
args.codecs[i] = defaults[name+"/"+engine] args.codecs[i] = defaults[name+"/"+engine]
case EngineV4L2: case EngineV4L2M2M:
args.codecs[i] = defaults[name+"/"+engine] args.codecs[i] = defaults[name+"/"+engine]
} }
} }
+2 -2
View File
@@ -11,14 +11,14 @@ func ProbeHardware(name string) string {
if run( if run(
"-f", "lavfi", "-i", "testsrc2", "-t", "1", "-f", "lavfi", "-i", "testsrc2", "-t", "1",
"-c", "h264_v4l2m2m", "-f", "null", "-") { "-c", "h264_v4l2m2m", "-f", "null", "-") {
return EngineV4L2 return EngineV4L2M2M
} }
case "h265": case "h265":
if run( if run(
"-f", "lavfi", "-i", "testsrc2", "-t", "1", "-f", "lavfi", "-i", "testsrc2", "-t", "1",
"-c", "hevc_v4l2m2m", "-f", "null", "-") { "-c", "hevc_v4l2m2m", "-f", "null", "-") {
return EngineV4L2 return EngineV4L2M2M
} }
} }