summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Utilities
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-09-25 15:57:28 +0000
committersr55 <[email protected]>2011-09-25 15:57:28 +0000
commitea437273cecf5bddcc7b8913bb4e8eef6b60d53b (patch)
treefe7e0238ae4ed7e6c09908acdd3e6fc2c65082a7 /win/CS/HandBrake.ApplicationServices/Utilities
parent54a87dae5d54169a797145f665851276c2e27708 (diff)
WinGui: Couple of fixes and updates to the Plist parser.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4250 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs26
1 files changed, 21 insertions, 5 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
index 2bbdfffcd..c6ffc4194 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
@@ -15,7 +15,6 @@ namespace HandBrake.ApplicationServices.Utilities
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
- using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.Interop.Model.Encoding;
@@ -81,6 +80,9 @@ namespace HandBrake.ApplicationServices.Utilities
case "AudioTrackDRCSlider":
track.DRC = double.Parse(value);
break;
+ case "AudioTrackGainSlider":
+ track.Gain = int.Parse(value);
+ break;
}
}
audioTracks.Add(track);
@@ -102,7 +104,7 @@ namespace HandBrake.ApplicationServices.Utilities
{
// Output Settings
case "FileFormat":
- parsed.OutputFormat = Converters.GetFileFormat(value);
+ parsed.OutputFormat = Converters.GetFileFormat(value.Replace("file", string.Empty).Trim());
break;
case "Mp4HttpOptimize":
parsed.OptimizeMP4 = value == "1";
@@ -116,7 +118,7 @@ namespace HandBrake.ApplicationServices.Utilities
// Picture Settings
case "PictureAutoCrop":
- // Not used
+ parsed.HasCropping = value != "1";
break;
case "PictureTopCrop":
parsed.Cropping.Top = int.Parse(value);
@@ -249,7 +251,7 @@ namespace HandBrake.ApplicationServices.Utilities
}
break;
case "VideoEncoder":
- parsed.VideoEncoder = Converters.GetVideoEncoder(value);
+ parsed.VideoEncoder = EnumHelper<VideoEncoder>.GetValue(value);
break;
case "VideoFramerate":
@@ -259,7 +261,21 @@ namespace HandBrake.ApplicationServices.Utilities
}
else if (!string.IsNullOrEmpty(value))
{
- parsed.Framerate = int.Parse(value);
+ parsed.Framerate = double.Parse(value);
+ }
+ break;
+ case "VideoFramerateMode":
+ switch (value)
+ {
+ case "vfr":
+ parsed.FramerateMode = FramerateMode.VFR;
+ break;
+ case "cfr":
+ parsed.FramerateMode = FramerateMode.CFR;
+ break;
+ default:
+ parsed.FramerateMode = FramerateMode.PFR;
+ break;
}
break;
case "VideoGrayScale":