/// <param name="titleIndex">\r
/// The title index to scan (1-based, 0 for all titles).\r
/// </param>\r
- public void StartScan(string path, int previewCount, TimeSpan minDuration, int titleIndex)\r
+ public void StartScan(string path, int previewCount, TimeSpan minDuration, int titleIndex, bool clEnabled = false)\r
{\r
this.previewCount = previewCount;\r
\r
IntPtr pathPtr = InteropUtilities.ToUtf8PtrFromString(path);\r
+ HBFunctions.hb_opencl_set_enable(this.hbHandle, clEnabled ? 1 : 0);\r
HBFunctions.hb_scan(this.hbHandle, pathPtr, titleIndex, previewCount, 1, (ulong)(minDuration.TotalSeconds * 90000));\r
Marshal.FreeHGlobal(pathPtr);\r
\r
NullValueHandling = NullValueHandling.Ignore,\r
};\r
\r
+ HBFunctions.hb_opencl_set_enable(this.hbHandle, encodeObject.Video.OpenCL ? 1 : 0);\r
string encode = JsonConvert.SerializeObject(encodeObject, Formatting.Indented, settings);\r
HBFunctions.hb_add_json(this.hbHandle, InteropUtilities.ToUtf8PtrFromString(encode));\r
HBFunctions.hb_start(this.hbHandle);\r
[DllImport("hb.dll", EntryPoint = "hb_dvd_set_dvdnav", CallingConvention = CallingConvention.Cdecl)]\r
public static extern void hb_dvd_set_dvdnav(int enable);\r
\r
+ // void hb_opencl_set_enable(hb_handle_t* h, int enable_opencl);\r
+ [DllImport("hb.dll", EntryPoint = "hb_dvd_set_dvdnav", CallingConvention = CallingConvention.Cdecl)]\r
+ public static extern void hb_opencl_set_enable(IntPtr hbHandle, int enable);\r
\r
/// Return Type: void\r
///param0: hb_handle_t*\r
/// <param name="titleIndex">\r
/// The title index to scan (1-based, 0 for all titles).\r
/// </param>\r
- void StartScan(string path, int previewCount, TimeSpan minDuration, int titleIndex);\r
+ void StartScan(string path, int previewCount, TimeSpan minDuration, int titleIndex, bool clEnabled = false);\r
\r
/// <summary>\r
/// Stops the current encode.\r
HandBrakeUtils.SetDvdNav(!configuraiton.IsDvdNavDisabled);
this.ServiceLogMessage("Starting Scan ...");
- this.instance.StartScan(sourcePath.ToString(), previewCount, minDuration, title != 0 ? title : 0);
+ this.instance.StartScan(sourcePath.ToString(), previewCount, minDuration, title != 0 ? title : 0, configuraiton.ScalingMode == VideoScaler.BicubicCl);
if (this.ScanStarted != null)
this.ScanStarted(this, System.EventArgs.Empty);