diff options
author | sr55 <[email protected]> | 2015-02-21 22:01:39 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-02-21 22:01:39 +0000 |
commit | ae9594298196c8412e49966256ae45eb3584ce27 (patch) | |
tree | 947af0ddfb14e3894286af812106ebfba7fec6f8 /win/CS/HandBrake.ApplicationServices | |
parent | 53508d57a481fa1e67ac66541581f925dda7fd6e (diff) |
WinGui: Extend the scope of libhb encode exception handling to get a better idea of what's going wrong for some people.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6935 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs index 483b88e7e..744f435ae 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs @@ -204,29 +204,29 @@ namespace HandBrake.ApplicationServices.Services.Encode /// </param>
private void ScanCompleted(QueueTask job, IHandBrakeInstance instance)
{
- ServiceLogMessage("Scan Completed. Setting up the job for encoding ...");
+ try
+ {
+ ServiceLogMessage("Scan Completed. Setting up the job for encoding ...");
- // Get an EncodeJob object for the Interop Library
- EncodeJob encodeJob = InteropModelCreator.GetEncodeJob(job);
+ // 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)
- {
- ServiceLogMessage("Title not found.");
- throw new Exception("Unable to get title for encoding. Encode Failed.");
- }
+ // Start the Encode
+ Title title = this.scannedSource.Titles.FirstOrDefault(t => t.TitleNumber == job.Task.Title);
+ if (title == null)
+ {
+ ServiceLogMessage("Title not found.");
+ throw new Exception("Unable to get title for encoding. Encode Failed.");
+ }
+
+ Interop.Model.Scan.Title scannedTitle = new Interop.Model.Scan.Title
+ {
+ Resolution = new Size(title.Resolution.Width, title.Resolution.Height),
+ ParVal = new Size(title.ParVal.Width, title.ParVal.Height),
+ FramerateDenominator = title.FramerateDenominator,
+ FramerateNumerator = title.FramerateNumerator,
+ };
- Interop.Model.Scan.Title scannedTitle = new Interop.Model.Scan.Title
- {
- Resolution = new Size(title.Resolution.Width, title.Resolution.Height),
- ParVal = new Size(title.ParVal.Width, title.ParVal.Height),
- FramerateDenominator = title.FramerateDenominator,
- FramerateNumerator = title.FramerateNumerator,
- };
-
- try
- {
ServiceLogMessage("Starting Encode ...");
instance.StartEncode(encodeJob, scannedTitle);
|