From d6b1b9c0b12f4142357988f8eaffb3005ca81331 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 16 Mar 2014 19:48:02 +0000 Subject: WinGui: Fix an issue with the preview scan count not being set correctly for libhb encode path. Added Nightly appcast update checking functionality back in. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6117 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../HandBrakeInterop/HandBrakeInstance.cs | 39 ++++++++++++++++------ .../Interfaces/IHandBrakeInstance.cs | 10 ++++-- 2 files changed, 37 insertions(+), 12 deletions(-) (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop') diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs index b231d9239..d51bcfc70 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs @@ -428,22 +428,40 @@ namespace HandBrake.Interop /// /// Starts an encode with the given job. /// - /// The job to start. - public void StartEncode(EncodeJob jobToStart) + /// + /// The job to start. + /// + /// + /// The scan Preview Count. + /// + public void StartEncode(EncodeJob jobToStart, int scanPreviewCount) { - this.StartEncode(jobToStart, false, 0, 0, 0); + this.StartEncode(jobToStart, false, 0, 0, 0, scanPreviewCount); } /// /// Starts an encode with the given job. /// - /// The job to start. - /// True if this is a preview encode. - /// The preview number to start the encode at (0-based). - /// The number of seconds in the preview. - /// The currently selected encode length. Used in preview - /// for calculating bitrate when the target size would be wrong. - public void StartEncode(EncodeJob job, bool preview, int previewNumber, int previewSeconds, double overallSelectedLengthSeconds) + /// + /// The job to start. + /// + /// + /// True if this is a preview encode. + /// + /// + /// The preview number to start the encode at (0-based). + /// + /// + /// The number of seconds in the preview. + /// + /// + /// The currently selected encode length. Used in preview + /// for calculating bitrate when the target size would be wrong. + /// + /// + /// The scan Preview Count. + /// + public void StartEncode(EncodeJob job, bool preview, int previewNumber, int previewSeconds, double overallSelectedLengthSeconds, int scanPreviewCount) { EncodingProfile profile = job.EncodingProfile; if (job.ChosenAudioTracks == null) @@ -451,6 +469,7 @@ namespace HandBrake.Interop throw new ArgumentException("job.ChosenAudioTracks cannot be null."); } + this.previewCount = scanPreviewCount; this.currentJob = job; IntPtr nativeJobPtr = HBFunctions.hb_job_init_by_index(this.hbHandle, this.GetTitleIndex(job.Title)); diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs index 874fd1e23..3123a6671 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs @@ -163,7 +163,10 @@ namespace HandBrake.Interop.Interfaces /// /// The job to start. /// - void StartEncode(EncodeJob jobToStart); + /// + /// The scan Preview Count. + /// + void StartEncode(EncodeJob jobToStart, int scanPreviewCount); /// /// Starts an encode with the given job. @@ -184,8 +187,11 @@ namespace HandBrake.Interop.Interfaces /// The currently selected encode length. Used in preview /// for calculating bitrate when the target size would be wrong. /// + /// + /// The scan Preview Count. + /// void StartEncode( - EncodeJob job, bool preview, int previewNumber, int previewSeconds, double overallSelectedLengthSeconds); + EncodeJob job, bool preview, int previewNumber, int previewSeconds, double overallSelectedLengthSeconds, int scanPreviewCount); /// /// Starts scanning the given path. -- cgit v1.2.3