From: sr55 Date: Fri, 12 Jun 2009 19:35:23 +0000 (+0000) Subject: WinGui: X-Git-Tag: 0.9.4~437 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9987f3bb7a178159687e53edc88bc55ccb5cfd3;p=handbrake WinGui: - Added support for the new subtitle information in the log format. Will deal with the new GUI elements later. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2525 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj index 8e294d90d..d0082e299 100644 --- a/win/C#/HandBrakeCS.csproj +++ b/win/C#/HandBrakeCS.csproj @@ -142,6 +142,12 @@ PictureSettings.cs + + UserControl + + + Subtitles.cs + UserControl @@ -251,6 +257,10 @@ PictureSettings.cs Designer + + Subtitles.cs + Designer + x264Panel.cs Designer diff --git a/win/C#/Parsing/Subtitle.cs b/win/C#/Parsing/Subtitle.cs index e3ff72af0..1fe45c27f 100644 --- a/win/C#/Parsing/Subtitle.cs +++ b/win/C#/Parsing/Subtitle.cs @@ -17,6 +17,8 @@ namespace Handbrake.Parsing { private string m_language; private int m_trackNumber; + private string m_type; + private string m_typecode; /// /// The track number of this Subtitle @@ -34,6 +36,24 @@ namespace Handbrake.Parsing get { return m_language; } } + /// + /// Langauage Code + /// + public string LanguageCode + { + get { return m_typecode; } + } + + + /// + /// Subtitle Type + /// + public string Type + { + get { return m_type; } + } + + /// /// Override of the ToString method to make this object easier to use in the UI /// @@ -47,13 +67,15 @@ namespace Handbrake.Parsing { string curLine = output.ReadLine(); - Match m = Regex.Match(curLine, @"^ \+ ([0-9]*), ([A-Za-z, ]*) \((.*)\)"); + Match m = Regex.Match(curLine, @"^ \+ ([0-9]*), ([A-Za-z, ]*) \((.*)\) \(([a-zA-Z]*)\)"); if (m.Success && !curLine.Contains("HandBrake has exited.")) { var thisSubtitle = new Subtitle { m_trackNumber = int.Parse(m.Groups[1].Value.Trim()), - m_language = m.Groups[2].Value + m_language = m.Groups[2].Value, + m_typecode = m.Groups[3].Value, + m_type = m.Groups[4].Value }; return thisSubtitle; }