diff options
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs')
-rw-r--r-- | win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs index e08d3f17c..fa5142e19 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs @@ -7,9 +7,11 @@ // </summary>
// --------------------------------------------------------------------------------------------------------------------
+using HandBrake.Interop.Model.Encoding;
+
namespace HandBrake.Interop
{
- public static class Utilities
+ public static class Utilities
{
public static int GreatestCommonFactor(int a, int b)
{
@@ -32,5 +34,15 @@ namespace HandBrake.Interop return GreatestCommonFactor(a, b % a);
}
}
+
+ /// <summary>
+ /// Determines if the given audio encoder is a passthrough encoder choice.
+ /// </summary>
+ /// <param name="encoder">The audio encoder to examine.</param>
+ /// <returns>True if the encoder is passthrough.</returns>
+ public static bool IsPassthrough(AudioEncoder encoder)
+ {
+ return encoder == AudioEncoder.Ac3Passthrough || encoder == AudioEncoder.Passthrough;
+ }
}
}
|