1 #ifndef KARAOKEWINDOWBACKGROUND_H
2 #define KARAOKEWINDOWBACKGROUND_H
5 * Copyright (C) 2005-2013 Team XBMC
8 * This Program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2, or (at your option)
13 * This Program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with XBMC; see the file COPYING. If not, see
20 * <http://www.gnu.org/licenses/>.
24 // C++ Interface: karaokewindowbackground
26 #include "cores/IPlayer.h"
30 class CGUIVisualisationControl;
31 class KaraokeVideoBackground;
33 class CKaraokeWindowBackground : public IPlayerCallback
36 CKaraokeWindowBackground();
37 ~CKaraokeWindowBackground();
39 virtual void Init(CGUIWindow * wnd);
41 // Start with empty background
42 virtual void StartEmpty();
44 // Start with visualisation background
45 virtual void StartVisualisation();
47 // Start with song-specific still image background
48 virtual void StartImage( const CStdString& path );
50 // Start with song-specific video background
51 virtual void StartVideo( const CStdString& path = "" );
53 // Start with default (setting-specific) background
54 virtual void StartDefault();
56 // Pause or continue the background
57 virtual void Pause( bool now_paused );
59 // Stop any kind of background
62 // Function forwarders
63 virtual bool OnAction(const CAction &action);
64 virtual bool OnMessage(CGUIMessage& message);
65 virtual void Render();
68 virtual void OnPlayBackEnded();
69 virtual void OnPlayBackStarted();
70 virtual void OnPlayBackStopped();
71 virtual void OnQueueNextItem();
77 BACKGROUND_VISUALISATION,
82 // This critical section protects all variables except m_videoEnded
83 CCriticalSection m_CritSectionShared;
85 // for visualization background
86 CGUIVisualisationControl * m_VisControl;
87 CGUIImage * m_ImgControl;
89 BackgroundMode m_currentMode;
91 // Parent window pointer
92 CGUIWindow * m_parentWindow;
94 // Video player pointer
95 KaraokeVideoBackground * m_videoPlayer;
97 // For default visualisation mode
98 BackgroundMode m_defaultMode;
99 CStdString m_path; // image