-
-
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
Kill global CStereoscopicsManager #13743
Conversation
Well that was the only platform I could help with, so we are good. Not sure the "testing army" have been recruited just yet, but it would be good to shape that out for quick sanity check type cross platform tests. Given the discussion part of this PR has been done elsewhere I suggest that you set off some test builds, and post links - easier it is made the more likely people can help. Although it only touches 14 files, so it is not a mass change like the eariler global killing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but see if you can find someone that uses stereoscopics to test
@@ -3674,7 +3674,10 @@ bool CVideoPlayer::OpenVideoStream(CDVDStreamInfo& hint, bool reset) | |||
hint.stills = true; | |||
|
|||
if (hint.stereo_mode.empty()) | |||
hint.stereo_mode = CStereoscopicsManager::GetInstance().DetectStereoModeByString(m_item.GetPath()); | |||
{ | |||
const CStereoscopicsManager &stereoscopicsManager = CServiceBroker::GetGUI()->GetStereoscopicsManager(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/guilib/GUIComponent.cpp
Outdated
@@ -41,12 +42,19 @@ CGUIComponent::~CGUIComponent() | |||
void CGUIComponent::Init() | |||
{ | |||
m_pWindowManager->Initialize(); | |||
m_stereoscopicsManager.reset(new CStereoscopicsManager(CServiceBroker::GetSettings(), | |||
CServiceBroker::GetDataCacheCore(), |
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/guilib/StereoscopicsManager.cpp
Outdated
CStereoscopicsManager::CStereoscopicsManager(void) | ||
CStereoscopicsManager::CStereoscopicsManager(CSettings &settings, | ||
CDataCacheCore &dataCacheCore, | ||
CGUIWindowManager &windowManager) : |
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.
xbmc/guilib/GUIComponent.cpp
Outdated
CServiceBroker::RegisterGUI(this); | ||
} | ||
|
||
void CGUIComponent::Deinit() | ||
{ | ||
CServiceBroker::UnregisterGUI(); | ||
|
||
m_stereoscopicsManager.reset(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/settings/DisplaySettings.cpp
Outdated
@@ -761,24 +762,28 @@ void CDisplaySettings::SettingOptionsScreensFiller(SettingConstPtr setting, std: | |||
|
|||
void CDisplaySettings::SettingOptionsStereoscopicModesFiller(SettingConstPtr setting, std::vector< std::pair<std::string, int> > &list, int ¤t, void *data) | |||
{ | |||
const CStereoscopicsManager &stereoscopicsManager = CServiceBroker::GetGUI()->GetStereoscopicsManager(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/guilib/StereoscopicsManager.cpp
Outdated
CSettings::SETTING_VIDEOSCREEN_STEREOSCOPICMODE | ||
}; | ||
|
||
m_settings.GetSettingsManager()->RegisterCallback(this, settingSet); |
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/guilib/StereoscopicsManager.h
Outdated
|
||
RENDER_STEREO_MODE GetNextSupportedStereoMode(const RENDER_STEREO_MODE ¤tMode, int step = 1) const; | ||
std::string DetectStereoModeByString(const std::string &needle) const; | ||
RENDER_STEREO_MODE GetStereoModeByUserChoice(const std::string &heading = "") const; |
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.
9fcadb7
to
9daefe8
Compare
@FernetMenta addressed your comments. Another round of review? |
9daefe8
to
037d968
Compare
Tested on Linux, Kodi starts successfully. Test on OSX in progress. That should cover most platforms. jenkins build this please. EDIT: OSX starts fine. |
Tried this on Pi (with a master build). When video stops the GUI remains in 3D mode. |
if that's the case, then StereoscopicsManager is likely not receiving the |
I can confirm that |
@@ -41,12 +43,18 @@ CGUIComponent::~CGUIComponent() | |||
void CGUIComponent::Init() | |||
{ | |||
m_pWindowManager->Initialize(); | |||
m_stereoscopicsManager->Initialize(); | |||
|
|||
//! @todo This is something we need to change |
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.
This PR kills the CStereoscopicsManager singleton, required for the login window refactor.
This replaces #13658 using the architecture added by fernet in #13722.
How Has This Been Tested?
Tested on Windows with a 3D tv. Not only does Kodi not crash, but 3D movies still work!
Testing for boot issues needed on other platforms. I think I saw that we have an army of testers in a slack channel?
Types of change