summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-01-11 18:12:28 +0000
committersr55 <[email protected]>2015-01-11 18:12:28 +0000
commit04392778932f7e6f424039f30d775ac4e1fd7b2b (patch)
treefa07d529e0a7fbb720173f40ae925e492ab117cb /win/CS/HandBrakeWPF
parent095576f3fbb5c96c9ef58fe45af9390bf718e1dd (diff)
WinGui: Make LibHB a first class citizen for encoding. (Now on by default). Update for JSON API changes. Bug fixes in subtitles and twopass encoding.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6732 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r--win/CS/HandBrakeWPF/App.xaml.cs2
-rw-r--r--win/CS/HandBrakeWPF/AppArguments.cs2
-rw-r--r--win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs3
-rw-r--r--win/CS/HandBrakeWPF/UserSettingConstants.cs2
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs4
-rw-r--r--win/CS/HandBrakeWPF/Views/OptionsView.xaml12
-rw-r--r--win/CS/HandBrakeWPF/defaultsettings.xml4
7 files changed, 18 insertions, 11 deletions
diff --git a/win/CS/HandBrakeWPF/App.xaml.cs b/win/CS/HandBrakeWPF/App.xaml.cs
index a744d859c..ce13693ab 100644
--- a/win/CS/HandBrakeWPF/App.xaml.cs
+++ b/win/CS/HandBrakeWPF/App.xaml.cs
@@ -68,7 +68,7 @@ namespace HandBrakeWPF
if (e.Args.Any(f => f.Equals("--enable-libhb")))
{
- AppArguments.EnableLibHB = true;
+ AppArguments.UseLibHb = true;
}
base.OnStartup(e);
diff --git a/win/CS/HandBrakeWPF/AppArguments.cs b/win/CS/HandBrakeWPF/AppArguments.cs
index 107eb7e5c..ecd47fb35 100644
--- a/win/CS/HandBrakeWPF/AppArguments.cs
+++ b/win/CS/HandBrakeWPF/AppArguments.cs
@@ -22,6 +22,6 @@ namespace HandBrakeWPF
/// <summary>
/// Gets or sets a value indicating whether enable lib hb.
/// </summary>
- public static bool EnableLibHB { get; set; }
+ public static bool UseLibHb { get; set; }
}
}
diff --git a/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs b/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs
index 7c679d033..b63cd3d68 100644
--- a/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs
+++ b/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs
@@ -49,7 +49,7 @@ namespace HandBrakeWPF.Services
/// </param>
public EncodeServiceWrapper(IUserSettingService userSettingService)
{
- var useLibHb = AppArguments.EnableLibHB ? AppArguments.EnableLibHB : userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableLibHb);
+ var useLibHb = AppArguments.UseLibHb ? AppArguments.UseLibHb : userSettingService.GetUserSetting<bool>(UserSettingConstants.UseLibHb);
var useProcessIsolation =
userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableProcessIsolation);
var port = userSettingService.GetUserSetting<string>(UserSettingConstants.ServerPort);
@@ -70,7 +70,6 @@ namespace HandBrakeWPF.Services
catch (Exception exc)
{
// Try to recover from errors.
- userSettingService.SetUserSetting(UserSettingConstants.EnableLibHb, false);
throw new GeneralApplicationException(
"Unable to initialise LibHB or Background worker service",
"Falling back to using HandBrakeCLI.exe. Setting has been reset",
diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs
index 18a410bb3..e2e258c00 100644
--- a/win/CS/HandBrakeWPF/UserSettingConstants.cs
+++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs
@@ -109,7 +109,7 @@ namespace HandBrakeWPF
/// <summary>
/// Enable the use of LibHb instead of HandBrakeCLI
/// </summary>
- public const string EnableLibHb = "EnableLibHb";
+ public const string UseLibHb = "UseLibHb";
/// <summary>
/// Growl Encodes
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index 38c1dcd55..51e30fdb1 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -1567,7 +1567,7 @@ namespace HandBrakeWPF.ViewModels
int.TryParse(userSettingService.GetUserSetting<string>(UserSettingConstants.ServerPort), out port);
this.ServerPort = port;
this.EnableProcessIsolation = userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableProcessIsolation);
- this.EnableLibHb = userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableLibHb);
+ this.EnableLibHb = userSettingService.GetUserSetting<bool>(UserSettingConstants.UseLibHb);
}
/// <summary>
@@ -1630,7 +1630,7 @@ namespace HandBrakeWPF.ViewModels
userSettingService.SetUserSetting(UserSettingConstants.DisableLibDvdNav, this.DisableLibdvdNav);
userSettingService.SetUserSetting(UserSettingConstants.EnableProcessIsolation, this.EnableProcessIsolation);
userSettingService.SetUserSetting(UserSettingConstants.ServerPort, this.ServerPort.ToString(CultureInfo.InvariantCulture));
- userSettingService.SetUserSetting(UserSettingConstants.EnableLibHb, this.EnableLibHb);
+ userSettingService.SetUserSetting(UserSettingConstants.UseLibHb, this.EnableLibHb);
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
index 900a7af7d..f2fe2fa02 100644
--- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
@@ -328,11 +328,19 @@
<StackPanel Orientation="Vertical" Margin="0,10,0,20" Visibility="Visible">
- <TextBlock Text="Alpha Features" FontSize="14" Margin="0,0,0,10"/>
+ <TextBlock Text="Encode Engine" FontSize="14" Margin="0,0,0,10"/>
<StackPanel Orientation="Vertical" Margin="20,0,0,0">
- <CheckBox Content="Use LibHB for Encoding (uses hb.dll instead of HandBrakeCLI.exe)" Margin="0,5,0,0" IsChecked="{Binding EnableLibHb}" />
+ <CheckBox Content="Use LibHB instead of HandBrakeCLI.exe for encoding." Margin="0,5,0,5" IsChecked="{Binding EnableLibHb}" />
+ <TextBlock Text="LibHB" FontWeight="Bold" />
+ <TextBlock Text="Accessing LibHB directly, allows the app to pause and restart encodes. Process isolation is not currently supported, so a crash will prevent the rest of the queue from completing."
+ TextWrapping="Wrap" Margin="10,0,10,5"/>
+ <TextBlock Text="HandBrakeCLI.exe" FontWeight="Bold" />
+ <TextBlock Text="Using HandBrakeCLI.exe provides process isolation so a crash during an encode won't prevent the rest of the queue from completing. You won't however be able to pause encodes."
+ TextWrapping="Wrap" Margin="10,0,10,5"/>
+
+
<CheckBox Content="Enable Process Isolation (Run Encodes via an intermediate service)" Margin="20,10,0,0" IsChecked="{Binding EnableProcessIsolation}" Visibility="Collapsed" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,0" Visibility="Collapsed">
<TextBlock Text="Server Port:" VerticalAlignment="Center" />
diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml
index 5525a2e05..afffb4c8a 100644
--- a/win/CS/HandBrakeWPF/defaultsettings.xml
+++ b/win/CS/HandBrakeWPF/defaultsettings.xml
@@ -386,10 +386,10 @@
</item>
<item>
<key>
- <string>EnableLibHb</string>
+ <string>UseLibHb</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>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
</value>
</item>
<item>