summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Utilities
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-08-23 22:01:06 +0000
committersr55 <[email protected]>2013-08-23 22:01:06 +0000
commit229d0c1badf2be70981bf2e1d5bbeac60f49bb2f (patch)
tree312b47d35754d7109414108c01585b3af212d6e7 /win/CS/HandBrake.ApplicationServices/Utilities
parentc7dc884bbee9c87fb4e7eb974d5ee029f4c234e4 (diff)
WinGui: Implement hb_qsv_available in the UI so that the encoder isn't shown when the build hasn't been built with quicksync support or the system doesn't support it.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5742 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs b/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
index 99ab990ca..41af30f5e 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
@@ -9,9 +9,12 @@
namespace HandBrake.ApplicationServices.Utilities
{
+ using System;
using System.Text.RegularExpressions;
using System.Windows.Forms;
+ using HandBrake.Interop.HbLib;
+
using Microsoft.Win32;
/// <summary>
@@ -59,6 +62,25 @@ namespace HandBrake.ApplicationServices.Utilities
}
/// <summary>
+ /// Gets a value indicating whether is qsv available.
+ /// </summary>
+ public static bool IsQsvAvailable
+ {
+ get
+ {
+ try
+ {
+ return HBFunctions.hb_qsv_available() == 1;
+ }
+ 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 hsw or newer.
/// </summary>
public static bool IsHswOrNewer