summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/Utilities/SystemInfo.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-06-05 21:52:23 +0100
committersr55 <[email protected]>2018-06-05 21:52:23 +0100
commit5c5b4d7773126d3f4852deb01856c905d2398b5e (patch)
tree54eaf4d35c86d71372e16b5f4536a8f3ca851f09 /win/CS/HandBrake.Interop/Utilities/SystemInfo.cs
parent5445592f20e5e645dce0df077afe7ecc2617b95f (diff)
WinGui: Rename HandBrake.ApplicationServices back to HandBrake.Interop. It's moving back to being more of an libhb interop/abstraction library only.
Diffstat (limited to 'win/CS/HandBrake.Interop/Utilities/SystemInfo.cs')
-rw-r--r--win/CS/HandBrake.Interop/Utilities/SystemInfo.cs94
1 files changed, 94 insertions, 0 deletions
diff --git a/win/CS/HandBrake.Interop/Utilities/SystemInfo.cs b/win/CS/HandBrake.Interop/Utilities/SystemInfo.cs
new file mode 100644
index 000000000..af0c24724
--- /dev/null
+++ b/win/CS/HandBrake.Interop/Utilities/SystemInfo.cs
@@ -0,0 +1,94 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <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>
+// <summary>
+// The System Information.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Utilities
+{
+ using System;
+
+ using Interop.HbLib;
+
+ /// <summary>
+ /// The System Information.
+ /// </summary>
+ public class SystemInfo
+ {
+ /// <summary>
+ /// Gets a value indicating whether is qsv available.
+ /// </summary>
+ public static bool IsQsvAvailable
+ {
+ get
+ {
+ try
+ {
+ return HBFunctions.hb_qsv_available() != 0;
+ }
+ 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 IsQsvAvailableH264
+ {
+ get
+ {
+ try
+ {
+ return (HBFunctions.hb_qsv_available() & NativeConstants.HB_VCODEC_QSV_H264) != 0;
+ }
+ 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) != 0;
+ }
+ catch (Exception)
+ {
+ // Silent failure. Typically this means the dll hasn't been built with --enable-qsv
+ return false;
+ }
+ }
+ }
+
+ public static bool IsQsvAvailableH26510bit
+ {
+ get
+ {
+ try
+ {
+ return (HBFunctions.hb_qsv_available() & NativeConstants.HB_VCODEC_QSV_H265_10BIT) != 0;
+ }
+ catch (Exception)
+ {
+ // Silent failure. Typically this means the dll hasn't been built with --enable-qsv
+ return false;
+ }
+ }
+ }
+ }
+}