// -------------------------------------------------------------------------------------------------------------------- // // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // // // The System Information. // // -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.Interop.Utilities { using System; using Interop.HbLib; /// /// The System Information. /// public class SystemInfo { /// /// Gets a value indicating whether is qsv available. /// 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; } } } /// /// Gets a value indicating whether is qsv available. /// 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; } } } /// /// Gets a value indicating whether is qsv available. /// 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; } } } } }