Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string str = "";
- if (ProcessNumber == 0)
- {
- str = e.Data;
- ProcessHandlerClass.Getx264Status(ref str, ref Value);
- }
- public static void Getx264Status(ref string str, ref double Value)
- {
- Regex regx264 = new Regex(@"(?<=\[)[^]]+(?=\%)");
- if (regx264.Match(str).Success)
- {
- if (!double.TryParse(regx264.Match(str).Value, out Value))
- Value = 0;
- str = string.Format("x264: {0}% - {1} - {2}", Value, Regex.Match(str, @"(?<=,\s)[^]]+(?<=fps)").Value, Regex.Match(str, @"(?<=eta\s)[^]]+(?<=\d)").Value);
- }
- else if
- (str.Contains("encoded"))
- {
- Value = 100;
- str = string.Format("x264: {0}%", Value);
- }
- else
- str = "";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement