/// <summary> /// The get encode instance. /// </summary> /// <param name="verbosity"> /// The verbosity. /// </param> /// <param name="configuration"> /// The configuration. /// </param> /// <returns> /// The <see cref="IHandBrakeInstance"/>. /// </returns> public static IHandBrakeInstance GetPreviewInstance(int verbosity, HBConfiguration configuration) { if (previewInstance != null) { previewInstance.Dispose(); previewInstance = null; } HandBrakeInstance newInstance = new HandBrakeInstance(); newInstance.Initialize(verbosity); previewInstance = newInstance; HandBrakeUtils.SetDvdNav(!configuration.IsDvdNavDisabled); return(previewInstance); }