summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeEncoderHelpers.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-04-09 14:46:54 +0100
committersr55 <[email protected]>2016-04-09 14:46:54 +0100
commitfc3324c8fa6c0aaa37c89d8d0bf098092d705932 (patch)
tree6789acc002fdd809e8327eb2d42bed9f440cf89e /win/CS/HandBrake.ApplicationServices/Interop/HandBrakeEncoderHelpers.cs
parentca2fc63cfd6a47920492bc96c3efd7e207af817d (diff)
WinGui: Use Mixdowns from LibHBand sanitise the choices. The GUI no longer shows invalid mixdowns.
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Interop/HandBrakeEncoderHelpers.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/HandBrakeEncoderHelpers.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeEncoderHelpers.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeEncoderHelpers.cs
index 67f1c5483..9de57c2be 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeEncoderHelpers.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeEncoderHelpers.cs
@@ -392,6 +392,22 @@ namespace HandBrake.ApplicationServices.Interop
}
/// <summary>
+ /// Determines if a mixdown is available for a given track and encoder.
+ /// </summary>
+ /// <param name="mixdown">
+ /// The mixdown to evaluate.
+ /// </param>
+ /// <param name="encoder">
+ /// The encoder to evaluate.
+ /// </param>
+ /// <param name="channelLayout">channel layout of the source track</param>
+ /// <returns>True if available.</returns>
+ public static bool MixdownIsSupported(HBMixdown mixdown, HBAudioEncoder encoder, int channelLayout)
+ {
+ return HBFunctions.hb_mixdown_is_supported(mixdown.Id, (uint)encoder.Id, (uint)channelLayout) > 0;
+ }
+
+ /// <summary>
/// Determines if DRC can be applied to the given track with the given encoder.
/// </summary>
/// <param name="trackNumber">