diff options
author | sr55 <[email protected]> | 2021-02-04 20:56:23 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2021-02-04 20:56:23 +0000 |
commit | aa71590c27fed3e0aa1f14c9c886e299cb1a15f1 (patch) | |
tree | 48d33d173238d9b34ea287608c0e6786907636dc /win | |
parent | db589c5559f2e556592db10b052ed688fa199b0e (diff) |
WinGui: Another smaller found of Namespace changes for HandBrake.Interop
Diffstat (limited to 'win')
45 files changed, 110 insertions, 113 deletions
diff --git a/win/CS/HandBrake.Interop/Interop/HandBrakeEncoderHelpers.cs b/win/CS/HandBrake.Interop/Interop/HandBrakeEncoderHelpers.cs index acf30fad0..33712955d 100644 --- a/win/CS/HandBrake.Interop/Interop/HandBrakeEncoderHelpers.cs +++ b/win/CS/HandBrake.Interop/Interop/HandBrakeEncoderHelpers.cs @@ -715,7 +715,7 @@ namespace HandBrake.Interop.Interop public static List<int> GetQsvAdaptorList() { - if (SystemInfo.IsQsvAvailable) + if (HandBrakeHardwareEncoderHelper.IsQsvAvailable) { IntPtr gpuListPtr = HBFunctions.hb_qsv_adapters_list(); diff --git a/win/CS/HandBrake.Interop/Interop/HandBrakeFilterHelpers.cs b/win/CS/HandBrake.Interop/Interop/HandBrakeFilterHelpers.cs index 9cc765770..d2285b818 100644 --- a/win/CS/HandBrake.Interop/Interop/HandBrakeFilterHelpers.cs +++ b/win/CS/HandBrake.Interop/Interop/HandBrakeFilterHelpers.cs @@ -19,7 +19,7 @@ namespace HandBrake.Interop.Interop using HandBrake.Interop.Interop.Helpers; using HandBrake.Interop.Interop.Interfaces.Model.Filters; using HandBrake.Interop.Interop.Json.Filters; - using HandBrake.Interop.Json; + using HandBrake.Interop.Utilities; /// <summary> /// The hand brake filter helpers. diff --git a/win/CS/HandBrake.Interop/Utilities/SystemInfo.cs b/win/CS/HandBrake.Interop/Interop/HandBrakeHardwareEncoderHelper.cs index 952d0b1c5..f0e55062a 100644 --- a/win/CS/HandBrake.Interop/Utilities/SystemInfo.cs +++ b/win/CS/HandBrake.Interop/Interop/HandBrakeHardwareEncoderHelper.cs @@ -1,5 +1,5 @@ // -------------------------------------------------------------------------------------------------------------------- -// <copyright file="SystemInfo.cs" company="HandBrake Project (https://handbrake.fr)"> +// <copyright file="HandBrakeHardwareEncoderHelper.cs" company="HandBrake Project (https://handbrake.fr)"> // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // </copyright> // <summary> @@ -7,14 +7,14 @@ // </summary> // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.Interop.Utilities +namespace HandBrake.Interop.Interop { using System; using System.Diagnostics; - using Interop.HbLib; + using HandBrake.Interop.Interop.HbLib; - public class SystemInfo + public class HandBrakeHardwareEncoderHelper { private static bool? isNvencH264Available; // Local cache to prevent log spam. private static bool? isNvencH265Available; diff --git a/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs index 440983f14..15f34fd14 100644 --- a/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/Interop/HandBrakeInstance.cs @@ -19,10 +19,10 @@ namespace HandBrake.Interop.Interop using System.Timers; using System.Xml; - using HandBrake.Interop.Interop.EventArgs; using HandBrake.Interop.Interop.HbLib; using HandBrake.Interop.Interop.Helpers; using HandBrake.Interop.Interop.Interfaces; + using HandBrake.Interop.Interop.Interfaces.EventArgs; using HandBrake.Interop.Interop.Interfaces.Model; using HandBrake.Interop.Interop.Interfaces.Model.Encoders; using HandBrake.Interop.Interop.Interfaces.Model.Picture; @@ -30,7 +30,7 @@ namespace HandBrake.Interop.Interop using HandBrake.Interop.Interop.Json.Encode; using HandBrake.Interop.Interop.Json.Scan; using HandBrake.Interop.Interop.Json.State; - using HandBrake.Interop.Json; + using HandBrake.Interop.Utilities; public class HandBrakeInstance : IHandBrakeInstance, IDisposable { diff --git a/win/CS/HandBrake.Interop/Interop/HandBrakePresetService.cs b/win/CS/HandBrake.Interop/Interop/HandBrakePresetService.cs index 2443a24b4..fdd987336 100644 --- a/win/CS/HandBrake.Interop/Interop/HandBrakePresetService.cs +++ b/win/CS/HandBrake.Interop/Interop/HandBrakePresetService.cs @@ -19,7 +19,7 @@ namespace HandBrake.Interop.Interop using HandBrake.Interop.Interop.Helpers; using HandBrake.Interop.Interop.Interfaces.Model.Presets; using HandBrake.Interop.Interop.Json.Presets; - using HandBrake.Interop.Json; + using HandBrake.Interop.Utilities; /// <summary> /// The hand brake preset service. diff --git a/win/CS/HandBrake.Interop/Interop/HandBrakeUtils.cs b/win/CS/HandBrake.Interop/Interop/HandBrakeUtils.cs index e2f1fd868..653cbcd64 100644 --- a/win/CS/HandBrake.Interop/Interop/HandBrakeUtils.cs +++ b/win/CS/HandBrake.Interop/Interop/HandBrakeUtils.cs @@ -16,11 +16,11 @@ namespace HandBrake.Interop.Interop using System.Text.Json; using System.Xml; - using HandBrake.Interop.Interop.EventArgs; using HandBrake.Interop.Interop.HbLib; + using HandBrake.Interop.Interop.Interfaces.EventArgs; using HandBrake.Interop.Interop.Json.Anamorphic; using HandBrake.Interop.Interop.Json.Shared; - using HandBrake.Interop.Json; + using HandBrake.Interop.Utilities; /// <summary> /// HandBrake Interop Utilities diff --git a/win/CS/HandBrake.Interop/Utilities/VersionHelper.cs b/win/CS/HandBrake.Interop/Interop/HandBrakeVersionHelper.cs index 6b381a6ee..6d40ddf04 100644 --- a/win/CS/HandBrake.Interop/Utilities/VersionHelper.cs +++ b/win/CS/HandBrake.Interop/Interop/HandBrakeVersionHelper.cs @@ -14,7 +14,7 @@ namespace HandBrake.Interop.Utilities using HandBrake.Interop.Interop.HbLib; - public class VersionHelper + public class HandBrakeVersionHelper { /// <summary> /// Gets the HandBrake version string. diff --git a/win/CS/HandBrake.Interop/Interop/EventArgs/EncodeCompletedEventArgs.cs b/win/CS/HandBrake.Interop/Interop/Interfaces/EventArgs/EncodeCompletedEventArgs.cs index 98368cd93..158d2eb84 100644 --- a/win/CS/HandBrake.Interop/Interop/EventArgs/EncodeCompletedEventArgs.cs +++ b/win/CS/HandBrake.Interop/Interop/Interfaces/EventArgs/EncodeCompletedEventArgs.cs @@ -7,7 +7,7 @@ // </summary> // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.Interop.Interop.EventArgs +namespace HandBrake.Interop.Interop.Interfaces.EventArgs { using System; diff --git a/win/CS/HandBrake.Interop/Interop/EventArgs/EncodeProgressEventArgs.cs b/win/CS/HandBrake.Interop/Interop/Interfaces/EventArgs/EncodeProgressEventArgs.cs index bad483d78..54e9d6f5d 100644 --- a/win/CS/HandBrake.Interop/Interop/EventArgs/EncodeProgressEventArgs.cs +++ b/win/CS/HandBrake.Interop/Interop/Interfaces/EventArgs/EncodeProgressEventArgs.cs @@ -7,7 +7,7 @@ // </summary> // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.Interop.Interop.EventArgs +namespace HandBrake.Interop.Interop.Interfaces.EventArgs { using System; diff --git a/win/CS/HandBrake.Interop/Interop/EventArgs/MessageLoggedEventArgs.cs b/win/CS/HandBrake.Interop/Interop/Interfaces/EventArgs/MessageLoggedEventArgs.cs index 22f74b0b3..7fb6b314e 100644 --- a/win/CS/HandBrake.Interop/Interop/EventArgs/MessageLoggedEventArgs.cs +++ b/win/CS/HandBrake.Interop/Interop/Interfaces/EventArgs/MessageLoggedEventArgs.cs @@ -7,7 +7,7 @@ // </summary> // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.Interop.Interop.EventArgs +namespace HandBrake.Interop.Interop.Interfaces.EventArgs { using System; diff --git a/win/CS/HandBrake.Interop/Interop/EventArgs/ScanProgressEventArgs.cs b/win/CS/HandBrake.Interop/Interop/Interfaces/EventArgs/ScanProgressEventArgs.cs index 274210a9b..c16f0fd0a 100644 --- a/win/CS/HandBrake.Interop/Interop/EventArgs/ScanProgressEventArgs.cs +++ b/win/CS/HandBrake.Interop/Interop/Interfaces/EventArgs/ScanProgressEventArgs.cs @@ -7,7 +7,7 @@ // </summary> // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.Interop.Interop.EventArgs +namespace HandBrake.Interop.Interop.Interfaces.EventArgs { using System; diff --git a/win/CS/HandBrake.Interop/Interop/Interfaces/IEncodeInstance.cs b/win/CS/HandBrake.Interop/Interop/Interfaces/IEncodeInstance.cs index e7a52fbfa..88e151838 100644 --- a/win/CS/HandBrake.Interop/Interop/Interfaces/IEncodeInstance.cs +++ b/win/CS/HandBrake.Interop/Interop/Interfaces/IEncodeInstance.cs @@ -11,7 +11,7 @@ namespace HandBrake.Interop.Interop.Interfaces { using System; - using HandBrake.Interop.Interop.EventArgs; + using HandBrake.Interop.Interop.Interfaces.EventArgs; using HandBrake.Interop.Interop.Json.Encode; using HandBrake.Interop.Interop.Json.State; diff --git a/win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs b/win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs index 283dfe01f..3d2c8693b 100644 --- a/win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/Interop/Interfaces/IHandBrakeInstance.cs @@ -11,9 +11,7 @@ namespace HandBrake.Interop.Interop.Interfaces { using System; - using HandBrake.Interop.Interop.EventArgs; - using HandBrake.Interop.Interop.Interfaces.Model; - using HandBrake.Interop.Interop.Interfaces.Model.Picture; + using HandBrake.Interop.Interop.Interfaces.EventArgs; using HandBrake.Interop.Interop.Interfaces.Model.Preview; using HandBrake.Interop.Interop.Json.Scan; @@ -27,7 +25,7 @@ namespace HandBrake.Interop.Interop.Interfaces /// <summary> /// Fires when a scan has completed. /// </summary> - event EventHandler<EventArgs> ScanCompleted; + event EventHandler<System.EventArgs> ScanCompleted; /// <summary> /// Fires for progress updates when scanning. diff --git a/win/CS/HandBrake.Interop/Model/HBConfiguration.cs b/win/CS/HandBrake.Interop/Interop/Interfaces/Model/HBConfiguration.cs index 837f0d94a..9777e56b7 100644 --- a/win/CS/HandBrake.Interop/Model/HBConfiguration.cs +++ b/win/CS/HandBrake.Interop/Interop/Interfaces/Model/HBConfiguration.cs @@ -7,7 +7,7 @@ // </summary> // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.Interop.Model +namespace HandBrake.Interop.Interop.Interfaces.Model { public class HBConfiguration { diff --git a/win/CS/HandBrake.Interop/Json/JsonSettings.cs b/win/CS/HandBrake.Interop/Utilities/JsonSettings.cs index 56cb229cc..8911e2d51 100644 --- a/win/CS/HandBrake.Interop/Json/JsonSettings.cs +++ b/win/CS/HandBrake.Interop/Utilities/JsonSettings.cs @@ -7,12 +7,15 @@ // </summary> // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.Interop.Json +namespace HandBrake.Interop.Utilities { using System.Text.Json; public class JsonSettings { + /// <summary> + /// For consistent use of JSON settings between this library and the consumers. + /// </summary> public static JsonSerializerOptions Options = new JsonSerializerOptions { IgnoreNullValues = true, diff --git a/win/CS/HandBrake.Interop/Utilities/LanguageUtilities.cs b/win/CS/HandBrake.Interop/Utilities/LanguageUtilities.cs index fad0307b5..96c4e6ba9 100644 --- a/win/CS/HandBrake.Interop/Utilities/LanguageUtilities.cs +++ b/win/CS/HandBrake.Interop/Utilities/LanguageUtilities.cs @@ -266,7 +266,7 @@ namespace HandBrake.Interop.Utilities List<string> names = new List<string>(); foreach (var item in languageCodes) { - KeyValuePair<string, string> name = MapLanguages().FirstOrDefault(v => v.Value == item); // Slightly inefficient but small set anyway so not a big issue. + KeyValuePair<string, string> name = MapLanguages().FirstOrDefault(v => v.Value == item); // Slightly inefficient but small set anyway so not a big issue. names.Add(name.Key); } diff --git a/win/CS/HandBrake.Worker/Logging/LogHandler.cs b/win/CS/HandBrake.Worker/Logging/LogHandler.cs index 6a1f7bb6f..7752be874 100644 --- a/win/CS/HandBrake.Worker/Logging/LogHandler.cs +++ b/win/CS/HandBrake.Worker/Logging/LogHandler.cs @@ -18,7 +18,7 @@ namespace HandBrake.Worker.Logging using System.Text; using HandBrake.Interop.Interop; - using HandBrake.Interop.Interop.EventArgs; + using HandBrake.Interop.Interop.Interfaces.EventArgs; using HandBrake.Worker.Logging.Interfaces; using HandBrake.Worker.Logging.Models; diff --git a/win/CS/HandBrake.Worker/Routing/ApiRouter.cs b/win/CS/HandBrake.Worker/Routing/ApiRouter.cs index e1ea632a8..b714194f2 100644 --- a/win/CS/HandBrake.Worker/Routing/ApiRouter.cs +++ b/win/CS/HandBrake.Worker/Routing/ApiRouter.cs @@ -15,8 +15,8 @@ namespace HandBrake.Worker.Routing using System.Text.Json; using HandBrake.Interop.Interop; + using HandBrake.Interop.Interop.Interfaces.EventArgs; using HandBrake.Interop.Interop.Json.State; - using HandBrake.Interop.Json; using HandBrake.Interop.Utilities; using HandBrake.Worker.Logging; using HandBrake.Worker.Logging.Interfaces; @@ -36,7 +36,7 @@ namespace HandBrake.Worker.Routing public string GetVersionInfo(HttpListenerRequest request) { - string versionInfo = JsonSerializer.Serialize(VersionHelper.GetVersion(), JsonSettings.Options); + string versionInfo = JsonSerializer.Serialize(HandBrakeVersionHelper.GetVersion(), JsonSettings.Options); return versionInfo; } @@ -133,7 +133,7 @@ namespace HandBrake.Worker.Routing this.TerminationEvent?.Invoke(this, EventArgs.Empty); } - private void HandbrakeInstance_EncodeCompleted(object sender, Interop.Interop.EventArgs.EncodeCompletedEventArgs e) + private void HandbrakeInstance_EncodeCompleted(object sender, EncodeCompletedEventArgs e) { this.completedState = new JsonState() { WorkDone = new WorkDone() { Error = e.Error } }; this.completedState.State = "WORKDONE"; diff --git a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs index e7e2dc3fb..6df7ea48c 100644 --- a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs @@ -14,10 +14,11 @@ namespace HandBrakeWPF.Converters using System.Globalization;
using System.Windows.Data;
- using HandBrake.Interop.Model;
+ using HandBrake.Interop.Interop.Interfaces.Model.Picture;
using HandBrakeWPF.Model.Filters;
using HandBrakeWPF.Model.Options;
+ using HandBrakeWPF.Model.Video;
using HandBrakeWPF.Services.Queue.Model;
using HandBrakeWPF.Utilities;
using OutputFormat = HandBrakeWPF.Services.Encode.Model.Models.OutputFormat;
diff --git a/win/CS/HandBrakeWPF/Converters/Video/ScalingConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/ScalingConverter.cs index f725bb72a..2314bda0a 100644 --- a/win/CS/HandBrakeWPF/Converters/Video/ScalingConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Video/ScalingConverter.cs @@ -13,10 +13,11 @@ namespace HandBrakeWPF.Converters.Video using System.Globalization;
using System.Windows.Data;
- using HandBrake.Interop.Model;
+ using HandBrake.Interop.Interop.Interfaces.Model.Picture;
using HandBrake.Interop.Utilities;
using HandBrakeWPF.Model;
+ using HandBrakeWPF.Model.Video;
using HandBrakeWPF.Utilities;
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs index 69ebf9f8a..a469d9ecd 100644 --- a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs @@ -20,10 +20,9 @@ namespace HandBrakeWPF.Converters.Video using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.Utilities;
- using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask;
- using OutputFormat = HandBrakeWPF.Services.Encode.Model.Models.OutputFormat;
- using SystemInfo = HandBrake.Interop.Utilities.SystemInfo;
- using VideoEncoder = HandBrakeWPF.Model.Video.VideoEncoder;
+ using EncodeTask = Services.Encode.Model.EncodeTask;
+ using OutputFormat = Services.Encode.Model.Models.OutputFormat;
+ using VideoEncoder = Model.Video.VideoEncoder;
/// <summary>
/// Video Encoder Converter
@@ -90,37 +89,37 @@ namespace HandBrakeWPF.Converters.Video encoders.RemoveAll(ve => !(ve.Equals(VideoEncoder.VP9) || ve.Equals(VideoEncoder.VP8)));
}
- if (!isQsvEnabled || !SystemInfo.IsQsvAvailableH264)
+ if (!isQsvEnabled || !HandBrakeHardwareEncoderHelper.IsQsvAvailableH264)
{
encoders.Remove(VideoEncoder.QuickSync);
}
- if (!isQsvEnabled || !SystemInfo.IsQsvAvailableH265)
+ if (!isQsvEnabled || !HandBrakeHardwareEncoderHelper.IsQsvAvailableH265)
{
encoders.Remove(VideoEncoder.QuickSyncH265);
encoders.Remove(VideoEncoder.QuickSyncH26510b);
}
- else if (!SystemInfo.IsQsvAvailableH26510bit)
+ else if (!HandBrakeHardwareEncoderHelper.IsQsvAvailableH26510bit)
{
encoders.Remove(VideoEncoder.QuickSyncH26510b);
}
- if (!isVceEnabled || !SystemInfo.IsVceH264Available)
+ if (!isVceEnabled || !HandBrakeHardwareEncoderHelper.IsVceH264Available)
{
encoders.Remove(VideoEncoder.VceH264);
}
- if (!isVceEnabled || !SystemInfo.IsVceH265Available)
+ if (!isVceEnabled || !HandBrakeHardwareEncoderHelper.IsVceH265Available)
{
encoders.Remove(VideoEncoder.VceH265);
}
- if (!isNvencEnabled || !SystemInfo.IsNVEncH264Available)
+ if (!isNvencEnabled || !HandBrakeHardwareEncoderHelper.IsNVEncH264Available)
{
encoders.Remove(VideoEncoder.NvencH264);
}
- if (!isNvencEnabled || !SystemInfo.IsNVEncH265Available)
+ if (!isNvencEnabled || !HandBrakeHardwareEncoderHelper.IsNVEncH265Available)
{
encoders.Remove(VideoEncoder.NvencH265);
}
diff --git a/win/CS/HandBrakeWPF/EventArgs/QueueProgressEventArgs.cs b/win/CS/HandBrakeWPF/EventArgs/QueueProgressEventArgs.cs index a3d9918d7..60d343385 100644 --- a/win/CS/HandBrakeWPF/EventArgs/QueueProgressEventArgs.cs +++ b/win/CS/HandBrakeWPF/EventArgs/QueueProgressEventArgs.cs @@ -11,8 +11,6 @@ namespace HandBrakeWPF.EventArgs {
using System;
- using HandBrake.Interop.Model;
-
using HandBrakeWPF.Services.Queue.Model;
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs b/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs index e2d4f448e..25ced2ae2 100644 --- a/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs +++ b/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs @@ -11,7 +11,7 @@ namespace HandBrakeWPF.Factories {
using Caliburn.Micro;
- using HandBrake.Interop.Model;
+ using HandBrake.Interop.Interop.Interfaces.Model;
using HandBrakeWPF.Services.Interfaces;
diff --git a/win/CS/HandBrakeWPF/Helpers/LogManager.cs b/win/CS/HandBrakeWPF/Helpers/LogManager.cs index 4d2418084..bb0ae31cd 100644 --- a/win/CS/HandBrakeWPF/Helpers/LogManager.cs +++ b/win/CS/HandBrakeWPF/Helpers/LogManager.cs @@ -14,7 +14,7 @@ namespace HandBrakeWPF.Helpers using Caliburn.Micro; using HandBrake.Interop.Interop; - using HandBrake.Interop.Interop.EventArgs; + using HandBrake.Interop.Interop.Interfaces.EventArgs; using HandBrakeWPF.Services.Logging.Interfaces; using HandBrakeWPF.Utilities; diff --git a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs index 373448c0b..df67625a8 100644 --- a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs @@ -18,7 +18,6 @@ namespace HandBrakeWPF.Helpers using System.Text.RegularExpressions;
using System.Windows;
- using HandBrake.Interop.Json;
using HandBrake.Interop.Utilities;
using HandBrakeWPF.Services.Interfaces;
@@ -50,7 +49,7 @@ namespace HandBrakeWPF.Helpers RecoverFromBackupFailure();
// Now check for all available recovery files. (There may be more than 1 for multi-instance support)
- string tempPath = DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly());
+ string tempPath = DirectoryUtilities.GetUserStoragePath(HandBrakeVersionHelper.IsNightly());
DirectoryInfo info = new DirectoryInfo(tempPath);
IEnumerable<FileInfo> foundFiles = info.GetFiles("*.json").Where(f => f.Name.StartsWith(QueueFileName));
var queueFiles = GetFilesExcludingActiveProcesses(foundFiles, filterQueueFiles);
@@ -127,7 +126,7 @@ namespace HandBrakeWPF.Helpers /// </returns>
public static bool RecoverQueue(IQueueService encodeQueue, IErrorService errorService, bool silentRecovery, List<string> queueFilter)
{
- string appDataPath = DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly());
+ string appDataPath = DirectoryUtilities.GetUserStoragePath(HandBrakeVersionHelper.IsNightly());
List<string> queueFiles = CheckQueueRecovery(queueFilter);
MessageBoxResult result = MessageBoxResult.None;
if (!silentRecovery)
@@ -178,7 +177,7 @@ namespace HandBrakeWPF.Helpers public static bool ArchivesExist()
{
- string appDataPath = DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly());
+ string appDataPath = DirectoryUtilities.GetUserStoragePath(HandBrakeVersionHelper.IsNightly());
DirectoryInfo info = new DirectoryInfo(appDataPath);
IEnumerable<FileInfo> foundFiles = info.GetFiles("*.archive").Where(f => f.Name.StartsWith(QueueFileName));
@@ -187,7 +186,7 @@ namespace HandBrakeWPF.Helpers private static void RecoverFromBackupFailure()
{
- string appDataPath = DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly());
+ string appDataPath = DirectoryUtilities.GetUserStoragePath(HandBrakeVersionHelper.IsNightly());
DirectoryInfo info = new DirectoryInfo(appDataPath);
IEnumerable<FileInfo> foundFiles = info.GetFiles("*.last");
@@ -236,7 +235,7 @@ namespace HandBrakeWPF.Helpers private static void CleanupFiles(List<string> removeFiles, bool archive)
{
- string appDataPath = DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly());
+ string appDataPath = DirectoryUtilities.GetUserStoragePath(HandBrakeVersionHelper.IsNightly());
// Cleanup old/unused queue files for now.
foreach (string file in removeFiles)
@@ -272,7 +271,7 @@ namespace HandBrakeWPF.Helpers /// </summary>
private static void TidyArchiveFiles()
{
- string appDataPath = DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly());
+ string appDataPath = DirectoryUtilities.GetUserStoragePath(HandBrakeVersionHelper.IsNightly());
DirectoryInfo info = new DirectoryInfo(appDataPath);
IEnumerable<FileInfo> foundFiles = info.GetFiles("*.archive").Where(f => f.Name.StartsWith(QueueFileName));
@@ -290,7 +289,7 @@ namespace HandBrakeWPF.Helpers public static void ResetArchives()
{
- string appDataPath = DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly());
+ string appDataPath = DirectoryUtilities.GetUserStoragePath(HandBrakeVersionHelper.IsNightly());
DirectoryInfo info = new DirectoryInfo(appDataPath);
IEnumerable<FileInfo> foundFiles = info.GetFiles("*.archive").Where(f => f.Name.StartsWith(QueueFileName));
foreach (FileInfo file in foundFiles)
diff --git a/win/CS/HandBrakeWPF/Instance/HandBrakeInstanceManager.cs b/win/CS/HandBrakeWPF/Instance/HandBrakeInstanceManager.cs index 52aa0bf16..418f46866 100644 --- a/win/CS/HandBrakeWPF/Instance/HandBrakeInstanceManager.cs +++ b/win/CS/HandBrakeWPF/Instance/HandBrakeInstanceManager.cs @@ -13,7 +13,7 @@ namespace HandBrakeWPF.Instance using HandBrake.Interop.Interop; using HandBrake.Interop.Interop.Interfaces; - using HandBrake.Interop.Model; + using HandBrake.Interop.Interop.Interfaces.Model; using HandBrakeWPF.Services.Interfaces; using HandBrakeWPF.Services.Logging.Interfaces; diff --git a/win/CS/HandBrakeWPF/Instance/RemoteInstance.cs b/win/CS/HandBrakeWPF/Instance/RemoteInstance.cs index 4d504507b..4bb52683c 100644 --- a/win/CS/HandBrakeWPF/Instance/RemoteInstance.cs +++ b/win/CS/HandBrakeWPF/Instance/RemoteInstance.cs @@ -19,11 +19,11 @@ namespace HandBrakeWPF.Instance using System.Threading; using System.Threading.Tasks; - using HandBrake.Interop.Interop.EventArgs; using HandBrake.Interop.Interop.Interfaces; + using HandBrake.Interop.Interop.Interfaces.EventArgs; using HandBrake.Interop.Interop.Json.Encode; using HandBrake.Interop.Interop.Json.State; - using HandBrake.Interop.Json; + using HandBrake.Interop.Utilities; using HandBrake.Worker.Routing.Commands; using HandBrakeWPF.Instance.Model; diff --git a/win/CS/HandBrake.Interop/Model/VideoScaler.cs b/win/CS/HandBrakeWPF/Model/Video/VideoScaler.cs index cf08f33c2..01624433e 100644 --- a/win/CS/HandBrake.Interop/Model/VideoScaler.cs +++ b/win/CS/HandBrakeWPF/Model/Video/VideoScaler.cs @@ -7,7 +7,7 @@ // </summary> // -------------------------------------------------------------------------------------------------------------------- -namespace HandBrake.Interop.Model +namespace HandBrakeWPF.Model.Video { using HandBrake.Interop.Attributes; diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs index 6310ecb8b..e43af094b 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs @@ -16,10 +16,10 @@ namespace HandBrakeWPF.Services.Encode.Factories using HandBrake.Interop.Interop; using HandBrake.Interop.Interop.HbLib; + using HandBrake.Interop.Interop.Interfaces.Model; using HandBrake.Interop.Interop.Interfaces.Model.Encoders; using HandBrake.Interop.Interop.Json.Encode; using HandBrake.Interop.Interop.Json.Shared; - using HandBrake.Interop.Model; using HandBrakeWPF.Helpers; using HandBrakeWPF.Model.Filters; @@ -36,7 +36,6 @@ namespace HandBrakeWPF.Services.Encode.Factories using PointToPointMode = Model.Models.PointToPointMode; using Subtitle = HandBrake.Interop.Interop.Json.Encode.Subtitles; using SubtitleTrack = Model.Models.SubtitleTrack; - using SystemInfo = HandBrake.Interop.Utilities.SystemInfo; using Validate = Helpers.Validate; using VideoEncoder = HandBrakeWPF.Model.Video.VideoEncoder; using VideoEncodeRateType = HandBrakeWPF.Model.Video.VideoEncodeRateType; @@ -246,7 +245,7 @@ namespace HandBrakeWPF.Services.Encode.Factories video.Turbo = job.TurboFirstPass; } - video.QSV.Decode = SystemInfo.IsQsvAvailable && configuration.EnableQuickSyncDecoding; + video.QSV.Decode = HandBrakeHardwareEncoderHelper.IsQsvAvailable && configuration.EnableQuickSyncDecoding; // The use of the QSV decoder is configurable for non QSV encoders. if (video.QSV.Decode && job.VideoEncoder != VideoEncoder.QuickSync && job.VideoEncoder != VideoEncoder.QuickSyncH265 && job.VideoEncoder != VideoEncoder.QuickSyncH26510b) @@ -256,7 +255,7 @@ namespace HandBrakeWPF.Services.Encode.Factories video.Options = job.ExtraAdvancedArguments; - if (SystemInfo.QsvHardwareGeneration > 6 && (job.VideoEncoder == VideoEncoder.QuickSync || job.VideoEncoder == VideoEncoder.QuickSyncH265 || job.VideoEncoder == VideoEncoder.QuickSyncH26510b)) + if (HandBrakeHardwareEncoderHelper.QsvHardwareGeneration > 6 && (job.VideoEncoder == VideoEncoder.QuickSync || job.VideoEncoder == VideoEncoder.QuickSyncH265 || job.VideoEncoder == VideoEncoder.QuickSyncH26510b)) { if (configuration.EnableQsvLowPower && !video.Options.Contains("lowpower")) { diff --git a/win/CS/HandBrakeWPF/Services/Encode/Interfaces/IEncode.cs b/win/CS/HandBrakeWPF/Services/Encode/Interfaces/IEncode.cs index 0a75ce009..4dce0bb98 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Interfaces/IEncode.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Interfaces/IEncode.cs @@ -11,7 +11,7 @@ namespace HandBrakeWPF.Services.Encode.Interfaces { using System; - using HandBrake.Interop.Model; + using HandBrake.Interop.Interop.Interfaces.Model; using EncodeCompletedEventArgs = HandBrakeWPF.Services.Encode.EventArgs.EncodeCompletedEventArgs; using EncodeProgressEventArgs = HandBrakeWPF.Services.Encode.EventArgs.EncodeProgressEventArgs; diff --git a/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs b/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs index 2ac9beb7c..06115b96d 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs @@ -14,11 +14,11 @@ namespace HandBrakeWPF.Services.Encode using System.Globalization; using System.IO; - using HandBrake.Interop.Interop.EventArgs; using HandBrake.Interop.Interop.Interfaces; + using HandBrake.Interop.Interop.Interfaces.EventArgs; + using HandBrake.Interop.Interop.Interfaces.Model; using HandBrake.Interop.Interop.Json.Encode; using HandBrake.Interop.Interop.Json.State; - using HandBrake.Interop.Model; using HandBrakeWPF.Exceptions; using HandBrakeWPF.Properties; diff --git a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs index 74f9c4dc4..57c68950f 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs @@ -16,16 +16,17 @@ namespace HandBrakeWPF.Services.Presets.Factories using HandBrake.Interop.Interop;
using HandBrake.Interop.Interop.HbLib;
+ using HandBrake.Interop.Interop.Interfaces.Model;
using HandBrake.Interop.Interop.Interfaces.Model.Filters;
using HandBrake.Interop.Interop.Interfaces.Model.Picture;
using HandBrake.Interop.Interop.Interfaces.Model.Presets;
using HandBrake.Interop.Interop.Json.Presets;
- using HandBrake.Interop.Model;
using HandBrake.Interop.Utilities;
using HandBrakeWPF.Model.Audio;
using HandBrakeWPF.Model.Filters;
using HandBrakeWPF.Model.Subtitles;
+ using HandBrakeWPF.Model.Video;
using HandBrakeWPF.Services.Encode.Model.Models;
using HandBrakeWPF.Services.Presets.Model;
using HandBrakeWPF.Utilities;
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs index e4e5e4881..907470950 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs @@ -13,7 +13,7 @@ namespace HandBrakeWPF.Services.Presets.Interfaces using System.Collections.Generic;
using System.Collections.ObjectModel;
- using HandBrake.Interop.Model;
+ using HandBrake.Interop.Interop.Interfaces.Model;
using HandBrakeWPF.Services.Presets.Model;
diff --git a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs index 08437b764..8d19c3282 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs @@ -20,9 +20,9 @@ namespace HandBrakeWPF.Services.Presets using System.Windows.Xps.Serialization;
using HandBrake.Interop.Interop;
+ using HandBrake.Interop.Interop.Interfaces.Model;
using HandBrake.Interop.Interop.Interfaces.Model.Presets;
using HandBrake.Interop.Interop.Json.Presets;
- using HandBrake.Interop.Model;
using HandBrake.Interop.Utilities;
using HandBrakeWPF.Factories;
@@ -37,15 +37,14 @@ namespace HandBrakeWPF.Services.Presets using Newtonsoft.Json;
- using GeneralApplicationException = HandBrakeWPF.Exceptions.GeneralApplicationException;
- using SystemInfo = HandBrake.Interop.Utilities.SystemInfo;
+ using GeneralApplicationException = Exceptions.GeneralApplicationException;
using VideoEncoder = HandBrakeWPF.Model.Video.VideoEncoder;
public class PresetService : IPresetService
{
public const int ForcePresetReset = 3;
public static string UserPresetCatgoryName = "Custom Presets";
- private readonly string presetFile = Path.Combine(DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly()), "presets.json");
+ private readonly string presetFile = Path.Combine(DirectoryUtilities.GetUserStoragePath(HandBrakeVersionHelper.IsNightly()), "presets.json");
private readonly ObservableCollection<IPresetObject> presets = new ObservableCollection<IPresetObject>(); // Can store Presets and PresetDisplayCategory objects.
private readonly Dictionary<string, Preset> flatPresetDict = new Dictionary<string, Preset>();
private readonly List<Preset> flatPresetList = new List<Preset>();
@@ -836,37 +835,37 @@ namespace HandBrakeWPF.Services.Presets bool isNvencEnabled = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableNvencEncoder);
bool isVcnEnabled = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.EnableVceEncoder);
- if (preset.Task.VideoEncoder == VideoEncoder.QuickSync && (!SystemInfo.IsQsvAvailable || !isQsvEnabled))
+ if (preset.Task.VideoEncoder == VideoEncoder.QuickSync && (!HandBrakeHardwareEncoderHelper.IsQsvAvailable || !isQsvEnabled))
{
return true;
}
- if (preset.Task.VideoEncoder == VideoEncoder.QuickSyncH265 && (!SystemInfo.IsQsvAvailableH265 || !isQsvEnabled))
+ if (preset.Task.VideoEncoder == VideoEncoder.QuickSyncH265 && (!HandBrakeHardwareEncoderHelper.IsQsvAvailableH265 || !isQsvEnabled))
{
return true;
}
- if (preset.Task.VideoEncoder == VideoEncoder.QuickSyncH26510b && (!SystemInfo.IsQsvAvailableH265 || !isQsvEnabled))
+ if (preset.Task.VideoEncoder == VideoEncoder.QuickSyncH26510b && (!HandBrakeHardwareEncoderHelper.IsQsvAvailableH265 || !isQsvEnabled))
{
return true;
}
- if (preset.Task.VideoEncoder == VideoEncoder.VceH264 && (!SystemInfo.IsVceH264Available || !isVcnEnabled))
+ if (preset.Task.VideoEncoder == VideoEncoder.VceH264 && (!HandBrakeHardwareEncoderHelper.IsVceH264Available || !isVcnEnabled))
{
return true;
}
- if (preset.Task.VideoEncoder == VideoEncoder.VceH265 && (!SystemInfo.IsVceH265Available || !isVcnEnabled))
+ if (preset.Task.VideoEncoder == VideoEncoder.VceH265 && (!HandBrakeHardwareEncoderHelper.IsVceH265Available || !isVcnEnabled))
{
return true;
}
- if (preset.Task.VideoEncoder == VideoEncoder.NvencH264 && (!SystemInfo.IsNVEncH264Available || !isNvencEnabled))
+ if (preset.Task.VideoEncoder == VideoEncoder.NvencH264 && (!HandBrakeHardwareEncoderHelper.IsNVEncH264Available || !isNvencEnabled))
{
return true;
}
- if (preset.Task.VideoEncoder == VideoEncoder.NvencH265 && (!SystemInfo.IsNVEncH265Available || !isNvencEnabled))
+ if (preset.Task.VideoEncoder == VideoEncoder.NvencH265 && (!HandBrakeHardwareEncoderHelper.IsNVEncH265Available || !isNvencEnabled))
{
return true;
}
diff --git a/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs index 1eeeba60e..0ed2a33a9 100644 --- a/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs @@ -14,7 +14,7 @@ namespace HandBrakeWPF.Services.Queue.Model using Caliburn.Micro;
- using HandBrake.Interop.Model;
+ using HandBrake.Interop.Interop.Interfaces.Model;
using HandBrakeWPF.Services.Presets.Model;
using HandBrakeWPF.Utilities;
diff --git a/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs b/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs index 885fd0cdd..7c9a92783 100644 --- a/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs @@ -18,9 +18,8 @@ namespace HandBrakeWPF.Services.Queue using System.Timers; using System.Windows; + using HandBrake.Interop.Interop.Interfaces.Model; using HandBrake.Interop.Interop.Json.Queue; - using HandBrake.Interop.Json; - using HandBrake.Interop.Model; using HandBrake.Interop.Utilities; using HandBrake.Worker.Routing.Commands; @@ -156,7 +155,7 @@ namespace HandBrakeWPF.Services.Queue { lock (this.queueFileLock) { - string appDataPath = DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly()); + string appDataPath = DirectoryUtilities.GetUserStoragePath(HandBrakeVersionHelper.IsNightly()); string tempPath = !string.IsNullOrEmpty(exportPath) ? exportPath : Path.Combine(appDataPath, string.Format(this.queueFile, string.Empty)); @@ -431,7 +430,7 @@ namespace HandBrakeWPF.Services.Queue public void RestoreQueue(string importPath) { - string appDataPath = DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly()); + string appDataPath = DirectoryUtilities.GetUserStoragePath(HandBrakeVersionHelper.IsNightly()); string tempPath = !string.IsNullOrEmpty(importPath) ? importPath : (appDataPath + string.Format(this.queueFile, string.Empty)); diff --git a/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs b/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs index 83e469bb0..d8d8e4399 100644 --- a/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs +++ b/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs @@ -33,7 +33,7 @@ namespace HandBrakeWPF.Services.Scan using HandBrakeWPF.Utilities; using ILog = Logging.Interfaces.ILog; - using ScanProgressEventArgs = HandBrake.Interop.Interop.EventArgs.ScanProgressEventArgs; + using ScanProgressEventArgs = HandBrake.Interop.Interop.Interfaces.EventArgs.ScanProgressEventArgs; using Title = Model.Title; public class LibScan : IScan, IDisposable diff --git a/win/CS/HandBrakeWPF/Services/UpdateService.cs b/win/CS/HandBrakeWPF/Services/UpdateService.cs index 61c326455..693478acb 100644 --- a/win/CS/HandBrakeWPF/Services/UpdateService.cs +++ b/win/CS/HandBrakeWPF/Services/UpdateService.cs @@ -104,17 +104,17 @@ namespace HandBrakeWPF.Services // Figure out which appcast we want to read.
string url = Constants.Appcast64;
- if (VersionHelper.IsNightly())
+ if (HandBrakeVersionHelper.IsNightly())
{
url = Constants.AppcastUnstable64;
}
- var currentBuild = VersionHelper.Build;
+ var currentBuild = HandBrakeVersionHelper.Build;
// Fetch the Appcast from our server.
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.AllowAutoRedirect = false; // We will never do this.
- request.UserAgent = string.Format("HandBrake Win Upd {0}", VersionHelper.GetVersionShort());
+ request.UserAgent = string.Format("HandBrake Win Upd {0}", HandBrakeVersionHelper.GetVersionShort());
WebResponse response = request.GetResponse();
// Parse the data with the AppcastReader
@@ -187,7 +187,7 @@ namespace HandBrakeWPF.Services HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
webRequest.Credentials = CredentialCache.DefaultCredentials;
- webRequest.UserAgent = string.Format("HandBrake Win Upd {0}", VersionHelper.GetVersionShort());
+ webRequest.UserAgent = string.Format("HandBrake Win Upd {0}", HandBrakeVersionHelper.GetVersionShort());
HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
long fileSize = webResponse.ContentLength;
diff --git a/win/CS/HandBrakeWPF/Services/UserSettingService.cs b/win/CS/HandBrakeWPF/Services/UserSettingService.cs index c12a5713d..85de0f018 100644 --- a/win/CS/HandBrakeWPF/Services/UserSettingService.cs +++ b/win/CS/HandBrakeWPF/Services/UserSettingService.cs @@ -15,11 +15,12 @@ namespace HandBrakeWPF.Services using System.IO;
using System.Linq;
- using HandBrake.Interop.Model;
+ using HandBrake.Interop.Interop.Interfaces.Model.Picture;
using HandBrake.Interop.Utilities;
using HandBrakeWPF.Extensions;
using HandBrakeWPF.Model;
+ using HandBrakeWPF.Model.Video;
using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.Utilities;
@@ -36,7 +37,7 @@ namespace HandBrakeWPF.Services /// </summary>
public class UserSettingService : IUserSettingService
{
- private readonly string settingsFile = Path.Combine(DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly()), "settings.json");
+ private readonly string settingsFile = Path.Combine(DirectoryUtilities.GetUserStoragePath(HandBrakeVersionHelper.IsNightly()), "settings.json");
private readonly string releaseSettingsFile = Path.Combine(DirectoryUtilities.GetUserStoragePath(false), "settings.json");
private readonly string nightlySettingsFile = Path.Combine(DirectoryUtilities.GetUserStoragePath(true), "settings.json");
private readonly JsonSerializerSettings settings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
@@ -189,7 +190,7 @@ namespace HandBrakeWPF.Services this.userSettings = deserialisedSettings;
}
}
- else if (VersionHelper.IsNightly() && File.Exists(this.releaseSettingsFile))
+ else if (HandBrakeVersionHelper.IsNightly() && File.Exists(this.releaseSettingsFile))
{
// Port the release versions config to the nightly.
if (!Directory.Exists(DirectoryUtilities.GetUserStoragePath(true)))
diff --git a/win/CS/HandBrakeWPF/Utilities/GeneralUtilities.cs b/win/CS/HandBrakeWPF/Utilities/GeneralUtilities.cs index 8329b9762..0704b2444 100644 --- a/win/CS/HandBrakeWPF/Utilities/GeneralUtilities.cs +++ b/win/CS/HandBrakeWPF/Utilities/GeneralUtilities.cs @@ -107,7 +107,7 @@ namespace HandBrakeWPF.Utilities gpuBuilder.Append("GPU Information is unavailable"); } - logHeader.AppendLine(string.Format("HandBrake {0}", VersionHelper.GetVersion())); + logHeader.AppendLine(string.Format("HandBrake {0}", HandBrakeVersionHelper.GetVersion())); logHeader.AppendLine(string.Format("OS: {0}", Environment.OSVersion)); logHeader.AppendLine(string.Format("CPU: {0}", SystemInfo.GetCpu)); logHeader.AppendLine(string.Format("Ram: {0} MB, ", SystemInfo.TotalPhysicalMemory)); @@ -115,7 +115,7 @@ namespace HandBrakeWPF.Utilities logHeader.AppendLine(string.Format("Screen: {0}x{1}", SystemInfo.ScreenBounds.Bounds.Width, SystemInfo.ScreenBounds.Bounds.Height)); logHeader.AppendLine(string.Format("Temp Dir: {0}", Path.GetTempPath())); logHeader.AppendLine(string.Format("Install Dir: {0}", Application.StartupPath)); - logHeader.AppendLine(string.Format("Data Dir: {0}\n", DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly()))); + logHeader.AppendLine(string.Format("Data Dir: {0}\n", DirectoryUtilities.GetUserStoragePath(HandBrakeVersionHelper.IsNightly()))); logHeader.AppendLine("-------------------------------------------"); diff --git a/win/CS/HandBrakeWPF/Utilities/HandBrakeApp.cs b/win/CS/HandBrakeWPF/Utilities/HandBrakeApp.cs index 39a8bc45c..528b17962 100644 --- a/win/CS/HandBrakeWPF/Utilities/HandBrakeApp.cs +++ b/win/CS/HandBrakeWPF/Utilities/HandBrakeApp.cs @@ -26,7 +26,7 @@ namespace HandBrakeWPF.Utilities /// </summary>
public static void ResetToDefaults()
{
- string appDataFolder = DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly());
+ string appDataFolder = DirectoryUtilities.GetUserStoragePath(HandBrakeVersionHelper.IsNightly());
DeleteFile(Path.Combine(appDataFolder, "presets.json"));
DeleteFile(Path.Combine(appDataFolder, "settings.json"));
diff --git a/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs index 551ce5e1a..ead1af3d2 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs @@ -36,7 +36,7 @@ namespace HandBrakeWPF.ViewModels {
get
{
- return string.Format("{0}", VersionHelper.GetVersion());
+ return string.Format("{0}", HandBrakeVersionHelper.GetVersion());
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index f0fc67745..7b8046070 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -802,7 +802,7 @@ namespace HandBrakeWPF.ViewModels public bool IsMultiProcess { get; set; }
- public bool IsNightly => VersionHelper.IsNightly();
+ public bool IsNightly => HandBrakeVersionHelper.IsNightly();
/* Commands */
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index e62c45546..2eb5ce954 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -21,11 +21,11 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro;
using HandBrake.Interop.Interop;
- using HandBrake.Interop.Model;
using HandBrake.Interop.Utilities;
using HandBrakeWPF.Model;
using HandBrakeWPF.Model.Options;
+ using HandBrakeWPF.Model.Video;
using HandBrakeWPF.Properties;
using HandBrakeWPF.Services;
using HandBrakeWPF.Services.Interfaces;
@@ -37,7 +37,6 @@ namespace HandBrakeWPF.ViewModels using Ookii.Dialogs.Wpf;
using Execute = Caliburn.Micro.Execute;
- using SystemInfo = HandBrake.Interop.Utilities.SystemInfo;
public class OptionsViewModel : ViewModelBase, IOptionsViewModel
{
@@ -141,7 +140,7 @@ namespace HandBrakeWPF.ViewModels public bool IsUWP { get; } = UwpDetect.IsUWP();
- public bool IsNightly { get; } = VersionHelper.IsNightly();
+ public bool IsNightly { get; } = HandBrakeVersionHelper.IsNightly();
public bool IsWindows10 => HandBrakeWPF.Utilities.SystemInfo.IsWindows10();
@@ -855,11 +854,11 @@ namespace HandBrakeWPF.ViewModels public VideoScaler SelectedScalingMode { get; set; }
- public bool IsQuickSyncAvailable { get; } = SystemInfo.IsQsvAvailable;
+ public bool IsQuickSyncAvailable { get; } = HandBrakeHardwareEncoderHelper.IsQsvAvailable;
- public bool IsVceAvailable { get; } = SystemInfo.IsVceH264Available;
+ public bool IsVceAvailable { get; } = HandBrakeHardwareEncoderHelper.IsVceH264Available;
- public bool IsNvencAvailable { get; } = SystemInfo.IsNVEncH264Available;
+ public bool IsNvencAvailable { get; } = HandBrakeHardwareEncoderHelper.IsNVEncH264Available;
public bool IsUseQsvDecAvailable
{
@@ -885,7 +884,7 @@ namespace HandBrakeWPF.ViewModels /* About HandBrake */
- public string Version { get; } = string.Format("{0}", VersionHelper.GetVersion());
+ public string Version { get; } = string.Format("{0}", HandBrakeVersionHelper.GetVersion());
public string UpdateMessage
{
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index be5c20485..779508839 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -30,16 +30,16 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.ViewModels.Interfaces;
using Clipboard = System.Windows.Clipboard;
- using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask;
- using FramerateMode = HandBrakeWPF.Services.Encode.Model.Models.FramerateMode;
- using OutputFormat = HandBrakeWPF.Services.Encode.Model.Models.OutputFormat;
- using SettingChangedEventArgs = HandBrakeWPF.EventArgs.SettingChangedEventArgs;
- using VideoEncoder = HandBrakeWPF.Model.Video.VideoEncoder;
- using VideoEncodeRateType = HandBrakeWPF.Model.Video.VideoEncodeRateType;
- using VideoLevel = HandBrakeWPF.Services.Encode.Model.Models.Video.VideoLevel;
- using VideoPreset = HandBrakeWPF.Services.Encode.Model.Models.Video.VideoPreset;
- using VideoProfile = HandBrakeWPF.Services.Encode.Model.Models.Video.VideoProfile;
- using VideoTune = HandBrakeWPF.Services.Encode.Model.Models.Video.VideoTune;
+ using EncodeTask = Services.Encode.Model.EncodeTask;
+ using FramerateMode = Services.Encode.Model.Models.FramerateMode;
+ using OutputFormat = Services.Encode.Model.Models.OutputFormat;
+ using SettingChangedEventArgs = EventArgs.SettingChangedEventArgs;
+ using VideoEncoder = Model.Video.VideoEncoder;
+ using VideoEncodeRateType = Model.Video.VideoEncodeRateType;
+ using VideoLevel = Services.Encode.Model.Models.Video.VideoLevel;
+ using VideoPreset = Services.Encode.Model.Models.Video.VideoPreset;
+ using VideoProfile = Services.Encode.Model.Models.Video.VideoProfile;
+ using VideoTune = Services.Encode.Model.Models.Video.VideoTune;
/// <summary>
/// The Video View Model
@@ -1544,7 +1544,7 @@ namespace HandBrakeWPF.ViewModels // Override for QuickSync
if (selectedEncoder == VideoEncoder.QuickSyncH265 || selectedEncoder == VideoEncoder.QuickSyncH26510b)
{
- if (HandBrake.Interop.Utilities.SystemInfo.QsvHardwareGeneration > 6)
+ if (HandBrakeHardwareEncoderHelper.QsvHardwareGeneration > 6)
{
defaultPreset = this.VideoPresets.IndexOf(this.VideoPresets.FirstOrDefault(s => s.ShortName == "speed")); // TGL
}
|