diff options
author | sr55 <[email protected]> | 2015-03-29 15:57:53 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-03-29 15:57:53 +0000 |
commit | 168ce686fd837de7fbf20266df31af2ac00c8db1 (patch) | |
tree | 1feb3e16046babb4bee15b7554a04ca383e13206 /win/CS/HandBrake.ApplicationServices | |
parent | 476eb6ccaa4e655c43d85d8111f27451aa0a8f8f (diff) |
WinGui: Add TrueHD, Flac and EAC3 Passthru, and EAC3 encoder options. Fixed No Audio Behaviour. Misc other experimental UX/UI code.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7027 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
4 files changed, 52 insertions, 166 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/AudioEncoder.cs b/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/AudioEncoder.cs index 7b18aaa03..3aef81c38 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/AudioEncoder.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/AudioEncoder.cs @@ -46,6 +46,10 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding [ShortName("copy:ac3")]
Ac3Passthrough,
+ [Display(Name = "E-AC3 Passthru")]
+ [ShortName("copy:eac3")]
+ EAc3Passthrough,
+
[Display(Name = "DTS Passthru")]
[ShortName("copy:dts")]
DtsPassthrough,
@@ -54,6 +58,10 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding [ShortName("copy:dtshd")]
DtsHDPassthrough,
+ [Display(Name = "TrueHD Passthru")]
+ [ShortName("copy:truehd")]
+ TrueHDPassthrough,
+
[Display(Name = "AAC Passthru")]
[ShortName("copy:aac")]
AacPassthru,
@@ -73,5 +81,9 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding [Display(Name = "FLAC 24-bit")]
[ShortName("flac24")]
ffflac24,
+
+ [Display(Name = "FLAC Passthru")]
+ [ShortName("copy:flac")]
+ FlacPassthru,
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/Model/Models/AllowedPassthru.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/Model/Models/AllowedPassthru.cs index 9a6f61810..d2ac4d5ac 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/Model/Models/AllowedPassthru.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/Model/Models/AllowedPassthru.cs @@ -16,35 +16,6 @@ namespace HandBrake.ApplicationServices.Services.Encode.Model.Models /// </summary>
public class AllowedPassthru
{
- #region Constants and Fields
-
- /// <summary>
- /// The audio allow aac pass.
- /// </summary>
- private bool? audioAllowAACPass;
-
- /// <summary>
- /// The audio allow a c 3 pass.
- /// </summary>
- private bool? audioAllowAC3Pass;
-
- /// <summary>
- /// The audio allow dtshd pass.
- /// </summary>
- private bool? audioAllowDTSHDPass;
-
- /// <summary>
- /// The audio allow dts pass.
- /// </summary>
- private bool? audioAllowDTSPass;
-
- /// <summary>
- /// The audio allow m p 3 pass.
- /// </summary>
- private bool? audioAllowMP3Pass;
-
- #endregion
-
#region Constructors and Destructors
/// <summary>
@@ -57,6 +28,9 @@ namespace HandBrake.ApplicationServices.Services.Encode.Model.Models this.AudioAllowDTSHDPass = true;
this.AudioAllowDTSPass = true;
this.AudioAllowMP3Pass = true;
+ this.AudioAllowEAC3Pass = true;
+ this.AudioAllowTrueHDPass = true;
+ this.AudioAllowFlacPass = true;
this.AudioEncoderFallback = AudioEncoder.Ac3;
}
@@ -66,13 +40,16 @@ namespace HandBrake.ApplicationServices.Services.Encode.Model.Models /// <param name="initialValue">
/// The initial Value.
/// </param>
- public AllowedPassthru(bool? initialValue)
+ public AllowedPassthru(bool initialValue)
{
this.AudioAllowAACPass = initialValue;
this.AudioAllowAC3Pass = initialValue;
this.AudioAllowDTSHDPass = initialValue;
this.AudioAllowDTSPass = initialValue;
this.AudioAllowMP3Pass = initialValue;
+ this.AudioAllowEAC3Pass = initialValue;
+ this.AudioAllowTrueHDPass = initialValue;
+ this.AudioAllowFlacPass = initialValue;
this.AudioEncoderFallback = AudioEncoder.Ac3;
}
@@ -90,6 +67,9 @@ namespace HandBrake.ApplicationServices.Services.Encode.Model.Models this.AudioAllowDTSHDPass = initialValue.AudioAllowDTSHDPass;
this.AudioAllowDTSPass = initialValue.AudioAllowDTSPass;
this.AudioAllowMP3Pass = initialValue.AudioAllowMP3Pass;
+ this.AudioAllowEAC3Pass = initialValue.AudioAllowEAC3Pass;
+ this.AudioAllowTrueHDPass = initialValue.AudioAllowTrueHDPass;
+ this.AudioAllowFlacPass = initialValue.AudioAllowFlacPass;
this.AudioEncoderFallback = initialValue.AudioEncoderFallback;
}
@@ -100,77 +80,42 @@ namespace HandBrake.ApplicationServices.Services.Encode.Model.Models /// <summary>
/// Gets or sets a value indicating whether AudioAllowAACPass.
/// </summary>
- public bool? AudioAllowAACPass
- {
- get
- {
- return this.audioAllowAACPass ?? true;
- }
- set
- {
- this.audioAllowAACPass = value;
- }
- }
+ public bool AudioAllowAACPass { get; set; }
/// <summary>
/// Gets or sets a value indicating whether AudioAllowAC3Pass.
/// </summary>
- public bool? AudioAllowAC3Pass
- {
- get
- {
- return this.audioAllowAC3Pass ?? true;
- }
- set
- {
- this.audioAllowAC3Pass = value;
- }
- }
+ public bool AudioAllowAC3Pass { get; set; }
/// <summary>
/// Gets or sets a value indicating whether AudioAllowDTSHDPass.
/// </summary>
- public bool? AudioAllowDTSHDPass
- {
- get
- {
- return this.audioAllowDTSHDPass ?? true;
- }
- set
- {
- this.audioAllowDTSHDPass = value;
- }
- }
+ public bool AudioAllowDTSHDPass { get; set; }
/// <summary>
/// Gets or sets a value indicating whether AudioAllowDTSPass.
/// </summary>
- public bool? AudioAllowDTSPass
- {
- get
- {
- return this.audioAllowDTSPass ?? true;
- }
- set
- {
- this.audioAllowDTSPass = value;
- }
- }
+ public bool AudioAllowDTSPass { get; set; }
/// <summary>
/// Gets or sets a value indicating whether AudioAllowMP3Pass.
/// </summary>
- public bool? AudioAllowMP3Pass
- {
- get
- {
- return this.audioAllowMP3Pass ?? true;
- }
- set
- {
- this.audioAllowMP3Pass = value;
- }
- }
+ public bool AudioAllowMP3Pass { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether audio allow true hd pass.
+ /// </summary>
+ public bool AudioAllowTrueHDPass { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether audio allow flac pass.
+ /// </summary>
+ public bool AudioAllowFlacPass { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether audio allow ea c 3 pass.
+ /// </summary>
+ public bool AudioAllowEAC3Pass { get; set; }
/// <summary>
/// Gets or sets AudioEncoderFallback.
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/Model/Models/AudioTrack.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/Model/Models/AudioTrack.cs index 34a81a27f..f2a454729 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/Model/Models/AudioTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/Model/Models/AudioTrack.cs @@ -344,7 +344,9 @@ namespace HandBrake.ApplicationServices.Services.Encode.Model.Models {
if (this.Encoder == AudioEncoder.Ac3Passthrough || this.Encoder == AudioEncoder.DtsPassthrough
|| this.Encoder == AudioEncoder.DtsHDPassthrough || this.Encoder == AudioEncoder.AacPassthru
- || this.Encoder == AudioEncoder.Mp3Passthru || this.Encoder == AudioEncoder.Passthrough)
+ || this.Encoder == AudioEncoder.Mp3Passthru || this.Encoder == AudioEncoder.Passthrough ||
+ this.Encoder == AudioEncoder.EAc3Passthrough || this.Encoder == AudioEncoder.TrueHDPassthrough
+ || this.Encoder == AudioEncoder.FlacPassthru)
{
return true;
}
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs b/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs index 5b39a23d6..d681106e0 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs @@ -154,52 +154,7 @@ namespace HandBrake.ApplicationServices.Utilities }
}
- /// <summary>
- /// Get the GUI equiv to a CLI audio encoder
- /// </summary>
- /// <param name="audioEnc">The Audio Encoder</param>
- /// <returns>The GUI representation of that audio encoder</returns>
- public static AudioEncoder GetAudioEncoderFromCliString(string audioEnc)
- {
- switch (audioEnc)
- {
- case "faac":
- case "ffaac":
- return AudioEncoder.ffaac;
- case "fdk_aac":
- return AudioEncoder.fdkaac;
- case "fdk_haac":
- return AudioEncoder.fdkheaac;
- case "mp3":
- case "lame":
- return AudioEncoder.Lame;
- case "vorbis":
- return AudioEncoder.Vorbis;
- case "ac3":
- case "ffac3":
- return AudioEncoder.Ac3;
- case "flac16":
- case "ffflac":
- return AudioEncoder.ffflac;
- case "flac24":
- case "ffflac24":
- return AudioEncoder.ffflac24;
- case "copy:ac3":
- return AudioEncoder.Ac3Passthrough;
- case "copy:dts":
- return AudioEncoder.DtsPassthrough;
- case "copy:dtshd":
- return AudioEncoder.DtsHDPassthrough;
- case "copy:mp3":
- return AudioEncoder.Mp3Passthru;
- case "copy:aac":
- return AudioEncoder.AacPassthru;
- case "copy":
- return AudioEncoder.Passthrough;
- default:
- return AudioEncoder.ffaac;
- }
- }
+
/// <summary>
/// Get the GUI equiv to a GUI audio encoder string
@@ -246,6 +201,12 @@ namespace HandBrake.ApplicationServices.Utilities case "FLAC (24-bit)":
case "FLAC 24-bit":
return AudioEncoder.ffflac24;
+ case "TrueHD Passthru":
+ return AudioEncoder.TrueHDPassthrough;
+ case "E-AC3 Passthru":
+ return AudioEncoder.EAc3Passthrough;
+ case "FLAC Passthru":
+ return AudioEncoder.FlacPassthru;
case "Auto Passthru":
return AudioEncoder.Passthrough;
default:
@@ -271,40 +232,6 @@ namespace HandBrake.ApplicationServices.Utilities #region Video
- /// <summary>
- /// Get the Video Encoder for a given string
- /// </summary>
- /// <param name="encoder">
- /// The encoder name
- /// </param>
- /// <returns>
- /// VideoEncoder enum object
- /// </returns>
- public static VideoEncoder GetVideoEncoder(string encoder)
- {
- switch (encoder)
- {
- case "ffmpeg":
- case "ffmpeg4":
- case "mpeg4":
- return VideoEncoder.FFMpeg;
- case "ffmpeg2":
- case "mpeg2":
- return VideoEncoder.FFMpeg2;
- case "x264":
- return VideoEncoder.X264;
- case "qsv_h264":
- return VideoEncoder.QuickSync;
- case "theora":
- return VideoEncoder.Theora;
- case "x265":
- return VideoEncoder.X265;
- case "VP8":
- return VideoEncoder.VP8;
- default:
- return VideoEncoder.X264;
- }
- }
/// <summary>
/// Get the Video Encoder for a given string
|