public override void Process() { if (media == null) { return; } if (media.State == States.Ended || media.State == States.Stopped) { playState = PlayState.Ended; } if (Initializing && media.State == States.Playing) { playState = PlayState.Playing; } if (!bufferingDone && !Initializing) { GUIWaitCursor.Hide(); // hide the wait cursor bufferingDone = true; if (Ended) { PlaybackEnded(); } else { if (GoFullscreen) { GUIWindowManager.ActivateWindow(GUIOnlineVideoFullscreen.WINDOW_FULLSCREEN_ONLINEVIDEO); } GUIMessage msgPb = new GUIMessage(GUIMessage.MessageType.GUI_MSG_PLAYBACK_STARTED, 0, 0, 0, 0, 0, null); msgPb.Label = CurrentFile; GUIWindowManager.SendThreadMessage(msgPb); SetVideoWindow(); osd = OSDController.Instance; } } if (osd != null) { osd.UpdateGUI(); } }
public override void Process() { if (wmpCtrl != null) { if (Initializing) { if (!bufferCompleted && wmpCtrl.playState.Equals(WMPPlayState.wmppsPlaying)) { bufferCompleted = true; } if (wmpCtrl.playState.Equals(WMPPlayState.wmppsReady)) { GUIWaitCursor.Hide(); // hide the wait cursor Log.Instance.Info("WMPVideoPlayer: error encountered while trying to play {0}", currentFile); bufferCompleted = true; PlaybackEnded(); } else if (bufferCompleted) { AdaptRefreshRate(); GUIWaitCursor.Hide(); // hide the wait cursor wmpCtrl.Visible = true; playState = PlayState.Playing; if (GoFullscreen) { GUIWindowManager.ActivateWindow(GUIOnlineVideoFullscreen.WINDOW_FULLSCREEN_ONLINEVIDEO); } GUIMessage msgPb = new GUIMessage(GUIMessage.MessageType.GUI_MSG_PLAYBACK_STARTED, 0, 0, 0, 0, 0, null); msgPb.Label = CurrentFile; GUIWindowManager.SendThreadMessage(msgPb); SetVideoWindow(); osd = OSDController.Instance; } } else if (Playing && osd != null) { osd.UpdateGUI(); } } }
/// <summary> /// Updates the gui and osd /// </summary> public void UpdateGUI() { _osd.UpdateGUI(); }