diff options
Diffstat (limited to 'win')
12 files changed, 96 insertions, 12 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs index 3df28820f..8eac46d61 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs @@ -33,7 +33,7 @@ namespace HandBrake.ApplicationServices.Utilities /// The preset.
/// </param>
/// <param name="build">
- /// The build.
+ /// The build.PictureModulusPictureModulus
/// </param>
public static void Export(string path, Preset preset, string build)
{
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs index eb9353aa7..6833dfc36 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeUtils.cs @@ -197,7 +197,8 @@ namespace HandBrake.Interop throw new ArgumentException("height must be positive.");
}
- return HBFunctions.hb_x264_param_unparse(
+ HBFunctions.hb_init(0, 0);
+ IntPtr ptr = HBFunctions.hb_x264_param_unparse(
preset,
string.Join(",", tunes),
extraOptions,
@@ -205,6 +206,11 @@ namespace HandBrake.Interop level,
width,
height);
+
+ string x264Settings = Marshal.PtrToStringAnsi(ptr);
+
+
+ return x264Settings;
}
/// <summary>
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs index cd4ca877d..00130a902 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/HbFunctions.cs @@ -338,7 +338,7 @@ namespace HandBrake.Interop.HbLib public static extern int hb_check_h264_level([In] [MarshalAs(UnmanagedType.LPStr)] string level, int width, int height, int fps_num, int fps_den, int interlaced, int fake_interlaced);
[DllImport("hb.dll", EntryPoint = "hb_x264_param_unparse", CallingConvention = CallingConvention.Cdecl)]
- public static extern string hb_x264_param_unparse(
+ public static extern IntPtr hb_x264_param_unparse(
[In] [MarshalAs(UnmanagedType.LPStr)] string x264_preset,
[In] [MarshalAs(UnmanagedType.LPStr)] string x264_tune,
[In] [MarshalAs(UnmanagedType.LPStr)] string x264_encopts,
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index e2ccbcbda..7db59a4d0 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -386,7 +386,8 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
- /// Looks up a localized string similar to The full x264 list of parameters: {0}.
+ /// Looks up a localized string similar to The full x264 list of parameters:
+ ///{0}.
/// </summary>
public static string Video_x264ExtraArgs {
get {
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index b39ace5a5..fed5d3923 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -238,7 +238,8 @@ may have problems with Weighted P-frame prediction: the Apple TV is completely i <value>..\Resources\logo64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Video_x264ExtraArgs" xml:space="preserve">
- <value>The full x264 list of parameters: {0}</value>
+ <value>The full x264 list of parameters:
+{0}</value>
</data>
<data name="Video_x264FastDecode" xml:space="preserve">
<value>Reduce decoder CPU usage.
diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index a90094cb5..1f4c02fce 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -196,6 +196,11 @@ namespace HandBrakeWPF /// </summary>
public const string LastPreviewDuration = "LastPreviewDuration";
+ /// <summary>
+ /// Disable LibHb Features
+ /// </summary>
+ public const string DisableLibHbFeatures = "DisableLibHbFeatures";
+
#endregion
}
}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index af4dce85b..8156aa806 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -142,6 +142,11 @@ namespace HandBrakeWPF.ViewModels private bool disableLibdvdNav;
/// <summary>
+ /// The disable libhb features
+ /// </summary>
+ private bool disableLibhbFeatures;
+
+ /// <summary>
/// The disable p reset update check notification.
/// </summary>
private bool disablePresetUpdateCheckNotification;
@@ -1342,6 +1347,24 @@ namespace HandBrakeWPF.ViewModels }
}
+ /// <summary>
+ /// Gets or sets a value indicating whether DisableLibdvdNav.
+ /// </summary>
+ public bool DisableLibHbFeatures
+ {
+ get
+ {
+ return this.disableLibhbFeatures;
+ }
+
+ set
+ {
+ this.disableLibhbFeatures = value;
+ this.NotifyOfPropertyChange("DisableLibHbFeatures");
+ }
+ }
+
+
#endregion
#endregion
@@ -1636,6 +1659,9 @@ namespace HandBrakeWPF.ViewModels this.EnableProcessIsolation = userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableProcessIsolation);
this.EnableDebugFeatures = userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableDebugFeatures);
this.EnableLibHb = userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableLibHb);
+
+ // LibHbFeatures
+ this.DisableLibHbFeatures = userSettingService.GetUserSetting<bool>(UserSettingConstants.DisableLibHbFeatures);
}
/// <summary>
@@ -1840,6 +1866,7 @@ namespace HandBrakeWPF.ViewModels userSettingService.SetUserSetting(ASUserSettingConstants.PreviewScanCount, this.SelectedPreviewCount);
userSettingService.SetUserSetting(UserSettingConstants.X264Step, double.Parse(this.SelectedGranulairty, CultureInfo.InvariantCulture));
userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedTab, this.ShowAdvancedTab);
+ userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedTab, this.ShowAdvancedTab);
int value;
if (int.TryParse(this.MinLength.ToString(CultureInfo.InvariantCulture), out value))
@@ -1851,7 +1878,7 @@ namespace HandBrakeWPF.ViewModels userSettingService.SetUserSetting(UserSettingConstants.EnableProcessIsolation, this.EnableProcessIsolation);
userSettingService.SetUserSetting(UserSettingConstants.ServerPort, this.ServerPort.ToString());
userSettingService.SetUserSetting(UserSettingConstants.EnableDebugFeatures, this.EnableDebugFeatures);
- userSettingService.SetUserSetting(UserSettingConstants.EnableLibHb, this.EnableLibHb);
+ userSettingService.SetUserSetting(UserSettingConstants.DisableLibHbFeatures, this.DisableLibHbFeatures);
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs index 4c01f8f35..963f7ef68 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs @@ -33,6 +33,7 @@ namespace HandBrakeWPF.ViewModels * - We are not handling cropping correctly within the UI.
* - The Height is not correctly set when using no Anamorphic
* - Maintain Aspect ratio needs corrected.
+ * - Custom Anamorphic.
*
*/
#region Constants and Fields
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index a59105084..514b45d5d 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -28,6 +28,7 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.Commands.Interfaces;
using HandBrakeWPF.Model;
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
@@ -497,6 +498,7 @@ namespace HandBrakeWPF.ViewModels {
this.Task.ExtraAdvancedArguments = value;
this.NotifyOfPropertyChange(() => this.ExtraArguments);
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
}
@@ -514,6 +516,7 @@ namespace HandBrakeWPF.ViewModels {
this.displayX264Options = value;
this.NotifyOfPropertyChange(() => this.DisplayX264Options);
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
@@ -533,6 +536,7 @@ namespace HandBrakeWPF.ViewModels this.x264PresetValue = value;
this.X264Preset = this.X264Presets[value];
this.NotifyOfPropertyChange(() => this.x264PresetValue);
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
}
@@ -553,6 +557,7 @@ namespace HandBrakeWPF.ViewModels this.Task.X264Preset = value;
this.NotifyOfPropertyChange(() => this.X264Preset);
ResetAdvancedTab();
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
}
@@ -574,6 +579,7 @@ namespace HandBrakeWPF.ViewModels this.Task.H264Profile = value;
this.NotifyOfPropertyChange(() => this.H264Profile);
ResetAdvancedTab();
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
}
@@ -594,6 +600,7 @@ namespace HandBrakeWPF.ViewModels this.Task.H264Level = value;
this.NotifyOfPropertyChange(() => this.H264Level);
ResetAdvancedTab();
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
}
@@ -614,6 +621,7 @@ namespace HandBrakeWPF.ViewModels this.Task.X264Tune = value;
this.NotifyOfPropertyChange(() => this.X264Tune);
ResetAdvancedTab();
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
}
@@ -634,6 +642,7 @@ namespace HandBrakeWPF.ViewModels this.Task.FastDecode = value;
this.NotifyOfPropertyChange(() => this.FastDecode);
ResetAdvancedTab();
+ this.NotifyOfPropertyChange(() => FullOptionsTooltip);
}
}
}
@@ -665,7 +674,7 @@ namespace HandBrakeWPF.ViewModels {
get
{
- return "You can provide additional arguments using the standard x264 format"; // string.Format(Resources.Video_x264ExtraArgs, this.GetActualx264Query());
+ return string.Format(Resources.Video_x264ExtraArgs, this.GetActualx264Query()); // "You can provide additional arguments using the standard x264 format";
}
}
@@ -897,13 +906,18 @@ namespace HandBrakeWPF.ViewModels /// </returns>
private string GetActualx264Query()
{
- string preset = EnumHelper<x264Preset>.GetDisplay(this.X264Preset);
- string profile = EnumHelper<x264Profile>.GetDisplay(this.H264Profile);
+ if (this.userSettingService.GetUserSetting<bool>(UserSettingConstants.DisableLibHbFeatures))
+ {
+ return string.Empty; // Feature is disabled.
+ }
+
+ string preset = EnumHelper<x264Preset>.GetDisplay(this.X264Preset).ToLower().Replace(" ", string.Empty);
+ string profile = EnumHelper<x264Profile>.GetDisplay(this.H264Profile).ToLower();
List<string> tunes = new List<string>();
if (X264Tune != x264Tune.None)
{
- tunes.Add(EnumHelper<x264Tune>.GetDisplay(this.X264Tune));
+ tunes.Add(this.X264Tune.ToString().ToLower().Replace(" ", string.Empty)); // TODO tidy this sillyness up.
}
if (this.FastDecode)
{
@@ -914,6 +928,16 @@ namespace HandBrakeWPF.ViewModels int width = this.Task.Width.HasValue ? this.Task.Width.Value : 720;
int height = this.Task.Height.HasValue ? this.Task.Height.Value : 576;
+ if (height == 0)
+ {
+ height = 576;
+ }
+
+ if (width == 0)
+ {
+ width = 720;
+ }
+
// TODO figure out what is wrong with this??
return HandBrakeUtils.CreateX264OptionsString(preset, tunes, this.ExtraArguments, profile, this.H264Level, width, height);
}
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index 0394adbff..c2e88150d 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -294,6 +294,7 @@ <CheckBox Content="Disable built-in preset update notification" IsChecked="{Binding DisablePresetUpdateCheckNotification}" />
<CheckBox Content="Always clear completed queue items after an encode completes" IsChecked="{Binding ClearQueueOnEncodeCompleted}" />
<CheckBox Content="Show Advanced Tab" IsChecked="{Binding ShowAdvancedTab}" />
+ <CheckBox Content="Disable LibHB Features" IsChecked="{Binding DisableLibHbFeatures}" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock Text="Number of picture previews to scan:" VerticalAlignment="Center" Width="250" />
<ComboBox Name="numberOfPreviews" ItemsSource="{Binding PreviewPicturesToScan}" SelectedItem="{Binding SelectedPreviewCount}" Width="120" />
@@ -365,7 +366,7 @@ <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">
- <CheckBox Content="Enable LibHB (uses hb.dll instead of HandBrakeCLI.exe)" Margin="0,5,0,0" IsChecked="{Binding EnableLibHb}" />
+ <CheckBox Content="Enable LibHB Scanning and Encoding (uses hb.dll instead of HandBrakeCLI.exe)" Margin="0,5,0,0" IsChecked="{Binding EnableLibHb}" />
<CheckBox Content="Enable Process Isolation (Run Scans and Encodes via an intermediate service)" Margin="20,10,0,0" IsChecked="{Binding EnableProcessIsolation}" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,0" Grid.Column="1">
<TextBlock Text="Server Port:" VerticalAlignment="Center" />
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml b/win/CS/HandBrakeWPF/Views/VideoView.xaml index 313216def..9e098596a 100644 --- a/win/CS/HandBrakeWPF/Views/VideoView.xaml +++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml @@ -17,6 +17,16 @@ <Style x:Key="LongToolTipHolder" TargetType="FrameworkElement">
<Setter Property="ToolTipService.ShowDuration" Value="20000" />
</Style>
+
+ <Style TargetType="ToolTip">
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <TextBlock TextWrapping="Wrap" Width="450" Text="{Binding}" />
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
</UserControl.Resources>
<Grid Margin="10,5,0,0">
@@ -177,7 +187,7 @@ <TextBlock Text="Extra Options:" Grid.Row="4" Grid.Column="0" Margin="0,10,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" />
<TextBox Text="{Binding ExtraArguments, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Height="30" MaxLines="2" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="3" Margin="5,10,0,0" VerticalAlignment="Center"
- ToolTip="{Binding FullOptionsTooltip}"/>
+ ToolTip="{Binding FullOptionsTooltip}" Style="{StaticResource LongToolTipHolder}" />
</Grid>
diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index 690930721..d14f6f7f3 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -440,4 +440,12 @@ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">30</anyType>
</value>
</item>
+ <item>
+ <key>
+ <string>DisableLibHbFeatures</string>
+ </key>
+ <value>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ </value>
+ </item>
</dictionary>
\ No newline at end of file |