summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/Encoding/OutputFormat.cs6
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs1
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs2
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/Container.cs4
-rw-r--r--win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs17
-rw-r--r--win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs2
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs4
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs2
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml7
10 files changed, 29 insertions, 18 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs
index be719701b..201ffc1e1 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs
@@ -518,7 +518,7 @@ namespace HandBrake.ApplicationServices.Model
{
get
{
- if (this.OutputFormat == OutputFormat.M4V || this.OutputFormat == OutputFormat.Mp4)
+ if (this.OutputFormat == OutputFormat.Mp4)
{
bool audio = this.AudioTracks.Any(item => item.Encoder == AudioEncoder.Ac3Passthrough ||
item.Encoder == AudioEncoder.Ac3 || item.Encoder == AudioEncoder.DtsPassthrough || item.Encoder == AudioEncoder.Passthrough);
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/OutputFormat.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/OutputFormat.cs
index d083e853c..828746f17 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/OutputFormat.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/OutputFormat.cs
@@ -10,6 +10,7 @@
namespace HandBrake.ApplicationServices.Model.Encoding
{
using System.ComponentModel;
+ using System.ComponentModel.DataAnnotations;
/// <summary>
/// The Output format.
@@ -17,12 +18,11 @@ namespace HandBrake.ApplicationServices.Model.Encoding
public enum OutputFormat
{
[Description("MP4")]
+ [Display(Name = "MP4")]
Mp4 = 0,
- [Description("M4V")]
- M4V,
-
[Description("MKV")]
+ [Display(Name = "MKV")]
Mkv,
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs
index 9e8bc3c32..970fb5c97 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs
@@ -129,7 +129,6 @@ namespace HandBrake.ApplicationServices.Utilities
switch (work.OutputFormat)
{
case OutputFormat.Mp4:
- case OutputFormat.M4V:
profile.ContainerName = "av_mp4"; // TODO make part of enum.
break;
case OutputFormat.Mkv:
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
index 70a7b9403..08c746ba0 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
@@ -136,7 +136,7 @@ namespace HandBrake.ApplicationServices.Utilities
AddEncodeElement(xmlWriter, "ChapterMarkers", "integer", parsed.IncludeChapterMarkers ? "1" : "0");
AddEncodeElement(xmlWriter, "Default", "integer", "0");
- AddEncodeElement(xmlWriter, "FileFormat", "string", (parsed.OutputFormat == OutputFormat.Mp4 || parsed.OutputFormat == OutputFormat.M4V) ? "MP4 file" : "MKV file");
+ AddEncodeElement(xmlWriter, "FileFormat", "string", (parsed.OutputFormat == OutputFormat.Mp4) ? "MP4 file" : "MKV file");
AddBooleanElement(xmlWriter, "Folder", false);
AddEncodeElement(xmlWriter, "Mp4HttpOptimize", "integer", parsed.OptimizeMP4 ? "1" : "0");
AddEncodeElement(xmlWriter, "Mp4iPodCompatible", "integer", parsed.IPod5GSupport ? "1" : "0");
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/Container.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/Container.cs
index 08f33caff..50261cfdc 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/Container.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/Container.cs
@@ -21,8 +21,8 @@ namespace HandBrake.Interop.Model.Encoding
None = 0x0,
[Display(Name = "MP4")]
- Mp4,
+ MP4,
[Display(Name = "MKV")]
- Mkv
+ MKV
}
}
diff --git a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
index 9214745e8..e0aceaf25 100644
--- a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
@@ -15,6 +15,7 @@ namespace HandBrakeWPF.Converters
using System;
using HandBrake.ApplicationServices.Model;
+ using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Utilities;
using HandBrake.Interop.Model.Encoding;
using HandBrake.Interop.Model.Encoding.x264;
@@ -69,7 +70,6 @@ namespace HandBrakeWPF.Converters
{
return EnumHelper<QsvPreset>.GetDisplay((QsvPreset)value);
}
-
if (value is IEnumerable<PresetPictureSettingsMode>)
{
return EnumHelper<PresetPictureSettingsMode>.GetEnumDisplayValues(typeof(PresetPictureSettingsMode));
@@ -90,11 +90,14 @@ namespace HandBrakeWPF.Converters
{
return EnumHelper<Denoise>.GetEnumDisplayValues(typeof(Denoise));
}
-
if (value is IEnumerable<VideoScaler>)
{
return EnumHelper<VideoScaler>.GetEnumDisplayValues(typeof(VideoScaler));
}
+ if (value is IEnumerable<OutputFormat>)
+ {
+ return EnumHelper<OutputFormat>.GetEnumDisplayValues(typeof(OutputFormat));
+ }
// Single Items
if (targetType == typeof(x264Preset) || value.GetType() == typeof(x264Preset))
@@ -148,6 +151,11 @@ namespace HandBrakeWPF.Converters
return EnumHelper<VideoScaler>.GetDisplay((VideoScaler)value);
}
+ if (targetType == typeof(OutputFormat) || value.GetType() == typeof(OutputFormat))
+ {
+ return EnumHelper<OutputFormat>.GetDisplay((OutputFormat)value);
+ }
+
return null;
}
@@ -223,6 +231,11 @@ namespace HandBrakeWPF.Converters
return EnumHelper<VideoScaler>.GetValue(value.ToString());
}
+ if (targetType == typeof(OutputFormat) || value.GetType() == typeof(OutputFormat))
+ {
+ return EnumHelper<OutputFormat>.GetValue(value.ToString());
+ }
+
return null;
}
}
diff --git a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs
index 0c521661b..1c5a2f955 100644
--- a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs
+++ b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs
@@ -110,7 +110,7 @@ namespace HandBrakeWPF.Helpers
/*
* File Extension
*/
- if (task.OutputFormat == OutputFormat.Mp4 || task.OutputFormat == OutputFormat.M4V)
+ if (task.OutputFormat == OutputFormat.Mp4)
{
switch (userSettingService.GetUserSetting<int>(UserSettingConstants.UseM4v))
{
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index c91a917f8..fafc1ce2b 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1527,10 +1527,8 @@ namespace HandBrakeWPF.ViewModels
this.SelectedOutputFormat = OutputFormat.Mkv;
break;
case ".mp4":
- this.SelectedOutputFormat = OutputFormat.Mp4;
- break;
case ".m4v":
- this.SelectedOutputFormat = OutputFormat.M4V;
+ this.SelectedOutputFormat = OutputFormat.Mp4;
break;
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
index 0219c49af..0161c562b 100644
--- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
@@ -590,7 +590,7 @@ namespace HandBrakeWPF.ViewModels
if ((source.SubtitleType == SubtitleType.PGS || source.SubtitleType == SubtitleType.VobSub || source.SubtitleType == SubtitleType.ForeignAudioSearch)
&& this.Task != null
- && (this.Task.OutputFormat == OutputFormat.Mp4 || this.Task.OutputFormat == OutputFormat.M4V))
+ && this.Task.OutputFormat == OutputFormat.Mp4)
{
if (track.CanBeBurned)
{
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml
index 15452b201..f243ea6b0 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml
@@ -23,7 +23,8 @@
<UserControl.Resources>
<Converters:BooleanConverter x:Key="booleanConverter" />
-
+ <Converters:EnumComboConverter x:Key="enumComboConverter" />
+
<Style TargetType="Button">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Padding" Value="5,1" />
@@ -485,8 +486,8 @@
<ComboBox Name="Container"
MinWidth="100"
Margin="8,0,0,0"
- ItemsSource="{Binding OutputFormats}"
- SelectedItem="{Binding SelectedOutputFormat}"
+ ItemsSource="{Binding OutputFormats, Converter={StaticResource enumComboConverter}}"
+ SelectedItem="{Binding SelectedOutputFormat, Converter={StaticResource enumComboConverter}}"
/>
<CheckBox Name="WebOptimized"
Margin="8,0,0,0"