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.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs
index ebfefff0a..e8d546237 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs
@@ -263,6 +263,29 @@ namespace HandBrake.Interop.Model
}
/// <summary>
+ /// Gets the video quality limits for the given video codec.
+ /// </summary>
+ /// <param name="encoder">The video encoder to check.</param>
+ /// <returns>Limits on the video quality for the encoder.</returns>
+ public static VideoQualityLimits GetVideoQualityLimits(HBVideoEncoder encoder)
+ {
+ float low = 0;
+ float high = 0;
+ float granularity = 0;
+ int direction = 0;
+
+ HBFunctions.hb_video_quality_get_limits((uint)encoder.Id, ref low, ref high, ref granularity, ref direction);
+
+ return new VideoQualityLimits
+ {
+ Low = low,
+ High = high,
+ Granularity = granularity,
+ Ascending = direction == 0
+ };
+ }
+
+ /// <summary>
/// Sanitizes an audio bitrate given the output codec, sample rate and mixdown.
/// </summary>
/// <param name="audioBitrate">The desired audio bitrate.</param>