summaryrefslogtreecommitdiffstats
path: root/win/CS/Controls
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/Controls')
-rw-r--r--win/CS/Controls/AudioPanel.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs
index 471ac9d2f..5e6341641 100644
--- a/win/CS/Controls/AudioPanel.cs
+++ b/win/CS/Controls/AudioPanel.cs
@@ -8,6 +8,7 @@ namespace Handbrake.Controls
using System;
using System.Collections.Generic;
using System.ComponentModel;
+ using System.Drawing;
using System.Linq;
using System.Windows.Forms;
@@ -76,6 +77,32 @@ namespace Handbrake.Controls
}
}
+ /// <summary>
+ /// Gets the Estimated Bitrate for Tracks and Passthru Tracks
+ /// Returns a Size object (Encoded Tracks, Passthru Trask)
+ /// </summary>
+ public Size EstimatedBitrate
+ {
+ get
+ {
+ int encodedTracks = 0;
+ int passthruTracks = 0;
+ foreach (AudioTrack track in this.AudioTracks)
+ {
+ if (track.Encoder == AudioEncoder.Ac3Passthrough || track.Encoder == AudioEncoder.DtsPassthrough)
+ {
+ passthruTracks += track.ScannedTrack.Bitrate;
+ }
+ else
+ {
+ encodedTracks += track.Bitrate;
+ }
+ }
+
+ return new Size(encodedTracks, passthruTracks);
+ }
+ }
+
#endregion
#region Public Methods