From cdac5d3a33743512011783afc9dd7f90c4f3a762 Mon Sep 17 00:00:00 2001 From: brianmario Date: Wed, 18 Jul 2007 17:40:13 +0000 Subject: WinGui: added some more source comments git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@710 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Parsing/AudioTrack.cs | 25 +++++++++++++++++++++++++ win/C#/Parsing/Chapter.cs | 13 +++++++++++++ win/C#/Parsing/DVD.cs | 9 +++++++++ win/C#/Parsing/Parser.cs | 4 ++++ win/C#/Parsing/Subtitle.cs | 13 +++++++++++++ win/C#/Parsing/Title.cs | 39 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 103 insertions(+) (limited to 'win/C#/Parsing') diff --git a/win/C#/Parsing/AudioTrack.cs b/win/C#/Parsing/AudioTrack.cs index 97394971b..d23d34748 100644 --- a/win/C#/Parsing/AudioTrack.cs +++ b/win/C#/Parsing/AudioTrack.cs @@ -5,9 +5,15 @@ using System.IO; namespace Handbrake.Parsing { + /// + /// An object represending an AudioTrack associated with a Title, in a DVD + /// public class AudioTrack { private int m_trackNumber; + /// + /// The track number of this Audio Track + /// public int TrackNumber { get @@ -17,6 +23,9 @@ namespace Handbrake.Parsing } private string m_language; + /// + /// The language (if detected) of this Audio Track + /// public string Language { get @@ -26,6 +35,9 @@ namespace Handbrake.Parsing } private string m_format; + /// + /// The primary format of this Audio Track + /// public string Format { get @@ -35,6 +47,9 @@ namespace Handbrake.Parsing } private string m_subFormat; + /// + /// Additional format info for this Audio Track + /// public string SubFormat { get @@ -44,6 +59,9 @@ namespace Handbrake.Parsing } private int m_frequency; + /// + /// The frequency (in MHz) of this Audio Track + /// public int Frequency { get @@ -53,6 +71,9 @@ namespace Handbrake.Parsing } private int m_bitrate; + /// + /// The bitrate (in kbps) of this Audio Track + /// public int Bitrate { get @@ -61,6 +82,10 @@ namespace Handbrake.Parsing } } + /// + /// Override of the ToString method to make this object easier to use in the UI + /// + /// A string formatted as: {track #} {language} ({format}) ({sub-format}) public override string ToString() { return string.Format("{0} {1} ({2}) ({3})", this.m_trackNumber, this.m_language, this.m_format, this.m_subFormat); diff --git a/win/C#/Parsing/Chapter.cs b/win/C#/Parsing/Chapter.cs index c74f0d56e..c824fcd68 100644 --- a/win/C#/Parsing/Chapter.cs +++ b/win/C#/Parsing/Chapter.cs @@ -5,9 +5,15 @@ using System.IO; namespace Handbrake.Parsing { + /// + /// An object representing a Chapter aosciated with a Title, in a DVD + /// public class Chapter { private int m_chapterNumber; + /// + /// The number of this Chapter, in regards to it's parent Title + /// public int ChapterNumber { get @@ -17,6 +23,9 @@ namespace Handbrake.Parsing } private TimeSpan m_duration; + /// + /// The length in time this Chapter spans + /// public TimeSpan Duration { get @@ -25,6 +34,10 @@ namespace Handbrake.Parsing } } + /// + /// Override of the ToString method to make this object easier to use in the UI + /// + /// A string formatted as: {chapter #} public override string ToString() { return this.m_chapterNumber.ToString(); diff --git a/win/C#/Parsing/DVD.cs b/win/C#/Parsing/DVD.cs index ef6586e39..1c2e0d0e7 100644 --- a/win/C#/Parsing/DVD.cs +++ b/win/C#/Parsing/DVD.cs @@ -7,9 +7,15 @@ using System.Windows.Forms; namespace Handbrake.Parsing { + /// + /// An object representing a scanned DVD + /// public class DVD { private List m_titles; + /// <summary> + /// Collection of Titles associated with this DVD + /// </summary> public List<Title> Titles { get @@ -18,6 +24,9 @@ namespace Handbrake.Parsing } } + /// <summary> + /// Default constructor for this object + /// </summary> public DVD() { this.m_titles = new List<Title>(); diff --git a/win/C#/Parsing/Parser.cs b/win/C#/Parsing/Parser.cs index 7b8b8ba68..8c3c24b3e 100644 --- a/win/C#/Parsing/Parser.cs +++ b/win/C#/Parsing/Parser.cs @@ -39,6 +39,10 @@ namespace Handbrake.Parsing /// </summary> public static event DataReadEventHandler OnReadToEnd; + /// <summary> + /// Default constructor for this object + /// </summary> + /// <param name="baseStream">The stream to parse from</param> public Parser(Stream baseStream) : base(baseStream) { this.m_buffer = string.Empty; diff --git a/win/C#/Parsing/Subtitle.cs b/win/C#/Parsing/Subtitle.cs index d91638076..66cc07843 100644 --- a/win/C#/Parsing/Subtitle.cs +++ b/win/C#/Parsing/Subtitle.cs @@ -5,9 +5,15 @@ using System.IO; namespace Handbrake.Parsing { + /// <summary> + /// An object that represents a subtitle associated with a Title, in a DVD + /// </summary> public class Subtitle { private int m_trackNumber; + /// <summary> + /// The track number of this Subtitle + /// </summary> public int TrackNumber { get @@ -17,6 +23,9 @@ namespace Handbrake.Parsing } private string m_language; + /// <summary> + /// The language (if detected) of this Subtitle + /// </summary> public string Language { get @@ -25,6 +34,10 @@ namespace Handbrake.Parsing } } + /// <summary> + /// Override of the ToString method to make this object easier to use in the UI + /// </summary> + /// <returns>A string formatted as: {track #} {language}</returns> public override string ToString() { return string.Format("{0} {1}", this.m_trackNumber, this.m_language); diff --git a/win/C#/Parsing/Title.cs b/win/C#/Parsing/Title.cs index 13795c474..6f3574f67 100644 --- a/win/C#/Parsing/Title.cs +++ b/win/C#/Parsing/Title.cs @@ -7,9 +7,15 @@ using System.Windows.Forms; namespace Handbrake.Parsing { + /// <summary> + /// An object that represents a single Title of a DVD + /// </summary> public class Title { private List<Chapter> m_chapters; + /// <summary> + /// Collection of chapters in this Title + /// </summary> public List<Chapter> Chapters { get @@ -19,6 +25,9 @@ namespace Handbrake.Parsing } private List<AudioTrack> m_audioTracks; + /// <summary> + /// Collection of audio tracks associated with this Title + /// </summary> public List<AudioTrack> AudioTracks { get @@ -28,6 +37,9 @@ namespace Handbrake.Parsing } private List<Subtitle> m_subtitles; + /// <summary> + /// Collection of subtitles associated with this Title + /// </summary> public List<Subtitle> Subtitles { get @@ -37,6 +49,9 @@ namespace Handbrake.Parsing } private int m_titleNumber; + /// <summary> + /// The track number of this Title + /// </summary> public int TitleNumber { get @@ -46,6 +61,9 @@ namespace Handbrake.Parsing } private TimeSpan m_duration; + /// <summary> + /// The length in time of this Title + /// </summary> public TimeSpan Duration { get @@ -55,6 +73,9 @@ namespace Handbrake.Parsing } private Size m_resolution; + /// <summary> + /// The resolution (width/height) of this Title + /// </summary> public Size Resolution { get @@ -64,6 +85,9 @@ namespace Handbrake.Parsing } private float m_aspectRatio; + /// <summary> + /// The aspect ratio of this Title + /// </summary> public float AspectRatio { get @@ -74,6 +98,14 @@ namespace Handbrake.Parsing private int[] m_autoCrop; + /// <summary> + /// The automatically detected crop region for this Title. + /// This is an int array with 4 items in it as so: + /// 0: + /// 1: + /// 2: + /// 3: + /// </summary> public int[] AutoCropDimensions { get @@ -82,6 +114,9 @@ namespace Handbrake.Parsing } } + /// <summary> + /// The constructor for this object + /// </summary> public Title() { this.m_audioTracks = new List<AudioTrack>(); @@ -89,6 +124,10 @@ namespace Handbrake.Parsing this.m_subtitles = new List<Subtitle>(); } + /// <summary> + /// Override of the ToString method to provide an easy way to use this object in the UI + /// </summary> + /// <returns>A string representing this track in the format: {title #} (00:00:00)</returns> public override string ToString() { return string.Format("{0} ({1:00}:{2:00}:{3:00})", this.m_titleNumber, this.m_duration.Hours, -- cgit v1.2.3