From 24f6d27cf9d979ab0743665b37e60fd1295776d1 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 7 Mar 2015 22:54:38 +0000 Subject: WinGui: Updating the app to handle the latest JSON API change regarding the Automatic title scan on encode. This Simplifies the API in the services library. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6977 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Interop/HandBrakeInstance.cs | 2 +- .../Interop/Json/Encode/Source.cs | 5 +++++ .../Interop/Model/SourceVideoInfo.cs | 20 +------------------- 3 files changed, 7 insertions(+), 20 deletions(-) (limited to 'win/CS/HandBrake.ApplicationServices/Interop') diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs index 719119cc0..379e461c3 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs @@ -271,7 +271,7 @@ namespace HandBrake.ApplicationServices.Interop }; // Sanatise the input. - Geometry resultGeometry = AnamorphicFactory.CreateGeometry(job, new SourceVideoInfo(null, null, new Size(title.Geometry.Width, title.Geometry.Height), new Size(title.Geometry.PAR.Num, title.Geometry.PAR.Den)), AnamorphicFactory.KeepSetting.HB_KEEP_WIDTH); // TODO this keep isn't right. + Geometry resultGeometry = AnamorphicFactory.CreateGeometry(job, new SourceVideoInfo(new Size(title.Geometry.Width, title.Geometry.Height), new Size(title.Geometry.PAR.Num, title.Geometry.PAR.Den)), AnamorphicFactory.KeepSetting.HB_KEEP_WIDTH); // TODO this keep isn't right. int width = resultGeometry.Width * resultGeometry.PAR.Num / resultGeometry.PAR.Den; int height = resultGeometry.Height; uiGeometry.geometry.height = resultGeometry.Height; // Prased the height now. diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Source.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Source.cs index 7adc228a9..27a746c36 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Source.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Source.cs @@ -28,5 +28,10 @@ namespace HandBrake.ApplicationServices.Interop.Json.Encode /// Gets or sets the title. /// public int Title { get; set; } + + /// + /// Gets or sets the path. + /// + public string Path { get; set; } } } \ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Model/SourceVideoInfo.cs b/win/CS/HandBrake.ApplicationServices/Interop/Model/SourceVideoInfo.cs index 0c6340189..31b94ae10 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Model/SourceVideoInfo.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Model/SourceVideoInfo.cs @@ -17,36 +17,18 @@ namespace HandBrake.ApplicationServices.Interop.Model /// /// Initializes a new instance of the class. /// - /// - /// The framerate numerator. - /// - /// - /// The framerate denominator. - /// /// /// The resolution. /// /// /// The par val. /// - public SourceVideoInfo(int? framerateNumerator, int? framerateDenominator, Size resolution, Size parVal) + public SourceVideoInfo(Size resolution, Size parVal) { - this.FramerateNumerator = framerateNumerator; - this.FramerateDenominator = framerateDenominator; this.Resolution = resolution; this.ParVal = parVal; } - /// - /// Gets the framerate numerator. - /// - public int? FramerateNumerator { get; private set; } - - /// - /// Gets the framerate denominator. - /// - public int? FramerateDenominator { get; private set; } - /// /// Gets or sets the resolution (width/height) of this Title /// -- cgit v1.2.3