summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs67
1 files changed, 31 insertions, 36 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs
index 7a00bb8e9..aad5df21c 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs
@@ -20,23 +20,18 @@ namespace HandBrake.ApplicationServices.Interop
using HandBrake.ApplicationServices.Interop.Json.Shared;
using HandBrake.ApplicationServices.Services.Logging;
using HandBrake.ApplicationServices.Services.Logging.Model;
-
- using Newtonsoft.Json;
-
- /// <summary>
- /// HandBrake Interop Utilities
- /// </summary>
- public static class HandBrakeUtils
- {
- /// <summary>
- /// Estimated overhead in bytes for each frame in output container.
- /// </summary>
- internal const int ContainerOverheadPerFrame = 6;
-
- /// <summary>
- /// The callback for log messages from HandBrake.
- /// </summary>
- private static LoggingCallback loggingCallback;
+
+ using Newtonsoft.Json;
+
+ /// <summary>
+ /// HandBrake Interop Utilities
+ /// </summary>
+ public static class HandBrakeUtils
+ {
+ /// <summary>
+ /// The callback for log messages from HandBrake.
+ /// </summary>
+ private static LoggingCallback loggingCallback;
/// <summary>
/// The callback for error messages from HandBrake.
@@ -294,25 +289,25 @@ namespace HandBrake.ApplicationServices.Interop
string x264Settings = Marshal.PtrToStringAnsi(ptr);
- return x264Settings;
- }
-
- /// <summary>
- /// Gets the final size and PAR of the video, given anamorphic inputs.
- /// </summary>
- /// <param name="anamorphicGeometry">Anamorphic inputs.</param>
- /// <returns>The final size and PAR of the video.</returns>
- public static Geometry GetAnamorphicSize(AnamorphicGeometry anamorphicGeometry)
- {
- string encode = JsonConvert.SerializeObject(anamorphicGeometry, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });
- LogHelper.LogMessage(new LogMessage(encode, LogMessageType.encodeJson, LogLevel.debug));
- IntPtr json = HBFunctions.hb_set_anamorphic_size_json(Marshal.StringToHGlobalAnsi(encode));
- string result = Marshal.PtrToStringAnsi(json);
- return JsonConvert.DeserializeObject<Geometry>(result);
- }
-
- /// <summary>
- /// Sends the message logged event to any registered listeners.
+ return x264Settings;
+ }
+
+ /// <summary>
+ /// Gets the final size and PAR of the video, given anamorphic inputs.
+ /// </summary>
+ /// <param name="anamorphicGeometry">Anamorphic inputs.</param>
+ /// <returns>The final size and PAR of the video.</returns>
+ public static Geometry GetAnamorphicSize(AnamorphicGeometry anamorphicGeometry)
+ {
+ string encode = JsonConvert.SerializeObject(anamorphicGeometry, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });
+ LogHelper.LogMessage(new LogMessage(encode, LogMessageType.encodeJson, LogLevel.debug));
+ IntPtr json = HBFunctions.hb_set_anamorphic_size_json(Marshal.StringToHGlobalAnsi(encode));
+ string result = Marshal.PtrToStringAnsi(json);
+ return JsonConvert.DeserializeObject<Geometry>(result);
+ }
+
+ /// <summary>
+ /// Sends the message logged event to any registered listeners.
/// </summary>
/// <param name="message">
/// The message to send.