diff options
author | agalin89 <[email protected]> | 2021-02-20 17:56:09 +0000 |
---|---|---|
committer | Scott <[email protected]> | 2021-03-12 19:05:21 +0000 |
commit | 48617ff4455bdc9226957148ffb61d3ad3e29213 (patch) | |
tree | 76017fdfced4098ed1859ceae8da83c3980b6dd2 /win/CS | |
parent | 052e3bc18259984b79c7101ef319955e275d5cd6 (diff) |
qsv: redesigned adapter capabilities collection and reporing
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrake.Interop/Interop/HandBrakeHardwareEncoderHelper.cs | 5 | ||||
-rw-r--r-- | win/CS/HandBrake.Interop/Interop/HbLib/HbFunctions.cs | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/win/CS/HandBrake.Interop/Interop/HandBrakeHardwareEncoderHelper.cs b/win/CS/HandBrake.Interop/Interop/HandBrakeHardwareEncoderHelper.cs index 168b7773d..8a36224c2 100644 --- a/win/CS/HandBrake.Interop/Interop/HandBrakeHardwareEncoderHelper.cs +++ b/win/CS/HandBrake.Interop/Interop/HandBrakeHardwareEncoderHelper.cs @@ -99,8 +99,9 @@ namespace HandBrake.Interop.Interop { try { - int cpu_platform = HBFunctions.hb_get_cpu_platform(); - int hardware = HBFunctions.qsv_hardware_generation(cpu_platform); + int adapter_index = HBFunctions.hb_qsv_get_adapter_index(); + int qsv_platform = HBFunctions.hb_qsv_get_platform(adapter_index); + int hardware = HBFunctions.hb_qsv_hardware_generation(qsv_platform); return hardware; } catch (Exception exc) diff --git a/win/CS/HandBrake.Interop/Interop/HbLib/HbFunctions.cs b/win/CS/HandBrake.Interop/Interop/HbLib/HbFunctions.cs index 6f55ff9d5..4fd7dcd4e 100644 --- a/win/CS/HandBrake.Interop/Interop/HbLib/HbFunctions.cs +++ b/win/CS/HandBrake.Interop/Interop/HbLib/HbFunctions.cs @@ -305,8 +305,14 @@ namespace HandBrake.Interop.Interop.HbLib [DllImport("hb", EntryPoint = "hb_get_cpu_platform", CallingConvention = CallingConvention.Cdecl)] public static extern int hb_get_cpu_platform(); - [DllImport("hb", EntryPoint = "qsv_hardware_generation", CallingConvention = CallingConvention.Cdecl)] - public static extern int qsv_hardware_generation(int cpu_platform); + [DllImport("hb", EntryPoint = "hb_qsv_get_platform", CallingConvention = CallingConvention.Cdecl)] + public static extern int hb_qsv_get_platform(int adapter_index); + + [DllImport("hb", EntryPoint = "hb_qsv_hardware_generation", CallingConvention = CallingConvention.Cdecl)] + public static extern int hb_qsv_hardware_generation(int cpu_platform); + + [DllImport("hb", EntryPoint = "hb_qsv_get_adapter_index", CallingConvention = CallingConvention.Cdecl)] + public static extern int hb_qsv_get_adapter_index(); [DllImport("hb", EntryPoint = "hb_qsv_adapters_list", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr hb_qsv_adapters_list(); |