diff options
author | sr55 <[email protected]> | 2015-01-12 19:50:52 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-01-12 19:50:52 +0000 |
commit | 78f3a92eeb301e9896fdc59efdd3d37133984033 (patch) | |
tree | 57f7cd0ab4fa2ea86df6ee7c26cfaa3a550e5a38 /win/CS/HandBrake.ApplicationServices | |
parent | 84d152fecb516134d1d89d4689761430d6aa0a0d (diff) |
WinGui: Some fixes around x264/x265 tune/profile options
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6739 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
3 files changed, 19 insertions, 7 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/Model/EncodeTask.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/Model/EncodeTask.cs index d5c62794d..991d60a76 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/Model/EncodeTask.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/Model/EncodeTask.cs @@ -54,7 +54,7 @@ namespace HandBrake.ApplicationServices.Services.Encode.Model this.AllowedPassthruOptions = new AllowedPassthru();
this.X264Preset = x264Preset.Medium;
this.QsvPreset = QsvPreset.Quality;
- this.H264Profile = x264Profile.None;
+ this.H264Profile = x264Profile.Auto;
this.X264Tune = x264Tune.None;
this.Modulus = 16;
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs index 15114000c..17a8ba000 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs @@ -19,9 +19,11 @@ namespace HandBrake.ApplicationServices.Utilities using HandBrake.Interop.Model;
using HandBrake.Interop.Model.Encoding;
using HandBrake.Interop.Model.Encoding.x264;
+ using HandBrake.Interop.Model.Encoding.x265;
/// <summary>
/// A Utility Class to Convert a
+ /// TODO remove this class and replace a new factory to convert the EncodeTask object. This will remove a layer of abstraction.
/// </summary>
public class InteropModelCreator
{
@@ -200,17 +202,27 @@ namespace HandBrake.ApplicationServices.Utilities {
profile.VideoTunes.Add("fastdecode");
}
+
+ profile.VideoProfile = work.H264Profile.ToString().ToLower().Replace(" ", string.Empty); // TODO change these away from strings.
+ profile.VideoLevel = work.H264Level;
}
else if (work.VideoEncoder == VideoEncoder.X265)
{
+
profile.VideoPreset = work.X265Preset.ToString().ToLower().Replace(" ", string.Empty);
- profile.VideoProfile = work.H265Profile.ToString().ToLower().Replace(" ", string.Empty);
- profile.VideoTunes = new List<string>();
- }
- profile.VideoLevel = work.H264Level;
- profile.VideoProfile = work.H264Profile.ToString().ToLower().Replace(" ", string.Empty); // TODO change these away from strings.
+ if (work.H265Profile != x265Profile.None)
+ {
+ profile.VideoProfile = work.H265Profile.ToString().ToLower().Replace(" ", string.Empty);
+ }
+ profile.VideoTunes = new List<string>();
+ if (work.X265Tune != x265Tune.None)
+ {
+ profile.VideoTunes.Add(work.X265Tune.ToString().ToLower().Replace(" ", string.Empty));
+ }
+ }
+
// Chapter Markers
profile.IncludeChapterMarkers = work.IncludeChapterMarkers;
job.CustomChapterNames = work.ChapterNames.Select(item => item.ChapterName).ToList();
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index fd9ad3b4c..653732d2b 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -1030,7 +1030,7 @@ namespace HandBrake.ApplicationServices.Utilities {
query += string.Format(" --encoder-level=\"{0}\" ", task.H264Level);
}
- if (task.H264Profile != x264Profile.None)
+ if (task.H264Profile != x264Profile.Auto)
{
query += string.Format(
" --encoder-profile={0} ", task.H264Profile.ToString().ToLower().Replace(" ", string.Empty));
|