\r
namespace HandBrakeWPF.Helpers\r
{\r
- using System;\r
using System.Diagnostics;\r
- using System.Runtime.InteropServices;\r
\r
using HandBrake.Interop.HbLib;\r
using HandBrake.Interop.Model;\r
/// </returns>\r
public static AnamorphicResult hb_set_anamorphic_size2(PictureSettingsJob job, PictureSettingsTitle title, KeepSetting setting)\r
{\r
- int outputHeight = 0;\r
- int outputParHeight = 0;\r
- int outputParWidth = 0;\r
- int outputWidth = 0;\r
-\r
int settingMode = (int)setting + (job.KeepDisplayAspect ? 0x04 : 0);\r
\r
hb_geometry_settings_s uiGeometry = new hb_geometry_settings_s\r
maxHeight = job.MaxHeight,\r
mode = (int)(hb_anamorphic_mode_t)job.AnamorphicMode,\r
modulus = job.Modulus.HasValue ? job.Modulus.Value : 16,\r
- geometry = new hb_geometry_s() { height = job.Height, width = job.Width, par = job.AnamorphicMode != Anamorphic.Custom ? new hb_rational_t { den = title.ParH, num = title.ParW } : new hb_rational_t { den = job.ParH, num = job.ParW }}\r
+ geometry = new hb_geometry_s { height = job.Height, width = job.Width, par = job.AnamorphicMode != Anamorphic.Custom ? new hb_rational_t { den = title.ParH, num = title.ParW } : new hb_rational_t { den = job.ParH, num = job.ParW }}\r
};\r
\r
hb_geometry_s sourceGeometry = new hb_geometry_s\r
\r
HBFunctions.hb_set_anamorphic_size2(ref sourceGeometry, ref uiGeometry, ref result);\r
\r
- outputWidth = result.width;\r
- outputHeight = result.height;\r
- outputParWidth = result.par.den;\r
- outputParHeight = result.par.num;\r
+ int outputWidth = result.width;\r
+ int outputHeight = result.height;\r
+ int outputParWidth = result.par.num;\r
+ int outputParHeight = result.par.den;\r
Debug.WriteLine("hb_set_anamorphic_size2: {0}x{1}", outputWidth, outputHeight);\r
return new AnamorphicResult { OutputWidth = outputWidth, OutputHeight = outputHeight, OutputParWidth = outputParWidth, OutputParHeight = outputParHeight };\r
}\r