diff options
author | sr55 <[email protected]> | 2012-02-04 16:45:29 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-02-04 16:45:29 +0000 |
commit | 53e2efcc66a556b2e3b7788a2152d6ed9a033f1b (patch) | |
tree | 4cc2cd7e0a15f2a1b21ffebdaecfd7b80053fb29 /win/CS/HandBrake.ApplicationServices | |
parent | 24468ce428c512fe6375a92eb6957cada4e0e89a (diff) |
WinGui: Fix the plist importer. New Passthru keys added.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4437 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs | 26 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs | 6 |
2 files changed, 28 insertions, 4 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs index 19a98c3f5..1d2e4d3af 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs @@ -42,7 +42,7 @@ namespace HandBrake.ApplicationServices.Utilities string qualityMode = string.Empty;
#region Get a List of Audio Track Objects
- XmlNode audioListDict = root.ChildNodes[2].ChildNodes[0].FirstChild.ChildNodes[1];
+ XmlNode audioListDict = root.ChildNodes[2].ChildNodes[0].FirstChild.ChildNodes[13];
ObservableCollection<AudioTrack> audioTracks = new ObservableCollection<AudioTrack>();
for (int i = 0; i < audioListDict.ChildNodes.Count; i++)
@@ -76,7 +76,7 @@ namespace HandBrake.ApplicationServices.Utilities track.DRC = double.Parse(value);
break;
case "AudioTrackGainSlider":
- track.Gain = int.Parse(value);
+ track.Gain = int.Parse(value.Replace("0.0", "0"));
break;
}
}
@@ -90,7 +90,7 @@ namespace HandBrake.ApplicationServices.Utilities XmlNode presetSettings = root.ChildNodes[2].ChildNodes[0].FirstChild;
// Start from 2 to avoid the audio settings which we don't need.
- for (int i = 2; i < presetSettings.ChildNodes.Count; i += 2)
+ for (int i = 0; i < presetSettings.ChildNodes.Count; i += 2)
{
string key = presetSettings.ChildNodes[i].InnerText;
string value = presetSettings.ChildNodes[i + 1].InnerText;
@@ -321,6 +321,26 @@ namespace HandBrake.ApplicationServices.Utilities case "UsesPictureSettings":
parsed.UsesPictureSettings = value == "1";
break;
+
+ // Allowed Passthru
+ case "AudioAllowAACPass":
+ parsed.AllowedPassthruOptions.AudioAllowAACPass = value == "1";
+ break;
+ case "AudioAllowAC3Pass":
+ parsed.AllowedPassthruOptions.AudioAllowAC3Pass = value == "1";
+ break;
+ case "AudioAllowDTSHDPass":
+ parsed.AllowedPassthruOptions.AudioAllowDTSHDPass = value == "1";
+ break;
+ case "AudioAllowDTSPass":
+ parsed.AllowedPassthruOptions.AudioAllowDTSPass = value == "1";
+ break;
+ case "AudioAllowMP3Pass":
+ parsed.AllowedPassthruOptions.AudioAllowMP3Pass = value == "1";
+ break;
+ case "AudioEncoderFallback":
+ parsed.AllowedPassthruOptions.AudioEncoderFallback = EnumHelper<AudioEncoder>.GetValue(value);
+ break;
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index 2f3d2b557..67717ecab 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -269,7 +269,11 @@ namespace HandBrake.ApplicationServices.Utilities query += string.Format(" --pixel-aspect {0}:{1}", task.PixelAspectX, task.PixelAspectY);
break;
}
- query += " --modulus " + task.Modulus;
+
+ if (task.Modulus.HasValue)
+ {
+ query += " --modulus " + task.Modulus;
+ }
return query;
}
|