[SCM] kodi/master: Imported Upstream version 15.2~rc1+dfsg1
rbalint at users.alioth.debian.org
rbalint at users.alioth.debian.org
Mon Sep 21 12:27:49 UTC 2015
The following commit has been merged in the master branch:
commit 86cbd70f46e9b9c40ee0ec1d276c2c2d90892cf8
Author: Balint Reczey <balint at balintreczey.hu>
Date: Mon Sep 21 10:22:59 2015 +0200
Imported Upstream version 15.2~rc1+dfsg1
diff --git a/addons/skin.confluence/720p/ViewsVideoLibrary.xml b/addons/skin.confluence/720p/ViewsVideoLibrary.xml
index 443cd62..d7de36c 100644
--- a/addons/skin.confluence/720p/ViewsVideoLibrary.xml
+++ b/addons/skin.confluence/720p/ViewsVideoLibrary.xml
@@ -1632,7 +1632,6 @@
<texture>OverlayWatching.png</texture>
<visible>ListItem.IsResumable</visible>
</control>
- </itemlayout>
<control type="image">
<left>320</left>
<top>14</top>
@@ -1641,6 +1640,7 @@
<texture>$INFO[ListItem.Overlay]</texture>
<aspectratio>keep</aspectratio>
</control>
+ </itemlayout>
<focusedlayout height="40" width="345">
<control type="image">
<left>0</left>
diff --git a/configure.ac b/configure.ac
index 4f351c5..7265637 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([kodi], [15.1.000], [http://trac.kodi.tv])
+AC_INIT([kodi], [15.1.901], [http://trac.kodi.tv])
AC_CONFIG_HEADERS([xbmc/config.h])
AH_TOP([#pragma once])
m4_include([m4/ax_prog_cc_for_build.m4])
diff --git a/media/Splash.png b/media/Splash.png
index abfb902..094b97c 100644
Binary files a/media/Splash.png and b/media/Splash.png differ
diff --git a/project/cmake/addons/addons/pvr.argustv/pvr.argustv.txt b/project/cmake/addons/addons/pvr.argustv/pvr.argustv.txt
index 31457f5..7ec9c06 100644
--- a/project/cmake/addons/addons/pvr.argustv/pvr.argustv.txt
+++ b/project/cmake/addons/addons/pvr.argustv/pvr.argustv.txt
@@ -1 +1 @@
-pvr.argustv https://github.com/kodi-pvr/pvr.argustv 96c8026
+pvr.argustv https://github.com/kodi-pvr/pvr.argustv 32f0327
diff --git a/project/cmake/addons/addons/pvr.filmon/pvr.filmon.txt b/project/cmake/addons/addons/pvr.filmon/pvr.filmon.txt
index f9bfe22..c7bf82c 100644
--- a/project/cmake/addons/addons/pvr.filmon/pvr.filmon.txt
+++ b/project/cmake/addons/addons/pvr.filmon/pvr.filmon.txt
@@ -1 +1 @@
-pvr.filmon https://github.com/kodi-pvr/pvr.filmon 5c41f4e
+pvr.filmon https://github.com/kodi-pvr/pvr.filmon 67abb56
diff --git a/project/cmake/addons/addons/pvr.mythtv/pvr.mythtv.txt b/project/cmake/addons/addons/pvr.mythtv/pvr.mythtv.txt
index 6c2d24f..b5e4d63 100644
--- a/project/cmake/addons/addons/pvr.mythtv/pvr.mythtv.txt
+++ b/project/cmake/addons/addons/pvr.mythtv/pvr.mythtv.txt
@@ -1 +1 @@
-pvr.mythtv https://github.com/kodi-pvr/pvr.mythtv 877774a
+pvr.mythtv https://github.com/kodi-pvr/pvr.mythtv bf85a48
diff --git a/project/cmake/addons/addons/pvr.pctv/pvr.pctv.txt b/project/cmake/addons/addons/pvr.pctv/pvr.pctv.txt
index ddcdb9c..78326ce 100644
--- a/project/cmake/addons/addons/pvr.pctv/pvr.pctv.txt
+++ b/project/cmake/addons/addons/pvr.pctv/pvr.pctv.txt
@@ -1 +1 @@
-pvr.pctv https://github.com/kodi-pvr/pvr.pctv d23160c
+pvr.pctv https://github.com/kodi-pvr/pvr.pctv bca8165
diff --git a/project/cmake/addons/addons/pvr.stalker/pvr.stalker.txt b/project/cmake/addons/addons/pvr.stalker/pvr.stalker.txt
index dfd0ac0..8182ad1 100644
--- a/project/cmake/addons/addons/pvr.stalker/pvr.stalker.txt
+++ b/project/cmake/addons/addons/pvr.stalker/pvr.stalker.txt
@@ -1 +1 @@
-pvr.stalker https://github.com/kodi-pvr/pvr.stalker 5f6eb19
+pvr.stalker https://github.com/kodi-pvr/pvr.stalker e556508
diff --git a/system/keymaps/joystick.Sony.PLAYSTATION(R)3.Controller.xml b/system/keymaps/joystick.Sony.PLAYSTATION(R)3.Controller.xml
index e4d2d07..43aee76 100644
--- a/system/keymaps/joystick.Sony.PLAYSTATION(R)3.Controller.xml
+++ b/system/keymaps/joystick.Sony.PLAYSTATION(R)3.Controller.xml
@@ -93,8 +93,10 @@
<button id="3">ActivateWindow(PlayerControls)</button>
<axis id="1">AnalogSeekForward</axis>
<axis id="2">AnalogSeekBack</axis>
- <axis id="3">VolumeUp</axis>
- <axis id="4">VolumeDown</axis>
+ <axis id="3" limit="+1">VolumeUp</axis>
+ <axis id="3" limit="-1">VolumeDown</axis>
+ <axis id="4" limit="+1">VolumeDown</axis>
+ <axis id="4" limit="-1">VolumeUp</axis>
<axis trigger="true" rest="-32768" id="13">ScrollUp</axis>
<axis trigger="true" rest="-32768" id="14">ScrollDown</axis>
<button id="5">Up</button>
diff --git a/version.txt b/version.txt
index 9edcc24..888ba62 100644
--- a/version.txt
+++ b/version.txt
@@ -2,10 +2,10 @@ APP_NAME Kodi
COMPANY_NAME XBMC-Foundation
WEBSITE http://kodi.tv
VERSION_MAJOR 15
-VERSION_MINOR 1
-VERSION_TAG
-VERSION_CODE 151000
-ADDON_API 15.1.000
+VERSION_MINOR 2
+VERSION_TAG RC1
+VERSION_CODE 151901
+ADDON_API 15.1.901
# Notes:
# Change AC_INIT in configure.ac
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index f3f65c5..352df29 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -2415,9 +2415,9 @@ bool CApplication::OnAction(const CAction &action)
step *= action.GetRepeat() * 50; // 50 fps
#endif
if (action.GetID() == ACTION_VOLUME_UP)
- volume += (float)fabs(action.GetAmount()) * action.GetAmount() * step;
+ volume += (float)(action.GetAmount() * action.GetAmount() * step);
else if (action.GetID() == ACTION_VOLUME_DOWN)
- volume -= (float)fabs(action.GetAmount()) * action.GetAmount() * step;
+ volume -= (float)(action.GetAmount() * action.GetAmount() * step);
else
volume = action.GetAmount() * step;
if (volume != m_volumeLevel)
diff --git a/xbmc/ApplicationMessenger.cpp b/xbmc/ApplicationMessenger.cpp
index 90424af..e0152aa 100644
--- a/xbmc/ApplicationMessenger.cpp
+++ b/xbmc/ApplicationMessenger.cpp
@@ -269,14 +269,12 @@ void CApplicationMessenger::ProcessMessage(ThreadMessage *pMsg)
case TMSG_HIBERNATE:
{
- g_PVRManager.SetWakeupCommand();
g_powerManager.Hibernate();
}
break;
case TMSG_SUSPEND:
{
- g_PVRManager.SetWakeupCommand();
g_powerManager.Suspend();
}
break;
diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp
index 8cf1202..35f0d1d 100644
--- a/xbmc/GUIInfoManager.cpp
+++ b/xbmc/GUIInfoManager.cpp
@@ -1203,10 +1203,8 @@ int CGUIInfoManager::TranslateSingleString(const std::string &strCondition, bool
{ // TODO: The parameter for these should really be on the first not the second property
if (prop.param().find("xml") != std::string::npos)
return AddMultiInfo(GUIInfo(window_bools[i].val, 0, ConditionalStringParameter(prop.param())));
- int winID = prop.param().empty() ? 0 : CButtonTranslator::TranslateWindow(prop.param());
- if (winID != WINDOW_INVALID)
- return AddMultiInfo(GUIInfo(window_bools[i].val, winID, 0));
- return 0;
+ int winID = prop.param().empty() ? WINDOW_INVALID : CButtonTranslator::TranslateWindow(prop.param());
+ return winID != WINDOW_INVALID ? AddMultiInfo(GUIInfo(window_bools[i].val, winID, 0)) : window_bools[i].val;
}
}
}
@@ -3713,8 +3711,6 @@ std::string CGUIInfoManager::GetMusicLabel(int item)
return StringUtils::Format("%s", m_audioInfo.audioCodecName.c_str());
}
break;
- case MUSICPLAYER_LYRICS:
- return GetItemLabel(m_currentFile, AddListItemProp("lyrics"));
}
return GetMusicTagLabel(item, m_currentFile);
}
diff --git a/xbmc/LangInfo.cpp b/xbmc/LangInfo.cpp
index 844c6ae..c0c7034 100644
--- a/xbmc/LangInfo.cpp
+++ b/xbmc/LangInfo.cpp
@@ -952,7 +952,12 @@ void CLangInfo::SetCurrentRegion(const std::string& strName)
if (CSettings::Get().GetString("locale.longdateformat") == SETTING_REGIONAL_DEFAULT)
SetLongDateFormat(m_currentRegion->m_strDateFormatLong);
if (CSettings::Get().GetString("locale.use24hourclock") == SETTING_REGIONAL_DEFAULT)
+ {
Set24HourClock(m_currentRegion->m_strTimeFormat);
+
+ // update the time format
+ SetTimeFormat(CSettings::Get().GetString("locale.timeformat"));
+ }
if (CSettings::Get().GetString("locale.timeformat") == SETTING_REGIONAL_DEFAULT)
SetTimeFormat(m_currentRegion->m_strTimeFormat);
if (CSettings::Get().GetString("locale.temperatureunit") == SETTING_REGIONAL_DEFAULT)
diff --git a/xbmc/addons/AddonManager.cpp b/xbmc/addons/AddonManager.cpp
index 81b80b6..1c07fe0 100644
--- a/xbmc/addons/AddonManager.cpp
+++ b/xbmc/addons/AddonManager.cpp
@@ -789,6 +789,8 @@ std::string CAddonMgr::GetTranslatedString(const cp_cfg_element_t *root, const c
translatedValues.insert(std::make_pair(lang, child.value != NULL ? child.value : ""));
else if (lang == NULL || strcmp(lang, "en") == 0 || strcmp(lang, "en_GB") == 0)
translatedValues.insert(std::make_pair("en_GB", child.value != NULL ? child.value : ""));
+ else if (strcmp(lang, "no") == 0)
+ translatedValues.insert(std::make_pair("nb_NO", child.value != NULL ? child.value : ""));
}
}
diff --git a/xbmc/addons/GUIWindowAddonBrowser.cpp b/xbmc/addons/GUIWindowAddonBrowser.cpp
index 3623014..ff53f09 100644
--- a/xbmc/addons/GUIWindowAddonBrowser.cpp
+++ b/xbmc/addons/GUIWindowAddonBrowser.cpp
@@ -302,17 +302,23 @@ void CGUIWindowAddonBrowser::UpdateButtons()
CGUIMediaWindow::UpdateButtons();
}
-static bool FilterVar(bool valid, const CVariant& variant,
- const std::string& check)
+static bool IsForeign(const std::string& languages)
{
- if (!valid)
+ if (languages.empty())
return false;
- if (variant.isNull() || variant.asString().empty())
- return false;
-
- std::string regions = variant.asString();
- return regions.find(check) == std::string::npos;
+ for (const auto& lang : StringUtils::Split(languages, " "))
+ {
+ if (lang == "en" ||
+ lang == g_langInfo.GetLocale().GetLanguageCode() ||
+ lang == g_langInfo.GetLocale().ToShortString())
+ return false;
+
+ // for backwards compatibility
+ if (lang == "no" && g_langInfo.GetLocale().ToShortString() == "nb_NO")
+ return false;
+ }
+ return true;
}
bool CGUIWindowAddonBrowser::GetDirectory(const std::string& strDirectory,
@@ -350,14 +356,11 @@ bool CGUIWindowAddonBrowser::GetDirectory(const std::string& strDirectory,
int i=0;
while (i < items.Size())
{
- if (!FilterVar(true, items[i]->GetProperty("Addon.Language"), "en") ||
- !FilterVar(true, items[i]->GetProperty("Addon.Language"), g_langInfo.GetLocale().GetLanguageCode()) ||
- !FilterVar(true, items[i]->GetProperty("Addon.Language"), g_langInfo.GetLocale().ToShortString()))
- {
- i++;
- }
- else
+ auto prop = items[i]->GetProperty("Addon.Language");
+ if (!prop.isNull() && IsForeign(prop.asString()))
items.Remove(i);
+ else
+ ++i;
}
}
if (CSettings::Get().GetBool("general.addonbrokenfilter"))
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp
index e7bed43..06f81c8 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp
@@ -243,6 +243,16 @@ CDVDOverlay* CDVDOverlayCodecFFmpeg::GetOverlay()
m_height = m_pCodecContext->height;
m_width = m_pCodecContext->width;
+ // ETSI EN 300 743 V1.3.1
+ // 5.3.1
+ // Absence of a DDS in a stream implies that the stream is coded in accordance with EN 300 743 (V1.2.1) [5] and that a
+ // display width of 720 pixels and a display height of 576 lines may be assumed.
+ if (!m_height && !m_width)
+ {
+ m_width = 720;
+ m_height = 576;
+ }
+
RENDER_STEREO_MODE render_stereo_mode = g_graphicsContext.GetStereoMode();
if (render_stereo_mode != RENDER_STEREO_MODE_OFF)
{
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
index 450b4a9..0503bec 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
@@ -1867,7 +1867,9 @@ int CAMLCodec::Decode(uint8_t *pData, size_t iSize, double dts, double pts)
if (m_old_pictcnt == m_cur_pictcnt)
m_ready_event.WaitMSec(25);
- int rtn = 0;
+ // we must return VC_BUFFER or VC_PICTURE,
+ // default to VC_BUFFER.
+ int rtn = VC_BUFFER;
if (m_old_pictcnt != m_cur_pictcnt)
{
m_old_pictcnt++;
diff --git a/xbmc/dbwrappers/mysqldataset.cpp b/xbmc/dbwrappers/mysqldataset.cpp
index 34c2477..f133dde 100644
--- a/xbmc/dbwrappers/mysqldataset.cpp
+++ b/xbmc/dbwrappers/mysqldataset.cpp
@@ -277,7 +277,7 @@ int MysqlDatabase::copy(const char *backup_name) {
if ( (ret=query_with_reconnect(sql)) != MYSQL_OK )
{
mysql_free_result(res);
- throw DbErrors("Can't copy schema for table '%s'\nError: %d", db.c_str(), ret);
+ throw DbErrors("Can't copy schema for table '%s'\nError: %d", row[0], ret);
}
// copy the table data
diff --git a/xbmc/guilib/GUIPanelContainer.cpp b/xbmc/guilib/GUIPanelContainer.cpp
index 6bb3f79..21fd4aa 100644
--- a/xbmc/guilib/GUIPanelContainer.cpp
+++ b/xbmc/guilib/GUIPanelContainer.cpp
@@ -54,8 +54,9 @@ void CGUIPanelContainer::Process(unsigned int currentTime, CDirtyRegionList &dir
int cacheBefore, cacheAfter;
GetCacheOffsets(cacheBefore, cacheAfter);
- // Free memory not used on screen at the moment, do this first so there's more memory for the new items.
- FreeMemory(CorrectOffset(offset - cacheBefore, 0), CorrectOffset(offset + cacheAfter + m_itemsPerPage + 1, 0));
+ // Free memory not used on screen
+ if ((int)m_items.size() > m_itemsPerPage + cacheBefore + cacheAfter)
+ FreeMemory(CorrectOffset(offset - cacheBefore, 0), CorrectOffset(offset + m_itemsPerPage + 1 + cacheAfter, 0));
CPoint origin = CPoint(m_posX, m_posY) + m_renderOffset;
float pos = (m_orientation == VERTICAL) ? origin.y : origin.x;
@@ -107,9 +108,6 @@ void CGUIPanelContainer::Render()
int cacheBefore, cacheAfter;
GetCacheOffsets(cacheBefore, cacheAfter);
- // Free memory not used on screen at the moment, do this first so there's more memory for the new items.
- FreeMemory(CorrectOffset(offset - cacheBefore, 0), CorrectOffset(offset + cacheAfter + m_itemsPerPage + 1, 0));
-
if (g_graphicsContext.SetClipRegion(m_posX, m_posY, m_width, m_height))
{
CPoint origin = CPoint(m_posX, m_posY) + m_renderOffset;
diff --git a/xbmc/guilib/GUIWindow.cpp b/xbmc/guilib/GUIWindow.cpp
index a700ebe..562c949 100644
--- a/xbmc/guilib/GUIWindow.cpp
+++ b/xbmc/guilib/GUIWindow.cpp
@@ -656,7 +656,8 @@ bool CGUIWindow::OnMessage(CGUIMessage& message)
{
CAction action(ACTION_GESTURE_NOTIFY, 0, (float)message.GetParam1(), (float)message.GetParam2(), 0, 0);
EVENT_RESULT result = OnMouseAction(action);
- message.SetParam1(result);
+ auto res = new int(result);
+ message.SetPointer(static_cast<void*>(res));
return result != EVENT_RESULT_UNHANDLED;
}
case GUI_MSG_ADD_CONTROL:
diff --git a/xbmc/input/touch/generic/GenericTouchActionHandler.cpp b/xbmc/input/touch/generic/GenericTouchActionHandler.cpp
index fc8599c..ebd538d 100644
--- a/xbmc/input/touch/generic/GenericTouchActionHandler.cpp
+++ b/xbmc/input/touch/generic/GenericTouchActionHandler.cpp
@@ -148,7 +148,15 @@ int CGenericTouchActionHandler::QuerySupportedGestures(float x, float y)
if (!g_windowManager.SendMessage(msg))
return 0;
- return msg.GetParam1();
+ int result = 0;
+ if (msg.GetPointer())
+ {
+ int *p = static_cast<int*>(msg.GetPointer());
+ msg.SetPointer(nullptr);
+ result = *p;
+ delete p;
+ }
+ return result;
}
void CGenericTouchActionHandler::touch(uint8_t type, uint8_t button, uint16_t x, uint16_t y)
diff --git a/xbmc/music/MusicInfoLoader.cpp b/xbmc/music/MusicInfoLoader.cpp
index 8de9c4c..a3fef98 100644
--- a/xbmc/music/MusicInfoLoader.cpp
+++ b/xbmc/music/MusicInfoLoader.cpp
@@ -107,14 +107,15 @@ bool CMusicInfoLoader::LoadAdditionalTagInfo(CFileItem* pItem)
CLog::Log(LOGDEBUG, "Loading additional tag info for file %s", path.c_str());
- // we load up the actual tag for this file
- unique_ptr<IMusicInfoTagLoader> pLoader (CMusicInfoTagLoaderFactory::CreateLoader(*pItem));
+ // we load up the actual tag for this file in order to
+ // fetch the lyrics and add it to the current music info tag
+ CFileItem tempItem(path, false);
+ unique_ptr<IMusicInfoTagLoader> pLoader (CMusicInfoTagLoaderFactory::CreateLoader(tempItem));
if (NULL != pLoader.get())
{
CMusicInfoTag tag;
pLoader->Load(path, tag);
- // then we set the fields from the file tags to the item
- pItem->SetProperty("lyrics", tag.GetLyrics());
+ pItem->GetMusicInfoTag()->SetLyrics(tag.GetLyrics());
pItem->SetProperty("hasfullmusictag", "true");
return true;
}
diff --git a/xbmc/osx/DarwinUtils.h b/xbmc/osx/DarwinUtils.h
index 7763548..0a0423e 100644
--- a/xbmc/osx/DarwinUtils.h
+++ b/xbmc/osx/DarwinUtils.h
@@ -33,6 +33,7 @@ public:
static const char *getIosPlatformString(void);
static bool IsAppleTV2(void);
static bool IsMavericks(void);
+ static bool IsLion(void);
static bool IsSnowLeopard(void);
static bool DeviceHasRetina(double &scale);
static const char *GetOSReleaseString(void);
diff --git a/xbmc/osx/DarwinUtils.mm b/xbmc/osx/DarwinUtils.mm
index 75ece9f..b1b282f 100644
--- a/xbmc/osx/DarwinUtils.mm
+++ b/xbmc/osx/DarwinUtils.mm
@@ -212,6 +212,20 @@ bool CDarwinUtils::IsMavericks(void)
return isMavericks == 1;
}
+bool CDarwinUtils::IsLion(void)
+{
+ static int isLion = -1;
+#if defined(TARGET_DARWIN_OSX)
+ if (isLion == -1)
+ {
+ double appKitVersion = floor(NSAppKitVersionNumber);
+ // everything lower 10.8 is 10.7.x because 10.7 is deployment target...
+ isLion = (appKitVersion < NSAppKitVersionNumber10_8) ? 1 : 0;
+ }
+#endif
+ return isLion == 1;
+}
+
bool CDarwinUtils::IsSnowLeopard(void)
{
static int isSnowLeopard = -1;
diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp
index 6754f42..53a5217 100644
--- a/xbmc/powermanagement/PowerManager.cpp
+++ b/xbmc/powermanagement/PowerManager.cpp
@@ -35,6 +35,7 @@
#include "guilib/GUIWindowManager.h"
#include "dialogs/GUIDialogBusy.h"
#include "dialogs/GUIDialogKaiToast.h"
+#include "pvr/PVRManager.h"
#if defined(TARGET_DARWIN)
#include "osx/CocoaPowerSyscall.h"
@@ -180,31 +181,14 @@ bool CPowerManager::Powerdown()
bool CPowerManager::Suspend()
{
- if (CanSuspend() && m_instance->Suspend())
- {
- CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
- if (dialog)
- dialog->Show();
-
- return true;
- }
-
- return false;
+ return (CanSuspend() && m_instance->Suspend());
}
bool CPowerManager::Hibernate()
{
- if (CanHibernate() && m_instance->Hibernate())
- {
- CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
- if (dialog)
- dialog->Show();
-
- return true;
- }
-
- return false;
+ return (CanHibernate() && m_instance->Hibernate());
}
+
bool CPowerManager::Reboot()
{
bool success = CanReboot() ? m_instance->Reboot() : false;
@@ -254,6 +238,11 @@ void CPowerManager::ProcessEvents()
void CPowerManager::OnSleep()
{
CAnnouncementManager::Get().Announce(System, "xbmc", "OnSleep");
+
+ CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
+ if (dialog)
+ dialog->Show();
+
CLog::Log(LOGNOTICE, "%s: Running sleep jobs", __FUNCTION__);
// stop lirc
@@ -262,6 +251,7 @@ void CPowerManager::OnSleep()
CBuiltins::Execute("LIRC.Stop");
#endif
+ PVR::CPVRManager::Get().SetWakeupCommand();
g_application.SaveFileState(true);
g_application.StopPlaying();
g_application.StopShutdownTimer();
diff --git a/xbmc/powermanagement/windows/Win32PowerSyscall.cpp b/xbmc/powermanagement/windows/Win32PowerSyscall.cpp
index 09787ca..cbc9842 100644
--- a/xbmc/powermanagement/windows/Win32PowerSyscall.cpp
+++ b/xbmc/powermanagement/windows/Win32PowerSyscall.cpp
@@ -26,34 +26,59 @@
bool CWin32PowerSyscall::m_OnResume = false;
bool CWin32PowerSyscall::m_OnSuspend = false;
+bool CWin32PowerStateWorker::QueryStateChange(PowerState state)
+{
+ if (!IsRunning())
+ return false;
+
+ if (m_state.exchange(state) != state)
+ {
+ m_queryEvent.Set();
+ return true;
+ }
+
+ return false;
+}
+
+void CWin32PowerStateWorker::Process(void)
+{
+ while (!m_bStop)
+ {
+ if (AbortableWait(m_queryEvent, -1) == WAIT_SIGNALED)
+ {
+ CWIN32Util::PowerManagement(m_state.load());
+ m_state.exchange(POWERSTATE_NONE);
+ m_queryEvent.Reset();
+ }
+ }
+}
CWin32PowerSyscall::CWin32PowerSyscall()
{
+ m_worker.Create();
+}
+
+CWin32PowerSyscall::~CWin32PowerSyscall()
+{
+ if (m_worker.IsRunning())
+ m_worker.StopThread();
}
bool CWin32PowerSyscall::Powerdown()
{
- return CWIN32Util::PowerManagement(POWERSTATE_SHUTDOWN);
+ return m_worker.QueryStateChange(POWERSTATE_SHUTDOWN);
}
bool CWin32PowerSyscall::Suspend()
{
- // On Vista+, we don't receive the PBT_APMSUSPEND message as we have fired the suspend mode
- // Set the flag manually
- CWin32PowerSyscall::SetOnSuspend();
-
- return CWIN32Util::PowerManagement(POWERSTATE_SUSPEND);
+ return m_worker.QueryStateChange(POWERSTATE_SUSPEND);
}
bool CWin32PowerSyscall::Hibernate()
{
- // On Vista+, we don't receive the PBT_APMSUSPEND message as we have fired the suspend mode
- // Set the flag manually
- CWin32PowerSyscall::SetOnSuspend();
-
- return CWIN32Util::PowerManagement(POWERSTATE_HIBERNATE);
+ return m_worker.QueryStateChange(POWERSTATE_HIBERNATE);
}
bool CWin32PowerSyscall::Reboot()
{
- return CWIN32Util::PowerManagement(POWERSTATE_REBOOT);
+ return m_worker.QueryStateChange(POWERSTATE_REBOOT);
}
bool CWin32PowerSyscall::CanPowerdown()
diff --git a/xbmc/powermanagement/windows/Win32PowerSyscall.h b/xbmc/powermanagement/windows/Win32PowerSyscall.h
index 95d4027..f2f0dd7 100644
--- a/xbmc/powermanagement/windows/Win32PowerSyscall.h
+++ b/xbmc/powermanagement/windows/Win32PowerSyscall.h
@@ -24,11 +24,31 @@
#ifndef _WIN32_POWER_SYSCALL_H_
#define _WIN32_POWER_SYSCALL_H_
#include "powermanagement/IPowerSyscall.h"
+#include "powermanagement/PowerManager.h"
+#include "threads/Event.h"
+#include "threads/Thread.h"
+#include <atomic>
+
+class CWin32PowerStateWorker : public CThread
+{
+public:
+ CWin32PowerStateWorker() : CThread("CWin32PowerStateWorker"), m_queryEvent(true), m_state(POWERSTATE_NONE) {}
+ bool QueryStateChange(PowerState State);
+
+protected:
+ virtual void Process(void);
+ virtual void OnStartup() { SetPriority(THREAD_PRIORITY_IDLE); };
+
+private:
+ std::atomic<PowerState> m_state;
+ CEvent m_queryEvent;
+};
class CWin32PowerSyscall : public CAbstractPowerSyscall
{
public:
CWin32PowerSyscall();
+ ~CWin32PowerSyscall();
virtual bool Powerdown();
virtual bool Suspend();
@@ -48,6 +68,7 @@ public:
static bool IsSuspending() { return m_OnSuspend; }
private:
+ CWin32PowerStateWorker m_worker;
static bool m_OnResume;
static bool m_OnSuspend;
diff --git a/xbmc/storage/osx/DarwinStorageProvider.cpp b/xbmc/storage/osx/DarwinStorageProvider.cpp
index 6be9ab1..19c99b7 100644
--- a/xbmc/storage/osx/DarwinStorageProvider.cpp
+++ b/xbmc/storage/osx/DarwinStorageProvider.cpp
@@ -29,6 +29,7 @@
#include <DiskArbitration/DiskArbitration.h>
#include <IOKit/storage/IOCDMedia.h>
#include <IOKit/storage/IODVDMedia.h>
+#include "osx/DarwinUtils.h"
#endif
#include "osx/CocoaInterface.h"
@@ -62,6 +63,9 @@ void CDarwinStorageProvider::GetLocalDrives(VECSOURCES &localDrives)
share.strName = "Volumes";
share.m_ignore = true;
localDrives.push_back(share);
+
+ if (CDarwinUtils::IsLion())
+ return; //temp workaround for crash in Cocoa_GetVolumeNameFromMountPoint on 10.7.x
// This will pick up all local non-removable disks including the Root Disk.
DASessionRef session = DASessionCreate(kCFAllocatorDefault);
@@ -106,6 +110,10 @@ void CDarwinStorageProvider::GetLocalDrives(VECSOURCES &localDrives)
void CDarwinStorageProvider::GetRemovableDrives(VECSOURCES &removableDrives)
{
#if defined(TARGET_DARWIN_OSX)
+
+ if (CDarwinUtils::IsLion())
+ return; //temp workaround for crash in Cocoa_GetVolumeNameFromMountPoint on 10.7.x
+
DASessionRef session = DASessionCreate(kCFAllocatorDefault);
if (session)
{
diff --git a/xbmc/utils/AMLUtils.cpp b/xbmc/utils/AMLUtils.cpp
index bcb57fc..ac2667c 100644
--- a/xbmc/utils/AMLUtils.cpp
+++ b/xbmc/utils/AMLUtils.cpp
@@ -356,6 +356,15 @@ bool aml_mode_to_resolution(const char *mode, RESOLUTION_INFO *res)
res->fRefreshRate = 60;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
+ else if (StringUtils::EqualsNoCase(fromMode, "1080p23hz"))
+ {
+ res->iWidth = 1920;
+ res->iHeight= 1080;
+ res->iScreenWidth = 1920;
+ res->iScreenHeight= 1080;
+ res->fRefreshRate = 23.976;
+ res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
+ }
else if (StringUtils::EqualsNoCase(fromMode, "1080p24hz"))
{
res->iWidth = 1920;
@@ -383,6 +392,15 @@ bool aml_mode_to_resolution(const char *mode, RESOLUTION_INFO *res)
res->fRefreshRate = 50;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
+ else if (StringUtils::EqualsNoCase(fromMode, "1080p59hz"))
+ {
+ res->iWidth = 1920;
+ res->iHeight= 1080;
+ res->iScreenWidth = 1920;
+ res->iScreenHeight= 1080;
+ res->fRefreshRate = 59.940;
+ res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
+ }
else if (StringUtils::EqualsNoCase(fromMode, "1080i"))
{
res->iWidth = 1920;
@@ -401,6 +419,15 @@ bool aml_mode_to_resolution(const char *mode, RESOLUTION_INFO *res)
res->fRefreshRate = 50;
res->dwFlags = D3DPRESENTFLAG_INTERLACED;
}
+ else if (StringUtils::EqualsNoCase(fromMode, "1080i59hz"))
+ {
+ res->iWidth = 1920;
+ res->iHeight= 1080;
+ res->iScreenWidth = 1920;
+ res->iScreenHeight= 1080;
+ res->fRefreshRate = 59.940;
+ res->dwFlags = D3DPRESENTFLAG_INTERLACED;
+ }
else if (StringUtils::EqualsNoCase(fromMode, "4k2ksmpte"))
{
res->iWidth = 1920;
@@ -410,6 +437,15 @@ bool aml_mode_to_resolution(const char *mode, RESOLUTION_INFO *res)
res->fRefreshRate = 24;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
+ else if (StringUtils::EqualsNoCase(fromMode, "4k2k23hz"))
+ {
+ res->iWidth = 1920;
+ res->iHeight= 1080;
+ res->iScreenWidth = 3840;
+ res->iScreenHeight= 2160;
+ res->fRefreshRate = 23.976;
+ res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
+ }
else if (StringUtils::EqualsNoCase(fromMode, "4k2k24hz"))
{
res->iWidth = 1920;
@@ -428,6 +464,15 @@ bool aml_mode_to_resolution(const char *mode, RESOLUTION_INFO *res)
res->fRefreshRate = 25;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
+ else if (StringUtils::EqualsNoCase(fromMode, "4k2k29hz"))
+ {
+ res->iWidth = 1920;
+ res->iHeight= 1080;
+ res->iScreenWidth = 3840;
+ res->iScreenHeight= 2160;
+ res->fRefreshRate = 29.970;
+ res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
+ }
else if (StringUtils::EqualsNoCase(fromMode, "4k2k30hz"))
{
res->iWidth = 1920;
diff --git a/xbmc/utils/RecentlyAddedJob.cpp b/xbmc/utils/RecentlyAddedJob.cpp
index a2f130e..094133d 100644
--- a/xbmc/utils/RecentlyAddedJob.cpp
+++ b/xbmc/utils/RecentlyAddedJob.cpp
@@ -272,7 +272,7 @@ bool CRecentlyAddedJob::UpdateMusic()
home->SetProperty("LatestAlbum." + value + ".Title" , album.strAlbum);
home->SetProperty("LatestAlbum." + value + ".Year" , album.iYear);
- home->SetProperty("LatestAlbum." + value + ".Artist" , album.artist);
+ home->SetProperty("LatestAlbum." + value + ".Artist" , StringUtils::Join(album.artist, g_advancedSettings.m_videoItemSeparator));
home->SetProperty("LatestAlbum." + value + ".Rating" , album.iRating);
home->SetProperty("LatestAlbum." + value + ".Path" , strDBpath);
home->SetProperty("LatestAlbum." + value + ".Thumb" , strThumb);
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlAndroid.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlAndroid.cpp
index 5ea1d7c..111442c 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlAndroid.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlAndroid.cpp
@@ -28,14 +28,18 @@
#include "utils/SysfsUtils.h"
#include "utils/AMLUtils.h"
+bool CEGLNativeTypeAmlAndroid::m_isWritable = false;
+
bool CEGLNativeTypeAmlAndroid::CheckCompatibility()
{
if (aml_present())
{
+ m_isWritable = false;
if (SysfsUtils::HasRW("/sys/class/display/mode"))
- return true;
+ m_isWritable = true;
else
- CLog::Log(LOGERROR, "AMLEGL: no rw on /sys/class/display/mode");
+ CLog::Log(LOGINFO, "AMLEGL: no rw on /sys/class/display/mode");
+ return true;
}
return false;
}
@@ -62,6 +66,9 @@ bool CEGLNativeTypeAmlAndroid::GetNativeResolution(RESOLUTION_INFO *res) const
bool CEGLNativeTypeAmlAndroid::SetNativeResolution(const RESOLUTION_INFO &res)
{
+ if (!m_isWritable)
+ return false;
+
switch((int)(res.fRefreshRate*10))
{
default:
@@ -80,6 +87,16 @@ bool CEGLNativeTypeAmlAndroid::SetNativeResolution(const RESOLUTION_INFO &res)
break;
}
break;
+ case 599:
+ switch(res.iScreenWidth)
+ {
+ default:
+ if (res.dwFlags & D3DPRESENTFLAG_INTERLACED)
+ return SetDisplayResolution("1080i59hz");
+ else
+ return SetDisplayResolution("1080p59hz");
+ break;
+ }
case 500:
switch(res.iScreenWidth)
{
@@ -106,6 +123,17 @@ bool CEGLNativeTypeAmlAndroid::SetNativeResolution(const RESOLUTION_INFO &res)
break;
}
break;
+ case 299:
+ switch(res.iScreenWidth)
+ {
+ case 3840:
+ return SetDisplayResolution("4k2k29hz");
+ break;
+ default:
+ return SetDisplayResolution("1080p29hz");
+ break;
+ }
+ break;
case 250:
switch(res.iScreenWidth)
{
@@ -131,6 +159,17 @@ bool CEGLNativeTypeAmlAndroid::SetNativeResolution(const RESOLUTION_INFO &res)
break;
}
break;
+ case 239:
+ switch(res.iScreenWidth)
+ {
+ case 3840:
+ return SetDisplayResolution("4k2k23hz");
+ break;
+ default:
+ return SetDisplayResolution("1080p23hz");
+ break;
+ }
+ break;
}
return false;
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlAndroid.h b/xbmc/windowing/egl/EGLNativeTypeAmlAndroid.h
index 27a935b..6887537 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlAndroid.h
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlAndroid.h
@@ -36,6 +36,7 @@ public:
protected:
mutable std::string m_curHdmiResolution;
mutable RESOLUTION_INFO m_fb_res;
+ static bool m_isWritable;
bool SetDisplayResolution(const char *resolution);
};
--
kodi packaging
More information about the pkg-multimedia-commits
mailing list