summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs
diff options
context:
space:
mode:
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>