diff options
author | Scott <[email protected]> | 2015-12-27 21:57:05 +0000 |
---|---|---|
committer | Scott <[email protected]> | 2015-12-27 21:57:05 +0000 |
commit | e2a5481e83511c59a3322eadab2e71b9f0796cb7 (patch) | |
tree | 971464d9cb8039e65c88aaae3a3a8b41b42d3c80 /win/CS/HandBrakeWPF/Services/Encode | |
parent | 930039b3154fcbf919b77ca0448865467e352896 (diff) |
WinGui: Some API and warnings cleanup.
Diffstat (limited to 'win/CS/HandBrakeWPF/Services/Encode')
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs | 91 |
1 files changed, 15 insertions, 76 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs index 5f022f6b5..03cea74f5 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs @@ -9,10 +9,8 @@ namespace HandBrakeWPF.Services.Encode.Model { - using System; using System.Collections.Generic; using System.Collections.ObjectModel; - using System.Linq; using HandBrake.ApplicationServices.Interop.Model; using HandBrake.ApplicationServices.Interop.Model.Encoding; @@ -20,7 +18,6 @@ namespace HandBrakeWPF.Services.Encode.Model using HandBrakeWPF.Utilities; using AllowedPassthru = HandBrakeWPF.Services.Encode.Model.Models.AllowedPassthru; - using AudioEncoder = HandBrakeWPF.Services.Encode.Model.Models.AudioEncoder; using AudioTrack = HandBrakeWPF.Services.Encode.Model.Models.AudioTrack; using ChapterMarker = HandBrakeWPF.Services.Encode.Model.Models.ChapterMarker; using DenoisePreset = HandBrakeWPF.Services.Encode.Model.Models.DenoisePreset; @@ -29,7 +26,6 @@ namespace HandBrakeWPF.Services.Encode.Model using OutputFormat = HandBrakeWPF.Services.Encode.Model.Models.OutputFormat; using PointToPointMode = HandBrakeWPF.Services.Encode.Model.Models.PointToPointMode; using SubtitleTrack = HandBrakeWPF.Services.Encode.Model.Models.SubtitleTrack; - using SubtitleType = HandBrakeWPF.Services.Encode.Model.Models.SubtitleType; 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; @@ -464,53 +460,6 @@ namespace HandBrakeWPF.Services.Encode.Model /// </summary> public string ExtraAdvancedArguments { get; set; } - #endregion - - #region Preview - - /// <summary> - /// Gets or sets a value indicating whether IsPreviewEncode. - /// </summary> - public bool IsPreviewEncode { get; set; } - - /// <summary> - /// Gets or sets PreviewEncodeDuration. - /// </summary> - public int? PreviewEncodeDuration { get; set; } - - /// <summary> - /// Gets or sets PreviewEncodeStartAt. - /// </summary> - public int? PreviewEncodeStartAt { get; set; } - - #endregion - - #region Helpers - - /// <summary> - /// Gets a value indicating whether M4v extension is required. - /// </summary> - public bool RequiresM4v - { - get - { - if (this.OutputFormat == OutputFormat.Mp4) - { - bool audio = - this.AudioTracks.Any( - item => - item.Encoder == AudioEncoder.Ac3Passthrough || item.Encoder == AudioEncoder.Ac3 - || item.Encoder == AudioEncoder.DtsPassthrough || item.Encoder == AudioEncoder.Passthrough); - - bool subtitles = this.SubtitleTracks.Any(track => track.SubtitleType != SubtitleType.VobSub); - - return audio || subtitles; - } - - return false; - } - } - /// <summary> /// Gets or sets a value indicating whether advanced panel enabled. /// </summary> @@ -530,34 +479,24 @@ namespace HandBrakeWPF.Services.Encode.Model } } + #endregion + + #region Preview + /// <summary> - /// Gets the picture settings desc. + /// Gets or sets a value indicating whether IsPreviewEncode. /// </summary> - public string PictureSettingsDesc - { - get - { - string resolution = string.Empty; - switch (this.Anamorphic) - { - case Anamorphic.Strict: - resolution = "Anamorphic: Strict"; - break; - case Anamorphic.Loose: - resolution = "Anamorphic: Loose, Width: " + this.Width; - break; - case Anamorphic.Custom: - resolution = "Anamorphic: Custom, Resolution: " + this.Width + "x" + this.Height; - break; - case Anamorphic.None: - resolution = "Resolution: " + this.Width + "x" + this.Height; - break; - } + public bool IsPreviewEncode { get; set; } - return resolution + Environment.NewLine + "Crop Top: " + this.Cropping.Top + ", Botton: " + this.Cropping.Bottom + ", Left: " - + this.Cropping.Left + ", Right: " + this.Cropping.Right; - } - } + /// <summary> + /// Gets or sets PreviewEncodeDuration. + /// </summary> + public int? PreviewEncodeDuration { get; set; } + + /// <summary> + /// Gets or sets PreviewEncodeStartAt. + /// </summary> + public int? PreviewEncodeStartAt { get; set; } #endregion } |