示例#1
0
        /// <summary>
        /// Initialize the system (Objects, Controls etc.)
        /// </summary>
        /// <param name="isVideo">Indícate if the file has video</param>
        private void InitSystem(bool isVideo)
        {
            _mediaInfo = new MediaInfoWrapper(_currentFile);

            _playState = PlayState.Playing;
            if (_configManager.OsdMode == OSDMode.InternalMPlayer || !isVideo)
            {
                _osdHandler = new InternalOSDHandler(this, true);
            }
            else if (_configManager.OsdMode == OSDMode.ExternalOSDLibrary)
            {
                _osdHandler = new ExternalOSDLibrary(this);
            }
            _videoHandler         = new VideoHandler(this, _osdHandler);
            _audioSubtitleHandler = new AudioSubtitleHandler(this, _osdHandler);
            _seekingHandler       = new SeekingHandler(this, _osdHandler);
            _messageHandlers      = new List <IMessageHandler> {
                _videoHandler, _audioSubtitleHandler, _seekingHandler, _osdHandler
            };
            _actionHandler = OnNewAction;
            GUIWindowManager.OnNewAction += _actionHandler;
        }
示例#2
0
        /// <summary>
        /// Initialize the system (Objects, Controls etc.)
        /// </summary>
        /// <param name="isVideo">Indícate if the file has video</param>
        private void InitSystem(bool isVideo)
        {
            _mediaInfo = new MediaInfoWrapper(_currentFile);

              _playState = PlayState.Playing;
              if (_configManager.OsdMode == OSDMode.InternalMPlayer || !isVideo)
              {
            _osdHandler = new InternalOSDHandler(this, true);
              }
              else if (_configManager.OsdMode == OSDMode.ExternalOSDLibrary)
              {
            _osdHandler = new ExternalOSDLibrary(this);
              }
              _videoHandler = new VideoHandler(this, _osdHandler);
              _audioSubtitleHandler = new AudioSubtitleHandler(this, _osdHandler);
              _seekingHandler = new SeekingHandler(this, _osdHandler);
              _messageHandlers = new List<IMessageHandler> { _videoHandler, _audioSubtitleHandler, _seekingHandler, _osdHandler };
              _actionHandler = OnNewAction;
              GUIWindowManager.OnNewAction += _actionHandler;
        }