summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Parsing/Title.cs24
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs6
2 files changed, 23 insertions, 7 deletions
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;
}