-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[refactor] make m_pPlayer private and expose it through method GetAppPlayer() #13259
Conversation
18120ae
to
dde89f0
Compare
xbmc/Application.cpp
Outdated
@@ -4864,6 +4865,11 @@ std::string CApplication::GetCurrentPlayer() | |||
return m_pPlayer->GetCurrentPlayer(); | |||
} | |||
|
|||
std::shared_ptr<CApplicationPlayer> CApplication::GetAppPlayer() | |||
{ | |||
return m_pPlayer; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/GUIInfoManager.cpp
Outdated
break; | ||
case PLAYER_CHAPTERNAME: | ||
if(g_application.m_pPlayer->IsPlaying()) | ||
g_application.m_pPlayer->GetChapterName(strLabel); | ||
if(g_application.GetAppPlayer()->IsPlaying()) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/GUIInfoManager.cpp
Outdated
{ | ||
strLabel = m_videoInfo.stereoMode; | ||
} | ||
break; | ||
case VIDEOPLAYER_SUBTITLES_LANG: | ||
if(g_application.m_pPlayer && g_application.m_pPlayer->IsPlaying() && g_application.m_pPlayer->GetSubtitleVisible()) | ||
if(g_application.GetAppPlayer() && g_application.GetAppPlayer()->IsPlaying() && g_application.GetAppPlayer()->GetSubtitleVisible()) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/Application.h
Outdated
@@ -502,6 +501,7 @@ class CApplication : public CXBApplicationEx, public IPlayerCallback, public IMs | |||
std::atomic_uint m_WaitingExternalCalls; /*!< counts threads wich are waiting to be processed in FrameMove */ | |||
unsigned int m_ProcessedExternalCalls; /*!< counts calls wich are processed during one "door open" cycle in FrameMove */ | |||
unsigned int m_ProcessedExternalDecay = 0; /*!< counts to close door after a few frames of no python activity */ | |||
std::shared_ptr<CApplicationPlayer> m_pPlayer; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
dde89f0
to
e60b29c
Compare
xbmc/GUIInfoManager.cpp
Outdated
@@ -6136,11 +6136,11 @@ std::string CGUIInfoManager::GetLabel(int info, int contextWindow, std::string * | |||
} | |||
break; | |||
case PLAYER_PLAYSPEED: | |||
if(g_application.m_pPlayer->IsPlaying()) | |||
if(g_application.GetAppPlayer().IsPlaying()) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/GUIInfoManager.cpp
Outdated
{ | ||
strLabel = CStreamDetails::VideoAspectToAspectDescription(CServiceBroker::GetDataCacheCore().GetVideoDAR()); | ||
} | ||
break; | ||
case VIDEOPLAYER_AUDIO_CHANNELS: | ||
if(g_application.m_pPlayer->IsPlaying()) | ||
if(g_application.GetAppPlayer().IsPlaying()) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/SeekHandler.cpp
Outdated
int64_t playTime = g_application.m_pPlayer->GetTime(); | ||
double minSeekSize = (g_application.m_pPlayer->GetMinTime() - playTime) / 1000; | ||
double maxSeekSize = (g_application.m_pPlayer->GetMaxTime() - playTime) / 1000; | ||
int64_t playTime = g_application.GetAppPlayer().GetTime(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
c4372ef
to
9ea824d
Compare
9ea824d
to
e930ba7
Compare
@Voyager1 FYI .. I changed the unique ptr |
jenkins build this please |
e930ba7
to
395a82d
Compare
@FernetMenta would be nice if you could take another look so I don't need another rebase round. |
xbmc/GUIInfoManager.cpp
Outdated
@@ -7223,88 +7190,88 @@ bool CGUIInfoManager::GetBool(int condition1, int contextWindow, const CGUIListI | |||
CGUIWindowSlideShow *slideShow = g_windowManager.GetWindow<CGUIWindowSlideShow>(WINDOW_SLIDESHOW); | |||
bReturn = (slideShow && slideShow->GetCurrentSlide() && slideShow->GetCurrentSlide()->IsVideo()); | |||
} | |||
else if (g_application.m_pPlayer->IsPlaying()) | |||
else if (g_application.GetAppPlayer().IsPlaying()) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
…tAppStackHelper()
…etBool This reduces dupe code and is necessary to easily drop the IsPlaying condition in the middle of the previous elseif conditions.
395a82d
to
5decb14
Compare
+1 |
seems ok to me. |
Jenkins build this please |
see commits