/// <summary> /// Handles a message that is retrieved from the MPlayer process /// </summary> /// <param name="message">Message to handle</param> public void HandleMessage(string message) { // Cache fill: 0.00% (0 bytes) if (message.StartsWith("Cache fill: ")) { string temp = message.Substring(12); int index = temp.IndexOf("%"); temp = temp.Substring(0, index); float cacheFill; float.TryParse(temp.Replace(".", CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator), out cacheFill); _osd.ShowCacheStatus(cacheFill); _showingCacheStatus = true; } else if (_showingCacheStatus) { _showingCacheStatus = false; _osd.HideCacheStatus(); } else if (message.StartsWith("VO: [directx] ") || message.StartsWith("VO: [direct3d] ") || message.StartsWith("VO: [gl2] ") || message.StartsWith("VO: [gl] ")) { _osd.HideInit(); } }