/// <summary> /// Constructor which initialises the video handler /// </summary> /// <param name="player">Instance of external player</param> /// <param name="osdHandler">Instance of the osdHandler</param> public VideoHandler(MPlayerExtPlayer player, IOSDHandler osdHandler) { _player = player; _osdHandler = osdHandler; _aspectRatio = "1.0"; _videoHeight = -1; _videoWidth = 0; _ar = GUIGraphicsContext.ARType; _mplayerBackgroundPanel = new Panel { ForeColor = Color.Black, BackColor = Color.Black, Size = new Size(0, 0), Location = new Point(0, 0) }; _mplayerOuterPanel = new Panel { ForeColor = Color.Black, BackColor = Color.Black, Size = new Size(0, 0), Location = new Point(0, 0) }; _mplayerInnerPanel = new Panel { Size = new Size(0, 0), ForeColor = Color.FromArgb(16, 16, 16), BackColor = Color.FromArgb(16, 16, 16) }; _mplayerOuterPanel.Controls.Add(_mplayerInnerPanel); _mplayerInnerPanel.Location = new Point(0, 0); }
/// <summary> /// Constructor which initialises the audio and subtitle handler /// </summary> /// <param name="player">Instance of external player</param> /// <param name="osdHandler">Instance of the osdHandler</param> public AudioSubtitleHandler(MPlayerExtPlayer player, IOSDHandler osdHandler) { _player = player; _osdHandler = osdHandler; _audioID = new Dictionary <int, int>(); _audioNames = new Dictionary <int, string>(); _subtitleID = new Dictionary <int, int>(); _subtitleNames = new Dictionary <int, string>(); _numberOfAudioStreams = 0; _numberOfSubtitles = 0; _currentAudioStream = 0; _currentSubtitleStream = 0; _currentAudioDelay = 0; _currentSubtitleDelay = 0; _configManager = ConfigurationManager.GetInstance(); _audioDelayStep = _configManager.AudioDelayStep; _subtitleDelayStep = _configManager.SubtitleDelayStep; _subtitlesEnabled = _configManager.EnableSubtitles; _currentSubtitlePosition = _configManager.SubtitlePosition; _currentSubtitleSize = _configManager.SubtitleSize; if (OSInfo.OSInfo.OSList.WindowsVista == OSInfo.OSInfo.GetOSName() || OSInfo.OSInfo.OSList.Windows2008 == OSInfo.OSInfo.GetOSName() || OSInfo.OSInfo.OSList.Windows7 == OSInfo.OSInfo.GetOSName()) { _mpMessageHandler = OnMessage; GUIWindowManager.Receivers += _mpMessageHandler; } _volume = 100; }
/// <summary> /// Constructor which initialises the seeking handler /// </summary> /// <param name="player">Instance of external player</param> /// <param name="osdHandler">Instance of the osdHandler</param> public SeekingHandler(MPlayerExtPlayer player, IOSDHandler osdHandler) { _player = player; _osdHandler = osdHandler; _additionalTime = DateTime.Now; _baseTime = 0; _speed = 1; _performSeekRelative = false; _checkTime = false; _isDvdMenu = false; _lastStreamPos = -1; }
/// <summary> /// Constructor which initialises the internal osd handler /// </summary> /// <param name="player">Instance of external player</param> /// <param name="playerUse">Indicates, if this instance will be used by the player class</param> public InternalOSDHandler(MPlayerExtPlayer player, bool playerUse) { _player = player; _displayDuration = 2000; _osdVisible = false; _osdVisibleForPause = false; _mpVolumeHandler = VolumeHandler.Instance; if (playerUse) { _mpMessageHandler = OnMessage; GUIWindowManager.Receivers += _mpMessageHandler; } }
/// <summary> /// Constructor which initialises the external osd library handler /// </summary> /// <param name="player">Instance of external player</param> public ExternalOSDLibrary(MPlayerExtPlayer player) { _showingCacheStatus = false; _internalOSDHandler = new InternalOSDHandler(player, false); using (new WaitCursor()) { Thread thread = new Thread(OsdGetInstance); thread.Start(); while (thread.IsAlive) { GUIWindowManager.Process(); Thread.Sleep(100); } } _osd.ShowInit(LocalizeStrings.Get((int)LocalizedMessages.Initializing)); }
/// <summary> /// Constructor which initialises the audio and subtitle handler /// </summary> /// <param name="player">Instance of external player</param> /// <param name="osdHandler">Instance of the osdHandler</param> public AudioSubtitleHandler(MPlayerExtPlayer player, IOSDHandler osdHandler) { _player = player; _osdHandler = osdHandler; _audioID = new Dictionary<int, int>(); _audioNames = new Dictionary<int, string>(); _subtitleID = new Dictionary<int, int>(); _subtitleNames = new Dictionary<int, string>(); _numberOfAudioStreams = 0; _numberOfSubtitles = 0; _currentAudioStream = 0; _currentSubtitleStream = 0; _currentAudioDelay = 0; _currentSubtitleDelay = 0; _configManager = ConfigurationManager.GetInstance(); _audioDelayStep = _configManager.AudioDelayStep; _subtitleDelayStep = _configManager.SubtitleDelayStep; _subtitlesEnabled = _configManager.EnableSubtitles; _currentSubtitlePosition = _configManager.SubtitlePosition; _currentSubtitleSize = _configManager.SubtitleSize; if (OSInfo.OSInfo.OSList.WindowsVista == OSInfo.OSInfo.GetOSName() || OSInfo.OSInfo.OSList.Windows2008 == OSInfo.OSInfo.GetOSName() || OSInfo.OSInfo.OSList.Windows7 == OSInfo.OSInfo.GetOSName()) { _mpMessageHandler = OnMessage; GUIWindowManager.Receivers += _mpMessageHandler; } _volume = 100; }