summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2015-10-19 13:14:04 -0700
committerJohn Stebbins <[email protected]>2015-10-19 13:14:04 -0700
commitba3d0e46199db21c1e4e899cc1d852ed0738d951 (patch)
tree51f18e3a0476f3256a27b5839e62c45b210c60cb /win/CS
parent8a01c54c5cfd7107a00ab8417af07e161ff97b56 (diff)
parent2e432bdd792739bb498313c36fce824f1debe278 (diff)
Merge pull request #21 from jstebbins/grayscale
grayscale: make it a real filter
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_filter_ids.cs1
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Filters.cs7
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs7
3 files changed, 8 insertions, 7 deletions
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.
/// </summary>
public List<Filter> FilterList { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether grayscale.
- /// </summary>
- 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<Filter>(),
- 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
{