summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-06-10 21:21:45 +0100
committersr55 <[email protected]>2018-06-10 21:22:13 +0100
commitc70981efae72a8392c18a7e92db667eddbc55485 (patch)
tree99b00bbc8287434684d99603710a189c4ef243aa /win/CS/HandBrakeWPF/Services
parentae881a0c1aa77a80deba7a3c81ab907e8e3d62ad (diff)
WinGui: Implement most of the HTTP Worker Process stubs.
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs13
-rw-r--r--win/CS/HandBrakeWPF/Services/Scan/LibScan.cs19
2 files changed, 15 insertions, 17 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs b/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs
index 85c5a42b1..a00344836 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs
@@ -13,7 +13,6 @@ namespace HandBrakeWPF.Services.Encode
using System.Diagnostics;
using System.IO;
- using HandBrake.Interop.Interop;
using HandBrake.Interop.Interop.EventArgs;
using HandBrake.Interop.Interop.Interfaces;
using HandBrake.Interop.Interop.Json.State;
@@ -24,11 +23,12 @@ namespace HandBrakeWPF.Services.Encode
using HandBrakeWPF.Services.Encode.Factories;
using EncodeTask = Model.EncodeTask;
+ using HandBrakeInstanceManager = Instance.HandBrakeInstanceManager;
using IEncode = Interfaces.IEncode;
- using ILog = HandBrakeWPF.Services.Logging.Interfaces.ILog;
- using LogLevel = HandBrakeWPF.Services.Logging.Model.LogLevel;
- using LogMessageType = HandBrakeWPF.Services.Logging.Model.LogMessageType;
- using LogService = HandBrakeWPF.Services.Logging.LogService;
+ using ILog = Logging.Interfaces.ILog;
+ using LogLevel = Logging.Model.LogLevel;
+ using LogMessageType = Logging.Model.LogMessageType;
+ using LogService = Logging.LogService;
/// <summary>
/// LibHB Implementation of IEncode
@@ -80,8 +80,7 @@ namespace HandBrakeWPF.Services.Encode
this.log.Reset(); // Reset so we have a clean log for the start of the encode.
this.ServiceLogMessage("Starting Encode ...");
- HandBrakeUtils.SetDvdNav(!configuration.IsDvdNavDisabled);
- this.instance = task.IsPreviewEncode ? HandBrakeInstanceManager.GetPreviewInstance(configuration.Verbosity) : HandBrakeInstanceManager.GetEncodeInstance(configuration.Verbosity);
+ this.instance = task.IsPreviewEncode ? HandBrake.Interop.Interop.HandBrakeInstanceManager.GetPreviewInstance(configuration.Verbosity, configuration) : HandBrakeInstanceManager.GetEncodeInstance(configuration.Verbosity, configuration);
this.instance.EncodeCompleted += this.InstanceEncodeCompleted;
this.instance.EncodeProgress += this.InstanceEncodeProgress;
diff --git a/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs b/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs
index 7bcc5531b..d17a5d3c9 100644
--- a/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs
+++ b/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs
@@ -30,14 +30,14 @@ namespace HandBrakeWPF.Services.Scan
using HandBrakeWPF.Services.Scan.Model;
using HandBrakeWPF.Utilities;
- using Chapter = HandBrakeWPF.Services.Scan.Model.Chapter;
- using ILog = HandBrakeWPF.Services.Logging.Interfaces.ILog;
- using LogLevel = HandBrakeWPF.Services.Logging.Model.LogLevel;
- using LogMessageType = HandBrakeWPF.Services.Logging.Model.LogMessageType;
- using LogService = HandBrakeWPF.Services.Logging.LogService;
+ using Chapter = Model.Chapter;
+ using ILog = Logging.Interfaces.ILog;
+ using LogLevel = Logging.Model.LogLevel;
+ using LogMessageType = Logging.Model.LogMessageType;
+ using LogService = Logging.LogService;
using ScanProgressEventArgs = HandBrake.Interop.Interop.EventArgs.ScanProgressEventArgs;
- using Subtitle = HandBrakeWPF.Services.Scan.Model.Subtitle;
- using Title = HandBrakeWPF.Services.Scan.Model.Title;
+ using Subtitle = Model.Subtitle;
+ using Title = Model.Title;
/// <summary>
/// Scan a Source
@@ -129,7 +129,7 @@ namespace HandBrakeWPF.Services.Scan
this.postScanOperation = postAction;
// Create a new HandBrake Instance.
- this.instance = HandBrakeInstanceManager.GetScanInstance(configuraiton.Verbosity);
+ this.instance = HandBrake.Interop.Interop.HandBrakeInstanceManager.GetScanInstance(configuraiton.Verbosity);
this.instance.ScanProgress += this.InstanceScanProgress;
this.instance.ScanCompleted += this.InstanceScanCompleted;
@@ -266,8 +266,7 @@ namespace HandBrakeWPF.Services.Scan
this.ServiceLogMessage("Starting Scan ...");
this.instance.StartScan(sourcePath.ToString(), previewCount, minDuration, title != 0 ? title : 0);
- if (this.ScanStarted != null)
- this.ScanStarted(this, System.EventArgs.Empty);
+ this.ScanStarted?.Invoke(this, System.EventArgs.Empty);
}
catch (Exception exc)
{