From dd8f04643a07579efa2b3ad78b71feeb68d0db43 Mon Sep 17 00:00:00 2001 From: sr55 Date: Tue, 16 Jul 2019 21:01:03 +0100 Subject: WinGui: Support Encode Time in days. #523 --- win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs | 4 ++-- win/CS/HandBrake.Interop/Interop/Json/State/Working.cs | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'win/CS') diff --git a/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs index 139a62e8d..c11340ee9 100644 --- a/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs @@ -463,8 +463,8 @@ namespace HandBrake.Interop.Interop { if (this.EncodeProgress != null) { - var progressEventArgs = new EncodeProgressEventArgs(state.Working.Progress, state.Working.Rate, state.Working.RateAvg, new TimeSpan(state.Working.Hours, state.Working.Minutes, state.Working.Seconds), - state.Working.PassID, state.Working.Pass, state.Working.PassCount, taskState.Code); + TimeSpan eta = TimeSpan.FromSeconds(state.Working.ETASeconds); + var progressEventArgs = new EncodeProgressEventArgs(state.Working.Progress, state.Working.Rate, state.Working.RateAvg, eta, state.Working.PassID, state.Working.Pass, state.Working.PassCount, taskState.Code); this.EncodeProgress(this, progressEventArgs); } diff --git a/win/CS/HandBrake.Interop/Interop/Json/State/Working.cs b/win/CS/HandBrake.Interop/Interop/Json/State/Working.cs index a1b7fb0e5..4e5060031 100644 --- a/win/CS/HandBrake.Interop/Interop/Json/State/Working.cs +++ b/win/CS/HandBrake.Interop/Interop/Json/State/Working.cs @@ -69,5 +69,10 @@ namespace HandBrake.Interop.Interop.Json.State /// Gets or sets the sequence id. /// public int SequenceID { get; set; } + + /// + /// Gets total time remaining in seconds. + /// + public int ETASeconds { get; set; } } } \ No newline at end of file -- cgit v1.2.3