diff options
author | brianmario <[email protected]> | 2007-07-09 22:26:54 +0000 |
---|---|---|
committer | brianmario <[email protected]> | 2007-07-09 22:26:54 +0000 |
commit | 67570f0d1a66754708b519467443d81549841746 (patch) | |
tree | 954e91fc001ceda75d1573563bf4af2623c18b16 /win/C#/Parsing/DVD.cs | |
parent | f443f516c2f56d2b64bd1b6c050ff75801b80112 (diff) |
added new parsing code to parse cli output into objects
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@667 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Parsing/DVD.cs')
-rw-r--r-- | win/C#/Parsing/DVD.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/win/C#/Parsing/DVD.cs b/win/C#/Parsing/DVD.cs new file mode 100644 index 000000000..50751ccf2 --- /dev/null +++ b/win/C#/Parsing/DVD.cs @@ -0,0 +1,38 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+
+namespace Handbrake.Parsing
+{
+ public class DVD
+ {
+ private List<Title> m_titles;
+ public List<Title> Titles
+ {
+ get
+ {
+ return this.m_titles;
+ }
+ }
+
+ public DVD()
+ {
+ this.m_titles = new List<Title>();
+ }
+
+ public static DVD Parse(StreamReader output)
+ {
+ DVD thisDVD = new DVD();
+ while (!output.EndOfStream)
+ {
+ string curLine = output.ReadLine();
+ if (curLine.Contains("Scanning title"))
+ {
+ thisDVD.m_titles.AddRange(Title.ParseList(output));
+ }
+ }
+ return thisDVD;
+ }
+ }
+}
|