diff options
Diffstat (limited to 'win/CS/HandBrakeWPF')
9 files changed, 27 insertions, 26 deletions
diff --git a/win/CS/HandBrakeWPF/Controls/StatusPanel.xaml.cs b/win/CS/HandBrakeWPF/Controls/StatusPanel.xaml.cs index 404e2981b..90afe8e33 100644 --- a/win/CS/HandBrakeWPF/Controls/StatusPanel.xaml.cs +++ b/win/CS/HandBrakeWPF/Controls/StatusPanel.xaml.cs @@ -104,7 +104,6 @@ namespace HandBrakeWPF.Controls /// </param>
private static void OnCancelActionSet(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
-
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Helpers/PictureSize.cs b/win/CS/HandBrakeWPF/Helpers/PictureSize.cs index b14695922..12a994914 100644 --- a/win/CS/HandBrakeWPF/Helpers/PictureSize.cs +++ b/win/CS/HandBrakeWPF/Helpers/PictureSize.cs @@ -186,7 +186,7 @@ namespace HandBrakeWPF.Helpers maxHeight = job.MaxHeight,
mode = (int)(hb_anamorphic_mode_t)job.AnamorphicMode,
modulus = job.Modulus.HasValue ? job.Modulus.Value : 16,
- geometry = new hb_geometry_s { height = job.Height, width = job.Width, par = job.AnamorphicMode != Anamorphic.Custom ? new hb_rational_t { den = title.ParH, num = title.ParW } : new hb_rational_t { den = job.ParH, num = job.ParW }}
+ geometry = new hb_geometry_s { height = job.Height, width = job.Width, par = job.AnamorphicMode != Anamorphic.Custom ? new hb_rational_t { den = title.ParH, num = title.ParW } : new hb_rational_t { den = job.ParH, num = job.ParW }}
};
hb_geometry_s sourceGeometry = new hb_geometry_s
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Factories/PlistFactory.cs b/win/CS/HandBrakeWPF/Services/Presets/Factories/PlistFactory.cs index 804f77b19..eb38c62ad 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/Factories/PlistFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/Factories/PlistFactory.cs @@ -148,7 +148,6 @@ namespace HandBrakeWPF.Services.Presets.Factories AddEncodeElement(xmlWriter, "Mp4iPodCompatible", "integer", parsed.IPod5GSupport ? "1" : "0");
AddEncodeElement(xmlWriter, "PictureAutoCrop", "integer", "1");
-
// Filters
AddEncodeElement(xmlWriter, "PictureDeblock", "integer", parsed.Deblock.ToString());
@@ -158,7 +157,6 @@ namespace HandBrakeWPF.Services.Presets.Factories AddEncodeElement(xmlWriter, "PictureDeinterlaceCustom", "string", parsed.Deinterlace == Deinterlace.Custom ? parsed.CustomDeinterlace : string.Empty);
AddEncodeElement(xmlWriter, "PictureDeinterlace", "integer", ((int)parsed.Deinterlace).ToString());
-
AddEncodeElement(xmlWriter, "PictureDenoiseFilter", "string", parsed.Denoise.ToString().ToLower());
AddEncodeElement(xmlWriter, "PictureDenoiseCustom", "string", parsed.DenoisePreset == DenoisePreset.Custom ? parsed.CustomDenoise : string.Empty);
AddEncodeElement(xmlWriter, "PictureDenoisePreset", "string", parsed.DenoisePreset.ToString().ToLower());
@@ -212,7 +210,6 @@ namespace HandBrakeWPF.Services.Presets.Factories AddEncodeElement(xmlWriter, "VideoOptionExtra", "string", parsed.ExtraAdvancedArguments);
AddEncodeElement(xmlWriter, "x264UseAdvancedOptions", "integer", parsed.ShowAdvancedTab ? "1" : "0");
-
int videoQualityType = 0;
if (parsed.VideoBitrate != null) videoQualityType = 1;
else if (parsed.Quality != null) videoQualityType = 2;
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Factories/PlistPresetFactory.cs b/win/CS/HandBrakeWPF/Services/Presets/Factories/PlistPresetFactory.cs index a8b0f43a3..d58e111eb 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/Factories/PlistPresetFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/Factories/PlistPresetFactory.cs @@ -279,7 +279,6 @@ namespace HandBrakeWPF.Services.Presets.Factories preset.Task.AdvancedEncoderOptions = kvp.Value;
break;
-
// Preset Information
case "PresetBuildNumber":
preset.Version = kvp.Value;
diff --git a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs index c0355a3bf..b7be8bfdc 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs @@ -12,6 +12,7 @@ namespace HandBrakeWPF.Services.Presets using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+ using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
@@ -318,6 +319,7 @@ namespace HandBrakeWPF.Services.Presets catch (Exception exc)
{
// Do Nothing.
+ Debug.WriteLine(exc);
}
}
}
@@ -446,6 +448,7 @@ namespace HandBrakeWPF.Services.Presets catch (Exception exc)
{
// Do Nothing.
+ Debug.WriteLine(exc);
}
}
}
@@ -478,6 +481,7 @@ namespace HandBrakeWPF.Services.Presets catch (Exception exc)
{
// Do Nothing
+ Debug.WriteLine(exc);
}
}
@@ -500,6 +504,7 @@ namespace HandBrakeWPF.Services.Presets catch (Exception exc)
{
createBackup = true;
+ Debug.WriteLine(exc);
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs index 7e6cc2525..768c127d6 100644 --- a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs @@ -19,19 +19,17 @@ namespace HandBrakeWPF.ViewModels using System.Windows;
using System.Windows.Media.Imaging;
- using HandBrake.ApplicationServices.Model;
+ using HandBrake.ApplicationServices.Interop.Model.Encoding;
+ using HandBrake.ApplicationServices.Services.Encode;
using HandBrake.ApplicationServices.Services.Encode.EventArgs;
using HandBrake.ApplicationServices.Services.Encode.Interfaces;
using HandBrake.ApplicationServices.Services.Encode.Model;
using HandBrake.ApplicationServices.Services.Encode.Model.Models;
using HandBrake.ApplicationServices.Services.Scan.Interfaces;
using HandBrake.ApplicationServices.Services.Scan.Model;
- using HandBrake.ApplicationServices.Interop.Model.Encoding;
- using HandBrake.ApplicationServices.Services.Encode;
using HandBrakeWPF.Factories;
using HandBrakeWPF.Properties;
- using HandBrakeWPF.Services;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.Services.Queue.Model;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -126,15 +124,19 @@ namespace HandBrakeWPF.ViewModels /// <param name="userSettingService">
/// The user Setting Service.
/// </param>
- public StaticPreviewViewModel(IScan scanService, IUserSettingService userSettingService)
+ /// <param name="errorService">
+ /// The error Service.
+ /// </param>
+ public StaticPreviewViewModel(IScan scanService, IUserSettingService userSettingService, IErrorService errorService)
{
this.scanService = scanService;
this.selectedPreviewImage = 1;
- this.Title = Properties.Resources.Preview;
+ this.Title = Resources.Preview;
this.PreviewNotAvailable = true;
// Live Preview
this.userSettingService = userSettingService;
+ this.errorService = errorService;
this.encodeService = new LibEncode(); // Preview needs a seperate instance rather than the shared singleton. This could maybe do with being refactored at some point
this.Title = "Preview";
@@ -410,7 +412,7 @@ namespace HandBrakeWPF.ViewModels this.Task = task;
this.UpdatePreviewFrame();
this.DisplayName = "Picture Preview";
- this.Title = Properties.Resources.Preview;
+ this.Title = Resources.Preview;
this.ScannedSource = scannedSource;
}
@@ -446,6 +448,7 @@ namespace HandBrakeWPF.ViewModels catch (Exception exc)
{
PreviewNotAvailable = true;
+ Debug.WriteLine(exc);
}
if (image != null)
@@ -470,13 +473,13 @@ namespace HandBrakeWPF.ViewModels if (ea.NewSize.Width > workArea.Width)
{
this.Width = (int)Math.Round(workArea.Width, 0) - 20;
- this.Title = Properties.Resources.Preview_Scaled;
+ this.Title = Resources.Preview_Scaled;
}
if (ea.NewSize.Height > workArea.Height)
{
this.Height = (int)Math.Round(workArea.Height, 0) - 20;
- this.Title = Properties.Resources.Preview_Scaled;
+ this.Title = Resources.Preview_Scaled;
}
}
#endregion
@@ -514,21 +517,21 @@ namespace HandBrakeWPF.ViewModels catch (Exception)
{
this.IsEncoding = false;
- this.errorService.ShowMessageBox("Unable to delete previous preview file. You may need to restart the application.",
+ this.errorService.ShowMessageBox("Unable to delete previous preview file. You may need to restart the application.",
Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
}
if (this.Task == null || string.IsNullOrEmpty(Task.Source))
{
- this.errorService.ShowMessageBox("You must first scan a source and setup your encode before creating a preview.",
+ this.errorService.ShowMessageBox("You must first scan a source and setup your encode before creating a preview.",
Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
EncodeTask encodeTask = new EncodeTask(this.Task)
{
- PreviewEncodeDuration = this.Duration,
- PreviewEncodeStartAt = this.SelectedPreviewImage,
+ PreviewEncodeDuration = this.Duration,
+ PreviewEncodeStartAt = this.SelectedPreviewImage,
PointToPointMode = PointToPointMode.Preview
};
@@ -561,6 +564,7 @@ namespace HandBrakeWPF.ViewModels #endregion
#region Private Methods
+
/// <summary>
/// Play the Encoded file
/// </summary>
@@ -600,7 +604,7 @@ namespace HandBrakeWPF.ViewModels }
else
{
- this.errorService.ShowMessageBox("Unable to detect VLC Player. \nPlease make sure VLC is installed and the directory specified in HandBrake's options is correct. (See: \"Tools Menu > Options > Picture Tab\")",
+ this.errorService.ShowMessageBox("Unable to detect VLC Player. \nPlease make sure VLC is installed and the directory specified in HandBrake's options is correct. (See: \"Tools Menu > Options > Picture Tab\")",
Resources.Error, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
@@ -614,7 +618,7 @@ namespace HandBrakeWPF.ViewModels }
else
{
- this.errorService.ShowMessageBox("Unable to find the preview file. Either the file was deleted or the encode failed. Check the activity log for details.",
+ this.errorService.ShowMessageBox("Unable to find the preview file. Either the file was deleted or the encode failed. Check the activity log for details.",
Resources.Error, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
@@ -631,7 +635,7 @@ namespace HandBrakeWPF.ViewModels // Make sure we are not already encoding and if we are then display an error.
if (encodeService.IsEncoding)
{
- this.errorService.ShowMessageBox("Handbrake is already encoding a video! Only one file can be encoded at any one time.",
+ this.errorService.ShowMessageBox("Handbrake is already encoding a video! Only one file can be encoded at any one time.",
Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
@@ -645,6 +649,7 @@ namespace HandBrakeWPF.ViewModels #endregion
#region Event Handlers
+
/// <summary>
/// Handle Encode Progress Events
/// </summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs index 33aa86be1..14c6a9899 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs @@ -667,7 +667,6 @@ namespace HandBrakeWPF.ViewModels SourceTrack = source,
};
-
// Burn-in Behaviours
if (this.SubtitleBehaviours.SelectedBurnInBehaviour == SubtitleBurnInBehaviourModes.ForeignAudio
|| this.SubtitleBehaviours.SelectedBurnInBehaviour == SubtitleBurnInBehaviourModes.ForeignAudioPreferred)
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 6d72d0590..47cc4f6a3 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -1220,7 +1220,6 @@ namespace HandBrakeWPF.ViewModels this.VideoLevel = VideoLevel.Auto;
}
-
// Setup Presets.
this.VideoPresets.Clear();
if (encoder.Presets != null)
@@ -1247,7 +1246,6 @@ namespace HandBrakeWPF.ViewModels // Update the Quality Slider. Make sure the bounds are up to date with the users settings.
this.SetQualitySliderBounds();
-
// Update control display
this.UseAdvancedTab = selectedEncoder != VideoEncoder.QuickSync && this.UseAdvancedTab;
this.DisplayOptimiseOptions = this.SelectedVideoEncoder == VideoEncoder.X264 || this.SelectedVideoEncoder == VideoEncoder.X265 || this.SelectedVideoEncoder == VideoEncoder.QuickSync;
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs index 7f8be26ab..fc5a141b9 100644 --- a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs @@ -73,7 +73,6 @@ namespace HandBrakeWPF.Views this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.G, ModifierKeys.Control | ModifierKeys.Shift)), new KeyGesture(Key.G, ModifierKeys.Control | ModifierKeys.Shift))); // Garbage Colleciton
this.InputBindings.Add(new InputBinding(new ProcessShortcutCommand(new KeyGesture(Key.F1, ModifierKeys.None)), new KeyGesture(Key.F1, ModifierKeys.None))); // Help
-
// Enable Windows 7 Taskbar progress indication.
if (this.TaskbarItemInfo == null)
{
|