summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Converters
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-02-13 14:22:03 +0000
committersr55 <[email protected]>2016-02-13 14:22:11 +0000
commit9667fe056a99b83bdc90cf75f8922ee745f87d52 (patch)
treeae8701a386260882c0aba8d34cca833e025ecd0a /win/CS/HandBrakeWPF/Converters
parentb7cb7d6b9d9b43962eec67f4529fb544b9c874cc (diff)
WinGui: x264/5 multilib support. You can now encode 10bit x264, 10bit x265 and 12bit x265 if you provide MinGW-W64 compiled dll libraries in the HandBrake install directory.
Diffstat (limited to 'win/CS/HandBrakeWPF/Converters')
-rw-r--r--win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs2
-rw-r--r--win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs16
-rw-r--r--win/CS/HandBrakeWPF/Converters/Video/VideoOptionsTooltipConverter.cs3
3 files changed, 19 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs
index 29e668917..dce48a4cf 100644
--- a/win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/Video/EncoderOptionsTooltipConverter.cs
@@ -48,7 +48,7 @@ namespace HandBrakeWPF.Converters.Video
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
EncodeTask task = value as EncodeTask;
- if (task != null && (task.VideoEncoder == VideoEncoder.X264 || task.VideoEncoder == VideoEncoder.X265))
+ if (task != null && (task.VideoEncoder == VideoEncoder.X264 || task.VideoEncoder == VideoEncoder.X264_10 || task.VideoEncoder == VideoEncoder.X265 || task.VideoEncoder == VideoEncoder.X265_10 || task.VideoEncoder == VideoEncoder.X265_12))
{
if (task.ShowAdvancedTab)
{
diff --git a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs
index e387bf064..489b787b1 100644
--- a/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/Video/VideoEncoderConverter.cs
@@ -15,6 +15,7 @@ namespace HandBrakeWPF.Converters.Video
using System.Linq;
using System.Windows.Data;
+ using HandBrake.ApplicationServices.Interop;
using HandBrake.ApplicationServices.Utilities;
using HandBrake.ApplicationServices.Interop.Model.Encoding;
@@ -53,6 +54,21 @@ namespace HandBrakeWPF.Converters.Video
List<VideoEncoder> encoders = EnumHelper<VideoEncoder>.GetEnumList().ToList();
EncodeTask task = values[1] as EncodeTask;
+ if (HandBrakeEncoderHelpers.VideoEncoders.All(a => a.ShortName != EnumHelper<VideoEncoder>.GetShortName(VideoEncoder.X264_10)))
+ {
+ encoders.Remove(VideoEncoder.X264_10);
+ }
+
+ if (HandBrakeEncoderHelpers.VideoEncoders.All(a => a.ShortName != EnumHelper<VideoEncoder>.GetShortName(VideoEncoder.X265_10)))
+ {
+ encoders.Remove(VideoEncoder.X265_10);
+ }
+
+ if (HandBrakeEncoderHelpers.VideoEncoders.All(a => a.ShortName != EnumHelper<VideoEncoder>.GetShortName(VideoEncoder.X265_12)))
+ {
+ encoders.Remove(VideoEncoder.X265_12);
+ }
+
if (task != null && task.OutputFormat != OutputFormat.Mkv)
{
encoders.Remove(VideoEncoder.Theora);
diff --git a/win/CS/HandBrakeWPF/Converters/Video/VideoOptionsTooltipConverter.cs b/win/CS/HandBrakeWPF/Converters/Video/VideoOptionsTooltipConverter.cs
index 3937cc373..f175ec2ad 100644
--- a/win/CS/HandBrakeWPF/Converters/Video/VideoOptionsTooltipConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/Video/VideoOptionsTooltipConverter.cs
@@ -48,7 +48,8 @@ namespace HandBrakeWPF.Converters.Video
EncodeTask task = value as EncodeTask;
if (task != null)
{
- string rfqp = task.VideoEncoder == VideoEncoder.X264 || task.VideoEncoder == VideoEncoder.X265 ? "RF" : "QP";
+ string rfqp = task.VideoEncoder == VideoEncoder.X264 || task.VideoEncoder == VideoEncoder.X264_10 || task.VideoEncoder == VideoEncoder.X265
+ || task.VideoEncoder == VideoEncoder.X265_10 || task.VideoEncoder == VideoEncoder.X265_12 ? "RF" : "QP";
string quality = task.VideoEncodeRateType == VideoEncodeRateType.ConstantQuality ? task.Quality + rfqp : task.VideoBitrate + " kbps";
string twoPass = task.TwoPass ? task.TurboFirstPass ? " (2-Pass with Turbo)" : " (2-Pass)" : string.Empty;
return string.Format("{0} - {1}{2}", EnumHelper<VideoEncoder>.GetDisplay(task.VideoEncoder), quality, twoPass);