diff options
author | sr55 <[email protected]> | 2015-05-03 17:29:45 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-05-03 17:29:45 +0000 |
commit | 99aa2bf7c9bfa34d1bf822d70da22243fbbdd344 (patch) | |
tree | aeda9214568a48dac6fcac2fb8902d73fe8ae378 /win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs | |
parent | 0be4e18bacefa6b7bc63731b4a004a6ff772af20 (diff) |
WinGui: Fix Line Endings and (StyleCop)Warnings
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7152 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs index aad5df21c..ccbaee4c1 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs @@ -20,18 +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> - /// 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.
@@ -223,12 +223,12 @@ namespace HandBrake.ApplicationServices.Interop public static bool IsH264LevelValid(string level, int width, int height, int fpsNumerator, int fpsDenominator, bool interlaced, bool fakeInterlaced)
{
return HBFunctions.hb_check_h264_level(
- level,
- width,
- height,
- fpsNumerator,
- fpsDenominator,
- interlaced ? 1 : 0,
+ level,
+ width,
+ height,
+ fpsNumerator,
+ fpsDenominator,
+ interlaced ? 1 : 0,
fakeInterlaced ? 1 : 0) == 0;
}
@@ -260,12 +260,12 @@ namespace HandBrake.ApplicationServices.Interop /// The full x264 options string from the given inputs.
/// </returns>
public static string CreateX264OptionsString(
- string preset,
- IList<string> tunes,
- string extraOptions,
- string profile,
- string level,
- int width,
+ string preset,
+ IList<string> tunes,
+ string extraOptions,
+ string profile,
+ string level,
+ int width,
int height)
{
if (width <= 0)
@@ -279,35 +279,35 @@ namespace HandBrake.ApplicationServices.Interop }
IntPtr ptr = HBFunctions.hb_x264_param_unparse(
- preset,
- string.Join(",", tunes),
- extraOptions,
- profile,
- level,
- width,
+ preset,
+ string.Join(",", tunes),
+ extraOptions,
+ profile,
+ level,
+ width,
height);
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.
|