[cosmetics] update date in GPL header
[vuplus_xbmc] / xbmc / music / karaoke / karaokewindowbackground.h
1 #ifndef KARAOKEWINDOWBACKGROUND_H
2 #define KARAOKEWINDOWBACKGROUND_H
3
4 /*
5  *      Copyright (C) 2005-2013 Team XBMC
6  *      http://www.xbmc.org
7  *
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)
11  *  any later version.
12  *
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.
17  *
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/>.
21  *
22  */
23
24 // C++ Interface: karaokewindowbackground
25
26 #include "cores/IPlayer.h"
27
28 class CGUIWindow;
29 class CGUIImage;
30 class CGUIVisualisationControl;
31 class KaraokeVideoBackground;
32
33 class CKaraokeWindowBackground : public IPlayerCallback
34 {
35 public:
36   CKaraokeWindowBackground();
37   ~CKaraokeWindowBackground();
38
39   virtual void Init(CGUIWindow * wnd);
40
41   // Start with empty background
42   virtual void StartEmpty();
43
44   // Start with visualisation background
45   virtual void StartVisualisation();
46
47   // Start with song-specific still image background
48   virtual void StartImage( const CStdString& path );
49
50   // Start with song-specific video background
51   virtual void StartVideo( const CStdString& path = "" );
52
53   // Start with default (setting-specific) background
54   virtual void StartDefault();
55
56   // Pause or continue the background
57   virtual void Pause( bool now_paused );
58
59   // Stop any kind of background
60   virtual void Stop();
61
62   // Function forwarders
63   virtual bool OnAction(const CAction &action);
64   virtual bool OnMessage(CGUIMessage& message);
65   virtual void Render();
66
67   // IPlayer callbacks
68   virtual void OnPlayBackEnded();
69   virtual void OnPlayBackStarted();
70   virtual void OnPlayBackStopped();
71   virtual void OnQueueNextItem();
72
73 private:
74   enum BackgroundMode
75   {
76       BACKGROUND_NONE,
77       BACKGROUND_VISUALISATION,
78       BACKGROUND_IMAGE,
79       BACKGROUND_VIDEO
80   };
81
82   // This critical section protects all variables except m_videoEnded
83   CCriticalSection          m_CritSectionShared;
84
85   // for visualization background
86   CGUIVisualisationControl * m_VisControl;
87   CGUIImage                * m_ImgControl;
88
89   BackgroundMode             m_currentMode;
90
91   // Parent window pointer
92   CGUIWindow               * m_parentWindow;
93
94   // Video player pointer
95   KaraokeVideoBackground   * m_videoPlayer;
96
97   // For default visualisation mode
98   BackgroundMode             m_defaultMode;
99   CStdString                 m_path; // image
100 };
101
102 #endif