1 /* Source.cs $ This file is part of the HandBrake source code.
\r
2 Homepage: <http://handbrake.fr>.
\r
3 It may be used under the terms of the GNU General Public License. */
\r
5 namespace HandBrake.ApplicationServices.Parsing
\r
7 using System.Collections.Generic;
\r
11 /// An object representing a scanned DVD
\r
16 /// Initializes a new instance of the <see cref="Source"/> class.
\r
17 /// Default constructor for this object
\r
21 Titles = new List<Title>();
\r
25 /// Gets or sets Titles. A list of titles from the source
\r
27 public List<Title> Titles { get; set; }
\r
30 /// Parse the StreamReader output into a List of Titles
\r
32 /// <param name="output">
\r
36 /// A DVD object which contains a list of title inforamtion
\r
38 public static Source Parse(StreamReader output)
\r
40 var thisDVD = new Source();
\r
42 while (!output.EndOfStream)
\r
44 if ((char) output.Peek() == '+')
\r
45 thisDVD.Titles.AddRange(Title.ParseList(output.ReadToEnd()));
\r