11 #include "application/ApplicationComponents.h" 12 #include "application/ApplicationEnums.h" 13 #include "application/ApplicationPlayerCallback.h" 14 #include "application/ApplicationSettingsHandling.h" 17 #include "messaging/IMessageTarget.h" 18 #include "playlists/PlayListTypes.h" 19 #include "threads/SystemClock.h" 20 #include "utils/GlobalsHandling.h" 21 #include "utils/Stopwatch.h" 22 #include "windowing/Resolution.h" 23 #include "windowing/XBMC_events.h" 50 typedef std::shared_ptr<IAddon> AddonPtr;
56 class CAnnouncementManager;
76 class CVideoInfoScanner;
81 class CMusicInfoScanner;
97 static const unsigned int ACTION_PREV_ITEM_THRESHOLD = 3;
107 void FrameMove(
bool processEvents,
bool processGUI =
true)
override;
108 void Render()
override;
110 bool IsInitialized()
const {
return !m_bInitializing; }
111 bool IsStopping()
const {
return m_bStop; }
114 bool InitWindow(RESOLUTION res = RES_INVALID);
116 bool Stop(
int exitCode);
117 const std::string& CurrentFile();
119 std::shared_ptr<CFileItem> CurrentFileItemPtr();
122 std::string GetCurrentPlayer();
124 int GetMessageMask()
override;
127 bool PlayMedia(
CFileItem& item,
const std::string& player, PLAYLIST::Id playlistId);
128 bool ProcessAndStartPlaylist(
const std::string& strPlayList,
130 PLAYLIST::Id playlistId,
132 bool PlayFile(
CFileItem item,
const std::string& player,
bool bRestart =
false);
134 void Restart(
bool bSamePosition =
true);
135 void DelayedPlayerRestart();
136 void CheckDelayedPlayerRestart();
137 bool IsPlayingFullScreenVideo()
const;
139 bool OnAction(
const CAction &action);
140 void CloseNetworkShares();
142 void ConfigureAndEnableAddons();
143 void ShowAppMigrationMessage();
144 void Process()
override;
151 double GetTotalTime()
const;
157 double GetTime()
const;
158 float GetPercentage()
const;
161 float GetCachePercentage()
const;
163 void SeekPercentage(
float percent);
164 void SeekTime(
double dTime = 0.0 );
166 void UpdateLibraries();
168 void UpdateCurrentPlayArt();
170 bool ExecuteXBMCAction(std::string action,
const CGUIListItemPtr &item = NULL);
173 std::unique_ptr<MEDIA_DETECT::CAutorun> m_Autorun;
176 std::string m_strPlayListFile;
178 bool IsAppFocused()
const {
return m_AppFocused; }
180 bool GetRenderGUI()
const override;
182 bool SetLanguage(
const std::string &strLanguage);
183 bool LoadLanguage(
bool reload);
185 void SetLoggingIn(
bool switchingProfiles);
187 std::unique_ptr<CServiceManager> m_ServiceManager;
192 void LockFrameMoveGuard();
197 void UnlockFrameMoveGuard();
200 bool OnSettingsSaving()
const override;
201 void PlaybackCleanup();
206 std::shared_ptr<ANNOUNCEMENT::CAnnouncementManager> m_pAnnouncementManager;
207 std::unique_ptr<CGUIComponent> m_pGUI;
208 std::unique_ptr<CWinSystemBase> m_pWinSystem;
209 std::unique_ptr<ActiveAE::CActiveAE> m_pActiveAE;
210 std::shared_ptr<CAppInboundProtocol> m_pAppPort;
211 std::deque<XBMC_Event> m_portEvents;
212 CCriticalSection m_portSection;
220 std::string m_prevMedia;
221 bool m_bInitializing =
true;
223 int m_nextPlaylistItem = -1;
225 std::chrono::time_point<std::chrono::steady_clock> m_lastRenderTime;
226 bool m_skipGuiRender =
false;
228 std::unique_ptr<MUSIC_INFO::CMusicInfoScanner> m_musicInfoScanner;
230 bool PlayStack(
CFileItem& item,
bool bRestart);
232 void HandlePortEvents();
234 std::unique_ptr<CInertialScrollingHandler> m_pInertialScrollingHandler;
236 std::vector<std::shared_ptr<ADDON::CAddonInfo>>
241 bool m_AppFocused{
true};
244 void PrintStartupLog();
245 void ResetCurrentItem();
247 mutable CCriticalSection m_critSection;
249 CCriticalSection m_frameMoveGuard;
250 std::atomic_uint m_WaitingExternalCalls;
251 unsigned int m_ProcessedExternalCalls = 0;
252 unsigned int m_ProcessedExternalDecay = 0;
253 int m_ExitCode{EXITCODE_QUIT};
257 #define g_application XBMC_GLOBAL_USE(CApplication) Definition: Stopwatch.h:14
Definition: ServiceManager.h:89
Definition: Application.h:64
A class wishing to receive messages should implement this and call.
Definition: IMessageTarget.h:23
Definition: IWindowManagerCallback.h:20
Definition: AppInboundProtocol.h:15
Definition: WinSystem.h:44
Represents a list of files.
Definition: FileItem.h:713
Definition: SystemClock.h:31
Definition: Bookmark.h:14
Definition: ThreadMessage.h:25
Definition: Application.h:69
Definition: Application.h:74
Definition: IMsgTargetCallback.h:22
A generic container for components.
Definition: ServiceBroker.h:55
Definition: PlayList.h:23
Definition: Application.h:84
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
Definition: SeekHandler.h:28
Definition: Application.h:54
Definition: SettingsComponent.h:25
Definition: GUIMessage.h:365
Definition: XBMC_events.h:109
Class handling application support for settings.
Definition: ApplicationSettingsHandling.h:19
std::vector< std::shared_ptr< ADDON::CAddonInfo > > m_incompatibleAddons
Definition: Application.h:237
Definition: GUIComponent.h:22
Definition: ApplicationPlayerCallback.h:19
Definition: visualization.h:21
Represents a file on a share.
Definition: FileItem.h:102
Definition: Application.h:79