summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-05-07 17:52:36 +0000
committersr55 <[email protected]>2015-05-07 17:52:36 +0000
commit86cbd6ce4d2c0f2b89d2933b9061e523e059d4dd (patch)
treef9cdee8106959d8c7a3fd36d98b3a3c4ac6768f6 /win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
parent17f4930018d7e23e95edd8a53a4e0f3e7d98a4ff (diff)
WinGui: Restore Preview functionality. The calc logic still needs fixed as there are a few edge cases that still todate don't work.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7164 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs13
1 files changed, 5 insertions, 8 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
index 8aafbc02d..e46f5b30b 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
@@ -274,8 +274,8 @@ namespace HandBrake.ApplicationServices.Interop
hb_geometry_settings_s uiGeometry = new hb_geometry_settings_s
{
crop = new[] { settings.Cropping.Top, settings.Cropping.Bottom, settings.Cropping.Left, settings.Cropping.Right },
- itu_par = 0,
- keep = settings.KeepDisplayAspect ? 0x04 : 0,
+ itu_par = 0,
+ keep = (int)AnamorphicFactory.KeepSetting.HB_KEEP_WIDTH + (settings.KeepDisplayAspect ? 0x04 : 0), // TODO Keep Width?
maxWidth = settings.MaxWidth,
maxHeight = settings.MaxHeight,
mode = (int)(hb_anamorphic_mode_t)settings.Anamorphic,
@@ -291,13 +291,10 @@ namespace HandBrake.ApplicationServices.Interop
};
// Sanitize the input.
- Geometry resultGeometry = AnamorphicFactory.CreateGeometry(
- settings,
- new SourceVideoInfo(
- new Size(title.Geometry.Width, title.Geometry.Height),
- new Size(title.Geometry.PAR.Num, title.Geometry.PAR.Den)));
- int width = resultGeometry.Width;
+ Geometry resultGeometry = AnamorphicFactory.CreateGeometry(settings, new SourceVideoInfo(new Size(title.Geometry.Width, title.Geometry.Height), new Size(title.Geometry.PAR.Num, title.Geometry.PAR.Den)));
+ int width = resultGeometry.Width * resultGeometry.PAR.Num / resultGeometry.PAR.Den;
int height = resultGeometry.Height;
+
uiGeometry.geometry.width = width;
uiGeometry.geometry.height = height;
uiGeometry.geometry.par.num = settings.PixelAspectX;