summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs
diff options
context:
space:
mode:
authorrandomengy <[email protected]>2013-09-14 18:13:52 +0000
committerrandomengy <[email protected]>2013-09-14 18:13:52 +0000
commitdf38b4e3b51cd16e1ef7c559717a578852877456 (patch)
tree826193d6858fbbc2eec6f70009083b98c7d14098 /win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs
parent1e73f743a8463ef70126d7b6b094f6ccc74c971e (diff)
Interop: Various fixes/improvements
* Exposed container list and changing compatible containers from an enum to an int to allow pulling the container list dynamically. * Removed a few unused and out-of-date functions and structs. * Updated a few structs to better track with the QSV changes. * Added a method to create a pointer to a UTF-8 encoded string. * Dither now is chosen automatically rather than turned off, which helps with FDK AAC. * Fixed unicode custom chapter names. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5782 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs33
1 files changed, 32 insertions, 1 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs
index e8d546237..cb70f21d0 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs
@@ -38,11 +38,16 @@ namespace HandBrake.Interop.Model
private static List<HBRate> videoFramerates;
/// <summary>
- /// The mixdowns.
+ /// List of HandBrake mixdowns.
/// </summary>
private static List<HBMixdown> mixdowns;
/// <summary>
+ /// List of HandBrake containers.
+ /// </summary>
+ private static List<HBContainer> containers;
+
+ /// <summary>
/// The audio bitrates.
/// </summary>
private static List<int> audioBitrates;
@@ -154,6 +159,22 @@ namespace HandBrake.Interop.Model
return audioSampleRates;
}
+ }
+
+ /// <summary>
+ /// Gets a list of supported containers.
+ /// </summary>
+ public static List<HBContainer> Containers
+ {
+ get
+ {
+ if (containers == null)
+ {
+ containers = InteropUtilities.GetListFromIterator<hb_container_s, HBContainer>(HBFunctions.hb_container_get_next, Converters.NativeToContainer);
+ }
+
+ return containers;
+ }
}
/// <summary>
@@ -187,6 +208,16 @@ namespace HandBrake.Interop.Model
}
/// <summary>
+ /// Gets the container with the specified short name.
+ /// </summary>
+ /// <param name="shortName">The name of the container.</param>
+ /// <returns>The requested container.</returns>
+ public static HBContainer GetContainer(string shortName)
+ {
+ return Containers.SingleOrDefault(c => c.ShortName == shortName);
+ }
+
+ /// <summary>
/// Determines if the given encoder is compatible with the given track.
/// </summary>
/// <param name="track">The audio track to examine.</param>