/// <summary>
 /// Returns the singleton instance
 /// </summary>
 /// <returns>Singleton instance</returns>
 public static ConfigurationManager GetInstance()
 {
     if (_singletonInstance == null)
       {
     _singletonInstance = new ConfigurationManager();
       }
       return _singletonInstance;
 }
 /// <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;
 }
Example #3
0
 /// <summary>
 /// Simple dummy constructor
 /// </summary>
 public MPlayerExtPlayer()
 {
     _configManager = ConfigurationManager.GetInstance();
 }