summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices
diff options
context:
space:
mode:
authorScott <[email protected]>2015-09-24 20:44:55 +0100
committerScott <[email protected]>2015-09-24 20:44:55 +0100
commite7912cc00a8aa031e494bb6f0554939059da89d3 (patch)
treef095829845df7513f4e2815b9d0ea0a150e2a6ca /win/CS/HandBrake.ApplicationServices
parentbf85b6277de7fc00bb66cc858d880e190aba59c4 (diff)
WinGui: Enable support for H.265 QuickSync support
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/HbLib/NativeConstants.cs4
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncoder.cs4
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs40
3 files changed, 47 insertions, 1 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/NativeConstants.cs b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/NativeConstants.cs
index 80f9e33be..0bcbc18cf 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/NativeConstants.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/NativeConstants.cs
@@ -45,6 +45,10 @@ namespace HandBrake.ApplicationServices.Interop.HbLib
public const uint HB_ACODEC_ANY = (HB_ACODEC_MASK | HB_ACODEC_PASS_FLAG);
public const uint HB_ACODEC_TRUEHD_PASS = (HB_ACODEC_PASS_FLAG | HB_ACODEC_FFTRUEHD);
+ // VideoEncoders
+ public const uint HB_VCODEC_QSV_H264 = 0x0000100;
+ public const uint HB_VCODEC_QSV_H265 = 0x0000200;
+ public const uint HB_VCODEC_QSV_MASK = 0x0000F00;
// Encode state
public const int HB_STATE_IDLE = 1;
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncoder.cs b/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncoder.cs
index 17ed82aef..4f30b5df3 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncoder.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/VideoEncoder.cs
@@ -26,6 +26,10 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
[ShortName("qsv_h264")]
QuickSync,
+ [Display(Name = "H.265 (Intel QSV)")]
+ [ShortName("qsv_h265")]
+ QuickSyncH265,
+
[Display(Name = "MPEG-4")]
[ShortName("mpeg4")]
FFMpeg,
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs b/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
index 2055fab90..ab11d71a9 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
@@ -1,4 +1,4 @@
-// --------------------------------------------------------------------------------------------------------------------
+// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SystemInfo.cs" company="HandBrake Project (http://handbrake.fr)">
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
@@ -82,6 +82,44 @@ namespace HandBrake.ApplicationServices.Utilities
}
/// <summary>
+ /// Gets a value indicating whether is qsv available.
+ /// </summary>
+ public static bool IsQsvAvailableH264
+ {
+ get
+ {
+ try
+ {
+ return HBFunctions.hb_qsv_available() == NativeConstants.HB_VCODEC_QSV_H264;
+ }
+ catch (Exception)
+ {
+ // Silent failure. Typically this means the dll hasn't been built with --enable-qsv
+ return false;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether is qsv available.
+ /// </summary>
+ public static bool IsQsvAvailableH265
+ {
+ get
+ {
+ try
+ {
+ return HBFunctions.hb_qsv_available() == NativeConstants.HB_VCODEC_QSV_H265;
+ }
+ catch (Exception)
+ {
+ // Silent failure. Typically this means the dll hasn't been built with --enable-qsv
+ return false;
+ }
+ }
+ }
+
+ /// <summary>
/// Gets the get gpu driver version.
/// </summary>
public static List<string> GetGPUInfo