diff options
author | sr55 <[email protected]> | 2011-12-27 22:52:43 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-12-27 22:52:43 +0000 |
commit | 5b745b8f17f8acc6d3799eb3cb86e09c7ca99017 (patch) | |
tree | 5a97790d448b6ac3b85b46f1803df00c34a39820 /win/CS/HandBrake.ApplicationServices/Model | |
parent | 20fd52b888f111ac2d7670fa3c41e495661cdebd (diff) |
WinGui: (WPF) Initial work to hookup the log viewer + some additional helper classes ported over form the WinForms version.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4390 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Model')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs index a51a7d43a..13216b608 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/EncodeTask.cs @@ -5,11 +5,10 @@ namespace HandBrake.ApplicationServices.Model
{
- using System.Collections.Generic;
using System.Collections.ObjectModel;
+ using System.Linq;
using HandBrake.ApplicationServices.Model.Encoding;
- using HandBrake.ApplicationServices.Parsing;
using HandBrake.Interop.Model;
using HandBrake.Interop.Model.Encoding;
using HandBrake.Interop.Model.Encoding.x264;
@@ -363,5 +362,29 @@ namespace HandBrake.ApplicationServices.Model /// </summary>
public bool UsesPictureSettings { get; set; }
#endregion
+
+ #region Helpers
+
+ /// <summary>
+ /// Gets a value indicating whether M4v extension is required.
+ /// </summary>
+ public bool RequiresM4v
+ {
+ get
+ {
+ if (this.OutputFormat == OutputFormat.M4V || 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;
+ }
+ }
+ #endregion
}
}
|