summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-01-05 20:33:55 +0000
committersr55 <[email protected]>2015-01-05 20:33:55 +0000
commit7faa75a3f684470aaaf52d03fce46a55426c6c53 (patch)
tree89bfdf0af07f0e0049b3770a0240cfa972763c8d /win
parentd9b030c21a0b104fb85400d9fc1526e6dc31acc0 (diff)
WinGui: Further fixes to libhb json api filters code.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6686 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs2
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs1
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/OutputFormat.cs21
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs9
-rw-r--r--win/CS/HandBrakeWPF/Views/FiltersView.xaml8
5 files changed, 13 insertions, 28 deletions
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 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="OutputFormat.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// Defines the OutputFormat type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-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 @@
<ComboBox Width="120" Grid.Row="0" ItemsSource="{Binding DetelecineOptions, Converter={StaticResource boolComboConverter}}"
SelectedItem="{Binding SelectedDetelecine, Converter={StaticResource boolComboConverter}}" Grid.Column="1" Margin="0,0,0,10"
HorizontalAlignment="Left"/>
- <TextBox Width="120" Grid.Row="0" Grid.Column="2" Margin="0,0,0,10" Text="{Binding CustomDetelecine}" HorizontalAlignment="Left"
+ <TextBox Width="120" Grid.Row="0" Grid.Column="2" Margin="0,0,0,10" Text="{Binding CustomDetelecine, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left"
Visibility="{Binding ShowDetelecineCustom, Converter={StaticResource boolToVisConverter}}"/>
<TextBlock Text="{Binding DeinterlaceControlText}" Grid.Row="1" Grid.Column="0" Margin="0,0,0,10" VerticalAlignment="Top"/>
@@ -67,10 +67,10 @@
Visibility="{Binding IsDeinterlaceMode, Converter={StaticResource boolToVisConverter}}" />
</StackPanel>
- <TextBox Width="120" Grid.Row="1" Grid.Column="2" Text="{Binding CustomDecomb}" VerticalAlignment="Top" HorizontalAlignment="Left"
+ <TextBox Width="120" Grid.Row="1" Grid.Column="2" Text="{Binding CustomDecomb, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top" HorizontalAlignment="Left"
Visibility="{Binding ShowDecombCustom, Converter={StaticResource boolToVisConverter}}" />
- <TextBox Width="120" Grid.Row="1" Grid.Column="2" Text="{Binding CustomDeinterlace}" VerticalAlignment="Top" HorizontalAlignment="Left"
+ <TextBox Width="120" Grid.Row="1" Grid.Column="2" Text="{Binding CustomDeinterlace, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top" HorizontalAlignment="Left"
Visibility="{Binding ShowDeinterlaceCustom, Converter={StaticResource boolToVisConverter}}" />
<TextBlock Text="Denoise:" Grid.Row="3" Grid.Column="0" Margin="0,0,0,10"/>
@@ -99,7 +99,7 @@
<StackPanel Orientation="Horizontal" Visibility="{Binding ShowDenoiseCustom, Converter={StaticResource boolToVisConverter}}">
<TextBlock Text="Custom: " Margin="5,0,5,0" />
- <TextBox Width="120" Margin="0" Text="{Binding CustomDenoise}" VerticalAlignment="Center" />
+ <TextBox Width="120" Margin="0" Text="{Binding CustomDenoise, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" />
</StackPanel>
</StackPanel>