summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-01-19 21:55:29 +0000
committersr55 <[email protected]>2015-01-19 21:55:29 +0000
commit50445c5138c234e860dcf8b54134aa6668c896df (patch)
treea9f4215d3354b1d0c6bf7a8e5550d680d1d3b8c8 /win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
parente92de31ae2e15317e95c5ecf13a2105916348881 (diff)
WinGui: Quick Fix for the batch encoding with libhb mode.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6775 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
index d360ab0ea..a05ea2194 100644
--- a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
@@ -26,6 +26,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Services.Encode.Model.Models;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Services.Scan.Interfaces;
+ using HandBrake.ApplicationServices.Services.Scan.Model;
using HandBrake.Interop.Model.Encoding;
using HandBrakeWPF.Factories;
@@ -218,6 +219,11 @@ namespace HandBrakeWPF.ViewModels
public EncodeTask Task { get; set; }
/// <summary>
+ /// Gets or sets the scanned source.
+ /// </summary>
+ public Source ScannedSource { get; set; }
+
+ /// <summary>
/// Gets the total previews.
/// </summary>
public int TotalPreviews
@@ -395,12 +401,16 @@ namespace HandBrakeWPF.ViewModels
/// <param name="task">
/// The task.
/// </param>
- public void UpdatePreviewFrame(EncodeTask task)
+ /// <param name="scannedSource">
+ /// The scanned Source.
+ /// </param>
+ public void UpdatePreviewFrame(EncodeTask task, Source scannedSource)
{
this.Task = task;
this.UpdatePreviewFrame();
this.DisplayName = "Picture Preview";
this.Title = Properties.Resources.Preview;
+ this.ScannedSource = scannedSource;
}
/// <summary>
@@ -543,7 +553,7 @@ namespace HandBrakeWPF.ViewModels
encodeTask.IsPreviewEncode = true;
encodeTask.PreviewEncodeStartAt = this.SelectedPreviewImage; // TODO 0 and 1 mean the same. Need to fix this as it knocks the video out of sync with the still preview.
encodeTask.PreviewEncodeDuration = this.Duration;
- QueueTask task = new QueueTask(encodeTask, HBConfigurationFactory.Create());
+ QueueTask task = new QueueTask(encodeTask, HBConfigurationFactory.Create(), this.ScannedSource);
ThreadPool.QueueUserWorkItem(this.CreatePreview, task);
}