summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrandomengy <[email protected]>2015-06-15 01:05:43 +0000
committerrandomengy <[email protected]>2015-06-15 01:05:43 +0000
commit55ae87db22c7ca2657a29c0939cfd513bdc6c2b9 (patch)
tree1c287ac26c5f61bd0eccc13611e063629e730a3f
parentc7da1aa1bc6d130d74b87d7697ea0f8ac7964aa4 (diff)
Interop: Updated to return PassId as well as Pass on encode progress.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7297 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs13
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs3
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/HbLib/NativeConstants.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/Json/State/Working.cs15
4 files changed, 28 insertions, 5 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs b/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs
index bbb9a6d07..82003719f 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs
@@ -36,8 +36,19 @@ namespace HandBrake.ApplicationServices.Interop.EventArgs
/// </summary>
public TimeSpan EstimatedTimeLeft { get; set; }
+ /// <summary>
+ /// Gets or sets the pass ID.
+ /// </summary>
+ /// <remarks>
+ /// -1: Subtitle scan
+ /// 0: Encode
+ /// 1: Encode first pass
+ /// 2: Encode second pass
+ /// </remarks>
+ public int PassId { get; set; }
+
/// <summary>
- /// Gets or sets the current encoding pass. (-1: subtitle scan, 1: first pass, 2: second pass)
+ /// Gets or sets the current encoding pass. (1-based)
/// </summary>
public int Pass { get; set; }
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
index b44136095..62e4e1b5c 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
@@ -562,7 +562,8 @@ namespace HandBrake.ApplicationServices.Interop
FractionComplete = state.Working.Progress,
CurrentFrameRate = state.Working.Rate,
AverageFrameRate = state.Working.RateAvg,
- EstimatedTimeLeft = new TimeSpan(state.Working.Hours, state.Working.Minutes, state.Working.Seconds),
+ EstimatedTimeLeft = new TimeSpan(state.Working.Hours, state.Working.Minutes, state.Working.Seconds),
+ PassId = state.Working.PassID,
Pass = state.Working.Pass,
PassCount = state.Working.PassCount
};
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/NativeConstants.cs b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/NativeConstants.cs
index 355a023d8..80f9e33be 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/NativeConstants.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/NativeConstants.cs
@@ -31,7 +31,7 @@ namespace HandBrake.ApplicationServices.Interop.HbLib
public const uint HB_ACODEC_FDK_HAAC = 0x00800000;
public const uint HB_ACODEC_FFEAC3 = 0x01000000;
public const uint HB_ACODEC_FFTRUEHD = 0x02000000;
- public const uint HB_ACODEC_FF_MASK = 0x00FF2800;
+ public const uint HB_ACODEC_FF_MASK = 0x03FF2800;
public const uint HB_ACODEC_PASS_FLAG = 0x40000000;
public const uint HB_ACODEC_PASS_MASK = (HB_ACODEC_AC3 | HB_ACODEC_DCA | HB_ACODEC_DCA_HD | HB_ACODEC_FFAAC | HB_ACODEC_FFEAC3 | HB_ACODEC_FFFLAC | HB_ACODEC_MP3 | HB_ACODEC_FFTRUEHD);
public const uint HB_ACODEC_AUTO_PASS = (HB_ACODEC_PASS_MASK | HB_ACODEC_PASS_FLAG);
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/State/Working.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/State/Working.cs
index dfc301b10..2347eb4c2 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/Json/State/Working.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/State/Working.cs
@@ -20,12 +20,23 @@ namespace HandBrake.ApplicationServices.Interop.Json.State
public int Hours { get; set; }
/// <summary>
- /// Gets or sets the job.
+ /// Gets or sets the Pass ID.
+ /// </summary>
+ /// <remarks>
+ /// -1: Subtitle scan
+ /// 0: Encode
+ /// 1: Encode first pass
+ /// 2: Encode second pass
+ /// </remarks>
+ public int PassID { get; set; }
+
+ /// <summary>
+ /// Gets or sets the pass number (1-based).
/// </summary>
public int Pass { get; set; }
/// <summary>
- /// Gets or sets the job count.
+ /// Gets or sets the pass count.
/// </summary>
public int PassCount { get; set; }