public static void Init(bool noHardwareMode, IUserSettingService userSettingService) { Thread thread = new Thread(() => { if (userSettingService.GetUserSetting <bool>(UserSettingConstants.ForceDisableHardwareSupport)) { noHardware = true; } else { noHardware = noHardwareMode; } HandBrakeUtils.RegisterLogger(); HandBrakeUtils.EnsureGlobalInit(noHardware); }); thread.Start(); if (!thread.Join(8000)) { // Something is likely handing in a graphics driver. Force disable this feature so we don't probe the hardware next time around. userSettingService.SetUserSetting(UserSettingConstants.ForceDisableHardwareSupport, true); throw new GeneralApplicationException(Resources.Startup_UnableToStart, Resources.Startup_UnableToStartInfo); } }
/// <summary> /// Initializes static members of the Converters class. /// </summary> static Converters() { HandBrakeUtils.EnsureGlobalInit(); VideoRates = new Dictionary <double, int>(); foreach (var framerate in Encoders.VideoFramerates) { VideoRates.Add(double.Parse(framerate.Name, CultureInfo.InvariantCulture), framerate.Rate); } }
/// <summary> /// Initializes static members of the Encoders class. /// </summary> static Encoders() { HandBrakeUtils.EnsureGlobalInit(); }
public static void Init(bool noHardwareMode) { noHardware = noHardwareMode; HandBrakeUtils.RegisterLogger(); HandBrakeUtils.EnsureGlobalInit(noHardwareMode); }
private void GlobalInitialize() { HandBrakeUtils.EnsureGlobalInit(initNoHardwareMode: false); HandBrakeUtils.SetDvdNav(Config.EnableLibDvdNav); }