From 7faa75a3f684470aaaf52d03fce46a55426c6c53 Mon Sep 17 00:00:00 2001 From: sr55 Date: Mon, 5 Jan 2015 20:33:55 +0000 Subject: WinGui: Further fixes to libhb json api filters code. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6686 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Utilities/InteropModelCreator.cs | 2 ++ .../Json/Factories/EncodeFactory.cs | 1 - .../HandBrakeInterop/Model/Encoding/OutputFormat.cs | 21 --------------------- win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs | 9 +++++++-- win/CS/HandBrakeWPF/Views/FiltersView.xaml | 8 ++++---- 5 files changed, 13 insertions(+), 28 deletions(-) delete mode 100644 win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/OutputFormat.cs diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs index eec8f4a8a..c8db8750f 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs @@ -164,6 +164,8 @@ namespace HandBrake.ApplicationServices.Utilities profile.CustomDecomb = work.CustomDecomb; profile.CustomDeinterlace = work.CustomDeinterlace; profile.CustomDenoise = work.CustomDenoise; + profile.DenoisePreset = work.DenoisePreset.ToString().ToLower().Replace(" ", string.Empty); + profile.DenoiseTune = work.DenoiseTune.ToString().ToLower().Replace(" ", string.Empty); profile.CustomDetelecine = work.CustomDetelecine; if (work.Deblock > 4) profile.Deblock = work.Deblock; diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs index 9393b0e16..f9e3ef074 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs @@ -420,7 +420,6 @@ namespace HandBrake.Interop.Json.Factories } // CropScale Filter - // TODO handle anamorphic. Geometry resultGeometry = AnamorphicFactory.CreateGeometry(job, title, AnamorphicFactory.KeepSetting.HB_KEEP_WIDTH); FilterList cropScale = new FilterList { diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/OutputFormat.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/OutputFormat.cs deleted file mode 100644 index 8251dc9d5..000000000 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/OutputFormat.cs +++ /dev/null @@ -1,21 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. -// -// -// Defines the OutputFormat type. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrake.Interop.Model.Encoding -{ - using System.ComponentModel.DataAnnotations; - - public enum OutputFormat - { - [Display(Name = "MP4")] - Mp4, - [Display(Name = "MKV")] - Mkv - } -} diff --git a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs index 0b2af3464..e71dbea24 100644 --- a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs @@ -14,7 +14,6 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro; - using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Model.Encoding; using HandBrake.ApplicationServices.Services.Encode.Model; using HandBrake.ApplicationServices.Services.Scan.Model; @@ -240,6 +239,8 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.SelectedDeInterlace); + if (value != Deinterlace.Custom) this.CustomDeinterlace = string.Empty; + // Show / Hide the Custom Control this.ShowDeinterlaceCustom = this.CurrentTask.Deinterlace == Deinterlace.Custom; this.NotifyOfPropertyChange(() => this.ShowDeinterlaceCustom); @@ -271,6 +272,8 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.SelectedDecomb); + if (value != Decomb.Custom) this.CustomDecomb = string.Empty; + // Show / Hide the Custom Control this.ShowDecombCustom = this.CurrentTask.Decomb == Decomb.Custom; this.NotifyOfPropertyChange(() => this.ShowDecombCustom); @@ -325,6 +328,7 @@ namespace HandBrakeWPF.ViewModels // Show / Hide the Custom Control this.ShowDetelecineCustom = this.CurrentTask.Detelecine == Detelecine.Custom; + if (value != Detelecine.Custom) this.CustomDetelecine = string.Empty; this.NotifyOfPropertyChange(() => this.ShowDetelecineCustom); } } @@ -360,7 +364,7 @@ namespace HandBrakeWPF.ViewModels } set { - if (!object.Equals(this.isDeinterlaceMode, value)) + if (!Equals(this.isDeinterlaceMode, value)) { this.isDeinterlaceMode = value; this.NotifyOfPropertyChange(() => this.IsDeinterlaceMode); @@ -420,6 +424,7 @@ namespace HandBrakeWPF.ViewModels // Show / Hide the Custom Control this.ShowDenoiseCustom = this.CurrentTask.Denoise == Denoise.hqdn3d && this.CurrentTask.DenoisePreset == DenoisePreset.Custom; + if (value != DenoisePreset.Custom) this.CustomDenoise = string.Empty; this.NotifyOfPropertyChange(() => this.ShowDenoiseCustom); this.NotifyOfPropertyChange(() => this.ShowDenoiseOptions); this.NotifyOfPropertyChange(() => this.ShowDenoiseTune); diff --git a/win/CS/HandBrakeWPF/Views/FiltersView.xaml b/win/CS/HandBrakeWPF/Views/FiltersView.xaml index 70488d5da..5f080ea22 100644 --- a/win/CS/HandBrakeWPF/Views/FiltersView.xaml +++ b/win/CS/HandBrakeWPF/Views/FiltersView.xaml @@ -48,7 +48,7 @@ - @@ -67,10 +67,10 @@ Visibility="{Binding IsDeinterlaceMode, Converter={StaticResource boolToVisConverter}}" /> - - @@ -99,7 +99,7 @@ - + -- cgit v1.2.3