diff options
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj | 6 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filter.cs | 14 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filters.cs (renamed from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/FilterList.cs) | 18 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/JsonEncodeObject.cs | 5 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/SubtitleSearch.cs (renamed from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Search.cs) | 4 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Subtitles.cs (renamed from win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Subtitle.cs) | 6 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/Encode/Factories/EncodeFactory.cs | 35 |
7 files changed, 42 insertions, 46 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj index 6f32ad6b1..e0bf5cd97 100644 --- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj +++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj @@ -114,16 +114,16 @@ <Compile Include="Interop\Json\Encode\AudioList.cs" />
<Compile Include="Interop\Json\Encode\ChapterList.cs" />
<Compile Include="Interop\Json\Encode\Destination.cs" />
+ <Compile Include="Interop\Json\Encode\Filters.cs" />
<Compile Include="Interop\Json\Encode\Filter.cs" />
- <Compile Include="Interop\Json\Encode\FilterList.cs" />
<Compile Include="Interop\Json\Encode\JsonEncodeObject.cs" />
<Compile Include="Interop\Json\Encode\MetaData.cs" />
<Compile Include="Interop\Json\Encode\Mp4Options.cs" />
<Compile Include="Interop\Json\Encode\Range.cs" />
- <Compile Include="Interop\Json\Encode\Search.cs" />
+ <Compile Include="Interop\Json\Encode\SubtitleSearch.cs" />
<Compile Include="Interop\Json\Encode\Source.cs" />
<Compile Include="Interop\Json\Encode\SRT.cs" />
- <Compile Include="Interop\Json\Encode\Subtitle.cs" />
+ <Compile Include="Interop\Json\Encode\Subtitles.cs" />
<Compile Include="Interop\Json\Encode\SubtitleList.cs" />
<Compile Include="Interop\Json\Encode\Video.cs" />
<Compile Include="Interop\Factories\AnamorphicFactory.cs" />
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filter.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filter.cs index 9082ff8a2..87bb43190 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filter.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filter.cs @@ -3,27 +3,25 @@ // 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 filter.
+// The filter list.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Interop.Json.Encode
{
- using System.Collections.Generic;
-
/// <summary>
- /// The filter.
+ /// The filter list.
/// </summary>
public class Filter
{
/// <summary>
- /// Gets or sets the filter list.
+ /// Gets or sets the id.
/// </summary>
- public List<FilterList> FilterList { get; set; }
+ public int ID { get; set; }
/// <summary>
- /// Gets or sets a value indicating whether grayscale.
+ /// Gets or sets the settings.
/// </summary>
- public bool Grayscale { get; set; }
+ public string Settings { get; set; }
}
}
\ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/FilterList.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filters.cs index e08a76ba8..a44a5b17b 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/FilterList.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filters.cs @@ -1,27 +1,29 @@ // --------------------------------------------------------------------------------------------------------------------
-// <copyright file="FilterList.cs" company="HandBrake Project (http://handbrake.fr)">
+// <copyright file="Filters.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 filter list.
+// The filter.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.Interop.Json.Encode
{
+ using System.Collections.Generic;
+
/// <summary>
- /// The filter list.
+ /// The filter.
/// </summary>
- public class FilterList
+ public class Filters
{
/// <summary>
- /// Gets or sets the id.
+ /// Gets or sets the filter list.
/// </summary>
- public int ID { get; set; }
+ public List<Filter> FilterList { get; set; }
/// <summary>
- /// Gets or sets the settings.
+ /// Gets or sets a value indicating whether grayscale.
/// </summary>
- public string Settings { get; set; }
+ public bool Grayscale { get; set; }
}
}
\ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/JsonEncodeObject.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/JsonEncodeObject.cs index cb9494c0d..b6b12a7eb 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/JsonEncodeObject.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/JsonEncodeObject.cs @@ -9,7 +9,6 @@ namespace HandBrake.ApplicationServices.Interop.Json.Encode
{
- using HandBrake.ApplicationServices.Interop.Json.Anamorphic;
using HandBrake.ApplicationServices.Interop.Json.Shared;
/// <summary>
@@ -30,7 +29,7 @@ namespace HandBrake.ApplicationServices.Interop.Json.Encode /// <summary>
/// Gets or sets the filter.
/// </summary>
- public Filter Filter { get; set; }
+ public Filters Filter { get; set; }
/// <summary>
/// Gets or sets the PAR
@@ -55,7 +54,7 @@ namespace HandBrake.ApplicationServices.Interop.Json.Encode /// <summary>
/// Gets or sets the subtitle.
/// </summary>
- public Subtitle Subtitle { get; set; }
+ public Subtitles Subtitle { get; set; }
/// <summary>
/// Gets or sets the video.
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Search.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/SubtitleSearch.cs index 8e5625f00..b6c5cbd63 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Search.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/SubtitleSearch.cs @@ -1,5 +1,5 @@ // --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Search.cs" company="HandBrake Project (http://handbrake.fr)">
+// <copyright file="SubtitleSearch.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>
@@ -12,7 +12,7 @@ namespace HandBrake.ApplicationServices.Interop.Json.Encode /// <summary>
/// The search.
/// </summary>
- public class Search
+ public class SubtitleSearch
{
/// <summary>
/// Gets or sets a value indicating whether burn.
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Subtitle.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Subtitles.cs index c5e8d56f7..5d38ba51d 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Subtitle.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Subtitles.cs @@ -1,5 +1,5 @@ // --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Subtitle.cs" company="HandBrake Project (http://handbrake.fr)">
+// <copyright file="Subtitles.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>
@@ -14,12 +14,12 @@ namespace HandBrake.ApplicationServices.Interop.Json.Encode /// <summary>
/// The subtitle.
/// </summary>
- public class Subtitle
+ public class Subtitles
{
/// <summary>
/// Gets or sets the search.
/// </summary>
- public Search Search { get; set; }
+ public SubtitleSearch Search { get; set; }
/// <summary>
/// Gets or sets the subtitle list.
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/Factories/EncodeFactory.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/Factories/EncodeFactory.cs index c3283e275..bebfeca18 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/Factories/EncodeFactory.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/Factories/EncodeFactory.cs @@ -17,7 +17,6 @@ namespace HandBrake.ApplicationServices.Services.Encode.Factories using HandBrake.ApplicationServices.Interop;
using HandBrake.ApplicationServices.Interop.HbLib;
using HandBrake.ApplicationServices.Interop.Helpers;
- using HandBrake.ApplicationServices.Interop.Json.Anamorphic;
using HandBrake.ApplicationServices.Interop.Json.Encode;
using HandBrake.ApplicationServices.Interop.Json.Shared;
using HandBrake.ApplicationServices.Interop.Model.Encoding;
@@ -26,8 +25,6 @@ namespace HandBrake.ApplicationServices.Services.Encode.Factories using HandBrake.ApplicationServices.Services.Encode.Model.Models;
using HandBrake.ApplicationServices.Utilities;
- using AudioTrack = HandBrake.ApplicationServices.Services.Encode.Model.Models.AudioTrack;
- using Subtitle = HandBrake.ApplicationServices.Interop.Json.Encode.Subtitle;
/// <summary>
/// This factory takes the internal EncodeJob object and turns it into a set of JSON models
@@ -174,14 +171,14 @@ namespace HandBrake.ApplicationServices.Services.Encode.Factories /// The job.
/// </param>
/// <returns>
- /// The <see cref="HandBrake.ApplicationServices.Interop.Json.Encode.Subtitle"/>.
+ /// The <see cref="HandBrake.ApplicationServices.Interop.Json.Encode.Subtitles"/>.
/// </returns>
- private static Subtitle CreateSubtitle(EncodeTask job)
+ private static Subtitles CreateSubtitle(EncodeTask job)
{
- Subtitle subtitle = new Subtitle
+ Subtitles subtitle = new Subtitles
{
Search =
- new Search
+ new SubtitleSearch
{
Enable = false,
Default = false,
@@ -387,20 +384,20 @@ namespace HandBrake.ApplicationServices.Services.Encode.Factories /// The job.
/// </param>
/// <returns>
- /// The <see cref="Filter"/>.
+ /// The <see cref="Filters"/>.
/// </returns>
- private static Filter CreateFilter(EncodeTask job)
+ private static Filters CreateFilter(EncodeTask job)
{
- Filter filter = new Filter
+ Filters filter = new Filters
{
- FilterList = new List<FilterList>(),
+ FilterList = new List<Filter>(),
Grayscale = job.Grayscale
};
// Detelecine
if (job.Detelecine != Detelecine.Off)
{
- FilterList filterItem = new FilterList { ID = (int)hb_filter_ids.HB_FILTER_DETELECINE, Settings = job.CustomDetelecine };
+ Filter filterItem = new Filter { ID = (int)hb_filter_ids.HB_FILTER_DETELECINE, Settings = job.CustomDetelecine };
filter.FilterList.Add(filterItem);
}
@@ -421,7 +418,7 @@ namespace HandBrake.ApplicationServices.Services.Encode.Factories options = job.CustomDecomb;
}
- FilterList filterItem = new FilterList { ID = (int)hb_filter_ids.HB_FILTER_DECOMB, Settings = options };
+ Filter filterItem = new Filter { ID = (int)hb_filter_ids.HB_FILTER_DECOMB, Settings = options };
filter.FilterList.Add(filterItem);
}
@@ -450,7 +447,7 @@ namespace HandBrake.ApplicationServices.Services.Encode.Factories options = job.CustomDeinterlace;
}
- FilterList filterItem = new FilterList { ID = (int)hb_filter_ids.HB_FILTER_DEINTERLACE, Settings = options };
+ Filter filterItem = new Filter { ID = (int)hb_filter_ids.HB_FILTER_DEINTERLACE, Settings = options };
filter.FilterList.Add(filterItem);
}
@@ -469,13 +466,13 @@ namespace HandBrake.ApplicationServices.Services.Encode.Factories string framerateString = num.HasValue ? string.Format("{0}:{1}:{2}", fm, num, den) : string.Format("{0}", fm); // filter_cfr, filter_vrate.num, filter_vrate.den
- FilterList framerateShaper = new FilterList { ID = (int)hb_filter_ids.HB_FILTER_VFR, Settings = framerateString };
+ Filter framerateShaper = new Filter { ID = (int)hb_filter_ids.HB_FILTER_VFR, Settings = framerateString };
filter.FilterList.Add(framerateShaper);
// Deblock
if (job.Deblock >= 5)
{
- FilterList filterItem = new FilterList { ID = (int)hb_filter_ids.HB_FILTER_DEBLOCK, Settings = job.Deblock.ToString() };
+ Filter filterItem = new Filter { ID = (int)hb_filter_ids.HB_FILTER_DEBLOCK, Settings = job.Deblock.ToString() };
filter.FilterList.Add(filterItem);
}
@@ -497,12 +494,12 @@ namespace HandBrake.ApplicationServices.Services.Encode.Factories settings = Marshal.PtrToStringAnsi(settingsPtr);
}
- FilterList filterItem = new FilterList { ID = (int)id, Settings = settings };
+ Filter filterItem = new Filter { ID = (int)id, Settings = settings };
filter.FilterList.Add(filterItem);
}
// CropScale Filter
- FilterList cropScale = new FilterList
+ Filter cropScale = new Filter
{
ID = (int)hb_filter_ids.HB_FILTER_CROP_SCALE,
Settings =
@@ -530,7 +527,7 @@ namespace HandBrake.ApplicationServices.Services.Encode.Factories /// The job.
/// </param>
/// <returns>
- /// The <see cref="MetaData"/>.
+ /// The <see cref="Interop.Json.Encode.MetaData"/>.
/// </returns>
private static MetaData CreateMetaData(EncodeTask job)
{
|