/// <param name="configuration">\r
/// The configuration.\r
/// </param>\r
- public QueueTask(EncodeTask task, HBConfiguration configuration)\r
+ /// <param name="scannedSource">\r
+ /// The scanned Source.\r
+ /// </param>\r
+ public QueueTask(EncodeTask task, HBConfiguration configuration, Source scannedSource)\r
{\r
this.Task = task;\r
this.Configuration = configuration;\r
this.Status = QueueItemStatus.Waiting;\r
+ this.ScannedSource = scannedSource;\r
}\r
\r
/// <summary>\r
HandBrakeUtils.SetDvdNav(!job.Configuration.IsDvdNavDisabled);\r
\r
ServiceLogMessage("Scanning title for encoding ... ");\r
- this.instance.StartScan(job.Task.Source, job.Configuration.PreviewScanCount, job.Task.Title);\r
+\r
+ this.instance.StartScan(job.ScannedSource.ScanPath, job.Configuration.PreviewScanCount, job.Task.Title);\r
}\r
catch (Exception exc)\r
{\r
Interop.Model.Scan.Title scannedTitle = new Interop.Model.Scan.Title\r
{\r
Resolution = new Size(title.Resolution.Width, title.Resolution.Height), \r
- ParVal = new Size(title.ParVal.Width, title.ParVal.Height),\r
- FramerateDenominator = title.FramerateDenominator,\r
- FramerateNumerator = title.FramerateNumerator,\r
+ ParVal = new Size(title.ParVal.Width, title.ParVal.Height), \r
+ FramerateDenominator = title.FramerateDenominator, \r
+ FramerateNumerator = title.FramerateNumerator, \r
};\r
\r
// TODO fix this tempory hack to pass in the required title information into the factory.\r
\r
namespace HandBrake.ApplicationServices.Services.Scan.Model\r
{\r
+ using System;\r
using System.Collections.Generic;\r
using System.Runtime.Serialization;\r
\r
/// </summary>\r
public int TitleNumber { get; set; }\r
\r
+ public int RescanTitleNumber { get; set; }\r
+\r
/// <summary>\r
/// Gets or sets Playlist.\r
/// </summary>\r
\r
namespace HandBrakeWPF.ViewModels\r
{\r
- using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Services.Encode.Model;\r
using HandBrake.ApplicationServices.Services.Scan.Model;\r
using HandBrake.Interop.Model.Encoding;\r
/// <summary>\r
/// Setup this window for a new source\r
/// </summary>\r
+ /// <param name="source">\r
+ /// The source.\r
+ /// </param>\r
/// <param name="title">\r
/// The title.\r
/// </param>\r
/// <param name="task">\r
/// The task.\r
/// </param>\r
- public void SetSource(Title title, Preset preset, EncodeTask task)\r
+ public void SetSource(Source source, Title title, Preset preset, EncodeTask task)\r
{\r
- this.EncoderOptionsViewModel.SetSource(title, preset, task);\r
- this.X264ViewModel.SetSource(title, preset, task);\r
+ this.EncoderOptionsViewModel.SetSource(source, title, preset, task);\r
+ this.X264ViewModel.SetSource(source, title, preset, task);\r
}\r
\r
#endregion\r
/// <summary>\r
/// Set the Source Title\r
/// </summary>\r
+ /// <param name="source">\r
+ /// The source.\r
+ /// </param>\r
/// <param name="title">\r
/// The title.\r
/// </param>\r
/// <param name="task">\r
/// The task.\r
/// </param>\r
- public void SetSource(Title title, Preset preset, EncodeTask task)\r
+ public void SetSource(Source source, Title title, Preset preset, EncodeTask task)\r
{\r
this.SourceTracks = title.AudioTracks;\r
\r
/// <summary>\r
/// Setup this window for a new source\r
/// </summary>\r
+ /// <param name="source">\r
+ /// The source.\r
+ /// </param>\r
/// <param name="title">\r
/// The title.\r
/// </param>\r
/// <param name="task">\r
/// The task.\r
/// </param>\r
- public void SetSource(Title title, Preset preset, EncodeTask task)\r
+ public void SetSource(Source source, Title title, Preset preset, EncodeTask task)\r
{\r
this.Task = task;\r
this.NotifyOfPropertyChange(() => this.Task);\r
{\r
using System.Collections.Generic;\r
\r
- using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Services.Encode.Model;\r
using HandBrake.ApplicationServices.Services.Scan.Model;\r
using HandBrake.Interop.Model.Encoding;\r
/// <summary>\r
/// The set source.\r
/// </summary>\r
+ /// <param name="source">\r
+ /// The source.\r
+ /// </param>\r
/// <param name="selectedTitle">\r
/// The selected title.\r
/// </param>\r
/// <param name="task">\r
/// The task.\r
/// </param>\r
- public void SetSource(Title selectedTitle, Preset currentPreset, EncodeTask task)\r
+ public void SetSource(Source source, Title selectedTitle, Preset currentPreset, EncodeTask task)\r
{\r
this.Task = task;\r
this.Preset = currentPreset;\r
/// <summary>\r
/// Setup this window for a new source\r
/// </summary>\r
+ /// <param name="source">\r
+ /// The source.\r
+ /// </param>\r
/// <param name="title">\r
/// The title.\r
/// </param>\r
/// <param name="task">\r
/// The task.\r
/// </param>\r
- public void SetSource(Title title, Preset preset, EncodeTask task)\r
+ public void SetSource(Source source, Title title, Preset preset, EncodeTask task)\r
{\r
this.CurrentTask = task;\r
}\r
\r
namespace HandBrakeWPF.ViewModels.Interfaces\r
{\r
- using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Services.Encode.Model;\r
+ using HandBrake.ApplicationServices.Services.Scan.Model;\r
\r
/// <summary>\r
/// The Static Preview View Model Interface\r
/// <param name="task">\r
/// The task.\r
/// </param>\r
- void UpdatePreviewFrame(EncodeTask task);\r
+ /// <param name="scannedSource">\r
+ /// The scanned Source.\r
+ /// </param>\r
+ void UpdatePreviewFrame(EncodeTask task, Source scannedSource);\r
\r
/// <summary>\r
/// Gets or sets a value indicating whether is open.\r
\r
namespace HandBrakeWPF.ViewModels.Interfaces\r
{\r
- using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Services.Encode.Model;\r
using HandBrake.ApplicationServices.Services.Scan.Model;\r
\r
/// <summary>\r
/// Setup the window after a scan.\r
/// </summary>\r
+ /// <param name="source">\r
+ /// The source.\r
+ /// </param>\r
/// <param name="selectedTitle">\r
/// The selected title.\r
/// </param>\r
/// <param name="task">\r
/// The task.\r
/// </param>\r
- void SetSource(Title selectedTitle, Preset currentPreset, EncodeTask task);\r
+ void SetSource(Source source, Title selectedTitle, Preset currentPreset, EncodeTask task);\r
\r
/// <summary>\r
/// Set the selected preset\r
if (!string.IsNullOrEmpty(this.CurrentTask.Source))\r
{\r
this.StaticPreviewViewModel.IsOpen = true;\r
- this.StaticPreviewViewModel.UpdatePreviewFrame(this.CurrentTask);\r
+ this.StaticPreviewViewModel.UpdatePreviewFrame(this.CurrentTask, this.ScannedSource);\r
this.WindowManager.ShowWindow(this.StaticPreviewViewModel);\r
}\r
}\r
return false;\r
}\r
\r
- QueueTask task = new QueueTask(new EncodeTask(this.CurrentTask), HBConfigurationFactory.Create());\r
+ QueueTask task = new QueueTask(new EncodeTask(this.CurrentTask), HBConfigurationFactory.Create(), this.ScannedSource);\r
\r
if (!this.queueProcessor.CheckForDestinationPathDuplicates(task.Task.Destination))\r
{\r
/// </param>\r
private void QueueEditAction(bool successful)\r
{\r
+ /* TODO Fix this. */\r
Execute.OnUIThread(() =>\r
{\r
// Copy all the Scan data into the UI\r
// Setup the Tabs\r
if (this.selectedTitle != null)\r
{\r
- this.PictureSettingsViewModel.SetSource(this.SelectedTitle, this.SelectedPreset, this.CurrentTask);\r
- this.VideoViewModel.SetSource(this.SelectedTitle, this.SelectedPreset, this.CurrentTask);\r
- this.FiltersViewModel.SetSource(this.SelectedTitle, this.SelectedPreset, this.CurrentTask);\r
- this.AudioViewModel.SetSource(this.SelectedTitle, this.SelectedPreset, this.CurrentTask);\r
- this.SubtitleViewModel.SetSource(this.SelectedTitle, this.SelectedPreset, this.CurrentTask);\r
- this.ChaptersViewModel.SetSource(this.SelectedTitle, this.SelectedPreset, this.CurrentTask);\r
- this.AdvancedViewModel.SetSource(this.SelectedTitle, this.SelectedPreset, this.CurrentTask);\r
+ this.PictureSettingsViewModel.SetSource(this.ScannedSource, this.SelectedTitle, this.SelectedPreset, this.CurrentTask);\r
+ this.VideoViewModel.SetSource(this.ScannedSource, this.SelectedTitle, this.SelectedPreset, this.CurrentTask);\r
+ this.FiltersViewModel.SetSource(this.ScannedSource, this.SelectedTitle, this.SelectedPreset, this.CurrentTask);\r
+ this.AudioViewModel.SetSource(this.ScannedSource, this.SelectedTitle, this.SelectedPreset, this.CurrentTask);\r
+ this.SubtitleViewModel.SetSource(this.ScannedSource, this.SelectedTitle, this.SelectedPreset, this.CurrentTask);\r
+ this.ChaptersViewModel.SetSource(this.ScannedSource, this.SelectedTitle, this.SelectedPreset, this.CurrentTask);\r
+ this.AdvancedViewModel.SetSource(this.ScannedSource, this.SelectedTitle, this.SelectedPreset, this.CurrentTask);\r
}\r
}\r
\r
/// </summary>\r
private Title currentTitle;\r
\r
+ /// <summary>\r
+ /// The scanned source.\r
+ /// </summary>\r
+ private Source scannedSource;\r
+\r
#endregion\r
\r
#region Constructors and Destructors\r
/// <summary>\r
/// Setup this window for a new source\r
/// </summary>\r
+ /// <param name="source">\r
+ /// The source.\r
+ /// </param>\r
/// <param name="title">\r
/// The title.\r
/// </param>\r
/// <param name="task">\r
/// The task.\r
/// </param>\r
- public void SetSource(Title title, Preset preset, EncodeTask task)\r
+ public void SetSource(Source source, Title title, Preset preset, EncodeTask task)\r
{\r
this.currentTitle = title;\r
this.Task = task;\r
\r
+ this.scannedSource = source;\r
+\r
if (title != null)\r
{\r
// Set cached info\r
// Step 5, Update the Preview\r
if (delayedPreviewprocessor != null && this.Task != null && this.StaticPreviewViewModel != null && this.StaticPreviewViewModel.IsOpen)\r
{\r
- delayedPreviewprocessor.PerformTask(() => this.StaticPreviewViewModel.UpdatePreviewFrame(this.Task), 800);\r
+ delayedPreviewprocessor.PerformTask(() => this.StaticPreviewViewModel.UpdatePreviewFrame(this.Task, this.scannedSource), 800);\r
}\r
}\r
\r
using HandBrake.ApplicationServices.Services.Encode.Model.Models;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
using HandBrake.ApplicationServices.Services.Scan.Interfaces;\r
+ using HandBrake.ApplicationServices.Services.Scan.Model;\r
using HandBrake.Interop.Model.Encoding;\r
\r
using HandBrakeWPF.Factories;\r
/// </summary>\r
public EncodeTask Task { get; set; }\r
\r
+ /// <summary>\r
+ /// Gets or sets the scanned source.\r
+ /// </summary>\r
+ public Source ScannedSource { get; set; } \r
+\r
/// <summary>\r
/// Gets the total previews.\r
/// </summary>\r
/// <param name="task">\r
/// The task.\r
/// </param>\r
- public void UpdatePreviewFrame(EncodeTask task)\r
+ /// <param name="scannedSource">\r
+ /// The scanned Source.\r
+ /// </param>\r
+ public void UpdatePreviewFrame(EncodeTask task, Source scannedSource)\r
{\r
this.Task = task;\r
this.UpdatePreviewFrame();\r
this.DisplayName = "Picture Preview";\r
this.Title = Properties.Resources.Preview;\r
+ this.ScannedSource = scannedSource;\r
}\r
\r
/// <summary>\r
encodeTask.IsPreviewEncode = true;\r
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.\r
encodeTask.PreviewEncodeDuration = this.Duration;\r
- QueueTask task = new QueueTask(encodeTask, HBConfigurationFactory.Create());\r
+ QueueTask task = new QueueTask(encodeTask, HBConfigurationFactory.Create(), this.ScannedSource);\r
ThreadPool.QueueUserWorkItem(this.CreatePreview, task);\r
}\r
\r
/// <summary>\r
/// Setup this window for a new source\r
/// </summary>\r
+ /// <param name="source">\r
+ /// The source.\r
+ /// </param>\r
/// <param name="title">\r
/// The title.\r
/// </param>\r
/// <param name="task">\r
/// The task.\r
/// </param>\r
- public void SetSource(Title title, Preset preset, EncodeTask task)\r
+ public void SetSource(Source source, Title title, Preset preset, EncodeTask task)\r
{\r
this.SourceTracks.Clear();\r
this.SourceTracks.Add(ForeignAudioSearchTrack);\r
/// <summary>\r
/// Setup this window for a new source\r
/// </summary>\r
+ /// <param name="source">\r
+ /// The source.\r
+ /// </param>\r
/// <param name="title">\r
/// The title.\r
/// </param>\r
/// <param name="task">\r
/// The task.\r
/// </param>\r
- public void SetSource(Title title, Preset preset, EncodeTask task)\r
+ public void SetSource(Source source, Title title, Preset preset, EncodeTask task)\r
{\r
this.Task = task;\r
}\r
/// <summary>\r
/// Setup this window for a new source\r
/// </summary>\r
+ /// <param name="source">\r
+ /// The source.\r
+ /// </param>\r
/// <param name="title">\r
/// The title.\r
/// </param>\r
/// <param name="task">\r
/// The task.\r
/// </param>\r
- public void SetSource(Title title, Preset preset, EncodeTask task)\r
+ public void SetSource(Source source, Title title, Preset preset, EncodeTask task)\r
{\r
this.Task = task;\r
this.NotifyOfPropertyChange(() => this.AdvancedOptionsString);\r