diff options
author | da-anda <da-anda@xbmc.org> | 2014-09-23 10:28:24 +0200 |
---|---|---|
committer | da-anda <da-anda@xbmc.org> | 2014-09-23 10:28:24 +0200 |
commit | 4503ad5a89f17ebc39765bd920433eb54bdc621d (patch) | |
tree | 8b2ea8bc84f2b3c77035c92df7df8bb34e340052 | |
parent | 3a5ff32a539cb7a1f54acb693df3cea85c29b111 (diff) | |
parent | 7002fb7a0e9f55e73e8088749d64286e2828bfc6 (diff) |
Merge pull request #5236 from da-anda/3D-ux-fixes
[3D] usability fixes and cleanup
-rw-r--r-- | addons/skin.confluence/720p/VideoOSD.xml | 8 | ||||
-rwxr-xr-x | language/English/strings.po | 76 | ||||
-rw-r--r-- | system/settings/settings.xml | 9 | ||||
-rw-r--r-- | xbmc/guilib/StereoscopicsManager.cpp | 29 | ||||
-rw-r--r-- | xbmc/guilib/StereoscopicsManager.h | 9 | ||||
-rw-r--r-- | xbmc/settings/DisplaySettings.cpp | 30 | ||||
-rw-r--r-- | xbmc/settings/Settings.cpp | 1 |
7 files changed, 114 insertions, 48 deletions
diff --git a/addons/skin.confluence/720p/VideoOSD.xml b/addons/skin.confluence/720p/VideoOSD.xml index 6837b0d7f9..e7b71742ae 100644 --- a/addons/skin.confluence/720p/VideoOSD.xml +++ b/addons/skin.confluence/720p/VideoOSD.xml @@ -636,9 +636,9 @@ <texture border="20,18,20,0">SubMenuBack-Header.png</texture> </control> <control type="label" id=""> - <left>30</left> + <left>0</left> <top>20</top> - <width>196</width> + <width>256</width> <height>15</height> <font>font12</font> <label>36501</label> @@ -735,9 +735,9 @@ <texture border="20,18,20,0">SubMenuBack-Header.png</texture> </control> <control type="label" id=""> - <left>30</left> + <left>0</left> <top>20</top> - <width>196</width> + <width>256</width> <height>15</height> <font>font12</font> <label>36501</label> diff --git a/language/English/strings.po b/language/English/strings.po index 348b77e784..2a519f5a6f 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -13427,8 +13427,10 @@ msgctxt "#36027" msgid "This device needs servicing" msgstr "" +#. Label for a select option #: xbmc/peripherals/devices/PeripheralCecAdapter.cpp #: system/peripherals.xml +#: system/settings.xml msgctxt "#36028" msgid "Ignore" msgstr "" @@ -15412,75 +15414,86 @@ msgstr "" #empty strings from id 36434 to 36499 #end reservation +#. label of a setting for the stereoscopic 3D mode of the GUI that is/should be applied #: system/settings/settings.xml msgctxt "#36500" -msgid "Stereoscopic mode (current)" +msgid "Stereoscopic 3D mode (current)" msgstr "" +#. headline of a dialog/info message showing the current stereoscopic 3D mode #: guilib/StereoscopicsManager.cpp msgctxt "#36501" -msgid "Stereoscopic mode" +msgid "Stereoscopic 3D mode" msgstr "" +#reserved strings for 3d modes 36502 - 36519 + +#. name of a stereoscopic mode #: system/settings/settings.xml msgctxt "#36502" -msgid "None" +msgid "Disabled" msgstr "" +#. name of a stereoscopic mode #: system/settings/settings.xml #: xbmc/video/dialogs/GUIDialogVideoSettings.cpp msgctxt "#36503" msgid "Over/Under" msgstr "" +#. name of a stereoscopic mode #: system/settings/settings.xml #: xbmc/video/dialogs/GUIDialogVideoSettings.cpp msgctxt "#36504" msgid "Side by side" msgstr "" +#. name of a stereoscopic mode #: system/settings/settings.xml msgctxt "#36505" msgid "Anaglyph Red/Cyan" msgstr "" +#. name of a stereoscopic mode #: system/settings/settings.xml msgctxt "#36506" msgid "Anaglyph Green/Magenta" msgstr "" +#. name of a stereoscopic mode #: system/settings/settings.xml msgctxt "#36507" msgid "Interlaced" msgstr "" +#. name of a stereoscopic mode #: system/settings/settings.xml msgctxt "#36508" msgid "Hardware Based" msgstr "" +#. name of a stereoscopic mode #: system/settings/settings.xml msgctxt "#36509" -msgid "Monoscopic - 2D" +msgid "Monoscopic (2D)" msgstr "" -#empty strings from id 36510 to 36519 -#reserved strings for 3d modes 36509 - 36520 +#empty (BUT RESERVED) strings from id 36510 to 36519 +#end of reserved strings for 3d modes +#. Name of a setting, asking the user for the default playback mode (2D, 3D, ask) of stereoscopic videos #: system/settings/settings.xml msgctxt "#36520" -msgid "Playback mode of stereoscopic videos." +msgid "Playback mode of stereoscopic 3D videos" msgstr "" +#. Option value of a desired playback mode setting. (f.e. "Settings -> Video -> Playback -> Playback mode of stereoscopic 3D videos" with label #36520) #: system/settings/settings.xml msgctxt "#36521" msgid "Ask me" msgstr "" -#: system/settings/settings.xml -msgctxt "#36522" -msgid "Use preferred mode" -msgstr "" +# empty string 36522 #. Description of setting "System -> Audio output -> Limit sampling rate (kHz)" with label #458 #: system/settings/settings.xml @@ -15488,46 +15501,46 @@ msgctxt "#36523" msgid "Maximum sampling rate for spdif or sampling rate for fixed output configuration." msgstr "" +#. label for a setting to choose the preferred (playback) mode and the name of a selectable playback option #: system/settings/settings.xml +#: guilib/StereoscopicsManager.cpp msgctxt "#36524" msgid "Preferred mode" msgstr "" +#. label for a preferred stereoscopic 3D playback mode #: settings/DisplaySettings.cpp msgctxt "#36525" msgid "Same as movie (autodetect)" msgstr "" +#. label of a setting to turn of stereoscopic 3D mode if video playback ended #: guilib/StereoscopicsManager.cpp msgctxt "#36526" -msgid "Disable stereoscopic mode when playback is stopped" +msgid "Disable stereoscopic 3D mode when playback ended" msgstr "" +#. Title of a dialog to choose the desired playback mode #: guilib/StereoscopicsManager.cpp msgctxt "#36527" -msgid "This video is stereoscopic. Select playback mode" -msgstr "" - -#: system/settings/settings.xml -msgctxt "#36528" -msgid "Select stereoscopic mode" +msgid "Select playback mode" msgstr "" +#. label of a dialog box promting the user to selected the desired playback mode of the detected stereoscopic video #: guilib/StereoscopicsManager.cpp -msgctxt "#36529" -msgid "Mono (2D)" +msgctxt "#36528" +msgid "Select stereoscopic 3D mode" msgstr "" -#: guilib/StereoscopicsManager.cpp -msgctxt "#36530" -msgid "Preferred mode" -msgstr "" +# empty labels 36529, 36530 +#. option label of a setting/dialog asking for the desired stereoscopic playback mode #: guilib/StereoscopicsManager.cpp msgctxt "#36531" msgid "Select alternate mode..." msgstr "" +#. option label of a setting/dialog asking for the desired stereoscopic playback mode #: settings/DisplaySettings.cpp msgctxt "#36532" msgid "Same as movie" @@ -15545,28 +15558,30 @@ msgctxt "#36534" msgid "Specify additional libraries whose log messages are to be included in the log." msgstr "" +#. label of a setting, allowing to specify the stereoscopic 3D mode of a video #: guilib/StereoscopicsManager.cpp #: xbmc/video/dialogs/GUIDialogVideoSettings.cpp msgctxt "#36535" -msgid "Stereoscopic mode of video" +msgid "Stereoscopic 3D mode of video" msgstr "" +#. label of a toggle option that allows to invert the stereoscopic 3d mode #: guilib/StereoscopicsManager.cpp #: xbmc/video/dialogs/GUIDialogVideoSettings.cpp msgctxt "#36536" -msgid "Stereoscopic mode inverted" +msgid "Invert Stereoscopic 3D mode (flip eyes)" msgstr "" #. Description of setting "Videos -> Playback -> Playback mode of stereoscopic videos" with label #36520 #: system/settings/settings.xml msgctxt "#36537" -msgid "Set playback mode of stereoscopic 3D videos." +msgid "Select in which mode stereoscopic 3D videos will be played. [Ask me] will show a dialog to select the desired mode for each playback. [Preferred mode] will use of the preferred mode specified in the 'System -> Video Hardware' section of the settings. [Monoscopic (2D)] will play the video in mono/2D. [Ignore] disables any stereoscopic 3D processing and handling". msgstr "" #. Description of setting "Videos -> Playback -> Disable stereoscopic mode when playback is stopped" with label #36526 #: system/settings/settings.xml msgctxt "#36538" -msgid "Prevents Kodi exiting out of stereoscopic 3D mode when playback is stopped as not all TVs will recognise the switch from 3D back to 2D without the viewing mode being toggled on the TV." +msgid "[Enabled] Switch GUI (and some TVs) back to 2D mode when playback ended. [Disabled] GUI and TV will stay in stereoscopic 3D mode. For video playlists the stereoscopic 3D mode won't change between videos, not even for non stereoscopic ones." msgstr "" #. Description of setting "System -> Video output -> Stereoscopic mode (current)" with label #36500 @@ -15578,7 +15593,7 @@ msgstr "" #. Description of setting "System -> Video output -> Preferred mode" with label #36524 #: system/settings/settings.xml msgctxt "#36540" -msgid "The preferred stereoscopic 3D mode." +msgid "The preferred mode in which stereoscopic 3D media such as videos should be played." msgstr "" #. Description of setting "Services -> AirPlay -> Allow volume control" with label #1269 @@ -15602,9 +15617,10 @@ msgctxt "#36544" msgid "Enable hardware decoding of video files." msgstr "" +#. Label of a setting, allowing the user to adjust the visual depths of subtitles when watching stereoscopic 3D videos #: system/settings/settings.xml msgctxt "#36545" -msgid "Subtitle stereoscopic depth" +msgid "Stereoscopic 3D depth of subtitles" msgstr "" #. Description of setting "Videos -> Subtitles -> Subtitle stereoscopic depth" with label #36545 diff --git a/system/settings/settings.xml b/system/settings/settings.xml index 547d214fff..b855fc6ae7 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -509,7 +509,9 @@ <constraints> <options> <option label="36521">0</option> <!-- ASK --> - <option label="36522">1</option> <!-- Preferred mode --> + <option label="36524">1</option> <!-- Preferred mode --> + <option label="36509">2</option> <!-- Monoscopic / 2D --> + <option label="36028">100</option> <!-- Ignore --> </options> </constraints> <control type="spinner" format="integer" delayed="true"/> @@ -2290,10 +2292,13 @@ </setting> <setting id="videoscreen.preferedstereoscopicmode" parent="videoscreen.stereoscopicmode" type="integer" label="36524" help="36540"> <level>2</level> - <default>0</default> + <default>100</default> <!-- ENUM RENDER_STEREO_MODE_AUTO --> <constraints> <options>preferedstereoscopicviewmodes</options> </constraints> + <updates> + <update type="change" /> + </updates> <control type="list" format="integer"/> </setting> </group> diff --git a/xbmc/guilib/StereoscopicsManager.cpp b/xbmc/guilib/StereoscopicsManager.cpp index bbac2aaa9b..35ba5974fa 100644 --- a/xbmc/guilib/StereoscopicsManager.cpp +++ b/xbmc/guilib/StereoscopicsManager.cpp @@ -205,7 +205,7 @@ RENDER_STEREO_MODE CStereoscopicsManager::GetStereoModeByUserChoice(const CStdSt if (g_Windowing.SupportsStereo(selectableMode)) { selectableModes.push_back(selectableMode); - CStdString label = g_localizeStrings.Get(36502+i); + CStdString label = GetLabelForStereoMode((RENDER_STEREO_MODE) i); pDlgSelect->Add( label ); if (mode == selectableMode) pDlgSelect->SetSelected( label ); @@ -241,6 +241,8 @@ RENDER_STEREO_MODE CStereoscopicsManager::GetStereoModeOfPlayingVideo(void) CStdString CStereoscopicsManager::GetLabelForStereoMode(const RENDER_STEREO_MODE &mode) { + if (mode == RENDER_STEREO_MODE_AUTO) + return g_localizeStrings.Get(36532); return g_localizeStrings.Get(36502 + mode); } @@ -420,12 +422,14 @@ bool CStereoscopicsManager::OnAction(const CAction &action) { SetStereoMode(RENDER_STEREO_MODE_MONO); } + return true; } else if (action.GetID() == ACTION_STEREOMODE_SET) { int stereoMode = ConvertStringToGuiStereoMode(action.GetName()); if (stereoMode > -1) SetStereoMode( (RENDER_STEREO_MODE) stereoMode); + return true; } return false; @@ -449,15 +453,19 @@ void CStereoscopicsManager::OnPlaybackStarted(void) if (!g_infoManager.EvaluateBool("videoplayer.isstereoscopic")) return; - // only change stereo mode if not yet in stereo mode + STEREOSCOPIC_PLAYBACK_MODE playbackMode = (STEREOSCOPIC_PLAYBACK_MODE) CSettings::Get().GetInt("videoplayer.stereoscopicplaybackmode"); RENDER_STEREO_MODE mode = GetStereoMode(); + + // early return if playback mode should be ignored and we're in no stereoscopic mode right now + if (playbackMode == STEREOSCOPIC_PLAYBACK_MODE_IGNORE && mode == RENDER_STEREO_MODE_OFF) + return; + if (mode != RENDER_STEREO_MODE_OFF) return; - int playbackMode = CSettings::Get().GetInt("videoplayer.stereoscopicplaybackmode"); switch (playbackMode) { - case 0: // Ask + case STEREOSCOPIC_PLAYBACK_MODE_ASK: // Ask { CApplicationMessenger::Get().MediaPause(); @@ -473,16 +481,14 @@ void CStereoscopicsManager::OnPlaybackStarted(void) // add choices - int idx_preferred = pDlgSelect->Add((CStdString)g_localizeStrings.Get(36530) + int idx_preferred = pDlgSelect->Add((CStdString)g_localizeStrings.Get(36524) // preferred + " (" + GetLabelForStereoMode(preferred) + ")"); - if(preferred != RENDER_STEREO_MODE_MONO) - idx_mono = pDlgSelect->Add( g_localizeStrings.Get(36529) ); // mono / 2d - + idx_mono = pDlgSelect->Add(GetLabelForStereoMode(RENDER_STEREO_MODE_MONO)); // mono / 2d - if(playing != RENDER_STEREO_MODE_OFF && g_Windowing.SupportsStereo(playing)) + if(playing != RENDER_STEREO_MODE_OFF && playing != preferred && g_Windowing.SupportsStereo(playing)) idx_playing = pDlgSelect->Add((CStdString)g_localizeStrings.Get(36532) + " (" + GetLabelForStereoMode(playing) @@ -506,9 +512,12 @@ void CStereoscopicsManager::OnPlaybackStarted(void) CApplicationMessenger::Get().MediaUnPause(); } break; - case 1: // Stereoscopic + case STEREOSCOPIC_PLAYBACK_MODE_PREFERRED: // Stereoscopic SetStereoMode( GetPreferredPlaybackMode() ); break; + case 2: // Mono + SetStereoMode( RENDER_STEREO_MODE_MONO ); + break; default: break; } diff --git a/xbmc/guilib/StereoscopicsManager.h b/xbmc/guilib/StereoscopicsManager.h index ef28bf7ff1..422cba20ec 100644 --- a/xbmc/guilib/StereoscopicsManager.h +++ b/xbmc/guilib/StereoscopicsManager.h @@ -32,6 +32,15 @@ class CAction; +enum STEREOSCOPIC_PLAYBACK_MODE +{ + STEREOSCOPIC_PLAYBACK_MODE_ASK, + STEREOSCOPIC_PLAYBACK_MODE_PREFERRED, + STEREOSCOPIC_PLAYBACK_MODE_MONO, + + STEREOSCOPIC_PLAYBACK_MODE_IGNORE = 100, +}; + class CStereoscopicsManager : public ISettingCallback, public IMsgTargetCallback { diff --git a/xbmc/settings/DisplaySettings.cpp b/xbmc/settings/DisplaySettings.cpp index e43445b198..6902f83323 100644 --- a/xbmc/settings/DisplaySettings.cpp +++ b/xbmc/settings/DisplaySettings.cpp @@ -324,6 +324,25 @@ bool CDisplaySettings::OnSettingUpdate(CSetting* &setting, const char *oldSettin return vsyncSetting->SetValue(VSYNC_ALWAYS); #endif } + else if (settingId == "videoscreen.preferedstereoscopicmode") + { + CSettingInt *stereomodeSetting = (CSettingInt*)setting; + STEREOSCOPIC_PLAYBACK_MODE playbackMode = (STEREOSCOPIC_PLAYBACK_MODE) CSettings::Get().GetInt("videoplayer.stereoscopicplaybackmode"); + if (stereomodeSetting->GetValue() == RENDER_STEREO_MODE_OFF) + { + // if preferred playback mode was OFF, update playback mode to ignore + if (playbackMode == STEREOSCOPIC_PLAYBACK_MODE_PREFERRED) + CSettings::Get().SetInt("videoplayer.stereoscopicplaybackmode", STEREOSCOPIC_PLAYBACK_MODE_IGNORE); + return stereomodeSetting->SetValue(RENDER_STEREO_MODE_AUTO); + } + else if (stereomodeSetting->GetValue() == RENDER_STEREO_MODE_MONO) + { + // if preferred playback mode was MONO, update playback mode + if (playbackMode == STEREOSCOPIC_PLAYBACK_MODE_PREFERRED) + CSettings::Get().SetInt("videoplayer.stereoscopicplaybackmode", STEREOSCOPIC_PLAYBACK_MODE_MONO); + return stereomodeSetting->SetValue(RENDER_STEREO_MODE_AUTO); + } + } return false; } @@ -718,8 +737,15 @@ void CDisplaySettings::SettingOptionsStereoscopicModesFiller(const CSetting *set void CDisplaySettings::SettingOptionsPreferredStereoscopicViewModesFiller(const CSetting *setting, std::vector< std::pair<std::string, int> > &list, int ¤t, void *data) { - SettingOptionsStereoscopicModesFiller(setting, list, current, data); - list.push_back(make_pair(g_localizeStrings.Get(36525), RENDER_STEREO_MODE_AUTO)); // option for autodetect + list.push_back(make_pair(CStereoscopicsManager::Get().GetLabelForStereoMode(RENDER_STEREO_MODE_AUTO), RENDER_STEREO_MODE_AUTO)); // option for autodetect + // don't add "off" to the list of preferred modes as this doesn't make sense + for (int i = RENDER_STEREO_MODE_OFF +1; i < RENDER_STEREO_MODE_COUNT; i++) + { + RENDER_STEREO_MODE mode = (RENDER_STEREO_MODE) i; + // also skip "mono" mode which is no real stereoscopic mode + if (mode != RENDER_STEREO_MODE_MONO && g_Windowing.SupportsStereo(mode)) + list.push_back(make_pair(CStereoscopicsManager::Get().GetLabelForStereoMode(mode), mode)); + } } void CDisplaySettings::SettingOptionsMonitorsFiller(const CSetting *setting, std::vector< std::pair<std::string, std::string> > &list, std::string ¤t, void *data) diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp index b87e984e8c..95d45127b7 100644 --- a/xbmc/settings/Settings.cpp +++ b/xbmc/settings/Settings.cpp @@ -680,6 +680,7 @@ void CSettings::InitializeISettingCallbacks() settingSet.insert("videoscreen.screenmode"); settingSet.insert("videoscreen.vsync"); settingSet.insert("videoscreen.monitor"); + settingSet.insert("videoscreen.preferedstereoscopicmode"); m_settingsManager->RegisterCallback(&CDisplaySettings::Get(), settingSet); settingSet.clear(); |