Skip to content

Commit d99eeec

Browse files
committed
Added optional Average FPS column for the Completed tab.
1 parent 806fcf5 commit d99eeec

File tree

7 files changed

+20
-4
lines changed

7 files changed

+20
-4
lines changed

VidCoder/Model/EncodeResult.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ public class EncodeResult
2121

2222
public TimeSpan EncodeTime { get; set; }
2323

24-
public TimeSpan PauseTime { get; set; }
25-
2624
public string LogPath { get; set; }
25+
2726
public long SizeBytes { get; set; }
2827

2928
public bool Succeeded

VidCoder/Resources/CommonRes.Designer.cs

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VidCoder/Resources/CommonRes.resx

+3
Original file line numberDiff line numberDiff line change
@@ -374,4 +374,7 @@ A full copy of the GNU General Public License has been included along with this
374374
<data name="CompletedColumnNamePauseTime" xml:space="preserve">
375375
<value>Pause time</value>
376376
</data>
377+
<data name="CompletedColumnNameAverageFps" xml:space="preserve">
378+
<value>Average FPS</value>
379+
</data>
377380
</root>

VidCoder/Services/ProcessingService.cs

-1
Original file line numberDiff line numberDiff line change
@@ -2375,7 +2375,6 @@ private void OnEncodeCompleted(EncodeJobViewModel finishedJobViewModel, VCEncode
23752375
Destination = finalOutputPath,
23762376
Status = status,
23772377
EncodeTime = finishedJobViewModel.EncodeTime,
2378-
PauseTime = finishedJobViewModel.PauseTime,
23792378
LogPath = encodeLogger.LogPath,
23802379
SizeBytes = outputFileLength,
23812380
},

VidCoder/Utilities/Utilities.cs

+1
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ public static string ImageCacheFolder
314314
{"Size", 80},
315315
{"PercentOfSource", 90},
316316
{"VideoDuration", 90},
317+
{"AverageFps", 80},
317318
};
318319

319320
public static IEncodeProxy CreateEncodeProxy()

VidCoder/View/Main.xaml

+3
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@
274274
<DataTemplate x:Key="CompletedTemplateVideoDuration" DataType="viewmodel:EncodeResultViewModel">
275275
<TextBlock Style="{DynamicResource TextBlockBaseStyle}" Text="{Binding Job.DurationDisplay}" />
276276
</DataTemplate>
277+
<DataTemplate x:Key="CompletedTemplateAverageFps" DataType="viewmodel:EncodeResultViewMode">
278+
<TextBlock Style="{DynamicResource TextBlockBaseStyle}" Text="{Binding AverageFpsDisplay}" />
279+
</DataTemplate>
277280
<ContextMenu x:Key="CompletedItemContextMenu" d:DataContext="{d:DesignInstance viewmodel:EncodeResultViewModel}">
278281
<MenuItem Command="{Binding Play}" Header="{x:Static res:MainRes.Play}">
279282
<MenuItem.Icon>

VidCoder/ViewModel/DataModels/EncodeResultViewModel.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ public string StatusText
5858

5959
public string TimeDisplay => this.encodeResult.EncodeTime.FormatShort();
6060

61-
public string PauseTimeDisplay => this.encodeResult.PauseTime > TimeSpan.Zero ? this.encodeResult.PauseTime.FormatShort() : string.Empty;
61+
public string PauseTimeDisplay => this.Job.PauseTime > TimeSpan.Zero ? this.Job.PauseTime.FormatShort() : string.Empty;
62+
63+
public string AverageFpsDisplay => this.Job.AverageFps > 0 ? this.Job.AverageFps.ToString("0.0", CultureInfo.CurrentCulture) : string.Empty;
6264

6365
public string StatusImage
6466
{

0 commit comments

Comments
 (0)