kodi: update to update to 17.0-beta3-7041777

This commit is contained in:
MilhouseVH 2016-10-05 05:59:30 +01:00
parent 438740d2e1
commit 91eafd40a4
6 changed files with 2 additions and 455 deletions

View File

@ -17,7 +17,7 @@
################################################################################
PKG_NAME="kodi-theme-Estuary"
PKG_VERSION="17.0-beta2-6e9d6fb"
PKG_VERSION="17.0-beta3-7041777"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################
PKG_NAME="kodi"
PKG_VERSION="17.0-beta2-6e9d6fb"
PKG_VERSION="17.0-beta3-7041777"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"

View File

@ -1,211 +0,0 @@
diff --git a/xbmc/DatabaseManager.cpp b/xbmc/DatabaseManager.cpp
index ed0178d..6430252 100644
--- a/xbmc/DatabaseManager.cpp
+++ b/xbmc/DatabaseManager.cpp
@@ -51,7 +51,7 @@ CDatabaseManager::~CDatabaseManager()
void CDatabaseManager::Initialize(bool addonsOnly)
{
Deinitialize();
- { CAddonDatabase db; UpdateDatabase(db); }
+ { CAddonDatabase db; UpdateDatabase(db, NULL, false); }
if (addonsOnly)
return;
CLog::Log(LOGDEBUG, "%s, updating databases...", __FUNCTION__);
@@ -83,11 +83,11 @@ bool CDatabaseManager::CanOpen(const std::string &name)
return false; // db isn't even attempted to update yet
}
-void CDatabaseManager::UpdateDatabase(CDatabase &db, DatabaseSettings *settings)
+void CDatabaseManager::UpdateDatabase(CDatabase &db, DatabaseSettings *settings, bool bShowSplash)
{
std::string name = db.GetBaseDBName();
UpdateStatus(name, DB_UPDATING);
- if (db.Update(settings ? *settings : DatabaseSettings()))
+ if (db.Update(settings ? *settings : DatabaseSettings(), bShowSplash))
UpdateStatus(name, DB_READY);
else
UpdateStatus(name, DB_FAILED);
diff --git a/xbmc/DatabaseManager.h b/xbmc/DatabaseManager.h
index c3bfba5..e75aae0 100644
--- a/xbmc/DatabaseManager.h
+++ b/xbmc/DatabaseManager.h
@@ -61,7 +61,7 @@ public:
\param name the name of the database to check.
\return true if the database can be opened, false otherwise.
- */
+ */
bool CanOpen(const std::string &name);
private:
@@ -73,7 +73,7 @@ private:
enum DB_STATUS { DB_CLOSED, DB_UPDATING, DB_READY, DB_FAILED };
void UpdateStatus(const std::string &name, DB_STATUS status);
- void UpdateDatabase(CDatabase &db, DatabaseSettings *settings = NULL);
+ void UpdateDatabase(CDatabase &db, DatabaseSettings *settings = NULL, bool bShowSplash = true);
CCriticalSection m_section; ///< Critical section protecting m_dbStatus.
std::map<std::string, DB_STATUS> m_dbStatus; ///< Our database status map.
diff --git a/xbmc/dbwrappers/Database.cpp b/xbmc/dbwrappers/Database.cpp
index 4dc71c5..6d06e8f 100644
--- a/xbmc/dbwrappers/Database.cpp
+++ b/xbmc/dbwrappers/Database.cpp
@@ -29,6 +29,7 @@
#include "sqlitedataset.h"
#include "DatabaseManager.h"
#include "DbUrl.h"
+#include "utils/Splash.h"
#ifdef HAS_MYSQL
#include "mysqldataset.h"
@@ -356,7 +357,7 @@ void CDatabase::InitSettings(DatabaseSettings &dbSettings)
dbSettings.name = GetBaseDBName();
}
-bool CDatabase::Update(const DatabaseSettings &settings)
+bool CDatabase::Update(const DatabaseSettings &settings, bool bShowSplash)
{
DatabaseSettings dbSettings = settings;
InitSettings(dbSettings);
@@ -367,6 +368,7 @@ bool CDatabase::Update(const DatabaseSettings &settings)
while (version >= GetMinSchemaVersion())
{
+ std::string splashmsg;
std::string dbName = dbSettings.name;
if (version)
dbName += StringUtils::Format("%d", version);
@@ -378,6 +380,13 @@ bool CDatabase::Update(const DatabaseSettings &settings)
{
CLog::Log(LOGNOTICE, "Old database found - updating from version %i to %i", version, GetSchemaVersion());
+ if (bShowSplash)
+ {
+ splashmsg = "Database migration in progress - please wait...";
+ splashmsg += "\nMigrating database " + dbSettings.name + " from v" + StringUtils::Format("%d", version) + " to v" + StringUtils::Format("%d", GetSchemaVersion());
+ CSplash::GetInstance().Show(splashmsg);
+ }
+
bool copy_fail = false;
try
diff --git a/xbmc/dbwrappers/Database.h b/xbmc/dbwrappers/Database.h
index 0117ecd..961f486 100644
--- a/xbmc/dbwrappers/Database.h
+++ b/xbmc/dbwrappers/Database.h
@@ -42,7 +42,7 @@ public:
Filter() : fields("*") {};
Filter(const char *w) : fields("*"), where(w) {};
Filter(const std::string &w) : fields("*"), where(w) {};
-
+
void AppendField(const std::string &strField);
void AppendJoin(const std::string &strJoin);
void AppendWhere(const std::string &strWhere, bool combineWithAnd = true);
@@ -163,7 +163,7 @@ public:
protected:
friend class CDatabaseManager;
- bool Update(const DatabaseSettings &db);
+ bool Update(const DatabaseSettings &db, bool bShowSplash);
void Split(const std::string& strFileNameAndPath, std::string& strPath, std::string& strFileName);
diff --git a/xbmc/utils/Splash.cpp b/xbmc/utils/Splash.cpp
index 7e1d885..c9dd388 100644
--- a/xbmc/utils/Splash.cpp
+++ b/xbmc/utils/Splash.cpp
@@ -30,13 +30,16 @@
using namespace XFILE;
CSplash::CSplash()
- : m_image(nullptr)
{
+ m_messageLayout = NULL;
+ m_image = NULL;
+ m_layoutWasLoading = false;
}
CSplash::~CSplash()
{
delete m_image;
+ delete m_messageLayout;
}
CSplash& CSplash::GetInstance()
@@ -47,6 +50,11 @@ CSplash& CSplash::GetInstance()
void CSplash::Show()
{
+ Show("");
+}
+
+void CSplash::Show(const std::string& message)
+{
if (!m_image)
{
std::string splashImage = "special://home/media/Splash.png";
@@ -70,6 +78,34 @@ void CSplash::Show()
m_image->Render();
m_image->FreeResources();
+ // render message
+ if (!message.empty())
+ {
+ if (!m_layoutWasLoading)
+ {
+ // load arial font, white body, no shadow, size: 20, no additional styling
+ CGUIFont *messageFont = g_fontManager.LoadTTF("__splash__", "arial.ttf", 0xFFFFFFFF, 0, 24, FONT_STYLE_NORMAL, false, 1.25f, 1.0f, &res);
+ if (messageFont)
+ m_messageLayout = new CGUITextLayout(messageFont, true, 0);
+ m_layoutWasLoading = true;
+ }
+ if (m_messageLayout)
+ {
+ m_messageLayout->Update(message, 1150, false, true);
+ float textWidth, textHeight;
+ m_messageLayout->GetTextExtent(textWidth, textHeight);
+
+ int width = g_graphicsContext.GetWidth();
+ int height = g_graphicsContext.GetHeight();
+
+ // ideally place text in center of empty area below splash image
+ float y = m_image->GetTextureHeight() - 180;
+ if (y + textHeight > height) // make sure entire text is visible
+ y = height - textHeight - 30; // -30 for safe viewing area
+ m_messageLayout->RenderOutline(width/2, y, 0, 0xFF000000, XBFONT_CENTER_X, width);
+ }
+ }
+
//show it on screen
g_Windowing.EndRender();
g_graphicsContext.Flip(true, false);
diff --git a/xbmc/utils/Splash.h b/xbmc/utils/Splash.h
index d8c81c2..66fbae0 100644
--- a/xbmc/utils/Splash.h
+++ b/xbmc/utils/Splash.h
@@ -22,6 +22,7 @@
#include <string>
+class CGUITextLayout;
class CGUIImage;
class CSplash
@@ -30,6 +31,7 @@ public:
static CSplash& GetInstance();
void Show();
+ void Show(const std::string& message);
protected:
CSplash();
@@ -38,5 +40,7 @@ protected:
virtual ~CSplash();
private:
+ CGUITextLayout* m_messageLayout;
CGUIImage* m_image;
+ bool m_layoutWasLoading;
};

View File

@ -1,82 +0,0 @@
From 11c81dbb3d0ccfbe3a4197890dea09801617eae2 Mon Sep 17 00:00:00 2001
From: mapfau <pfau@peakwork.de>
Date: Sun, 28 Aug 2016 23:15:34 +0200
Subject: [PATCH] check for kodi.inputstream version
---
xbmc/addons/InputStream.cpp | 23 +++++++++++++++++++++--
xbmc/addons/InputStream.h | 4 +++-
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/xbmc/addons/InputStream.cpp b/xbmc/addons/InputStream.cpp
index 9d6aee2..5d09a4c 100644
--- a/xbmc/addons/InputStream.cpp
+++ b/xbmc/addons/InputStream.cpp
@@ -36,8 +36,22 @@ std::unique_ptr<CInputStream> CInputStream::FromExtension(AddonProps props, cons
std::string extensions = CAddonMgr::GetInstance().GetExtValue(ext->configuration, "@extension");
std::string protocols = CAddonMgr::GetInstance().GetExtValue(ext->configuration, "@protocols");
std::string name(ext->plugin->identifier);
+
+ bool matchAPIVersion(true);
+ for (unsigned int i(0); i < ext->plugin->num_imports; ++i)
+ if (strcmp(ext->plugin->imports[i].plugin_id, "kodi.inputstream") == 0 && strcmp(ext->plugin->imports[i].version, INPUTSTREAM_API_VERSION) != 0)
+ {
+ matchAPIVersion = false;
+ CLog::Log(LOGNOTICE, "CInputStream::FromExtension - %s (%s) not loaded due to API mismatch, has %s, wanted %s",
+ props.id.c_str(),
+ props.version.Upstream().c_str(),
+ ext->plugin->imports[i].version,
+ INPUTSTREAM_API_VERSION);
+ break;
+ }
+
std::unique_ptr<CInputStream> istr(new CInputStream(props, name, listitemprops,
- extensions, protocols));
+ extensions, protocols, matchAPIVersion));
istr->CheckConfig();
return istr;
}
@@ -46,8 +60,10 @@ CInputStream::CInputStream(const AddonProps& props,
const std::string& name,
const std::string& listitemprops,
const std::string& extensions,
- const std::string& protocols)
+ const std::string& protocols,
+ bool matchAPIVersion)
: InputStreamDll(std::move(props))
+, m_matchAPIVersion(matchAPIVersion)
{
m_fileItemProps = StringUtils::Tokenize(listitemprops, "|");
for (auto &key : m_fileItemProps)
@@ -71,6 +87,9 @@ CInputStream::CInputStream(const AddonProps& props,
bool CInputStream::CheckAPIVersion()
{
+ if (!m_matchAPIVersion)
+ return false;
+
std::string dllVersion = m_pStruct->GetApiVersion();
if (dllVersion.compare(INPUTSTREAM_API_VERSION) != 0)
{
diff --git a/xbmc/addons/InputStream.h b/xbmc/addons/InputStream.h
index c081472..328e036 100644
--- a/xbmc/addons/InputStream.h
+++ b/xbmc/addons/InputStream.h
@@ -46,7 +46,8 @@ namespace ADDON
const std::string& name,
const std::string& listitemprops,
const std::string& extensions,
- const std::string& protocols);
+ const std::string& protocols,
+ bool hasAPIVersion);
virtual ~CInputStream() {}
virtual void SaveSettings() override;
@@ -100,6 +101,7 @@ namespace ADDON
std::vector<std::string> m_extensionsList;
std::vector<std::string> m_protocolsList;
INPUTSTREAM_CAPABILITIES m_caps;
+ bool m_matchAPIVersion;
std::map<int, CDemuxStream*> m_streams;
static CCriticalSection m_parentSection;

View File

@ -1,116 +0,0 @@
From e0b1e6bd9afc7db17173200b21fcbf0084f83e78 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de>
Date: Mon, 19 Sep 2016 14:20:44 +0200
Subject: [PATCH] VideoPlayer: drop obsolete player method HasFrame, fix subs
for bypass renderer
---
xbmc/ApplicationPlayer.cpp | 9 ---------
xbmc/ApplicationPlayer.h | 1 -
xbmc/cores/IPlayer.h | 2 --
xbmc/cores/VideoPlayer/VideoPlayer.cpp | 5 -----
xbmc/cores/VideoPlayer/VideoPlayer.h | 1 -
xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp | 3 ++-
xbmc/video/windows/GUIWindowFullScreen.cpp | 2 +-
7 files changed, 3 insertions(+), 20 deletions(-)
diff --git a/xbmc/ApplicationPlayer.cpp b/xbmc/ApplicationPlayer.cpp
index b76134d..205cdd5 100644
--- a/xbmc/ApplicationPlayer.cpp
+++ b/xbmc/ApplicationPlayer.cpp
@@ -762,15 +762,6 @@ void CApplicationPlayer::FrameMove()
player->FrameMove();
}
-bool CApplicationPlayer::HasFrame()
-{
- std::shared_ptr<IPlayer> player = GetInternal();
- if (player)
- return player->HasFrame();
- else
- return false;
-}
-
void CApplicationPlayer::Render(bool clear, uint32_t alpha, bool gui)
{
std::shared_ptr<IPlayer> player = GetInternal();
diff --git a/xbmc/ApplicationPlayer.h b/xbmc/ApplicationPlayer.h
index d27e8df..5144a0d 100644
--- a/xbmc/ApplicationPlayer.h
+++ b/xbmc/ApplicationPlayer.h
@@ -83,7 +83,6 @@ class CApplicationPlayer
void SetPlaySpeed(float speed);
void FrameMove();
- bool HasFrame();
void Render(bool clear, uint32_t alpha = 255, bool gui = true);
void FlushRenderer();
void SetRenderViewMode(int mode);
diff --git a/xbmc/cores/IPlayer.h b/xbmc/cores/IPlayer.h
index 7bc005b..d004a4e 100644
--- a/xbmc/cores/IPlayer.h
+++ b/xbmc/cores/IPlayer.h
@@ -389,8 +389,6 @@ class IPlayer
*/
virtual void FrameMove() {};
- virtual bool HasFrame() { return false; };
-
virtual void Render(bool clear, uint32_t alpha = 255, bool gui = true) {};
virtual void FlushRenderer() {};
diff --git a/xbmc/cores/VideoPlayer/VideoPlayer.cpp b/xbmc/cores/VideoPlayer/VideoPlayer.cpp
index b4a604c..ac67923 100644
--- a/xbmc/cores/VideoPlayer/VideoPlayer.cpp
+++ b/xbmc/cores/VideoPlayer/VideoPlayer.cpp
@@ -5039,11 +5039,6 @@ void CVideoPlayer::FrameMove()
m_renderManager.FrameMove();
}
-bool CVideoPlayer::HasFrame()
-{
- return m_renderManager.HasFrame();
-}
-
void CVideoPlayer::Render(bool clear, uint32_t alpha, bool gui)
{
m_renderManager.Render(clear, 0, alpha, gui);
diff --git a/xbmc/cores/VideoPlayer/VideoPlayer.h b/xbmc/cores/VideoPlayer/VideoPlayer.h
index 3f39706..d022ce2 100644
--- a/xbmc/cores/VideoPlayer/VideoPlayer.h
+++ b/xbmc/cores/VideoPlayer/VideoPlayer.h
@@ -368,7 +368,6 @@ class CVideoPlayer : public IPlayer, public CThread, public IVideoPlayer, public
virtual bool SwitchChannel(const PVR::CPVRChannelPtr &channel);
virtual void FrameMove();
- virtual bool HasFrame();
virtual void Render(bool clear, uint32_t alpha = 255, bool gui = true);
virtual void FlushRenderer();
virtual void SetRenderViewMode(int mode);
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp
index bbdd403..52d418b 100644
--- a/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp
@@ -960,7 +960,8 @@ bool CRenderManager::IsGuiLayer()
if (!m_pRenderer)
return false;
- if (m_pRenderer->IsGuiLayer() || m_renderedOverlay || m_overlays.HasOverlay(m_presentsource))
+ if ((m_pRenderer->IsGuiLayer() && HasFrame()) ||
+ m_renderedOverlay || m_overlays.HasOverlay(m_presentsource))
return true;
if (m_renderDebug && m_debugTimer.IsTimePast())
diff --git a/xbmc/video/windows/GUIWindowFullScreen.cpp b/xbmc/video/windows/GUIWindowFullScreen.cpp
index 7263752..72da165 100644
--- a/xbmc/video/windows/GUIWindowFullScreen.cpp
+++ b/xbmc/video/windows/GUIWindowFullScreen.cpp
@@ -485,7 +485,7 @@ void CGUIWindowFullScreen::FrameMove()
void CGUIWindowFullScreen::Process(unsigned int currentTime, CDirtyRegionList &dirtyregion)
{
- if (g_application.m_pPlayer->IsRenderingGuiLayer() && g_application.m_pPlayer->HasFrame())
+ if (g_application.m_pPlayer->IsRenderingGuiLayer())
MarkDirtyRegion();
CGUIWindow::Process(currentTime, dirtyregion);

View File

@ -1,44 +0,0 @@
From 56fc55be3f7e8361ce95dab9131a6d5bfeae1a7d Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de>
Date: Mon, 19 Sep 2016 14:45:29 +0200
Subject: [PATCH] VideoPlayer: make processInfo a smart pointer, fixes mem leak
---
xbmc/cores/VideoPlayer/VideoPlayer.cpp | 2 +-
xbmc/cores/VideoPlayer/VideoPlayer.h | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/xbmc/cores/VideoPlayer/VideoPlayer.cpp b/xbmc/cores/VideoPlayer/VideoPlayer.cpp
index b4a604c..7c5b243 100644
--- a/xbmc/cores/VideoPlayer/VideoPlayer.cpp
+++ b/xbmc/cores/VideoPlayer/VideoPlayer.cpp
@@ -663,7 +663,7 @@ CVideoPlayer::CVideoPlayer(IPlayerCallback& callback)
m_SkipCommercials = true;
- m_processInfo = CProcessInfo::CreateInstance();
+ m_processInfo.reset(CProcessInfo::CreateInstance());
CreatePlayers();
m_displayLost = false;
diff --git a/xbmc/cores/VideoPlayer/VideoPlayer.h b/xbmc/cores/VideoPlayer/VideoPlayer.h
index 3f39706..2684376 100644
--- a/xbmc/cores/VideoPlayer/VideoPlayer.h
+++ b/xbmc/cores/VideoPlayer/VideoPlayer.h
@@ -21,6 +21,7 @@
*/
#include <atomic>
+#include <memory>
#include <utility>
#include <vector>
#include "cores/IPlayer.h"
@@ -503,7 +504,7 @@ class CVideoPlayer : public IPlayer, public CThread, public IVideoPlayer, public
XbmcThreads::EndTime m_cachingTimer;
CFileItem m_item;
XbmcThreads::EndTime m_ChannelEntryTimeOut;
- CProcessInfo *m_processInfo;
+ std::unique_ptr<CProcessInfo> m_processInfo;
CCurrentStream m_CurrentAudio;
CCurrentStream m_CurrentVideo;