From 2e432bdd792739bb498313c36fce824f1debe278 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Fri, 16 Oct 2015 11:27:08 -0700 Subject: grayscale: wingui changes --- .../HandBrake.ApplicationServices/Interop/HbLib/hb_filter_ids.cs | 1 + .../HandBrake.ApplicationServices/Interop/Json/Encode/Filters.cs | 7 +------ win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs | 7 ++++++- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'win') diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_filter_ids.cs b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_filter_ids.cs index 6ff3d5bec..d4164ede6 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_filter_ids.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_filter_ids.cs @@ -24,6 +24,7 @@ namespace HandBrake.ApplicationServices.Interop.HbLib // Finally filters that don't care what order they are in, // except that they must be after the above filters HB_FILTER_ROTATE, + HB_FILTER_GRAYSCALE, HB_FILTER_QSV_POST, // for QSV - important to have as a last one HB_FILTER_QSV, // default MSDK VPP filter } diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filters.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filters.cs index a44a5b17b..2e767b18a 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filters.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filters.cs @@ -20,10 +20,5 @@ namespace HandBrake.ApplicationServices.Interop.Json.Encode /// Gets or sets the filter list. /// public List FilterList { get; set; } - - /// - /// Gets or sets a value indicating whether grayscale. - /// - public bool Grayscale { get; set; } } -} \ No newline at end of file +} diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs index 0e979f3d9..31688c334 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs @@ -396,7 +396,6 @@ namespace HandBrakeWPF.Services.Encode.Factories Filters filter = new Filters { FilterList = new List(), - Grayscale = job.Grayscale }; // Detelecine @@ -506,6 +505,12 @@ namespace HandBrakeWPF.Services.Encode.Factories filter.FilterList.Add(filterItem); } + if (job.Grayscale) + { + Filter filterItem = new Filter { ID = (int)hb_filter_ids.HB_FILTER_GRAYSCALE, Settings = null }; + filter.FilterList.Add(filterItem); + } + // CropScale Filter Filter cropScale = new Filter { -- cgit v1.2.3