summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs4
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs39
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs10
-rw-r--r--win/CS/HandBrakeWPF/Constants.cs12
-rw-r--r--win/CS/HandBrakeWPF/Services/UpdateService.cs10
5 files changed, 59 insertions, 16 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
index 57e4bfd71..27e3b039d 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs
@@ -127,7 +127,7 @@ namespace HandBrake.ApplicationServices.Services
// We have to scan the source again but only the title so the HandBrake instance is initialised correctly.
// Since the UI sends the crop params down, we don't have to do all the previews.
- instance.StartScan(job.Task.Source, 1, job.Task.Title);
+ instance.StartScan(job.Task.Source, job.Configuration.PreviewScanCount, job.Task.Title);
instance.ScanCompleted += delegate
{
@@ -201,7 +201,7 @@ namespace HandBrake.ApplicationServices.Services
EncodeJob encodeJob = InteropModelCreator.GetEncodeJob(job);
// Start the Encode
- instance.StartEncode(encodeJob);
+ instance.StartEncode(encodeJob, job.Configuration.PreviewScanCount);
// Fire the Encode Started Event
this.InvokeEncodeStarted(EventArgs.Empty);
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
/// <summary>
/// Starts an encode with the given job.
/// </summary>
- /// <param name="jobToStart">The job to start.</param>
- public void StartEncode(EncodeJob jobToStart)
+ /// <param name="jobToStart">
+ /// The job to start.
+ /// </param>
+ /// <param name="scanPreviewCount">
+ /// The scan Preview Count.
+ /// </param>
+ public void StartEncode(EncodeJob jobToStart, int scanPreviewCount)
{
- this.StartEncode(jobToStart, false, 0, 0, 0);
+ this.StartEncode(jobToStart, false, 0, 0, 0, scanPreviewCount);
}
/// <summary>
/// Starts an encode with the given job.
/// </summary>
- /// <param name="job">The job to start.</param>
- /// <param name="preview">True if this is a preview encode.</param>
- /// <param name="previewNumber">The preview number to start the encode at (0-based).</param>
- /// <param name="previewSeconds">The number of seconds in the preview.</param>
- /// <param name="overallSelectedLengthSeconds">The currently selected encode length. Used in preview
- /// for calculating bitrate when the target size would be wrong.</param>
- public void StartEncode(EncodeJob job, bool preview, int previewNumber, int previewSeconds, double overallSelectedLengthSeconds)
+ /// <param name="job">
+ /// The job to start.
+ /// </param>
+ /// <param name="preview">
+ /// True if this is a preview encode.
+ /// </param>
+ /// <param name="previewNumber">
+ /// The preview number to start the encode at (0-based).
+ /// </param>
+ /// <param name="previewSeconds">
+ /// The number of seconds in the preview.
+ /// </param>
+ /// <param name="overallSelectedLengthSeconds">
+ /// The currently selected encode length. Used in preview
+ /// for calculating bitrate when the target size would be wrong.
+ /// </param>
+ /// <param name="scanPreviewCount">
+ /// The scan Preview Count.
+ /// </param>
+ 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
/// <param name="jobToStart">
/// The job to start.
/// </param>
- void StartEncode(EncodeJob jobToStart);
+ /// <param name="scanPreviewCount">
+ /// The scan Preview Count.
+ /// </param>
+ void StartEncode(EncodeJob jobToStart, int scanPreviewCount);
/// <summary>
/// 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.
/// </param>
+ /// <param name="scanPreviewCount">
+ /// The scan Preview Count.
+ /// </param>
void StartEncode(
- EncodeJob job, bool preview, int previewNumber, int previewSeconds, double overallSelectedLengthSeconds);
+ EncodeJob job, bool preview, int previewNumber, int previewSeconds, double overallSelectedLengthSeconds, int scanPreviewCount);
/// <summary>
/// Starts scanning the given path.
diff --git a/win/CS/HandBrakeWPF/Constants.cs b/win/CS/HandBrakeWPF/Constants.cs
index 36732611d..174db62ad 100644
--- a/win/CS/HandBrakeWPF/Constants.cs
+++ b/win/CS/HandBrakeWPF/Constants.cs
@@ -25,6 +25,18 @@ namespace HandBrakeWPF
public const string Appcast32 = "http://handbrake.fr/appcast.i386.xml";
/// <summary>
+ /// The appcast 32.
+ /// </summary>
+ public const string AppcastUnstable32 = "http://handbrake.fr/appcast_unstable.i386.xml";
+
+
+ /// <summary>
+ /// The appcast 32.
+ /// </summary>
+ public const string AppcastUnstable64 = "http://handbrake.fr/appcast_unstable.x86_64.xml";
+
+
+ /// <summary>
/// The any.
/// </summary>
public const string Any = "(Any)";
diff --git a/win/CS/HandBrakeWPF/Services/UpdateService.cs b/win/CS/HandBrakeWPF/Services/UpdateService.cs
index 41135743b..db94b56b0 100644
--- a/win/CS/HandBrakeWPF/Services/UpdateService.cs
+++ b/win/CS/HandBrakeWPF/Services/UpdateService.cs
@@ -14,8 +14,6 @@ namespace HandBrakeWPF.Services
using System.Net;
using System.Threading;
- using HandBrake.ApplicationServices;
- using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Model;
@@ -91,6 +89,14 @@ namespace HandBrakeWPF.Services
? Constants.Appcast64
: Constants.Appcast32;
+ if (VersionHelper.IsNightly())
+ {
+ url =
+ VersionHelper.Is64Bit()
+ ? Constants.AppcastUnstable64
+ : Constants.AppcastUnstable32;
+ }
+
var currentBuild =
this.userSettingService.GetUserSetting<int>(UserSettingConstants.HandBrakeBuild);
var skipBuild = this.userSettingService.GetUserSetting<int>(