summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/C#/HandBrake.ApplicationServices/Parsing/AudioTrack.cs63
-rw-r--r--win/C#/HandBrake.ApplicationServices/Parsing/Chapter.cs25
-rw-r--r--win/C#/HandBrake.ApplicationServices/Parsing/Subtitle.cs39
-rw-r--r--win/C#/HandBrake.ApplicationServices/Parsing/Title.cs121
4 files changed, 48 insertions, 200 deletions
diff --git a/win/C#/HandBrake.ApplicationServices/Parsing/AudioTrack.cs b/win/C#/HandBrake.ApplicationServices/Parsing/AudioTrack.cs
index 0272a96af..55cf524a5 100644
--- a/win/C#/HandBrake.ApplicationServices/Parsing/AudioTrack.cs
+++ b/win/C#/HandBrake.ApplicationServices/Parsing/AudioTrack.cs
@@ -15,14 +15,14 @@ namespace HandBrake.ApplicationServices.Parsing
public class AudioTrack
{
/// <summary>
- /// Gets The track number of this Audio Track
+ /// Gets or sets The track number of this Audio Track
/// </summary>
- public int TrackNumber { get; private set; }
+ public int TrackNumber { get; set; }
/// <summary>
- /// Gets The language (if detected) of this Audio Track
+ /// Gets or sets The language (if detected) of this Audio Track
/// </summary>
- public string Language { get; private set; }
+ public string Language { get; set; }
/// <summary>
/// Gets or sets LanguageCode.
@@ -35,62 +35,19 @@ namespace HandBrake.ApplicationServices.Parsing
public string Description { get; set; }
/// <summary>
- /// Gets The primary format of this Audio Track
+ /// Gets or sets The primary format of this Audio Track
/// </summary>
- public string Format { get; private set; }
+ public string Format { get; set; }
/// <summary>
- /// Gets The frequency (in MHz) of this Audio Track
+ /// Gets or sets The frequency (in MHz) of this Audio Track
/// </summary>
- public int SampleRate { get; private set; }
+ public int SampleRate { get; set; }
/// <summary>
- /// Gets The bitrate (in kbps) of this Audio Track
+ /// Gets or sets The bitrate (in kbps) of this Audio Track
/// </summary>
- public int Bitrate { get; private set; }
-
- /// <summary>
- /// Create a new Audio Track object
- /// </summary>
- /// <param name="track">
- /// The track.
- /// </param>
- /// <param name="lang">
- /// The lang.
- /// </param>
- /// <param name="langCode">
- /// The lang code.
- /// </param>
- /// <param name="desc">
- /// The desc.
- /// </param>
- /// <param name="format">
- /// The format.
- /// </param>
- /// <param name="samplerate">
- /// The samplerate.
- /// </param>
- /// <param name="bitrate">
- /// The bitrate.
- /// </param>
- /// <returns>
- /// A new Audio Track
- /// </returns>
- public static AudioTrack CreateAudioTrack(int track, string lang, string langCode, string desc, string format, int samplerate, int bitrate)
- {
- AudioTrack newTrack = new AudioTrack
- {
- TrackNumber = track,
- Language = lang,
- LanguageCode = langCode,
- Description = desc,
- Format = format,
- SampleRate = samplerate,
- Bitrate = bitrate
- };
-
- return newTrack;
- }
+ public int Bitrate { get; set; }
/// <summary>
/// Parse the CLI input to an Audio Track object
diff --git a/win/C#/HandBrake.ApplicationServices/Parsing/Chapter.cs b/win/C#/HandBrake.ApplicationServices/Parsing/Chapter.cs
index b39f2baa4..0545dd1d5 100644
--- a/win/C#/HandBrake.ApplicationServices/Parsing/Chapter.cs
+++ b/win/C#/HandBrake.ApplicationServices/Parsing/Chapter.cs
@@ -16,31 +16,14 @@ namespace HandBrake.ApplicationServices.Parsing
public class Chapter
{
/// <summary>
- /// Gets The number of this Chapter, in regards to it's parent Title
+ /// Gets or sets The number of this Chapter, in regards to it's parent Title
/// </summary>
- public int ChapterNumber { get; private set; }
+ public int ChapterNumber { get; set; }
/// <summary>
- /// Gets The length in time this Chapter spans
+ /// Gets or sets The length in time this Chapter spans
/// </summary>
- public TimeSpan Duration { get; private set; }
-
- /// <summary>
- /// Create a chapter Object
- /// </summary>
- /// <param name="number">
- /// The number.
- /// </param>
- /// <param name="duration">
- /// The duration.
- /// </param>
- /// <returns>
- /// A new Chapter Object
- /// </returns>
- public static Chapter CreateChapterOjbect(int number, TimeSpan duration)
- {
- return new Chapter { ChapterNumber = number, Duration = duration };
- }
+ public TimeSpan Duration { get; set; }
/// <summary>
/// Parse a CLI string to a Chapter object
diff --git a/win/C#/HandBrake.ApplicationServices/Parsing/Subtitle.cs b/win/C#/HandBrake.ApplicationServices/Parsing/Subtitle.cs
index 31ec350fa..f4cd65768 100644
--- a/win/C#/HandBrake.ApplicationServices/Parsing/Subtitle.cs
+++ b/win/C#/HandBrake.ApplicationServices/Parsing/Subtitle.cs
@@ -17,24 +17,24 @@ namespace HandBrake.ApplicationServices.Parsing
public class Subtitle
{
/// <summary>
- /// Gets the track number of this Subtitle
+ /// Gets or sets the track number of this Subtitle
/// </summary>
- public int TrackNumber { get; private set; }
+ public int TrackNumber { get; set; }
/// <summary>
- /// Gets the The language (if detected) of this Subtitle
+ /// Gets or sets the The language (if detected) of this Subtitle
/// </summary>
- public string Language { get; private set; }
+ public string Language { get; set; }
/// <summary>
- /// Gets the Langauage Code
+ /// Gets or sets the Langauage Code
/// </summary>
- public string LanguageCode { get; private set; }
+ public string LanguageCode { get; set; }
/// <summary>
- /// Gets the Subtitle Type
+ /// Gets or sets the Subtitle Type
/// </summary>
- public SubtitleType SubtitleType { get; private set; }
+ public SubtitleType SubtitleType { get; set; }
/// <summary>
/// Gets Subtitle Type
@@ -48,29 +48,6 @@ namespace HandBrake.ApplicationServices.Parsing
}
/// <summary>
- /// Create a new Subtitle Object
- /// </summary>
- /// <param name="track">
- /// The track.
- /// </param>
- /// <param name="lang">
- /// The lang.
- /// </param>
- /// <param name="langCode">
- /// The lang code.
- /// </param>
- /// <param name="type">
- /// The type.
- /// </param>
- /// <returns>
- /// A Subtitle Object
- /// </returns>
- public static Subtitle CreateSubtitleObject(int track, string lang, string langCode, SubtitleType type)
- {
- return new Subtitle { TrackNumber = track, Language = lang, LanguageCode = langCode, SubtitleType = type };
- }
-
- /// <summary>
/// Parse the input strings related to subtitles
/// </summary>
/// <param name="output">
diff --git a/win/C#/HandBrake.ApplicationServices/Parsing/Title.cs b/win/C#/HandBrake.ApplicationServices/Parsing/Title.cs
index 0e2d80f66..d402ac909 100644
--- a/win/C#/HandBrake.ApplicationServices/Parsing/Title.cs
+++ b/win/C#/HandBrake.ApplicationServices/Parsing/Title.cs
@@ -37,147 +37,78 @@ namespace HandBrake.ApplicationServices.Parsing
#region Properties
/// <summary>
- /// Gets a Collection of chapters in this Title
+ /// Gets or sets a Collection of chapters in this Title
/// </summary>
- public List<Chapter> Chapters { get; private set; }
+ public List<Chapter> Chapters { get; set; }
/// <summary>
- /// Gets a Collection of audio tracks associated with this Title
+ /// Gets or sets a Collection of audio tracks associated with this Title
/// </summary>
- public List<AudioTrack> AudioTracks { get; private set; }
+ public List<AudioTrack> AudioTracks { get; set; }
/// <summary>
- /// Gets aCollection of subtitles associated with this Title
+ /// Gets or sets a Collection of subtitles associated with this Title
/// </summary>
- public List<Subtitle> Subtitles { get; private set; }
+ public List<Subtitle> Subtitles { get; set; }
/// <summary>
- /// Gets The track number of this Title
+ /// Gets or sets The track number of this Title
/// </summary>
- public int TitleNumber { get; private set; }
+ public int TitleNumber { get; set; }
/// <summary>
- /// Gets the length in time of this Title
+ /// Gets or sets the length in time of this Title
/// </summary>
- public TimeSpan Duration { get; private set; }
+ public TimeSpan Duration { get; set; }
/// <summary>
- /// Gets the resolution (width/height) of this Title
+ /// Gets or sets the resolution (width/height) of this Title
/// </summary>
- public Size Resolution { get; private set; }
+ public Size Resolution { get; set; }
/// <summary>
- /// Gets the aspect ratio of this Title
+ /// Gets or sets the aspect ratio of this Title
/// </summary>
- public double AspectRatio { get; private set; }
+ public double AspectRatio { get; set; }
/// <summary>
- /// Gets AngleCount.
+ /// Gets or sets AngleCount.
/// </summary>
- public int AngleCount { get; private set; }
+ public int AngleCount { get; set; }
/// <summary>
- /// Gets Par Value
+ /// Gets or sets Par Value
/// </summary>
- public Size ParVal { get; private set; }
+ public Size ParVal { get; set; }
/// <summary>
- /// Gets the automatically detected crop region for this Title.
+ /// Gets or sets the automatically detected crop region for this Title.
/// This is an int array with 4 items in it as so:
/// 0: T
/// 1: B
/// 2: L
/// 3: R
/// </summary>
- public Cropping AutoCropDimensions { get; private set; }
+ public Cropping AutoCropDimensions { get; set; }
/// <summary>
- /// Gets the FPS of the source.
+ /// Gets or sets the FPS of the source.
/// </summary>
- public double Fps { get; private set; }
+ public double Fps { get; set; }
/// <summary>
- /// Gets a value indicating whether this is a MainTitle.
+ /// Gets or sets a value indicating whether this is a MainTitle.
/// </summary>
- public bool MainTitle { get; private set; }
+ public bool MainTitle { get; set; }
/// <summary>
- /// Gets the Source Name
+ /// Gets or sets the Source Name
/// </summary>
- public string SourceName { get; private set; }
+ public string SourceName { get; set; }
#endregion
/// <summary>
- /// Creates a Title
- /// </summary>
- /// <param name="angles">
- /// The angles.
- /// </param>
- /// <param name="aspectRatio">
- /// The aspect Ratio.
- /// </param>
- /// <param name="audioTracks">
- /// The audio Tracks.
- /// </param>
- /// <param name="crop">
- /// The crop.
- /// </param>
- /// <param name="chapters">
- /// The chapters.
- /// </param>
- /// <param name="duration">
- /// The duration.
- /// </param>
- /// <param name="fps">
- /// The fps.
- /// </param>
- /// <param name="mainTitle">
- /// The main Title.
- /// </param>
- /// <param name="parVal">
- /// The par Val.
- /// </param>
- /// <param name="resolution">
- /// The resolution.
- /// </param>
- /// <param name="sourceName">
- /// The source Name.
- /// </param>
- /// <param name="subtitles">
- /// The subtitles.
- /// </param>
- /// <param name="titleNumber">
- /// The title Number.
- /// </param>
- /// <returns>
- /// A Title Object
- /// </returns>
- public static Title CreateTitle(int angles, double aspectRatio, List<AudioTrack> audioTracks, Cropping crop, List<Chapter> chapters,
- TimeSpan duration, float fps, bool mainTitle, Size parVal, Size resolution, string sourceName, List<Subtitle> subtitles,
- int titleNumber)
- {
- Title title = new Title
- {
- AngleCount = angles,
- AspectRatio = aspectRatio,
- AudioTracks = audioTracks,
- AutoCropDimensions = crop,
- Chapters = chapters,
- Duration = duration,
- Fps = fps,
- MainTitle = mainTitle,
- ParVal = parVal,
- Resolution = resolution,
- SourceName = sourceName,
- Subtitles = subtitles,
- TitleNumber = titleNumber
- };
-
- return title;
- }
-
- /// <summary>
/// Parse the Title Information
/// </summary>
/// <param name="output">A stingreader of output data</param>