diff options
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/Json')
17 files changed, 873 insertions, 0 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/ScanFactory.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/ScanFactory.cs new file mode 100644 index 000000000..446ae5c1b --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/ScanFactory.cs @@ -0,0 +1,255 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ScanFactory.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The scan factory.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.Factories
+{
+ using System;
+ using System.Collections.Generic;
+
+ using HandBrake.Interop.Json.Scan;
+ using HandBrake.Interop.Model;
+ using HandBrake.Interop.Model.Scan;
+
+ /// <summary>
+ /// This factory takes the JSON objects deserialized from libhb for the scan information
+ /// and converts them into the internal Title objects.
+ /// </summary>
+ internal class ScanFactory
+ {
+ /// <summary>
+ /// The create title set.
+ /// </summary>
+ /// <param name="scan">
+ /// The scan.
+ /// </param>
+ /// <returns>
+ /// The <see cref="IEnumerable"/>.
+ /// </returns>
+ internal static IEnumerable<Title> CreateTitleSet(JsonScanObject scan)
+ {
+ List<Title> titles = new List<Title>();
+
+ if (scan != null)
+ {
+ foreach (TitleList item in scan.TitleList)
+ {
+ Title title = CreateTitle(item);
+
+ if (title.TitleNumber == scan.MainFeature)
+ {
+ title.IsMainFeature = true;
+ }
+
+ titles.Add(title);
+ }
+ }
+
+ return titles;
+ }
+
+ /// <summary>
+ /// The create title.
+ /// </summary>
+ /// <param name="title">
+ /// The title.
+ /// </param>
+ /// <returns>
+ /// The <see cref="Title"/>.
+ /// </returns>
+ private static Title CreateTitle(TitleList title)
+ {
+ Title newTitle = new Title
+ {
+ TitleNumber = title.Index,
+ Playlist = title.Playlist,
+ Resolution = new Size(title.Geometry.Width, title.Geometry.Height),
+ ParVal = new Size(title.Geometry.PAR.Num, title.Geometry.PAR.Den),
+ Duration = new TimeSpan(title.Duration.Hours, title.Duration.Minutes, title.Duration.Seconds),
+ AutoCropDimensions = new Cropping
+ {
+ Top = title.Crop[0],
+ Bottom = title.Crop[1],
+ Left = title.Crop[2],
+ Right = title.Crop[3]
+ },
+ //AspectRatio = (double)title.Geometry.DAR.Width / title.Geometry.DAR.Height,
+ AngleCount = title.AngleCount,
+ VideoCodecName = title.VideoCodec,
+ Framerate = ((double)title.FrameRate.Num) / title.FrameRate.Den,
+ FramerateNumerator = title.FrameRate.Num,
+ FramerateDenominator = title.FrameRate.Den,
+ Path = title.Path
+ };
+
+ switch (title.Type)
+ {
+ case 2:
+ newTitle.InputType = InputType.Stream;
+ break;
+ case 0:
+ newTitle.InputType = InputType.Dvd;
+ break;
+ case 1:
+ newTitle.InputType = InputType.Bluray;
+ break;
+ case 3:
+ newTitle.InputType = InputType.FFStream;
+ break;
+ }
+
+ foreach (Subtitle subtitleTrack in CreateSubtitleTracks(title.SubtitleList))
+ {
+ newTitle.Subtitles.Add(subtitleTrack);
+ }
+
+ foreach (AudioTrack audioTrack in CreateAudioTracks(title.AudioList))
+ {
+ newTitle.AudioTracks.Add(audioTrack);
+ }
+
+ foreach (Chapter chapter in CreateChapters(title.ChapterList))
+ {
+ newTitle.Chapters.Add(chapter);
+ }
+
+ return newTitle;
+ }
+
+ /// <summary>
+ /// The create subtitle tracks.
+ /// </summary>
+ /// <param name="subtitles">
+ /// The subtitles.
+ /// </param>
+ /// <returns>
+ /// The <see cref="IEnumerable"/>.
+ /// </returns>
+ private static IEnumerable<Subtitle> CreateSubtitleTracks(IEnumerable<SubtitleList> subtitles)
+ {
+ List<Subtitle> subtiles = new List<Subtitle>();
+
+ int currentSubtitleTrack = 1;
+ foreach (SubtitleList subtitle in subtitles)
+ {
+ Subtitle newSubtitle = new Subtitle
+ {
+ TrackNumber = currentSubtitleTrack,
+ Language = subtitle.Language,
+ LanguageCode = subtitle.LanguageCode,
+ SubtitleSourceInt = subtitle.Source,
+ // SubtitleSource = null,
+ };
+
+
+ //switch (subtitle.subsource)
+ //{
+ // case hb_subtitle_s_subsource.CC608SUB:
+ // newSubtitle.SubtitleSource = SubtitleSource.CC608;
+ // break;
+ // case hb_subtitle_s_subsource.CC708SUB:
+ // newSubtitle.SubtitleSource = SubtitleSource.CC708;
+ // break;
+ // case hb_subtitle_s_subsource.SRTSUB:
+ // newSubtitle.SubtitleSource = SubtitleSource.SRT;
+ // break;
+ // case hb_subtitle_s_subsource.SSASUB:
+ // newSubtitle.SubtitleSource = SubtitleSource.SSA;
+ // break;
+ // case hb_subtitle_s_subsource.TX3GSUB:
+ // newSubtitle.SubtitleSource = SubtitleSource.TX3G;
+ // break;
+ // case hb_subtitle_s_subsource.UTF8SUB:
+ // newSubtitle.SubtitleSource = SubtitleSource.UTF8;
+ // break;
+ // case hb_subtitle_s_subsource.VOBSUB:
+ // newSubtitle.SubtitleSource = SubtitleSource.VobSub;
+ // break;
+ // case hb_subtitle_s_subsource.PGSSUB:
+ // newSubtitle.SubtitleSource = SubtitleSource.PGS;
+ // break;
+ // default:
+ // break;
+ //}
+
+ subtiles.Add(newSubtitle);
+
+ currentSubtitleTrack++;
+ }
+
+ return subtiles;
+ }
+
+ /// <summary>
+ /// The create audio tracks.
+ /// </summary>
+ /// <param name="audioTracks">
+ /// The audio tracks.
+ /// </param>
+ /// <returns>
+ /// The <see cref="IEnumerable"/>.
+ /// </returns>
+ private static IEnumerable<AudioTrack> CreateAudioTracks(IEnumerable<AudioList> audioTracks)
+ {
+ List<AudioTrack> tracks = new List<AudioTrack>();
+
+ int currentAudioTrack = 1;
+ foreach (AudioList track in audioTracks)
+ {
+ AudioTrack newAudio = new AudioTrack
+ {
+ TrackNumber = currentAudioTrack,
+ // CodecParam = audio.config.input.codec_param,
+ // CodecId = audio.config.input.codec,
+ Language = track.Language,
+ LanguageCode = track.LanguageCode,
+ Description = track.Description,
+ ChannelLayout = (ulong)track.ChannelLayout,
+ SampleRate = track.SampleRate,
+ Bitrate = track.BitRate
+ };
+
+ tracks.Add(newAudio);
+
+ currentAudioTrack++;
+ }
+ return tracks;
+ }
+
+ /// <summary>
+ /// The create chapters.
+ /// </summary>
+ /// <param name="chapters">
+ /// The chapters.
+ /// </param>
+ /// <returns>
+ /// The <see cref="IEnumerable"/>.
+ /// </returns>
+ private static IEnumerable<Chapter> CreateChapters(IEnumerable<ChapterList> chapters)
+ {
+ List<Chapter> tracks = new List<Chapter>();
+
+ int currentTrack = 1;
+ foreach (ChapterList chapter in chapters)
+ {
+ Chapter newChapter = new Chapter
+ {
+ Name = chapter.Name,
+ ChapterNumber = currentTrack,
+ Duration = new TimeSpan(chapter.Duration.Hours, chapter.Duration.Minutes, chapter.Duration.Seconds),
+ // DurationPts = chapter.duration
+ };
+
+ tracks.Add(newChapter);
+ currentTrack++;
+ }
+
+ return tracks;
+ }
+ }
+}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/AudioList.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/AudioList.cs new file mode 100644 index 000000000..b91511cfc --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/AudioList.cs @@ -0,0 +1,47 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AudioList.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The audio list.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.Scan
+{
+ /// <summary>
+ /// The audio list.
+ /// </summary>
+ internal class AudioList
+ {
+ /// <summary>
+ /// Gets or sets the bit rate.
+ /// </summary>
+ public int BitRate { get; set; }
+
+ /// <summary>
+ /// Gets or sets the channel layout.
+ /// </summary>
+ public int ChannelLayout { get; set; }
+
+ /// <summary>
+ /// Gets or sets the description.
+ /// </summary>
+ public string Description { get; set; }
+
+ /// <summary>
+ /// Gets or sets the language.
+ /// </summary>
+ public string Language { get; set; }
+
+ /// <summary>
+ /// Gets or sets the language code.
+ /// </summary>
+ public string LanguageCode { get; set; }
+
+ /// <summary>
+ /// Gets or sets the sample rate.
+ /// </summary>
+ public int SampleRate { get; set; }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/ChapterList.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/ChapterList.cs new file mode 100644 index 000000000..b5573268a --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/ChapterList.cs @@ -0,0 +1,27 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ChapterList.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The chapter list.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.Scan
+{
+ /// <summary>
+ /// The chapter list.
+ /// </summary>
+ internal class ChapterList
+ {
+ /// <summary>
+ /// Gets or sets the duration.
+ /// </summary>
+ public Duration2 Duration { get; set; }
+
+ /// <summary>
+ /// Gets or sets the name.
+ /// </summary>
+ public string Name { get; set; }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/Color.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/Color.cs new file mode 100644 index 000000000..5b162bd3c --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/Color.cs @@ -0,0 +1,32 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Color.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The color.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.Scan
+{
+ /// <summary>
+ /// The color.
+ /// </summary>
+ internal class Color
+ {
+ /// <summary>
+ /// Gets or sets the matrix.
+ /// </summary>
+ public int Matrix { get; set; }
+
+ /// <summary>
+ /// Gets or sets the primary.
+ /// </summary>
+ public int Primary { get; set; }
+
+ /// <summary>
+ /// Gets or sets the transfer.
+ /// </summary>
+ public int Transfer { get; set; }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/Duration.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/Duration.cs new file mode 100644 index 000000000..ac7f0b083 --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/Duration.cs @@ -0,0 +1,37 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Duration.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The duration.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.Scan
+{
+ /// <summary>
+ /// The duration.
+ /// </summary>
+ internal class Duration
+ {
+ /// <summary>
+ /// Gets or sets the hours.
+ /// </summary>
+ public int Hours { get; set; }
+
+ /// <summary>
+ /// Gets or sets the minutes.
+ /// </summary>
+ public int Minutes { get; set; }
+
+ /// <summary>
+ /// Gets or sets the seconds.
+ /// </summary>
+ public int Seconds { get; set; }
+
+ /// <summary>
+ /// Gets or sets the ticks.
+ /// </summary>
+ public int Ticks { get; set; }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/Duration2.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/Duration2.cs new file mode 100644 index 000000000..54471780d --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/Duration2.cs @@ -0,0 +1,37 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Duration2.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The duration 2.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.Scan
+{
+ /// <summary>
+ /// The duration 2.
+ /// </summary>
+ internal class Duration2
+ {
+ /// <summary>
+ /// Gets or sets the hours.
+ /// </summary>
+ public int Hours { get; set; }
+
+ /// <summary>
+ /// Gets or sets the minutes.
+ /// </summary>
+ public int Minutes { get; set; }
+
+ /// <summary>
+ /// Gets or sets the seconds.
+ /// </summary>
+ public int Seconds { get; set; }
+
+ /// <summary>
+ /// Gets or sets the ticks.
+ /// </summary>
+ public int Ticks { get; set; }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/FrameRate.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/FrameRate.cs new file mode 100644 index 000000000..0ecdbd69c --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/FrameRate.cs @@ -0,0 +1,28 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="FrameRate.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The frame rate.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.Scan
+{
+ /// <summary>
+ /// The frame rate.
+ /// </summary>
+ internal class FrameRate
+ {
+
+ /// <summary>
+ /// Gets or sets the den.
+ /// </summary>
+ public int Den { get; set; }
+
+ /// <summary>
+ /// Gets or sets the num.
+ /// </summary>
+ public int Num { get; set; }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/Geometry.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/Geometry.cs new file mode 100644 index 000000000..414a07a0c --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/Geometry.cs @@ -0,0 +1,32 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Geometry.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The geometry.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.Scan
+{
+ /// <summary>
+ /// The geometry.
+ /// </summary>
+ internal class Geometry
+ {
+ /// <summary>
+ /// Gets or sets the height.
+ /// </summary>
+ public int Height { get; set; }
+
+ /// <summary>
+ /// Gets or sets the par.
+ /// </summary>
+ public PAR PAR { get; set; }
+
+ /// <summary>
+ /// Gets or sets the width.
+ /// </summary>
+ public int Width { get; set; }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/JsonScanObject.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/JsonScanObject.cs new file mode 100644 index 000000000..74fb03977 --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/JsonScanObject.cs @@ -0,0 +1,29 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="JsonScanObject.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The root object.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.Scan
+{
+ using System.Collections.Generic;
+
+ /// <summary>
+ /// The root object.
+ /// </summary>
+ internal class JsonScanObject
+ {
+ /// <summary>
+ /// Gets or sets the main feature.
+ /// </summary>
+ public int MainFeature { get; set; }
+
+ /// <summary>
+ /// Gets or sets the title list.
+ /// </summary>
+ public List<TitleList> TitleList { get; set; }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/MetaData.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/MetaData.cs new file mode 100644 index 000000000..5b5545bba --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/MetaData.cs @@ -0,0 +1,18 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="MetaData.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The meta data.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.Scan
+{
+ /// <summary>
+ /// The meta data.
+ /// </summary>
+ internal class MetaData
+ {
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/PAR.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/PAR.cs new file mode 100644 index 000000000..ef7e55020 --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/PAR.cs @@ -0,0 +1,27 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PAR.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The par.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.Scan
+{
+ /// <summary>
+ /// The par.
+ /// </summary>
+ internal class PAR
+ {
+ /// <summary>
+ /// Gets or sets the height.
+ /// </summary>
+ public int Num { get; set; }
+
+ /// <summary>
+ /// Gets or sets the width.
+ /// </summary>
+ public int Den { get; set; }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/SubtitleList.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/SubtitleList.cs new file mode 100644 index 000000000..dcc73869d --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/SubtitleList.cs @@ -0,0 +1,37 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="SubtitleList.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The subtitle list.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.Scan
+{
+ /// <summary>
+ /// The subtitle list.
+ /// </summary>
+ internal class SubtitleList
+ {
+ /// <summary>
+ /// Gets or sets the format.
+ /// </summary>
+ public int Format { get; set; }
+
+ /// <summary>
+ /// Gets or sets the language.
+ /// </summary>
+ public string Language { get; set; }
+
+ /// <summary>
+ /// Gets or sets the language code.
+ /// </summary>
+ public string LanguageCode { get; set; }
+
+ /// <summary>
+ /// Gets or sets the source.
+ /// </summary>
+ public int Source { get; set; }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/TitleList.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/TitleList.cs new file mode 100644 index 000000000..c65962c66 --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Scan/TitleList.cs @@ -0,0 +1,104 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="TitleList.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The title list.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.Scan
+{
+ using System.Collections.Generic;
+
+ /// <summary>
+ /// The title list.
+ /// </summary>
+ internal class TitleList
+ {
+ /// <summary>
+ /// Gets or sets the angle count.
+ /// </summary>
+ public int AngleCount { get; set; }
+
+ /// <summary>
+ /// Gets or sets the audio list.
+ /// </summary>
+ public List<AudioList> AudioList { get; set; }
+
+ /// <summary>
+ /// Gets or sets the chapter list.
+ /// </summary>
+ public List<ChapterList> ChapterList { get; set; }
+
+ /// <summary>
+ /// Gets or sets the color.
+ /// </summary>
+ public Color Color { get; set; }
+
+ /// <summary>
+ /// Gets or sets the cropping values
+ /// </summary>
+ public List<int> Crop { get; set; }
+
+ /// <summary>
+ /// Gets or sets the duration.
+ /// </summary>
+ public Duration Duration { get; set; }
+
+ /// <summary>
+ /// Gets or sets the frame rate.
+ /// </summary>
+ public FrameRate FrameRate { get; set; }
+
+ /// <summary>
+ /// Gets or sets the geometry.
+ /// </summary>
+ public Geometry Geometry { get; set; }
+
+ /// <summary>
+ /// Gets or sets the index.
+ /// </summary>
+ public int Index { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether interlace detected.
+ /// </summary>
+ public bool InterlaceDetected { get; set; }
+
+ /// <summary>
+ /// Gets or sets the meta data.
+ /// </summary>
+ public MetaData MetaData { get; set; }
+
+ /// <summary>
+ /// Gets or sets the name.
+ /// </summary>
+ public string Name { get; set; }
+
+ /// <summary>
+ /// Gets or sets the path.
+ /// </summary>
+ public string Path { get; set; }
+
+ /// <summary>
+ /// Gets or sets the playlist.
+ /// </summary>
+ public int Playlist { get; set; }
+
+ /// <summary>
+ /// Gets or sets the subtitle list.
+ /// </summary>
+ public List<SubtitleList> SubtitleList { get; set; }
+
+ /// <summary>
+ /// Gets or sets the type.
+ /// </summary>
+ public int Type { get; set; }
+
+ /// <summary>
+ /// Gets or sets the video codec.
+ /// </summary>
+ public string VideoCodec { get; set; }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/State/JsonState.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/State/JsonState.cs new file mode 100644 index 000000000..3671fe866 --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/State/JsonState.cs @@ -0,0 +1,37 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="JsonState.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The hand brake state.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.State
+{
+ /// <summary>
+ /// The hand brake state.
+ /// </summary>
+ public class JsonState
+ {
+ /// <summary>
+ /// Gets or sets the scanning.
+ /// </summary>
+ public Scanning Scanning { get; set; }
+
+ /// <summary>
+ /// Gets or sets the working.
+ /// </summary>
+ public Working Working { get; set; }
+
+ /// <summary>
+ /// Gets or sets the work done.
+ /// </summary>
+ public WorkDone WorkDone { get; set; }
+
+ /// <summary>
+ /// Gets or sets the state.
+ /// </summary>
+ public int State { get; set; }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/State/Scanning.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/State/Scanning.cs new file mode 100644 index 000000000..af1aae793 --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/State/Scanning.cs @@ -0,0 +1,42 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Scanning.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The scanning.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.State
+{
+ /// <summary>
+ /// The scanning.
+ /// </summary>
+ public class Scanning
+ {
+ /// <summary>
+ /// Gets or sets the preview.
+ /// </summary>
+ public int Preview { get; set; }
+
+ /// <summary>
+ /// Gets or sets the preview count.
+ /// </summary>
+ public int PreviewCount { get; set; }
+
+ /// <summary>
+ /// Gets or sets the progress.
+ /// </summary>
+ public double Progress { get; set; }
+
+ /// <summary>
+ /// Gets or sets the title.
+ /// </summary>
+ public int Title { get; set; }
+
+ /// <summary>
+ /// Gets or sets the title count.
+ /// </summary>
+ public int TitleCount { get; set; }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/State/WorkDone.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/State/WorkDone.cs new file mode 100644 index 000000000..95093c50a --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/State/WorkDone.cs @@ -0,0 +1,22 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="WorkDone.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The work done.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.State
+{
+ /// <summary>
+ /// The work done.
+ /// </summary>
+ public class WorkDone
+ {
+ /// <summary>
+ /// Gets or sets the error.
+ /// </summary>
+ public int Error { get; set; }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/State/Working.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/State/Working.cs new file mode 100644 index 000000000..ff781c093 --- /dev/null +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/State/Working.cs @@ -0,0 +1,62 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Working.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The working.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Json.State
+{
+ /// <summary>
+ /// The working.
+ /// </summary>
+ public class Working
+ {
+ /// <summary>
+ /// Gets or sets the hours.
+ /// </summary>
+ public int Hours { get; set; }
+
+ /// <summary>
+ /// Gets or sets the job.
+ /// </summary>
+ public int Job { get; set; }
+
+ /// <summary>
+ /// Gets or sets the job count.
+ /// </summary>
+ public int JobCount { get; set; }
+
+ /// <summary>
+ /// Gets or sets the minutes.
+ /// </summary>
+ public int Minutes { get; set; }
+
+ /// <summary>
+ /// Gets or sets the progress.
+ /// </summary>
+ public double Progress { get; set; }
+
+ /// <summary>
+ /// Gets or sets the rate.
+ /// </summary>
+ public double Rate { get; set; }
+
+ /// <summary>
+ /// Gets or sets the rate avg.
+ /// </summary>
+ public double RateAvg { get; set; }
+
+ /// <summary>
+ /// Gets or sets the seconds.
+ /// </summary>
+ public int Seconds { get; set; }
+
+ /// <summary>
+ /// Gets or sets the sequence id.
+ /// </summary>
+ public int SequenceID { get; set; }
+ }
+}
\ No newline at end of file |