Advertisement
Guest User

Untitled

a guest
Jul 30th, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.98 KB | None | 0 0
  1.    string str = "";
  2.          
  3.                     if (ProcessNumber == 0)
  4.                     {
  5.                         str = e.Data;
  6.                         ProcessHandlerClass.Getx264Status(ref str, ref Value);
  7.                     }
  8.  
  9.  
  10.  
  11.         public static void Getx264Status(ref string str, ref double Value)
  12.         {
  13.             Regex regx264 = new Regex(@"(?<=\[)[^]]+(?=\%)");
  14.            
  15.             if (regx264.Match(str).Success)
  16.             {
  17.                 if (!double.TryParse(regx264.Match(str).Value, out Value))
  18.                     Value = 0;
  19.                 str = string.Format("x264: {0}% - {1} - {2}", Value, Regex.Match(str, @"(?<=,\s)[^]]+(?<=fps)").Value, Regex.Match(str, @"(?<=eta\s)[^]]+(?<=\d)").Value);
  20.             }
  21.             else if
  22.                (str.Contains("encoded"))
  23.             {
  24.                 Value = 100;
  25.                 str = string.Format("x264: {0}%", Value);
  26.             }
  27.             else
  28.                 str = "";
  29.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement