diff options
author | sr55 <[email protected]> | 2015-03-05 20:54:44 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-03-05 20:54:44 +0000 |
commit | 5c7597d9de68e920ea6f06b6086df148d7225739 (patch) | |
tree | 3d6259d16fd65061d1895562b65e4094ac16d47d /win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs | |
parent | 205b514fa0a9cd94c500a7be7460684aba82d8bc (diff) |
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
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs | 11 |
1 files changed, 7 insertions, 4 deletions
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;
/// <summary>
/// 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);
|