mirror of
https://github.com/Tichau/FileConverter.git
synced 2026-11-22 02:21:51 +01:00
Add an enum to define video encoding speed settings.
This commit is contained in:
1 parent
61dff1f5e2
commit
8d8666e1e1
8 files changed
+178
-13
No files matched your search
@@ -0,0 +1,17 @@
|
||||
// // <copyright file="VideoEncodingSpeed.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
|
||||
|
||||
namespace FileConverter.ConversionJobs
|
||||
{
|
||||
public enum VideoEncodingSpeed
|
||||
{
|
||||
UltraFast,
|
||||
SuperFast,
|
||||
VeryFast,
|
||||
Faster,
|
||||
Fast,
|
||||
Medium,
|
||||
Slow,
|
||||
Slower,
|
||||
VerySlow,
|
||||
}
|
||||
}
|
||||
@@ -102,6 +102,7 @@
|
||||
<Compile Include="ConversionJobs\ConversionJob_Gif.cs" />
|
||||
<Compile Include="ConversionJobs\ConversionJob_Ico.cs" />
|
||||
<Compile Include="ConversionJobs\ConversionJob_ImageMagick.cs" />
|
||||
<Compile Include="ConversionJobs\VideoEncodingSpeed.cs" />
|
||||
<Compile Include="ConversionPreset\ConversionSettingsOverride.cs" />
|
||||
<Compile Include="ConversionPreset\ConversionSettings.cs" />
|
||||
<Compile Include="Diagnostics\DiagnosticsData.cs" />
|
||||
@@ -117,6 +118,7 @@
|
||||
<DependentUpon>Resources.fr.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Registry.cs" />
|
||||
<Compile Include="Settings.Migration.cs" />
|
||||
<Compile Include="Settings.Settings.cs" />
|
||||
<Compile Include="Upgrade\Helpers.cs" />
|
||||
<Compile Include="Upgrade\UpgradeVersionDescription.cs" />
|
||||
|
||||
@@ -676,6 +676,60 @@ namespace FileConverter.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Faster.
|
||||
/// </summary>
|
||||
public static string VideoEncodingSpeedFasterName {
|
||||
get {
|
||||
return ResourceManager.GetString("VideoEncodingSpeedFasterName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Fast.
|
||||
/// </summary>
|
||||
public static string VideoEncodingSpeedFastName {
|
||||
get {
|
||||
return ResourceManager.GetString("VideoEncodingSpeedFastName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Medium.
|
||||
/// </summary>
|
||||
public static string VideoEncodingSpeedMediumName {
|
||||
get {
|
||||
return ResourceManager.GetString("VideoEncodingSpeedMediumName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Slower.
|
||||
/// </summary>
|
||||
public static string VideoEncodingSpeedSlowerName {
|
||||
get {
|
||||
return ResourceManager.GetString("VideoEncodingSpeedSlowerName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Slow.
|
||||
/// </summary>
|
||||
public static string VideoEncodingSpeedSlowName {
|
||||
get {
|
||||
return ResourceManager.GetString("VideoEncodingSpeedSlowName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Super Fast.
|
||||
/// </summary>
|
||||
public static string VideoEncodingSpeedSuperFastName {
|
||||
get {
|
||||
return ResourceManager.GetString("VideoEncodingSpeedSuperFastName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Define the ratio 'file size' versus 'compression duration'. A slow compression will give you a smaller file (for the same video quality) than a faster compression..
|
||||
/// </summary>
|
||||
@@ -685,6 +739,33 @@ namespace FileConverter.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Ultra Fast.
|
||||
/// </summary>
|
||||
public static string VideoEncodingSpeedUltraFastName {
|
||||
get {
|
||||
return ResourceManager.GetString("VideoEncodingSpeedUltraFastName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Very Fast.
|
||||
/// </summary>
|
||||
public static string VideoEncodingSpeedVeryFastName {
|
||||
get {
|
||||
return ResourceManager.GetString("VideoEncodingSpeedVeryFastName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Very Slow.
|
||||
/// </summary>
|
||||
public static string VideoEncodingSpeedVerySlowName {
|
||||
get {
|
||||
return ResourceManager.GetString("VideoEncodingSpeedVerySlowName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Video.
|
||||
/// </summary>
|
||||
|
||||
@@ -331,9 +331,36 @@ Special paths:
|
||||
<data name="VideoEncodingQualityTooltip" xml:space="preserve">
|
||||
<value>Define the ratio 'file size' versus 'video quality'. A lower value will give you a smaller file, a greater value give you a better video quality.</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedFasterName" xml:space="preserve">
|
||||
<value>Faster</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedFastName" xml:space="preserve">
|
||||
<value>Fast</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedMediumName" xml:space="preserve">
|
||||
<value>Medium</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedSlowerName" xml:space="preserve">
|
||||
<value>Slower</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedSlowName" xml:space="preserve">
|
||||
<value>Slow</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedSuperFastName" xml:space="preserve">
|
||||
<value>Super Fast</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedTooltip" xml:space="preserve">
|
||||
<value>Define the ratio 'file size' versus 'compression duration'. A slow compression will give you a smaller file (for the same video quality) than a faster compression.</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedUltraFastName" xml:space="preserve">
|
||||
<value>Ultra Fast</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedVeryFastName" xml:space="preserve">
|
||||
<value>Very Fast</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedVerySlowName" xml:space="preserve">
|
||||
<value>Very Slow</value>
|
||||
</data>
|
||||
<data name="VideoTitle" xml:space="preserve">
|
||||
<value>Video</value>
|
||||
</data>
|
||||
|
||||
@@ -331,9 +331,36 @@ Special paths:
|
||||
<data name="VideoEncodingQualityTooltip" xml:space="preserve">
|
||||
<value>Define the ratio 'file size' versus 'video quality'. A lower value will give you a smaller file, a greater value give you a better video quality.</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedFasterName" xml:space="preserve">
|
||||
<value>Faster</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedFastName" xml:space="preserve">
|
||||
<value>Fast</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedMediumName" xml:space="preserve">
|
||||
<value>Medium</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedSlowerName" xml:space="preserve">
|
||||
<value>Slower</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedSlowName" xml:space="preserve">
|
||||
<value>Slow</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedSuperFastName" xml:space="preserve">
|
||||
<value>Super Fast</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedTooltip" xml:space="preserve">
|
||||
<value>Define the ratio 'file size' versus 'compression duration'. A slow compression will give you a smaller file (for the same video quality) than a faster compression.</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedUltraFastName" xml:space="preserve">
|
||||
<value>Ultra Fast</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedVeryFastName" xml:space="preserve">
|
||||
<value>Very Fast</value>
|
||||
</data>
|
||||
<data name="VideoEncodingSpeedVerySlowName" xml:space="preserve">
|
||||
<value>Very Slow</value>
|
||||
</data>
|
||||
<data name="VideoTitle" xml:space="preserve">
|
||||
<value>Video</value>
|
||||
</data>
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace FileConverter.ValueConverters.Generic
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return value?.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -336,16 +336,14 @@
|
||||
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="20" SelectionEnd="33" Minimum="0" Maximum="51" TickPlacement="BottomRight" SmallChange="1" LargeChange="6" TickFrequency="1" Foreground="#004B82" />
|
||||
|
||||
<Label Content="{x:Static project:Resources.EncodingSpeed}" Grid.Row="2" Grid.Column="0" ToolTip="{x:Static project:Resources.VideoEncodingSpeedTooltip}" HorizontalContentAlignment="Right"/>
|
||||
<ComboBox Grid.Row="2" Grid.Column="1" SelectedValue="{Binding SelectedPreset.Settings, ConverterParameter=VideoEncodingSpeed|System.String, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay, TargetNullValue=veryslow}">
|
||||
<System:String>Ultra Fast</System:String>
|
||||
<System:String>Super Fast</System:String>
|
||||
<System:String>Very Fast</System:String>
|
||||
<System:String>Faster</System:String>
|
||||
<System:String>Fast</System:String>
|
||||
<System:String>Medium</System:String>
|
||||
<System:String>Slow</System:String>
|
||||
<System:String>Slower</System:String>
|
||||
<System:String>Very Slow</System:String>
|
||||
<ComboBox Grid.Row="2" Grid.Column="1"
|
||||
ItemsSource="{Binding VideoEncodingSpeeds, ElementName=window, Mode=OneTime}"
|
||||
SelectedValue="{Binding SelectedPreset.Settings, ConverterParameter=VideoEncodingSpeed|FileConverter.ConversionJobs.VideoEncodingSpeed, Converter={StaticResource ConversionSettingsToEnum}, ElementName=window, Mode=TwoWay, TargetNullValue=veryslow}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ContentPresenter Content="{Binding Converter={StaticResource ObjectToLocalizedString}, Mode=OneTime}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Label Content="{x:Static project:Resources.Scale}" Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right"/>
|
||||
@@ -471,7 +469,7 @@
|
||||
<!--Quality-->
|
||||
<Label Content="{x:Static project:Resources.Quality}" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right"/>
|
||||
<Slider Grid.Row="0" Grid.Column="1" x:Name="QualitySlider" Value="{Binding SelectedPreset.Settings, ConverterParameter=ImageQuality|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay, TargetNullValue=25}"
|
||||
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="30" SelectionEnd="100" Minimum="0" Maximum="100" TickPlacement="BottomRight" SmallChange="5" LargeChange="15" TickFrequency="5" Foreground="#004B82" />
|
||||
Margin="0,5,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="30" SelectionEnd="100" Minimum="0" Maximum="100" TickPlacement="BottomRight" SmallChange="5" LargeChange="15" TickFrequency="5" Foreground="#004B82" />
|
||||
<!--Scale-->
|
||||
<Label Content="{x:Static project:Resources.Scale}" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right"/>
|
||||
<Grid Grid.Row="1" Grid.Column="1">
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// <copyright file="SettingsWindow.xaml.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
|
||||
|
||||
|
||||
namespace FileConverter
|
||||
{
|
||||
using System;
|
||||
@@ -15,6 +14,7 @@ namespace FileConverter
|
||||
|
||||
using FileConverter.Annotations;
|
||||
using FileConverter.Commands;
|
||||
using FileConverter.ConversionJobs;
|
||||
using Microsoft.Win32;
|
||||
|
||||
/// <summary>
|
||||
@@ -168,6 +168,19 @@ namespace FileConverter
|
||||
InputPostConversionAction.Delete,
|
||||
};
|
||||
|
||||
public VideoEncodingSpeed[] VideoEncodingSpeeds => new[]
|
||||
{
|
||||
VideoEncodingSpeed.UltraFast,
|
||||
VideoEncodingSpeed.SuperFast,
|
||||
VideoEncodingSpeed.VeryFast,
|
||||
VideoEncodingSpeed.Faster,
|
||||
VideoEncodingSpeed.Fast,
|
||||
VideoEncodingSpeed.Medium,
|
||||
VideoEncodingSpeed.Slow,
|
||||
VideoEncodingSpeed.Slower,
|
||||
VideoEncodingSpeed.VerySlow,
|
||||
};
|
||||
|
||||
public string AboutSectionContent
|
||||
{
|
||||
get
|
||||
|
||||
Reference in new issue
Block a user