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" 48 typedef std::shared_ptr<IAddon> AddonPtr;
54 class CAnnouncementManager;
74 class CVideoInfoScanner;
79 class CMusicInfoScanner;
93 static const unsigned int ACTION_PREV_ITEM_THRESHOLD = 3;
103 void FrameMove(
bool processEvents,
bool processGUI =
true)
override;
104 void Render()
override;
106 bool IsInitialized()
const {
return !m_bInitializing; }
107 bool IsStopping()
const {
return m_bStop; }
110 bool InitWindow(RESOLUTION res = RES_INVALID);
112 bool Stop(
int exitCode);
113 const std::string& CurrentFile();
115 std::shared_ptr<CFileItem> CurrentFileItemPtr();
118 std::string GetCurrentPlayer();
120 int GetMessageMask()
override;
123 bool PlayMedia(
CFileItem& item,
const std::string& player, PLAYLIST::Id playlistId);
124 bool ProcessAndStartPlaylist(
const std::string& strPlayList,
126 PLAYLIST::Id playlistId,
128 bool PlayFile(
CFileItem item,
const std::string& player,
bool bRestart =
false);
130 void Restart(
bool bSamePosition =
true);
131 void DelayedPlayerRestart();
132 void CheckDelayedPlayerRestart();
133 bool IsPlayingFullScreenVideo()
const;
135 bool OnAction(
const CAction &action);
136 void CloseNetworkShares();
138 void ConfigureAndEnableAddons();
139 void ShowAppMigrationMessage();
140 void Process()
override;
147 double GetTotalTime()
const;
153 double GetTime()
const;
154 float GetPercentage()
const;
157 float GetCachePercentage()
const;
159 void SeekPercentage(
float percent);
160 void SeekTime(
double dTime = 0.0 );
162 void UpdateLibraries();
164 void UpdateCurrentPlayArt();
166 bool ExecuteXBMCAction(std::string action,
const std::shared_ptr<CGUIListItem>& item = NULL);
168 #ifdef HAS_OPTICAL_DRIVE 169 std::unique_ptr<MEDIA_DETECT::CAutorun> m_Autorun;
172 std::string m_strPlayListFile;
174 bool IsAppFocused()
const {
return m_AppFocused; }
176 bool GetRenderGUI()
const override;
178 bool SetLanguage(
const std::string &strLanguage);
179 bool LoadLanguage(
bool reload);
181 void SetLoggingIn(
bool switchingProfiles);
183 std::unique_ptr<CServiceManager> m_ServiceManager;
188 void LockFrameMoveGuard();
193 void UnlockFrameMoveGuard();
196 bool OnSettingsSaving()
const override;
197 void PlaybackCleanup();
199 std::shared_ptr<ANNOUNCEMENT::CAnnouncementManager> m_pAnnouncementManager;
200 std::unique_ptr<CGUIComponent> m_pGUI;
201 std::unique_ptr<CWinSystemBase> m_pWinSystem;
202 std::unique_ptr<ActiveAE::CActiveAE> m_pActiveAE;
203 std::shared_ptr<CAppInboundProtocol> m_pAppPort;
211 std::string m_prevMedia;
212 bool m_bInitializing =
true;
214 int m_nextPlaylistItem = -1;
216 std::chrono::time_point<std::chrono::steady_clock> m_lastRenderTime;
217 bool m_skipGuiRender =
false;
219 std::unique_ptr<MUSIC_INFO::CMusicInfoScanner> m_musicInfoScanner;
221 bool PlayStack(
CFileItem& item,
bool bRestart);
223 std::unique_ptr<CInertialScrollingHandler> m_pInertialScrollingHandler;
225 std::vector<std::shared_ptr<ADDON::CAddonInfo>>
230 bool m_AppFocused{
true};
233 void PrintStartupLog();
234 void ResetCurrentItem();
236 mutable CCriticalSection m_critSection;
238 CCriticalSection m_frameMoveGuard;
239 std::atomic_uint m_WaitingExternalCalls;
240 unsigned int m_ProcessedExternalCalls = 0;
241 unsigned int m_ProcessedExternalDecay = 0;
242 int m_ExitCode{EXITCODE_QUIT};
243 std::shared_ptr<CFileItem> m_itemCurrentFile;
248 #define g_application XBMC_GLOBAL_USE(CApplication) This is an Event class built from a ConditionVariable.
Definition: Event.h:35
Definition: Stopwatch.h:14
Definition: ServiceManager.h:90
Definition: Application.h:62
A class wishing to receive messages should implement this and call.
Definition: IMessageTarget.h:23
Definition: IWindowManagerCallback.h:20
Definition: AppInboundProtocol.h:18
Definition: WinSystem.h:49
Represents a list of files.
Definition: FileItem.h:702
Definition: SystemClock.h:31
Definition: Bookmark.h:14
Definition: ThreadMessage.h:25
Definition: Application.h:67
Definition: Application.h:72
Definition: IMsgTargetCallback.h:22
A generic container for components.
Definition: ServiceBroker.h:55
Definition: PlayList.h:23
Definition: Application.h:82
Class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:21
Definition: SeekHandler.h:28
Definition: Application.h:52
Definition: SettingsComponent.h:25
Definition: GUIMessage.h:365
Class handling application support for settings.
Definition: ApplicationSettingsHandling.h:19
std::vector< std::shared_ptr< ADDON::CAddonInfo > > m_incompatibleAddons
Definition: Application.h:226
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:77