summaryrefslogtreecommitdiffstats
path: root/win/C#/Parsing
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-06-07 23:04:05 +0000
committersr55 <[email protected]>2009-06-07 23:04:05 +0000
commit2b3ac1f2ae64e8591ffa6f3485bd131b8ff7d9ef (patch)
tree4594d79c72ac0e4f48fa69b8b260ac9128eabb16 /win/C#/Parsing
parenta4bc7d65af62d27c3b8d9a2f3c50f5938a46d9da (diff)
WinGui:
- Checkin of the new picutre settings panel (before I end up accidentally losing working code) - Modes: None, Strict and Loose work (mostly). Custom does not work (yet) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2497 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Parsing')
-rw-r--r--win/C#/Parsing/Title.cs20
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