// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// HBConfiguration Factory
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Factories
{
using Caliburn.Micro;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrakeWPF.Services.Interfaces;
///
/// HBConfiguration Factory
///
public class HBConfigurationFactory
{
///
/// The user setting service.
///
private static readonly IUserSettingService UserSettingService = IoC.Get();
///
/// The create.
///
///
/// The is logging enabled.
///
///
/// The .
///
public static HBConfiguration Create(bool isLoggingEnabled)
{
HBConfiguration config = new HBConfiguration
{
IsDvdNavDisabled = UserSettingService.GetUserSetting(UserSettingConstants.DisableLibDvdNav),
IsLoggingEnabled = isLoggingEnabled,
DisableQuickSyncDecoding = UserSettingService.GetUserSetting(UserSettingConstants.DisableQuickSyncDecoding),
EnableDxva = UserSettingService.GetUserSetting(UserSettingConstants.EnableDxva),
ScalingMode = UserSettingService.GetUserSetting(UserSettingConstants.ScalingMode),
PreviewScanCount = UserSettingService.GetUserSetting(UserSettingConstants.PreviewScanCount),
Verbosity = UserSettingService.GetUserSetting(UserSettingConstants.Verbosity),
MinScanDuration = UserSettingService.GetUserSetting(UserSettingConstants.MinScanDuration),
ProcessPriority = UserSettingService.GetUserSetting(UserSettingConstants.ProcessPriority),
SaveLogToCopyDirectory = UserSettingService.GetUserSetting(UserSettingConstants.SaveLogToCopyDirectory),
SaveLogWithVideo = UserSettingService.GetUserSetting(UserSettingConstants.SaveLogWithVideo),
SaveLogCopyDirectory = UserSettingService.GetUserSetting(UserSettingConstants.SaveLogCopyDirectory),
};
return config;
}
///
/// The create.
///
///
/// The .
///
public static HBConfiguration Create()
{
return Create(true);
}
}
}