From 5c7597d9de68e920ea6f06b6086df148d7225739 Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 5 Mar 2015 20:54:44 +0000 Subject: WinGui: Remove the EncodeJob model. This removes another abstraction layer that is no longer necessary now that the GUI uses libhb directly. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6966 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Services/Encode/LibEncode.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs') diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs index 3dee11f37..8d0391345 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs @@ -12,6 +12,7 @@ namespace HandBrake.ApplicationServices.Services.Encode using System; using System.Diagnostics; using System.Linq; + using System.ServiceModel.Channels; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Services.Encode.Interfaces; @@ -21,7 +22,9 @@ namespace HandBrake.ApplicationServices.Services.Encode using HandBrake.ApplicationServices.Interop; using HandBrake.ApplicationServices.Interop.EventArgs; using HandBrake.ApplicationServices.Interop.Interfaces; + using HandBrake.ApplicationServices.Interop.Json.Factories; using HandBrake.ApplicationServices.Interop.Model; + using HandBrake.ApplicationServices.Services.Encode.Factories; /// /// LibHB Implementation of IEncode @@ -208,9 +211,6 @@ namespace HandBrake.ApplicationServices.Services.Encode { ServiceLogMessage("Scan Completed. Setting up the job for encoding ..."); - // Get an EncodeJob object for the Interop Library - EncodeJob encodeJob = InteropModelCreator.GetEncodeJob(job); - // Start the Encode Title title = this.scannedSource.Titles.FirstOrDefault(t => t.TitleNumber == job.Task.Title); if (title == null) @@ -228,7 +228,10 @@ namespace HandBrake.ApplicationServices.Services.Encode }; ServiceLogMessage("Starting Encode ..."); - instance.StartEncode(encodeJob, scannedTitle); + + // Get an EncodeJob object for the Interop Library + SourceVideoInfo videoInfo = new SourceVideoInfo(title.FramerateNumerator, title.FramerateDenominator, title.Resolution, title.ParVal); + instance.StartEncode(EncodeFactory.Create(job.Task, videoInfo, job.Configuration), scannedTitle); // Fire the Encode Started Event this.InvokeEncodeStarted(System.EventArgs.Empty); -- cgit v1.2.3