diff options
Diffstat (limited to 'win/C#/Parsing/Title.cs')
-rw-r--r-- | win/C#/Parsing/Title.cs | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/win/C#/Parsing/Title.cs b/win/C#/Parsing/Title.cs index 69afe3e90..e79dd72bd 100644 --- a/win/C#/Parsing/Title.cs +++ b/win/C#/Parsing/Title.cs @@ -28,7 +28,8 @@ namespace Handbrake.Parsing private TimeSpan m_duration;
private Size m_resolution;
private int m_titleNumber;
-
+ private Size m_parVal;
+
/// <summary>
/// The constructor for this object
/// </summary>
@@ -96,6 +97,14 @@ namespace Handbrake.Parsing }
/// <summary>
+ /// Par Value
+ /// </summary>
+ public Size ParVal
+ {
+ get { return m_parVal; }
+ }
+
+ /// <summary>
/// The automatically detected crop region for this Title.
/// This is an int array with 4 items in it as so:
/// 0:
@@ -163,11 +172,16 @@ namespace Handbrake.Parsing // Get resolution, aspect ratio and FPS for this title
m = Regex.Match(output.ReadLine(),
- @"^ \+ size: ([0-9]*)x([0-9]*), aspect: ([0-9]*\.[0-9]*), ([0-9]*\.[0-9]*) fps");
+ @"^ \+ size: ([0-9]*)x([0-9]*), pixel aspect: ([0-9]*)/([0-9]*), display aspect: ([0-9]*\.[0-9]*), ([0-9]*\.[0-9]*) fps");
+ //size: 720x576, pixel aspect: 16/15, display aspect: 1.33, 25.000 fps
+
+
+
if (m.Success)
{
thisTitle.m_resolution = new Size(int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value));
- thisTitle.m_aspectRatio = float.Parse(m.Groups[3].Value, Culture);
+ thisTitle.m_parVal = new Size(int.Parse(m.Groups[3].Value), int.Parse(m.Groups[4].Value));
+ thisTitle.m_aspectRatio = float.Parse(m.Groups[5].Value, Culture);
}
// Get autocrop region for this title
|