summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-03-01 17:53:54 +0000
committersr55 <[email protected]>2015-03-01 17:53:54 +0000
commit5cce72f890bc7b6075a55aa4364b8817c22f11c0 (patch)
treec049480c710828c2e5d6375dfcfa03faa48a5f56
parent6106f068ddc39e4d8aca10f42dc955cfae183360 (diff)
WinGui: Removing the Isolation code as it's not used, and planned for libhb instead.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6958 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj3
-rw-r--r--win/CS/HandBrake.ApplicationServices/Isolation/BackgroundServiceConnector.cs179
-rw-r--r--win/CS/HandBrake.ApplicationServices/Isolation/IsolatedEncodeService.cs216
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Encode/Interfaces/IEncodeServiceWrapper.cs18
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs4
-rw-r--r--win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs27
-rw-r--r--win/CS/HandBrakeWPF/Services/NotificationService.cs2
-rw-r--r--win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs2
-rw-r--r--win/CS/HandBrakeWPF/UserSettingConstants.cs10
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs4
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs4
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs49
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs4
-rw-r--r--win/CS/HandBrakeWPF/Views/OptionsView.xaml16
15 files changed, 16 insertions, 524 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
index fccf0154e..7b0c96fd8 100644
--- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
+++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
@@ -201,8 +201,6 @@
<Compile Include="Interop\Model\Subtitles.cs" />
<Compile Include="Interop\Model\VideoQualityLimits.cs" />
<Compile Include="Interop\Model\VideoRangeType.cs" />
- <Compile Include="Isolation\BackgroundServiceConnector.cs" />
- <Compile Include="Isolation\IsolatedEncodeService.cs" />
<Compile Include="Services\Encode\Factories\VideoProfileFactory.cs" />
<Compile Include="Services\Encode\Factories\VideoPresetFactory.cs" />
<Compile Include="Services\Encode\Factories\VideoLevelFactory.cs" />
@@ -213,7 +211,6 @@
<Compile Include="Model\VideoScaler.cs" />
<Compile Include="Services\Encode\EventArgs\EncodeCompletedEventArgs.cs" />
<Compile Include="Services\Encode\EventArgs\EncodeProgressEventArgs.cs" />
- <Compile Include="Services\Encode\Interfaces\IEncodeServiceWrapper.cs" />
<Compile Include="Services\Encode\Model\Models\Video\VideoLevel.cs" />
<Compile Include="Services\Encode\Model\Models\Video\VideoPreset.cs" />
<Compile Include="Services\Encode\Model\Models\Video\VideoProfile.cs" />
diff --git a/win/CS/HandBrake.ApplicationServices/Isolation/BackgroundServiceConnector.cs b/win/CS/HandBrake.ApplicationServices/Isolation/BackgroundServiceConnector.cs
deleted file mode 100644
index 0fa7c2474..000000000
--- a/win/CS/HandBrake.ApplicationServices/Isolation/BackgroundServiceConnector.cs
+++ /dev/null
@@ -1,179 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="BackgroundServiceConnector.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// Background Service Connector.
-// HandBrake has the ability to connect to a service app that will control Libhb.
-// This acts as process isolation.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.ApplicationServices.Isolation
-{
- using System;
- using System.Diagnostics;
- using System.ServiceModel;
- using System.Threading;
-
- using HandBrake.ApplicationServices.Exceptions;
- using HandBrake.ApplicationServices.Services.Encode.EventArgs;
- using HandBrake.ApplicationServices.Services.Interfaces;
-
- /// <summary>
- /// Background Service Connector.
- /// HandBrake has the ability to connect to a service app that will control Libhb.
- /// This acts as process isolation.
- /// </summary>
- public class BackgroundServiceConnector : IHbServiceCallback, IDisposable
- {
- #region Constants and Fields
-
- /// <summary>
- /// Gets or sets the pipe factory.
- /// DuplexChannelFactory is necessary for Callbacks.
- /// </summary>
- private static DuplexChannelFactory<IServerService> pipeFactory;
-
- /// <summary>
- /// The background process.
- /// </summary>
- private static Process backgroundProcess;
-
- #endregion
-
- #region Properties
-
- /// <summary>
- /// Gets or sets a value indicating whether is connected.
- /// </summary>
- public bool IsConnected { get; set; }
-
- /// <summary>
- /// Gets or sets the service.
- /// </summary>
- public IServerService Service { get; set; }
-
- #endregion
-
- #region Public Server Management Methods
-
- /// <summary>
- /// The can connect.
- /// </summary>
- /// <returns>
- /// The System.Boolean.
- /// </returns>
- public bool CanConnect()
- {
- return true;
- }
-
- /// <summary>
- /// The connect.
- /// </summary>
- /// <param name="port">
- /// The port.
- /// </param>
- public void Connect(string port)
- {
- if (backgroundProcess == null)
- {
- ProcessStartInfo processStartInfo = new ProcessStartInfo(
- "HandBrake.Server.exe", port)
- {
- UseShellExecute = false,
- CreateNoWindow = true,
- RedirectStandardOutput = true,
- };
-
- backgroundProcess = new Process { StartInfo = processStartInfo };
- backgroundProcess.Start();
- }
-
- // When the process writes out a line, it's pipe server is ready and can be contacted for
- // work. Reading line blocks until this happens.
- backgroundProcess.StandardOutput.ReadLine();
-
- ThreadPool.QueueUserWorkItem(delegate
- {
- try
- {
- pipeFactory = new DuplexChannelFactory<IServerService>(
- new InstanceContext(this),
- new NetTcpBinding(),
- new EndpointAddress(string.Format("net.tcp://127.0.0.1:{0}/IHbService", port)));
-
- // Connect and Subscribe to the Server
- this.Service = pipeFactory.CreateChannel();
- this.Service.Subscribe();
- this.IsConnected = true;
- }
- catch (Exception exc)
- {
- throw new GeneralApplicationException("Unable to connect to background worker process", "Please restart HandBrake", exc);
- }
- });
- }
-
- /// <summary>
- /// The disconnect.
- /// </summary>
- public void Shutdown()
- {
- try
- {
- if (backgroundProcess != null && !backgroundProcess.HasExited)
- {
- this.Service.Unsubscribe();
- }
- }
- catch (Exception exc)
- {
- throw new GeneralApplicationException("Unable to disconnect to background worker process",
- "It may have already close. Check for any left over HandBrake.Server.exe processes", exc);
- }
- }
-
- #endregion
-
- #region Implemented Interfaces
-
- /// <summary>
- /// The dispose.
- /// </summary>
- public void Dispose()
- {
- this.Service.Unsubscribe();
- }
-
- /// <summary>
- /// The encode progress callback.
- /// </summary>
- /// <param name="eventArgs">
- /// The event Args.
- /// </param>
- public virtual void EncodeProgressCallback(EncodeProgressEventArgs eventArgs)
- {
- }
-
- /// <summary>
- /// The encode completed callback.
- /// </summary>
- /// <param name="eventArgs">
- /// The event Args.
- /// </param>
- public virtual void EncodeCompletedCallback(EncodeCompletedEventArgs eventArgs)
- {
- }
-
- /// <summary>
- /// The encode started callback.
- /// </summary>
- public virtual void EncodeStartedCallback()
- {
- }
-
- #endregion
- }
-} \ No newline at end of file
diff --git a/win/CS/HandBrake.ApplicationServices/Isolation/IsolatedEncodeService.cs b/win/CS/HandBrake.ApplicationServices/Isolation/IsolatedEncodeService.cs
deleted file mode 100644
index a98941b1f..000000000
--- a/win/CS/HandBrake.ApplicationServices/Isolation/IsolatedEncodeService.cs
+++ /dev/null
@@ -1,216 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="IsolatedEncodeService.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// Isolated Scan Service
-// This is an implementation of the IEncode implementation that runs scans on a seperate process
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.ApplicationServices.Isolation
-{
- using System;
- using System.Threading;
-
- using HandBrake.ApplicationServices.Exceptions;
- using HandBrake.ApplicationServices.Model;
- using HandBrake.ApplicationServices.Services.Encode.EventArgs;
- using HandBrake.ApplicationServices.Services.Encode.Interfaces;
-
- /// <summary>
- /// Isolated Scan Service.
- /// This is an implementation of the IEncode implementation that runs scans on a seperate process
- /// </summary>
- public class IsolatedEncodeService : BackgroundServiceConnector, IEncode
- {
- #region Constructors and Destructors
-
- /// <summary>
- /// Initializes a new instance of the <see cref="IsolatedEncodeService"/> class.
- /// </summary>
- /// <param name="port">
- /// The port.
- /// </param>
- public IsolatedEncodeService(string port)
- {
- try
- {
- if (this.CanConnect())
- {
- this.Connect(port);
- }
- }
- catch (Exception exception)
- {
- throw new GeneralApplicationException("Unable to connect to scan worker process.", "Try restarting HandBrake", exception);
- }
- }
-
- #endregion
-
- #region Events
-
- /// <summary>
- /// The encode completed.
- /// </summary>
- public event EncodeCompletedStatus EncodeCompleted;
-
- /// <summary>
- /// The encode started.
- /// </summary>
- public event EventHandler EncodeStarted;
-
- /// <summary>
- /// The encode status changed.
- /// </summary>
- public event EncodeProgessStatus EncodeStatusChanged;
-
- #endregion
-
- #region Properties
-
- /// <summary>
- /// Gets ActivityLog.
- /// </summary>
- public string ActivityLog
- {
- get
- {
- return this.IsConnected ? this.Service.EncodeActivityLog : "Unable to connect to background worker service ...";
- }
- }
-
- /// <summary>
- /// Gets the log index.
- /// </summary>
- public int LogIndex
- {
- get
- {
- return -1;
- }
- }
-
- /// <summary>
- /// Gets a value indicating whether can pause.
- /// </summary>
- public bool CanPause
- {
- get
- {
- return false; // TODO make this work.
- }
- }
-
- /// <summary>
- /// Gets a value indicating whether is pasued.
- /// </summary>
- public bool IsPasued { get; private set; }
-
- /// <summary>
- /// Gets a value indicating whether IsEncoding.
- /// </summary>
- public bool IsEncoding
- {
- get
- {
- return this.IsConnected && this.Service.IsEncoding;
- }
- }
-
- #endregion
-
- #region Public Methods
-
- /// <summary>
- /// The encode completed callback.
- /// </summary>
- /// <param name="eventArgs">
- /// The event args.
- /// </param>
- public override void EncodeCompletedCallback(EncodeCompletedEventArgs eventArgs)
- {
- if (this.EncodeCompleted != null)
- {
- ThreadPool.QueueUserWorkItem(delegate { this.EncodeCompleted(this, eventArgs); });
- }
-
- base.EncodeCompletedCallback(eventArgs);
- }
-
- /// <summary>
- /// The encode progress callback.
- /// </summary>
- /// <param name="eventArgs">
- /// The event args.
- /// </param>
- public override void EncodeProgressCallback(EncodeProgressEventArgs eventArgs)
- {
- if (this.EncodeStatusChanged != null)
- {
- ThreadPool.QueueUserWorkItem(delegate { this.EncodeStatusChanged(this, eventArgs); });
- }
-
- base.EncodeProgressCallback(eventArgs);
- }
-
- #endregion
-
- #region Implemented Interfaces
-
- #region IEncode
-
- /// <summary>
- /// Copy the log file to the desired destinations
- /// </summary>
- /// <param name="destination">
- /// The destination.
- /// </param>
- /// <param name="configuration">
- /// The configuration.
- /// </param>
- public void ProcessLogs(string destination, HBConfiguration configuration)
- {
- ThreadPool.QueueUserWorkItem(delegate { this.Service.ProcessEncodeLogs(destination, configuration); });
- }
-
- /// <summary>
- /// Start with a LibHb EncodeJob Object
- /// </summary>
- /// <param name="job">
- /// The job.
- /// </param>
- public void Start(QueueTask job)
- {
- ThreadPool.QueueUserWorkItem(
- delegate { this.Service.StartEncode(job); });
- }
-
- /// <summary>
- /// The pause.
- /// </summary>
- public void Pause()
- {
- }
-
- /// <summary>
- /// The resume.
- /// </summary>
- public void Resume()
- {
- }
-
- /// <summary>
- /// Kill the CLI process
- /// </summary>
- public void Stop()
- {
- ThreadPool.QueueUserWorkItem(delegate { this.Service.StopEncode(); });
- }
-
- #endregion
-
- #endregion
- }
-} \ No newline at end of file
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/Interfaces/IEncodeServiceWrapper.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/Interfaces/IEncodeServiceWrapper.cs
deleted file mode 100644
index 6163bcffc..000000000
--- a/win/CS/HandBrake.ApplicationServices/Services/Encode/Interfaces/IEncodeServiceWrapper.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="IEncodeServiceWrapper.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// IEncodeServiceWrapper Interface
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.ApplicationServices.Services.Encode.Interfaces
-{
- /// <summary>
- /// EncodeServiceWrapper Interface
- /// </summary>
- public interface IEncodeServiceWrapper : IEncode
- {
- }
-}
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs
index 7cb0ef7b6..4e5b51d93 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs
@@ -55,7 +55,7 @@ namespace HandBrake.ApplicationServices.Services.Interfaces
/// <summary>
/// Gets the IEncodeService instance.
/// </summary>
- IEncodeServiceWrapper EncodeService { get; }
+ IEncode EncodeService { get; }
/// <summary>
/// Gets a value indicating whether IsProcessing.
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
index 991b2132e..ba6a3a92e 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
@@ -66,7 +66,7 @@ namespace HandBrake.ApplicationServices.Services
/// <exception cref="ArgumentNullException">
/// Services are not setup
/// </exception>
- public QueueProcessor(IEncodeServiceWrapper encodeService)
+ public QueueProcessor(IEncode encodeService)
{
this.EncodeService = encodeService;
@@ -143,7 +143,7 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// Gets the IEncodeService instance.
/// </summary>
- public IEncodeServiceWrapper EncodeService { get; private set; }
+ public IEncode EncodeService { get; private set; }
/// <summary>
/// Gets a value indicating whether IsProcessing.
diff --git a/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs b/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs
index b63b74078..867f523c8 100644
--- a/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs
+++ b/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs
@@ -14,20 +14,17 @@ namespace HandBrakeWPF.Services
using System;
using HandBrake.ApplicationServices.Exceptions;
- using HandBrake.ApplicationServices.Isolation;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Encode;
using HandBrake.ApplicationServices.Services.Encode.EventArgs;
using HandBrake.ApplicationServices.Services.Encode.Interfaces;
- using HandBrakeWPF.Services.Interfaces;
-
/// <summary>
/// We have multiple implementations of Iencode. This is a wrapper class for the GUI so that the
/// implementation used is controllable via user settings.
/// Over time, this class will go away when the LibHB and process isolation code matures.
/// </summary>
- public class EncodeServiceWrapper : IEncodeServiceWrapper
+ public class EncodeServiceWrapper : IEncode
{
#region Constants and Fields
@@ -43,32 +40,18 @@ namespace HandBrakeWPF.Services
/// <summary>
/// Initializes a new instance of the <see cref="EncodeServiceWrapper"/> class.
/// </summary>
- /// <param name="userSettingService">
- /// The user setting service.
- /// </param>
- public EncodeServiceWrapper(IUserSettingService userSettingService)
+ public EncodeServiceWrapper()
{
- var useProcessIsolation =
- userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableProcessIsolation);
- var port = userSettingService.GetUserSetting<string>(UserSettingConstants.ServerPort);
-
try
{
- if (useProcessIsolation)
- {
- this.encodeService = new IsolatedEncodeService(port);
- }
- else
- {
- this.encodeService = new LibEncode();
- }
+ this.encodeService = new LibEncode();
}
catch (Exception exc)
{
// Try to recover from errors.
throw new GeneralApplicationException(
- "Unable to initialise LibHB or Background worker service",
- "HandBrake will not be able to operate correctly.",
+ "Unable to initialise LibHB or Background worker service",
+ "HandBrake will not be able to operate correctly.",
exc);
}
diff --git a/win/CS/HandBrakeWPF/Services/NotificationService.cs b/win/CS/HandBrakeWPF/Services/NotificationService.cs
index ba3c0cf99..1a647a970 100644
--- a/win/CS/HandBrakeWPF/Services/NotificationService.cs
+++ b/win/CS/HandBrakeWPF/Services/NotificationService.cs
@@ -37,7 +37,7 @@ namespace HandBrakeWPF.Services
/// <param name="userSettingService">
/// The user Setting Service.
/// </param>
- public NotificationService(IEncodeServiceWrapper encodeService, IQueueProcessor queueProcessor, IUserSettingService userSettingService)
+ public NotificationService(IEncode encodeService, IQueueProcessor queueProcessor, IUserSettingService userSettingService)
{
this.userSettingService = userSettingService;
// encodeService.EncodeCompleted += this.EncodeServiceEncodeCompleted;
diff --git a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
index 10da855fa..c8b327cd3 100644
--- a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
+++ b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
@@ -62,7 +62,7 @@ namespace HandBrakeWPF.Startup
// Services
this.windsorContainer.Register(Component.For<IUpdateService>().ImplementedBy<UpdateService>().LifeStyle.Is(LifestyleType.Singleton));
this.windsorContainer.Register(Component.For<IScan>().ImplementedBy<LibScan>().LifeStyle.Is(LifestyleType.Singleton));
- this.windsorContainer.Register(Component.For<IEncodeServiceWrapper>().ImplementedBy<EncodeServiceWrapper>().LifeStyle.Is(LifestyleType.Singleton));
+ this.windsorContainer.Register(Component.For<IEncode>().ImplementedBy<EncodeServiceWrapper>().LifeStyle.Is(LifestyleType.Singleton));
this.windsorContainer.Register(Component.For<INotificationService>().ImplementedBy<NotificationService>().LifeStyle.Is(LifestyleType.Singleton));
this.windsorContainer.Register(Component.For<IPrePostActionService>().ImplementedBy<PrePostActionService>().LifeStyle.Is(LifestyleType.Singleton));
this.windsorContainer.Register(Component.For<IUserSettingService>().ImplementedBy<UserSettingService>());
diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs
index fb3f6a04b..1c5464079 100644
--- a/win/CS/HandBrakeWPF/UserSettingConstants.cs
+++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs
@@ -97,16 +97,6 @@ namespace HandBrakeWPF
public const string VLCPath = "VLC_Path";
/// <summary>
- /// The enable process isolation.
- /// </summary>
- public const string EnableProcessIsolation = "EnableProcessIsolation";
-
- /// <summary>
- /// The server port.
- /// </summary>
- public const string ServerPort = "ServerPort";
-
- /// <summary>
/// Growl Encodes
/// </summary>
public const string GrowlEncode = "GrowlEncode";
diff --git a/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs
index 21921b5d6..008d70dcb 100644
--- a/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs
@@ -30,7 +30,7 @@ namespace HandBrakeWPF.ViewModels
/// <summary>
/// Backing field for the encodeService service
/// </summary>
- private readonly IEncodeServiceWrapper encodeService;
+ private readonly IEncode encodeService;
/// <summary>
/// Backing field for the Scan Service
@@ -58,7 +58,7 @@ namespace HandBrakeWPF.ViewModels
/// <param name="scanService">
/// The scan service.
/// </param>
- public LogViewModel(IEncodeServiceWrapper encodeService, IScan scanService)
+ public LogViewModel(IEncode encodeService, IScan scanService)
{
this.encodeService = encodeService;
this.scanService = scanService;
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index d3fd9900c..f204b084d 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -97,7 +97,7 @@ namespace HandBrakeWPF.ViewModels
/// <summary>
/// The Encode Service
/// </summary>
- private readonly IEncodeServiceWrapper encodeService;
+ private readonly IEncode encodeService;
/// <summary>
/// Windows 7 API Pack wrapper
@@ -229,7 +229,7 @@ namespace HandBrakeWPF.ViewModels
/// The when Done Service.
/// *** Leave in Constructor. ***
/// </param>
- public MainViewModel(IUserSettingService userSettingService, IScan scanService, IEncodeServiceWrapper encodeService, IPresetService presetService,
+ public MainViewModel(IUserSettingService userSettingService, IScan scanService, IEncode encodeService, IPresetService presetService,
IErrorService errorService, IShellViewModel shellViewModel, IUpdateService updateService, INotificationService notificationService,
IPrePostActionService whenDoneService)
{
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index 77132cf11..31841a335 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -261,16 +261,6 @@ namespace HandBrakeWPF.ViewModels
private UpdateCheckInformation updateInfo;
/// <summary>
- /// The enable process isolation.
- /// </summary>
- private bool enableProcessIsolation;
-
- /// <summary>
- /// The server port.
- /// </summary>
- private int serverPort;
-
- /// <summary>
/// The show advanced tab backing field.
/// </summary>
private bool showAdvancedTab;
@@ -1061,38 +1051,6 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
- /// Gets or sets a value indicating whether ClearQueueOnEncodeCompleted.
- /// </summary>
- public bool EnableProcessIsolation
- {
- get
- {
- return this.enableProcessIsolation;
- }
- set
- {
- this.enableProcessIsolation = value;
- this.NotifyOfPropertyChange(() => this.EnableProcessIsolation);
- }
- }
-
- /// <summary>
- /// Gets or sets the server port.
- /// </summary>
- public int ServerPort
- {
- get
- {
- return this.serverPort;
- }
- set
- {
- this.serverPort = value;
- this.NotifyOfPropertyChange(() => this.ServerPort);
- }
- }
-
- /// <summary>
/// Gets or sets a value indicating whether enable lib hb.
/// </summary>
public bool ShowAdvancedTab
@@ -1541,11 +1499,6 @@ namespace HandBrakeWPF.ViewModels
// Use dvdnav
this.DisableLibdvdNav = userSettingService.GetUserSetting<bool>(UserSettingConstants.DisableLibDvdNav);
-
- int port;
- int.TryParse(userSettingService.GetUserSetting<string>(UserSettingConstants.ServerPort), out port);
- this.ServerPort = port;
- this.EnableProcessIsolation = userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableProcessIsolation);
}
/// <summary>
@@ -1606,8 +1559,6 @@ namespace HandBrakeWPF.ViewModels
}
userSettingService.SetUserSetting(UserSettingConstants.DisableLibDvdNav, this.DisableLibdvdNav);
- userSettingService.SetUserSetting(UserSettingConstants.EnableProcessIsolation, this.EnableProcessIsolation);
- userSettingService.SetUserSetting(UserSettingConstants.ServerPort, this.ServerPort.ToString(CultureInfo.InvariantCulture));
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
index 5099a2d9a..ff1b1a0c9 100644
--- a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
@@ -55,7 +55,7 @@ namespace HandBrakeWPF.ViewModels
/// <summary>
/// Backing field for the encode service.
/// </summary>
- private readonly IEncodeServiceWrapper encodeService;
+ private readonly IEncode encodeService;
/// <summary>
/// The error service
@@ -134,7 +134,7 @@ namespace HandBrakeWPF.ViewModels
// Live Preview
this.userSettingService = userSettingService;
- this.encodeService = new EncodeServiceWrapper(userSettingService); // Preview needs a seperate instance rather than the shared singleton. This could maybe do with being refactored at some point
+ this.encodeService = new EncodeServiceWrapper(); // Preview needs a seperate instance rather than the shared singleton. This could maybe do with being refactored at some point
this.Title = "Preview";
this.Percentage = "0.00%";
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
index 2315eea55..52f9568d2 100644
--- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
@@ -325,22 +325,6 @@
</StackPanel>
-
- <StackPanel Orientation="Vertical" Margin="0,10,0,20" Visibility="Visible">
-
- <TextBlock Text="Encode Engine" FontSize="14" Margin="0,0,0,10" Visibility="Collapsed"/>
-
- <StackPanel Orientation="Vertical" Margin="20,0,0,0">
-
-
- <CheckBox Content="Enable Process Isolation (Run Encodes via an intermediate service)" Margin="20,10,0,0" IsChecked="{Binding EnableProcessIsolation}" Visibility="Collapsed" />
- <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Visibility="Collapsed">
- <TextBlock Text="Server Port:" VerticalAlignment="Center" />
- <TextBox Width="50" MaxLength="5" Text="{Binding ServerPort}" />
- </StackPanel>
-
- </StackPanel>
- </StackPanel>
</StackPanel>
<StackPanel Name="Updates" Orientation="Vertical" Margin="10,10,0,0"