From 85b4cc450b4fbbd54d6355b91665657523200b10 Mon Sep 17 00:00:00 2001 From: handbrake Date: Tue, 15 Jan 2013 07:35:19 +0000 Subject: modified some display information errors modified GUI OpenCL/UVD checkbox enable errors modified compile without enable-opencl work errors git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5171 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../HandBrake.ApplicationServices/Parsing/Title.cs | 24 ++++++++++++++++++---- .../Utilities/QueryGeneratorUtility.cs | 6 +++--- win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 4 ++-- 3 files changed, 25 insertions(+), 9 deletions(-) (limited to 'win') diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs index d6e6e57aa..466a33aa1 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs @@ -142,6 +142,7 @@ namespace HandBrake.ApplicationServices.Parsing { var thisTitle = new Title(); string nextLine = output.ReadLine(); + string temp; // Get the Title Number Match m = Regex.Match(nextLine, @"^\+ title ([0-9]*):"); @@ -223,12 +224,27 @@ namespace HandBrake.ApplicationServices.Parsing }; } - m = Regex.Match(output.ReadLine(), @"^ \+ support opencl: ([0-9]*)"); + nextLine = output.ReadLine(); + m = Regex.Match(nextLine, @"^ \+ support opencl:"); if (m.Success) - thisTitle.OpenCLSupport = int.Parse(m.Groups[1].Value.Trim()); - m = Regex.Match(output.ReadLine(), @" \+ support uvd: ([0-9]*)"); + { + temp = nextLine.Replace("+ support opencl:", string.Empty).Trim(); + if (string.Compare(temp, "yes") == 0) + thisTitle.OpenCLSupport = 1; + else + thisTitle.OpenCLSupport = 0; + } + + nextLine = output.ReadLine(); + m = Regex.Match(nextLine, @"^ \+ support uvd:"); if (m.Success) - thisTitle.UVDSupport = int.Parse(m.Groups[1].Value.Trim()); + { + temp = nextLine.Replace("+ support uvd:", string.Empty).Trim(); + if (string.Compare(temp, "yes") == 0) + thisTitle.UVDSupport = 1; + else + thisTitle.UVDSupport = 0; + } thisTitle.Chapters.AddRange(Chapter.ParseList(output)); thisTitle.AudioTracks.AddRange(AudioHelper.ParseList(output)); diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index ca23b3c66..69cbfc258 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -245,10 +245,10 @@ namespace HandBrake.ApplicationServices.Utilities if (task.OpenCLSupport) query += " -P "; - if (task.UVDSupport && task.OpenCLSupport) + + if (task.UVDSupport) query += " -U "; - else if (task.UVDSupport && !task.OpenCLSupport) - query += " -P -U"; + return query; } diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 0a0cfe02d..6d2e736a3 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1721,11 +1721,11 @@ namespace HandBrakeWPF.ViewModels { if (this.selectedTitle.OpenCLSupport == 0) { - this.SupportOpenCL = false; + this.SupportOpenCL = true; } else { - this.SupportOpenCL = true; + this.SupportOpenCL = false; } if (this.selectedTitle.UVDSupport == 0) { -- cgit v1.2.3