]> granicus.if.org Git - handbrake/commitdiff
WinGui: Removing the Isolation code as it's not used, and planned for libhb instead.
authorsr55 <sr55.hb@outlook.com>
Sun, 1 Mar 2015 17:53:54 +0000 (17:53 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 1 Mar 2015 17:53:54 +0000 (17:53 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6958 b64f7644-9d1e-0410-96f1-a4d463321fa5

15 files changed:
win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
win/CS/HandBrake.ApplicationServices/Isolation/BackgroundServiceConnector.cs [deleted file]
win/CS/HandBrake.ApplicationServices/Isolation/IsolatedEncodeService.cs [deleted file]
win/CS/HandBrake.ApplicationServices/Services/Encode/Interfaces/IEncodeServiceWrapper.cs [deleted file]
win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueProcessor.cs
win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs
win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs
win/CS/HandBrakeWPF/Services/NotificationService.cs
win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
win/CS/HandBrakeWPF/UserSettingConstants.cs
win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
win/CS/HandBrakeWPF/Views/OptionsView.xaml

index fccf0154eac240ed99d1f89ad8301d936492ce8f..7b0c96fd85b70b511afa109453ead4ba0349a543 100644 (file)
     <Compile Include="Interop\Model\Subtitles.cs" />\r
     <Compile Include="Interop\Model\VideoQualityLimits.cs" />\r
     <Compile Include="Interop\Model\VideoRangeType.cs" />\r
-    <Compile Include="Isolation\BackgroundServiceConnector.cs" />\r
-    <Compile Include="Isolation\IsolatedEncodeService.cs" />\r
     <Compile Include="Services\Encode\Factories\VideoProfileFactory.cs" />\r
     <Compile Include="Services\Encode\Factories\VideoPresetFactory.cs" />\r
     <Compile Include="Services\Encode\Factories\VideoLevelFactory.cs" />\r
     <Compile Include="Model\VideoScaler.cs" />\r
     <Compile Include="Services\Encode\EventArgs\EncodeCompletedEventArgs.cs" />\r
     <Compile Include="Services\Encode\EventArgs\EncodeProgressEventArgs.cs" />\r
-    <Compile Include="Services\Encode\Interfaces\IEncodeServiceWrapper.cs" />\r
     <Compile Include="Services\Encode\Model\Models\Video\VideoLevel.cs" />\r
     <Compile Include="Services\Encode\Model\Models\Video\VideoPreset.cs" />\r
     <Compile Include="Services\Encode\Model\Models\Video\VideoProfile.cs" />\r
diff --git a/win/CS/HandBrake.ApplicationServices/Isolation/BackgroundServiceConnector.cs b/win/CS/HandBrake.ApplicationServices/Isolation/BackgroundServiceConnector.cs
deleted file mode 100644 (file)
index 0fa7c24..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="BackgroundServiceConnector.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Background Service Connector.\r
-//   HandBrake has the ability to connect to a service app that will control Libhb.\r
-//   This acts as process isolation.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Isolation\r
-{\r
-    using System;\r
-    using System.Diagnostics;\r
-    using System.ServiceModel;\r
-    using System.Threading;\r
-\r
-    using HandBrake.ApplicationServices.Exceptions;\r
-    using HandBrake.ApplicationServices.Services.Encode.EventArgs;\r
-    using HandBrake.ApplicationServices.Services.Interfaces;\r
-\r
-    /// <summary>\r
-    /// Background Service Connector.\r
-    /// HandBrake has the ability to connect to a service app that will control Libhb. \r
-    /// This acts as process isolation.\r
-    /// </summary>\r
-    public class BackgroundServiceConnector : IHbServiceCallback, IDisposable\r
-    {\r
-        #region Constants and Fields\r
-\r
-        /// <summary>\r
-        /// Gets or sets the pipe factory.\r
-        /// DuplexChannelFactory is necessary for Callbacks.\r
-        /// </summary>\r
-        private static DuplexChannelFactory<IServerService> pipeFactory;\r
-\r
-        /// <summary>\r
-        /// The background process.\r
-        /// </summary>\r
-        private static Process backgroundProcess;\r
-\r
-        #endregion\r
-\r
-        #region Properties\r
-\r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether is connected.\r
-        /// </summary>\r
-        public bool IsConnected { get; set; }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the service.\r
-        /// </summary>\r
-        public IServerService Service { get; set; }\r
-\r
-        #endregion\r
-\r
-        #region Public Server Management Methods\r
-\r
-        /// <summary>\r
-        /// The can connect.\r
-        /// </summary>\r
-        /// <returns>\r
-        /// The System.Boolean.\r
-        /// </returns>\r
-        public bool CanConnect()\r
-        {\r
-            return true;\r
-        }\r
-\r
-        /// <summary>\r
-        /// The connect.\r
-        /// </summary>\r
-        /// <param name="port">\r
-        /// The port.\r
-        /// </param>\r
-        public void Connect(string port)\r
-        {\r
-            if (backgroundProcess == null)\r
-            {\r
-                ProcessStartInfo processStartInfo = new ProcessStartInfo(\r
-                    "HandBrake.Server.exe", port)\r
-                {\r
-                    UseShellExecute = false, \r
-                    CreateNoWindow = true, \r
-                    RedirectStandardOutput = true, \r
-                };\r
-\r
-                backgroundProcess = new Process { StartInfo = processStartInfo };\r
-                backgroundProcess.Start();\r
-            }\r
-\r
-            // When the process writes out a line, it's pipe server is ready and can be contacted for\r
-            // work. Reading line blocks until this happens.\r
-            backgroundProcess.StandardOutput.ReadLine();\r
-\r
-            ThreadPool.QueueUserWorkItem(delegate\r
-                {\r
-                    try\r
-                    {\r
-                        pipeFactory = new DuplexChannelFactory<IServerService>(\r
-                            new InstanceContext(this), \r
-                            new NetTcpBinding(), \r
-                            new EndpointAddress(string.Format("net.tcp://127.0.0.1:{0}/IHbService", port)));\r
-\r
-                        // Connect and Subscribe to the Server\r
-                        this.Service = pipeFactory.CreateChannel();\r
-                        this.Service.Subscribe();\r
-                        this.IsConnected = true;\r
-                    }\r
-                    catch (Exception exc)\r
-                    {\r
-                        throw new GeneralApplicationException("Unable to connect to background worker process", "Please restart HandBrake", exc);\r
-                    }\r
-                });\r
-        }\r
-\r
-        /// <summary>\r
-        /// The disconnect.\r
-        /// </summary>\r
-        public void Shutdown()\r
-        {\r
-            try\r
-            {\r
-                if (backgroundProcess != null && !backgroundProcess.HasExited)\r
-                {\r
-                    this.Service.Unsubscribe();\r
-                }\r
-            }\r
-            catch (Exception exc)\r
-            {\r
-                throw new GeneralApplicationException("Unable to disconnect to background worker process", \r
-                    "It may have already close. Check for any left over HandBrake.Server.exe processes", exc);\r
-            }\r
-        }\r
-\r
-        #endregion\r
-\r
-        #region Implemented Interfaces\r
-\r
-        /// <summary>\r
-        /// The dispose.\r
-        /// </summary>\r
-        public void Dispose()\r
-        {\r
-            this.Service.Unsubscribe();\r
-        }\r
-\r
-        /// <summary>\r
-        /// The encode progress callback.\r
-        /// </summary>\r
-        /// <param name="eventArgs">\r
-        /// The event Args.\r
-        /// </param>\r
-        public virtual void EncodeProgressCallback(EncodeProgressEventArgs eventArgs)\r
-        {\r
-        }\r
-\r
-        /// <summary>\r
-        /// The encode completed callback.\r
-        /// </summary>\r
-        /// <param name="eventArgs">\r
-        /// The event Args.\r
-        /// </param>\r
-        public virtual void EncodeCompletedCallback(EncodeCompletedEventArgs eventArgs)\r
-        {\r
-        }\r
-\r
-        /// <summary>\r
-        /// The encode started callback.\r
-        /// </summary>\r
-        public virtual void EncodeStartedCallback()\r
-        {\r
-        }\r
-\r
-        #endregion\r
-    }\r
-}
\ 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 (file)
index a98941b..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="IsolatedEncodeService.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   Isolated Scan Service\r
-//   This is an implementation of the IEncode implementation that runs scans on a seperate process\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Isolation\r
-{\r
-    using System;\r
-    using System.Threading;\r
-\r
-    using HandBrake.ApplicationServices.Exceptions;\r
-    using HandBrake.ApplicationServices.Model;\r
-    using HandBrake.ApplicationServices.Services.Encode.EventArgs;\r
-    using HandBrake.ApplicationServices.Services.Encode.Interfaces;\r
-\r
-    /// <summary>\r
-    /// Isolated Scan Service. \r
-    /// This is an implementation of the IEncode implementation that runs scans on a seperate process\r
-    /// </summary>\r
-    public class IsolatedEncodeService : BackgroundServiceConnector, IEncode\r
-    {\r
-        #region Constructors and Destructors\r
-\r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="IsolatedEncodeService"/> class. \r
-        /// </summary>\r
-        /// <param name="port">\r
-        /// The port.\r
-        /// </param>\r
-        public IsolatedEncodeService(string port)\r
-        {\r
-            try\r
-            {\r
-                if (this.CanConnect())\r
-                {\r
-                    this.Connect(port);\r
-                }\r
-            }\r
-            catch (Exception exception)\r
-            {\r
-                throw new GeneralApplicationException("Unable to connect to scan worker process.", "Try restarting HandBrake", exception);\r
-            }\r
-        }\r
-\r
-        #endregion\r
-\r
-        #region Events\r
-\r
-        /// <summary>\r
-        /// The encode completed.\r
-        /// </summary>\r
-        public event EncodeCompletedStatus EncodeCompleted;\r
-\r
-        /// <summary>\r
-        /// The encode started.\r
-        /// </summary>\r
-        public event EventHandler EncodeStarted;\r
-\r
-        /// <summary>\r
-        /// The encode status changed.\r
-        /// </summary>\r
-        public event EncodeProgessStatus EncodeStatusChanged;\r
-\r
-        #endregion\r
-\r
-        #region Properties\r
-\r
-        /// <summary>\r
-        /// Gets ActivityLog.\r
-        /// </summary>\r
-        public string ActivityLog\r
-        {\r
-            get\r
-            {\r
-                return this.IsConnected ? this.Service.EncodeActivityLog : "Unable to connect to background worker service ...";\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets the log index.\r
-        /// </summary>\r
-        public int LogIndex\r
-        {\r
-            get\r
-            {\r
-                return -1;\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating whether can pause.\r
-        /// </summary>\r
-        public bool CanPause\r
-        {\r
-            get\r
-            {\r
-                return false; // TODO make this work.\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating whether is pasued.\r
-        /// </summary>\r
-        public bool IsPasued { get; private set; }\r
-\r
-        /// <summary>\r
-        /// Gets a value indicating whether IsEncoding.\r
-        /// </summary>\r
-        public bool IsEncoding\r
-        {\r
-            get\r
-            {\r
-                return this.IsConnected && this.Service.IsEncoding;\r
-            }\r
-        }\r
-\r
-        #endregion\r
-\r
-        #region Public Methods\r
-\r
-        /// <summary>\r
-        /// The encode completed callback.\r
-        /// </summary>\r
-        /// <param name="eventArgs">\r
-        /// The event args.\r
-        /// </param>\r
-        public override void EncodeCompletedCallback(EncodeCompletedEventArgs eventArgs)\r
-        {\r
-            if (this.EncodeCompleted != null)\r
-            {\r
-                ThreadPool.QueueUserWorkItem(delegate { this.EncodeCompleted(this, eventArgs); });\r
-            }\r
-\r
-            base.EncodeCompletedCallback(eventArgs);\r
-        }\r
-\r
-        /// <summary>\r
-        /// The encode progress callback.\r
-        /// </summary>\r
-        /// <param name="eventArgs">\r
-        /// The event args.\r
-        /// </param>\r
-        public override void EncodeProgressCallback(EncodeProgressEventArgs eventArgs)\r
-        {\r
-            if (this.EncodeStatusChanged != null)\r
-            {\r
-                ThreadPool.QueueUserWorkItem(delegate { this.EncodeStatusChanged(this, eventArgs); });\r
-            }\r
-\r
-            base.EncodeProgressCallback(eventArgs);\r
-        }\r
-\r
-        #endregion\r
-\r
-        #region Implemented Interfaces\r
-\r
-        #region IEncode\r
-\r
-        /// <summary>\r
-        /// Copy the log file to the desired destinations\r
-        /// </summary>\r
-        /// <param name="destination">\r
-        /// The destination.\r
-        /// </param>\r
-        /// <param name="configuration">\r
-        /// The configuration.\r
-        /// </param>\r
-        public void ProcessLogs(string destination, HBConfiguration configuration)\r
-        {\r
-            ThreadPool.QueueUserWorkItem(delegate { this.Service.ProcessEncodeLogs(destination, configuration); });\r
-        }\r
-\r
-        /// <summary>\r
-        /// Start with a LibHb EncodeJob Object\r
-        /// </summary>\r
-        /// <param name="job">\r
-        /// The job.\r
-        /// </param>\r
-        public void Start(QueueTask job)\r
-        {\r
-            ThreadPool.QueueUserWorkItem(\r
-                delegate { this.Service.StartEncode(job); });\r
-        }\r
-\r
-        /// <summary>\r
-        /// The pause.\r
-        /// </summary>\r
-        public void Pause()\r
-        {\r
-        }\r
-\r
-        /// <summary>\r
-        /// The resume.\r
-        /// </summary>\r
-        public void Resume()\r
-        {\r
-        }\r
-\r
-        /// <summary>\r
-        /// Kill the CLI process\r
-        /// </summary>\r
-        public void Stop()\r
-        {\r
-            ThreadPool.QueueUserWorkItem(delegate { this.Service.StopEncode(); });\r
-        }\r
-\r
-        #endregion\r
-\r
-        #endregion\r
-    }\r
-}
\ 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 (file)
index 6163bcf..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="IEncodeServiceWrapper.cs" company="HandBrake Project (http://handbrake.fr)">\r
-//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-//   IEncodeServiceWrapper Interface\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Services.Encode.Interfaces\r
-{\r
-    /// <summary>\r
-    /// EncodeServiceWrapper Interface\r
-    /// </summary>\r
-    public interface IEncodeServiceWrapper : IEncode\r
-    {\r
-    }\r
-}\r
index 7cb0ef7b6f3b0d0515ccfdf385287a61467da389..4e5b51d930266e35e9d028c2ca589f80b1977559 100644 (file)
@@ -55,7 +55,7 @@ namespace HandBrake.ApplicationServices.Services.Interfaces
         /// <summary>\r
         /// Gets the IEncodeService instance.\r
         /// </summary>\r
-        IEncodeServiceWrapper EncodeService { get; }\r
+        IEncode EncodeService { get; }\r
 \r
         /// <summary>\r
         /// Gets a value indicating whether IsProcessing.\r
index 991b2132e7acfb0517d9998084da0d63e2a4a41a..ba6a3a92e74255cc102880e7a3c7f1be06190b83 100644 (file)
@@ -66,7 +66,7 @@ namespace HandBrake.ApplicationServices.Services
         /// <exception cref="ArgumentNullException">\r
         /// Services are not setup\r
         /// </exception>\r
-        public QueueProcessor(IEncodeServiceWrapper encodeService)\r
+        public QueueProcessor(IEncode encodeService)\r
         {\r
             this.EncodeService = encodeService;\r
 \r
@@ -143,7 +143,7 @@ namespace HandBrake.ApplicationServices.Services
         /// <summary>\r
         /// Gets the IEncodeService instance.\r
         /// </summary>\r
-        public IEncodeServiceWrapper EncodeService { get; private set; }\r
+        public IEncode EncodeService { get; private set; }\r
 \r
         /// <summary>\r
         /// Gets a value indicating whether IsProcessing.\r
index b63b74078f7765a398069ca984801f2b82be10f9..867f523c837973a25fb896120bd34b3ccc6ed5ef 100644 (file)
@@ -14,20 +14,17 @@ namespace HandBrakeWPF.Services
     using System;\r
 \r
     using HandBrake.ApplicationServices.Exceptions;\r
-    using HandBrake.ApplicationServices.Isolation;\r
     using HandBrake.ApplicationServices.Model;\r
     using HandBrake.ApplicationServices.Services.Encode;\r
     using HandBrake.ApplicationServices.Services.Encode.EventArgs;\r
     using HandBrake.ApplicationServices.Services.Encode.Interfaces;\r
 \r
-    using HandBrakeWPF.Services.Interfaces;\r
-\r
     /// <summary>\r
     /// We have multiple implementations of Iencode. This is a wrapper class for the GUI so that the \r
     /// implementation used is controllable via user settings.\r
     /// Over time, this class will go away when the LibHB and process isolation code matures.\r
     /// </summary>\r
-    public class EncodeServiceWrapper : IEncodeServiceWrapper\r
+    public class EncodeServiceWrapper : IEncode\r
     {\r
         #region Constants and Fields\r
 \r
@@ -43,32 +40,18 @@ namespace HandBrakeWPF.Services
         /// <summary>\r
         /// Initializes a new instance of the <see cref="EncodeServiceWrapper"/> class.\r
         /// </summary>\r
-        /// <param name="userSettingService">\r
-        /// The user setting service.\r
-        /// </param>\r
-        public EncodeServiceWrapper(IUserSettingService userSettingService)\r
+        public EncodeServiceWrapper()\r
         {\r
-            var useProcessIsolation =\r
-                userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableProcessIsolation);\r
-            var port = userSettingService.GetUserSetting<string>(UserSettingConstants.ServerPort);\r
-\r
             try\r
             {\r
-                if (useProcessIsolation)\r
-                {\r
-                    this.encodeService = new IsolatedEncodeService(port);\r
-                }\r
-                else\r
-                {\r
-                    this.encodeService = new LibEncode();\r
-                }\r
+                this.encodeService = new LibEncode();\r
             }\r
             catch (Exception exc)\r
             {\r
                 // Try to recover from errors.\r
                 throw new GeneralApplicationException(\r
-                    "Unable to initialise LibHB or Background worker service",\r
-                    "HandBrake will not be able to operate correctly.",\r
+                    "Unable to initialise LibHB or Background worker service", \r
+                    "HandBrake will not be able to operate correctly.", \r
                     exc);\r
             }\r
   \r
index ba3c0cf999bf23065713b36a873495fc39cf8934..1a647a97083ead546554561ec4b5b8393fcb066f 100644 (file)
@@ -37,7 +37,7 @@ namespace HandBrakeWPF.Services
         /// <param name="userSettingService">\r
         /// The user Setting Service.\r
         /// </param>\r
-        public NotificationService(IEncodeServiceWrapper encodeService, IQueueProcessor queueProcessor, IUserSettingService userSettingService)\r
+        public NotificationService(IEncode encodeService, IQueueProcessor queueProcessor, IUserSettingService userSettingService)\r
         {\r
             this.userSettingService = userSettingService;\r
            // encodeService.EncodeCompleted += this.EncodeServiceEncodeCompleted;\r
index 10da855fab99164102ea8bf7e1509e0e7cd6f169..c8b327cd368aacf2b7ca7bddca30d211a39ca7f9 100644 (file)
@@ -62,7 +62,7 @@ namespace HandBrakeWPF.Startup
             // Services\r
             this.windsorContainer.Register(Component.For<IUpdateService>().ImplementedBy<UpdateService>().LifeStyle.Is(LifestyleType.Singleton));\r
             this.windsorContainer.Register(Component.For<IScan>().ImplementedBy<LibScan>().LifeStyle.Is(LifestyleType.Singleton));\r
-            this.windsorContainer.Register(Component.For<IEncodeServiceWrapper>().ImplementedBy<EncodeServiceWrapper>().LifeStyle.Is(LifestyleType.Singleton));\r
+            this.windsorContainer.Register(Component.For<IEncode>().ImplementedBy<EncodeServiceWrapper>().LifeStyle.Is(LifestyleType.Singleton));\r
             this.windsorContainer.Register(Component.For<INotificationService>().ImplementedBy<NotificationService>().LifeStyle.Is(LifestyleType.Singleton));\r
             this.windsorContainer.Register(Component.For<IPrePostActionService>().ImplementedBy<PrePostActionService>().LifeStyle.Is(LifestyleType.Singleton));\r
             this.windsorContainer.Register(Component.For<IUserSettingService>().ImplementedBy<UserSettingService>());\r
index fb3f6a04b027f1b431d141d42b5165205971f9aa..1c5464079eb028a3913e99afac4c7dfa32194f85 100644 (file)
@@ -96,16 +96,6 @@ namespace HandBrakeWPF
         /// </summary>\r
         public const string VLCPath = "VLC_Path";\r
 \r
-        /// <summary>\r
-        /// The enable process isolation.\r
-        /// </summary>\r
-        public const string EnableProcessIsolation = "EnableProcessIsolation";\r
-\r
-        /// <summary>\r
-        /// The server port.\r
-        /// </summary>\r
-        public const string ServerPort = "ServerPort";\r
-\r
         /// <summary>\r
         /// Growl Encodes\r
         /// </summary>\r
index 21921b5d60cb910a7b256ee0df64b4de3bbfd91c..008d70dcb5b3373b6e7aeee0e64296b9303ff77e 100644 (file)
@@ -30,7 +30,7 @@ namespace HandBrakeWPF.ViewModels
         /// <summary>\r
         /// Backing field for the encodeService service\r
         /// </summary>\r
-        private readonly IEncodeServiceWrapper encodeService;\r
+        private readonly IEncode encodeService;\r
 \r
         /// <summary>\r
         /// Backing field for the Scan Service\r
@@ -58,7 +58,7 @@ namespace HandBrakeWPF.ViewModels
         /// <param name="scanService">\r
         /// The scan service.\r
         /// </param>\r
-        public LogViewModel(IEncodeServiceWrapper encodeService, IScan scanService)\r
+        public LogViewModel(IEncode encodeService, IScan scanService)\r
         {\r
             this.encodeService = encodeService;\r
             this.scanService = scanService;\r
index d3fd9900c73cc59f392f32caaf5ffc479784ac55..f204b084debad695c010e10c1ef1cee670ea0b9e 100644 (file)
@@ -97,7 +97,7 @@ namespace HandBrakeWPF.ViewModels
         /// <summary>\r
         /// The Encode Service\r
         /// </summary>\r
-        private readonly IEncodeServiceWrapper encodeService;\r
+        private readonly IEncode encodeService;\r
 \r
         /// <summary>\r
         /// Windows 7 API Pack wrapper\r
@@ -229,7 +229,7 @@ namespace HandBrakeWPF.ViewModels
         /// The when Done Service.\r
         /// *** Leave in Constructor. *** \r
         /// </param>\r
-        public MainViewModel(IUserSettingService userSettingService, IScan scanService, IEncodeServiceWrapper encodeService, IPresetService presetService,\r
+        public MainViewModel(IUserSettingService userSettingService, IScan scanService, IEncode encodeService, IPresetService presetService,\r
             IErrorService errorService, IShellViewModel shellViewModel, IUpdateService updateService, INotificationService notificationService,\r
             IPrePostActionService whenDoneService)\r
         {\r
index 77132cf11b1adba09a2845e2c8e2236f92c4aac6..31841a3355184d5eb49a3cefaa3c11a447780e56 100644 (file)
@@ -260,16 +260,6 @@ namespace HandBrakeWPF.ViewModels
         /// </summary>\r
         private UpdateCheckInformation updateInfo;\r
 \r
-        /// <summary>\r
-        /// The enable process isolation.\r
-        /// </summary>\r
-        private bool enableProcessIsolation;\r
-\r
-        /// <summary>\r
-        /// The server port.\r
-        /// </summary>\r
-        private int serverPort;\r
-\r
         /// <summary>\r
         /// The show advanced tab backing field.\r
         /// </summary>\r
@@ -1060,38 +1050,6 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
-        /// <summary>\r
-        /// Gets or sets a value indicating whether ClearQueueOnEncodeCompleted.\r
-        /// </summary>\r
-        public bool EnableProcessIsolation\r
-        {\r
-            get\r
-            {\r
-                return this.enableProcessIsolation;\r
-            }\r
-            set\r
-            {\r
-                this.enableProcessIsolation = value;\r
-                this.NotifyOfPropertyChange(() => this.EnableProcessIsolation);\r
-            }\r
-        }\r
-\r
-        /// <summary>\r
-        /// Gets or sets the server port.\r
-        /// </summary>\r
-        public int ServerPort\r
-        {\r
-            get\r
-            {\r
-                return this.serverPort;\r
-            }\r
-            set\r
-            {\r
-                this.serverPort = value;\r
-                this.NotifyOfPropertyChange(() => this.ServerPort);\r
-            }\r
-        }\r
-\r
         /// <summary>\r
         /// Gets or sets a value indicating whether enable lib hb.\r
         /// </summary>\r
@@ -1541,11 +1499,6 @@ namespace HandBrakeWPF.ViewModels
 \r
             // Use dvdnav\r
             this.DisableLibdvdNav = userSettingService.GetUserSetting<bool>(UserSettingConstants.DisableLibDvdNav);  \r
-\r
-            int port;\r
-            int.TryParse(userSettingService.GetUserSetting<string>(UserSettingConstants.ServerPort), out port);\r
-            this.ServerPort = port;\r
-            this.EnableProcessIsolation = userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableProcessIsolation);\r
         }\r
 \r
         /// <summary>\r
@@ -1606,8 +1559,6 @@ namespace HandBrakeWPF.ViewModels
             }\r
 \r
             userSettingService.SetUserSetting(UserSettingConstants.DisableLibDvdNav, this.DisableLibdvdNav);\r
-            userSettingService.SetUserSetting(UserSettingConstants.EnableProcessIsolation, this.EnableProcessIsolation);\r
-            userSettingService.SetUserSetting(UserSettingConstants.ServerPort, this.ServerPort.ToString(CultureInfo.InvariantCulture));\r
         }\r
 \r
         /// <summary>\r
index 5099a2d9a4394f07f8e6f4b41084e6ee5b175644..ff1b1a0c9557fd2ec4fcc998f5df162e6698d44e 100644 (file)
@@ -55,7 +55,7 @@ namespace HandBrakeWPF.ViewModels
         /// <summary>\r
         /// Backing field for the encode service.\r
         /// </summary>\r
-        private readonly IEncodeServiceWrapper encodeService;\r
+        private readonly IEncode encodeService;\r
 \r
         /// <summary>\r
         /// The error service\r
@@ -134,7 +134,7 @@ namespace HandBrakeWPF.ViewModels
 \r
             // Live Preview\r
             this.userSettingService = userSettingService;\r
-            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\r
+            this.encodeService = new EncodeServiceWrapper(); // Preview needs a seperate instance rather than the shared singleton. This could maybe do with being refactored at some point\r
 \r
             this.Title = "Preview";\r
             this.Percentage = "0.00%";\r
index 2315eea55ff196e20bc063bdbcec6296fb693244..52f9568d21e1ce204d638ef43e164a3532dd0a5a 100644 (file)
 \r
                     </StackPanel>\r
 \r
-\r
-                    <StackPanel Orientation="Vertical" Margin="0,10,0,20" Visibility="Visible">\r
-\r
-                        <TextBlock Text="Encode Engine" FontSize="14" Margin="0,0,0,10" Visibility="Collapsed"/>\r
-\r
-                        <StackPanel Orientation="Vertical"  Margin="20,0,0,0">\r
-\r
-\r
-                            <CheckBox Content="Enable Process Isolation (Run Encodes via an intermediate service)" Margin="20,10,0,0" IsChecked="{Binding EnableProcessIsolation}" Visibility="Collapsed" />\r
-                            <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Visibility="Collapsed">\r
-                                <TextBlock Text="Server Port:" VerticalAlignment="Center" />\r
-                                <TextBox Width="50" MaxLength="5" Text="{Binding ServerPort}" />\r
-                            </StackPanel>\r
-\r
-                        </StackPanel>\r
-                    </StackPanel>\r
                 </StackPanel>\r
 \r
                 <StackPanel Name="Updates" Orientation="Vertical" Margin="10,10,0,0"\r