summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/HandBrakeInterop
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-09-17 19:15:51 +0000
committersr55 <[email protected]>2011-09-17 19:15:51 +0000
commitd428990eccd41c5ea9e67115a093ea0c09bc3e2a (patch)
treee21e539dec9df67e6c36fe45bf5673910bda67d5 /win/CS/HandBrake.Interop/HandBrakeInterop
parentccbaa9137a2275647a22b86487109f694c0f732d (diff)
Interop: Added support for various audio encoding options that were missing from various functions.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4228 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Converters.cs14
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs6
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs5
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs28
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs26
5 files changed, 65 insertions, 14 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Converters.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Converters.cs
index 73ca4f290..868a8b720 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Converters.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Converters.cs
@@ -94,12 +94,22 @@ namespace HandBrake.Interop
{
case AudioEncoder.Ac3Passthrough:
return NativeConstants.HB_ACODEC_AC3_PASS;
+ case AudioEncoder.Ac3:
+ return NativeConstants.HB_ACODEC_AC3;
case AudioEncoder.Faac:
return NativeConstants.HB_ACODEC_FAAC;
+ case AudioEncoder.ffaac:
+ return NativeConstants.HB_ACODEC_FFAAC;
+ case AudioEncoder.AacPassthru:
+ return NativeConstants.HB_ACODEC_AAC_PASS;
case AudioEncoder.Lame:
return NativeConstants.HB_ACODEC_LAME;
- case AudioEncoder.Ac3:
- return NativeConstants.HB_ACODEC_AC3;
+ case AudioEncoder.Mp3Passthru:
+ return NativeConstants.HB_ACODEC_MP3_PASS;
+ case AudioEncoder.DtsPassthrough:
+ return NativeConstants.HB_ACODEC_DCA_PASS;
+ case AudioEncoder.DtsHDPassthrough:
+ return NativeConstants.HB_ACODEC_DCA_HD_PASS;
case AudioEncoder.Vorbis:
return NativeConstants.HB_ACODEC_VORBIS;
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs
index 2ea3a2ca2..12172993f 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs
@@ -14,18 +14,14 @@ namespace HandBrake.Interop
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
- using System.Text;
- using System.Timers;
- using System.Threading;
using System.Windows.Media.Imaging;
using HandBrake.Interop.HbLib;
using HandBrake.Interop.Model;
using HandBrake.Interop.Model.Encoding;
using HandBrake.Interop.SourceData;
- using HandBrake.Interop;
- /// <summary>
+ /// <summary>
/// A wrapper for a HandBrake instance.
/// </summary>
public class HandBrakeInstance : IDisposable
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs
index 5b4735ff8..047a69535 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs
@@ -205,13 +205,18 @@ namespace HandBrake.Interop
switch (encoder)
{
case AudioEncoder.Faac:
+ case AudioEncoder.ffaac:
+ case AudioEncoder.AacPassthru:
case AudioEncoder.Vorbis:
return 1024;
case AudioEncoder.Lame:
+ case AudioEncoder.Mp3Passthru:
return 1152;
case AudioEncoder.Ac3:
case AudioEncoder.Passthrough:
case AudioEncoder.Ac3Passthrough:
+ case AudioEncoder.DtsPassthrough:
+ case AudioEncoder.DtsHDPassthrough:
return 1536;
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs
index 81b529918..a4c7637b5 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs
@@ -9,11 +9,21 @@
namespace HandBrake.Interop.Model.Encoding
{
- using System;
+ using System;
- public class AudioEncoding
+ /// <summary>
+ /// The Audio Encoding Model
+ /// </summary>
+ public class AudioEncoding
{
+ /// <summary>
+ /// Gets or sets InputNumber.
+ /// </summary>
public int InputNumber { get; set; }
+
+ /// <summary>
+ /// Gets or sets Encoder.
+ /// </summary>
public AudioEncoder Encoder { get; set; }
/// <summary>
@@ -21,6 +31,9 @@ namespace HandBrake.Interop.Model.Encoding
/// </summary>
public int Bitrate { get; set; }
+ /// <summary>
+ /// Gets or sets Mixdown.
+ /// </summary>
public Mixdown Mixdown { get; set; }
/// <summary>
@@ -34,8 +47,19 @@ namespace HandBrake.Interop.Model.Encoding
/// </summary>
public int SampleRateRaw { get; set; }
+ /// <summary>
+ /// Gets or sets Gain.
+ /// </summary>
public int Gain { get; set; }
+
+ /// <summary>
+ /// Gets or sets Drc.
+ /// </summary>
public double Drc { get; set; }
+
+ /// <summary>
+ /// Gets or sets Name.
+ /// </summary>
public string Name { get; set; }
}
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs
index fa5142e19..084005d68 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Utilities.cs
@@ -7,13 +7,24 @@
// </summary>
// --------------------------------------------------------------------------------------------------------------------
-using HandBrake.Interop.Model.Encoding;
-
namespace HandBrake.Interop
{
- public static class Utilities
+ using HandBrake.Interop.Model.Encoding;
+
+ public static class Utilities
{
- public static int GreatestCommonFactor(int a, int b)
+ /// <summary>
+ /// Get the Greatest Common Factor
+ /// </summary>
+ /// <param name="a">
+ /// The a.
+ /// </param>
+ /// <param name="b">
+ /// The b.
+ /// </param>
+ /// <returns>
+ /// </returns>
+ public static int GreatestCommonFactor(int a, int b)
{
if (a == 0)
{
@@ -42,7 +53,12 @@ namespace HandBrake.Interop
/// <returns>True if the encoder is passthrough.</returns>
public static bool IsPassthrough(AudioEncoder encoder)
{
- return encoder == AudioEncoder.Ac3Passthrough || encoder == AudioEncoder.Passthrough;
+ return encoder == AudioEncoder.Ac3Passthrough ||
+ encoder == AudioEncoder.DtsHDPassthrough ||
+ encoder == AudioEncoder.DtsPassthrough ||
+ encoder == AudioEncoder.Mp3Passthru ||
+ encoder == AudioEncoder.AacPassthru ||
+ encoder == AudioEncoder.Passthrough;
}
}
}