summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs
diff options
context:
space:
mode:
authorrandomengy <[email protected]>2011-07-24 19:04:13 +0000
committerrandomengy <[email protected]>2011-07-24 19:04:13 +0000
commitd03140dd43594dafbf6f7f474ee06b45afc1b903 (patch)
tree700ad66da60f01e9d1b399dbead00f91f1d8c039 /win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs
parent2f8559933d48333e463a548152197db4cb926971 (diff)
Add DTS-HD and DRC to HandBrakeInterop. Update libhb audio structures. Fix test project build failures.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4138 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs14
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;
+ }
}
}