summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-11-19 23:18:43 +0000
committersr55 <[email protected]>2013-11-19 23:18:43 +0000
commitacc52477100589c854cd3410a09949dd86fac754 (patch)
treebf4658ab3770f0541a5be78498a5cecc7687484f /win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
parentc32a46c925608e51be9edcd6b5647c50124dd16a (diff)
WinGui: Putting in place the framework for a static preview window. Initial window created and now displays a static preview. This feature is not enabled in the UI yet.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5901 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/LibScan.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/LibScan.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
index 167394764..24c364024 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
@@ -13,6 +13,7 @@ namespace HandBrake.ApplicationServices.Services
using System.Collections.Generic;
using System.IO;
using System.Text;
+ using System.Windows.Media.Imaging;
using HandBrake.ApplicationServices.EventArgs;
using HandBrake.ApplicationServices.Model;
@@ -23,6 +24,7 @@ namespace HandBrake.ApplicationServices.Services
using HandBrake.Interop;
using HandBrake.Interop.EventArgs;
using HandBrake.Interop.Interfaces;
+ using HandBrake.Interop.Model;
using AudioTrack = HandBrake.ApplicationServices.Parsing.Audio;
using ScanProgressEventArgs = HandBrake.Interop.EventArgs.ScanProgressEventArgs;
@@ -239,6 +241,30 @@ namespace HandBrake.ApplicationServices.Services
}
}
+ /// <summary>
+ /// Get a Preview image for the current job and preview number.
+ /// </summary>
+ /// <param name="job">
+ /// The job.
+ /// </param>
+ /// <param name="preview">
+ /// The preview.
+ /// </param>
+ /// <returns>
+ /// The <see cref="BitmapImage"/>.
+ /// </returns>
+ public BitmapImage GetPreview(EncodeTask job, int preview)
+ {
+ if (this.instance == null)
+ {
+ return null;
+ }
+
+ EncodeJob encodeJob = InteropModelCreator.GetEncodeJob(job);
+ BitmapImage bitmapImage = this.instance.GetPreview(encodeJob, preview);
+ return bitmapImage;
+ }
+
#endregion
#region Private Methods