diff options
author | sr55 <[email protected]> | 2011-08-07 13:28:43 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-08-07 13:28:43 +0000 |
commit | 439b0a6c8f4cd9f5c15aa8c06e5200f2119fc88a (patch) | |
tree | e89b5543adfe31c22fff28c766e1cb38c5da6a41 /win/CS | |
parent | c24d8ddd65e9549b26e813681cac60365c1c5175 (diff) |
WinGui: Support for AAC and MP3 Passthru added + change default audio mode setting to 0 to prevent crash.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4158 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/Controls/AudioPanel.cs | 26 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Functions/Converters.cs | 16 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioEncoder.cs | 6 | ||||
-rw-r--r-- | win/CS/Properties/Settings.Designer.cs | 16 | ||||
-rw-r--r-- | win/CS/Properties/Settings.settings | 5 | ||||
-rw-r--r-- | win/CS/app.config | 2 |
6 files changed, 65 insertions, 6 deletions
diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index f97af0605..b3389fd27 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -123,10 +123,12 @@ namespace Handbrake.Controls drp_audioEncoder.Items.Clear();
drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.Faac));
drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.ffaac));
+ drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.AacPassthru));
drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.Lame));
+ drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.Mp3Passthru));
drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.Ac3Passthrough));
drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.Ac3));
-
+
if (path.Contains("MKV"))
{
drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.DtsPassthrough));
@@ -162,7 +164,8 @@ namespace Handbrake.Controls foreach (AudioTrack track in tracks)
{
- if (track.Encoder == AudioEncoder.Ac3Passthrough || track.Encoder == AudioEncoder.DtsPassthrough || track.Encoder == AudioEncoder.DtsHDPassthrough)
+ if (track.Encoder == AudioEncoder.Ac3Passthrough || track.Encoder == AudioEncoder.DtsPassthrough ||
+ track.Encoder == AudioEncoder.DtsHDPassthrough || track.Encoder == AudioEncoder.AacPassthru || track.Encoder == AudioEncoder.Mp3Passthru)
{
track.MixDown = HandBrake.ApplicationServices.Model.Encoding.Mixdown.Passthrough;
track.Bitrate = 0;
@@ -271,6 +274,23 @@ namespace Handbrake.Controls // Switch to AAC
drp_audioEncoder.SelectedIndex = 0;
}
+
+ // If the track isn't AAC, and the encoder is, change it.
+ if (track.Encoder == AudioEncoder.AacPassthru && !track.ScannedTrack.Format.Contains("aac"))
+ {
+ // Switch to AAC
+ drp_audioEncoder.SelectedIndex = 0;
+ }
+
+
+ // If the track isn't MP3, and the encoder is, change it.
+ if (track.Encoder == AudioEncoder.Mp3Passthru && !track.ScannedTrack.Format.Contains("mp3"))
+ {
+ // Switch to AAC
+ drp_audioEncoder.SelectedIndex = 0;
+ }
+
+
}
break;
case "drp_audioEncoder":
@@ -914,6 +934,8 @@ namespace Handbrake.Controls case "AC3 Passthru":
case "DTS Passthru":
case "DTS-HD Passthru":
+ case "AAC Passthru":
+ case "MP3 Passthru":
drp_audioMix.SelectedItem = Passthru;
break;
}
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs b/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs index e12639e1d..ba6331fcf 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs @@ -148,6 +148,10 @@ namespace HandBrake.ApplicationServices.Functions case "copy:dts":
return "DTS Passthru";
case "copy:dtshd":
+ return "MP3 Passthru";
+ case "copy:mp3":
+ return "AAC Passthru";
+ case "copy:aac":
return "DTS-HD Passthru";
case "ffaac":
return "AAC (ffmpeg)";
@@ -181,6 +185,10 @@ namespace HandBrake.ApplicationServices.Functions return AudioEncoder.DtsPassthrough;
case "copy:dtshd":
return AudioEncoder.DtsHDPassthrough;
+ case "copy:mp3":
+ return AudioEncoder.Mp3Passthru;
+ case "copy:aac":
+ return AudioEncoder.AacPassthru;
default:
return AudioEncoder.Faac;
}
@@ -213,6 +221,10 @@ namespace HandBrake.ApplicationServices.Functions return AudioEncoder.DtsPassthrough;
case "DTS-HD Passthru":
return AudioEncoder.DtsHDPassthrough;
+ case "AAC Passthru":
+ return AudioEncoder.AacPassthru;
+ case "MP3 Passthru":
+ return AudioEncoder.Mp3Passthru;
default:
return AudioEncoder.Faac;
}
@@ -247,6 +259,10 @@ namespace HandBrake.ApplicationServices.Functions return "copy:dtshd";
case AudioEncoder.Ac3:
return "ac3";
+ case AudioEncoder.AacPassthru:
+ return "copy:aac";
+ case AudioEncoder.Mp3Passthru:
+ return "copy:mp3";
default:
return "faac";
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioEncoder.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioEncoder.cs index 8b030070f..6dfff1076 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioEncoder.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioEncoder.cs @@ -36,6 +36,12 @@ namespace HandBrake.ApplicationServices.Model.Encoding [Description("DTS-HD Passthru")]
DtsHDPassthrough,
+ [Description("AAC Passthru")]
+ AacPassthru,
+
+ [Description("MP3 Passthru")]
+ Mp3Passthru,
+
[Description("Vorbis (vorbis)")]
Vorbis
}
diff --git a/win/CS/Properties/Settings.Designer.cs b/win/CS/Properties/Settings.Designer.cs index a2da3dc99..08e3d417f 100644 --- a/win/CS/Properties/Settings.Designer.cs +++ b/win/CS/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:4.0.30319.235
+// Runtime Version:4.0.30319.431
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -409,7 +409,7 @@ namespace Handbrake.Properties { [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("4")]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
public int DubModeAudio {
get {
return ((int)(this["DubModeAudio"]));
@@ -442,5 +442,17 @@ namespace Handbrake.Properties { this["addOnlyOneAudioPerLanguage"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("10")]
+ public string MinTitleLength {
+ get {
+ return ((string)(this["MinTitleLength"]));
+ }
+ set {
+ this["MinTitleLength"] = value;
+ }
+ }
}
}
diff --git a/win/CS/Properties/Settings.settings b/win/CS/Properties/Settings.settings index 7e9eac8e7..a5a61eb98 100644 --- a/win/CS/Properties/Settings.settings +++ b/win/CS/Properties/Settings.settings @@ -100,7 +100,7 @@ <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /></Value>
</Setting>
<Setting Name="DubModeAudio" Type="System.Int32" Scope="User">
- <Value Profile="(Default)">4</Value>
+ <Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="DubModeSubtitle" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
@@ -108,5 +108,8 @@ <Setting Name="addOnlyOneAudioPerLanguage" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
+ <Setting Name="MinTitleLength" Type="System.String" Scope="User">
+ <Value Profile="(Default)">10</Value>
+ </Setting>
</Settings>
</SettingsFile>
\ No newline at end of file diff --git a/win/CS/app.config b/win/CS/app.config index c3f2548f1..91e3b40be 100644 --- a/win/CS/app.config +++ b/win/CS/app.config @@ -110,7 +110,7 @@ </value>
</setting>
<setting name="DubModeAudio" serializeAs="String">
- <value>4</value>
+ <value>0</value>
</setting>
<setting name="DubModeSubtitle" serializeAs="String">
<value>0</value>
|