(jarvis) kodi: update to kodi-16.0-beta1-9a5ddf5

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stefan Saraev 2015-10-20 01:23:50 -07:00 committed by Stephan Raue
parent 2ce4e81a03
commit 9b4277d675
34 changed files with 192 additions and 18211 deletions

View File

@ -17,13 +17,13 @@
################################################################################
PKG_NAME="kodi-theme-Confluence"
PKG_VERSION="15.2-02e7013"
PKG_VERSION="16.0-beta1-9a5ddf5"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.kodi.tv"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain kodi"
PKG_DEPENDS_TARGET="toolchain kodi:host"
PKG_PRIORITY="optional"
PKG_SECTION="mediacenter"
PKG_SHORTDESC="kodi-theme-Confluence: Kodi Mediacenter default theme"

View File

@ -17,13 +17,13 @@
################################################################################
PKG_NAME="kodi"
PKG_VERSION="15.2-02e7013"
PKG_VERSION="16.0-beta1-9a5ddf5"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.kodi.tv"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain kodi:host libsquish boost Python zlib bzip2 systemd pciutils lzo pcre swig:host libass curl rtmpdump fontconfig fribidi tinyxml libjpeg-turbo libpng tiff freetype jasper libogg libcdio libmpeg2 taglib libxml2 libxslt yajl sqlite libvorbis ffmpeg"
PKG_DEPENDS_TARGET="toolchain kodi:host libsquish boost Python zlib bzip2 systemd pciutils lzo pcre swig:host libass curl rtmpdump fontconfig fribidi tinyxml libjpeg-turbo libpng tiff freetype jasper libogg libcdio libmpeg2 taglib libxml2 libxslt yajl sqlite libvorbis ffmpeg crossguid giflib"
PKG_DEPENDS_HOST="lzo:host libpng:host libjpeg-turbo:host giflib:host"
PKG_PRIORITY="optional"
PKG_SECTION="mediacenter"
@ -253,12 +253,6 @@ PKG_CONFIGURE_OPTS_TARGET="gl_cv_func_gettimeofday_clobber=no \
$KODI_CEC \
--enable-udev \
--disable-libusb \
--disable-goom \
--disable-rsxs \
--disable-projectm \
--disable-waveform \
--disable-spectrum \
--disable-fishbmc \
$KODI_XORG \
--disable-ccache \
$KODI_ALSA \
@ -275,6 +269,7 @@ PKG_CONFIGURE_OPTS_TARGET="gl_cv_func_gettimeofday_clobber=no \
$KODI_SSH \
$KODI_AIRPLAY \
$KODI_AIRTUNES \
--enable-gif \
$KODI_NONFREE \
--disable-asap-codec \
$KODI_WEBSERVER \
@ -372,6 +367,7 @@ post_makeinstall_target() {
rm -rf $INSTALL/usr/share/applications
rm -rf $INSTALL/usr/share/icons
rm -rf $INSTALL/usr/share/kodi/addons/service.xbmc.versioncheck
rm -rf $INSTALL/usr/share/kodi/addons/visualization.vortex
rm -rf $INSTALL/usr/share/xsessions
mkdir -p $INSTALL/usr/share/kodi/addons

View File

@ -1,17 +1,17 @@
From eed67c881eddd1f522e02b7b410d92fae7e39325 Mon Sep 17 00:00:00 2001
From 26d1905c371dd7e0e23bb589ccf29f2bfec5b8af Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Sat, 18 Apr 2015 15:12:49 +0300
Subject: [PATCH 01/12] enable PYTHONOPTIMIZE with external Python
Subject: [PATCH 01/13] enable PYTHONOPTIMIZE with external Python
---
xbmc/interfaces/python/XBPython.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/xbmc/interfaces/python/XBPython.cpp b/xbmc/interfaces/python/XBPython.cpp
index 695c6db..fe8b157 100644
index af8d608..6213dbe 100644
--- a/xbmc/interfaces/python/XBPython.cpp
+++ b/xbmc/interfaces/python/XBPython.cpp
@@ -572,10 +572,9 @@ bool XBPython::OnScriptInitialized(ILanguageInvoker *invoker)
@@ -568,10 +568,9 @@ bool XBPython::OnScriptInitialized(ILanguageInvoker *invoker)
// at http://docs.python.org/using/cmdline.html#environment-variables
#if !defined(TARGET_WINDOWS) && !defined(TARGET_ANDROID)
@ -26,5 +26,5 @@ index 695c6db..fe8b157 100644
if (!CUtil::GetFrameworksPath(true).empty())
{
--
2.1.4
2.5.0

View File

@ -1,7 +1,7 @@
From 2896398cc05ebc58fe512f02919b1189dcb04062 Mon Sep 17 00:00:00 2001
From a4a1922fee3c51f2005bc6d2738ab1a871319a4f Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Sat, 18 Apr 2015 15:23:51 +0300
Subject: [PATCH 02/12] add openelec.tv RSS news
Subject: [PATCH 02/13] add openelec.tv RSS news
---
userdata/RssFeeds.xml | 1 +
@ -20,5 +20,5 @@ index 6169113..631aafb 100644
<feed updateinterval="30">http://feeds.xbmc.org/latest_xbmc_addons</feed>
<feed updateinterval="30">http://feeds.xbmc.org/updated_xbmc_addons</feed>
--
2.1.4
2.5.0

View File

@ -1,7 +1,7 @@
From c547dcc2826e3337f5ff10d0f21485eb480d3351 Mon Sep 17 00:00:00 2001
From 468f917d3c1ee6f84b1a075d327d7c7626f1e223 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Sat, 18 Apr 2015 15:03:31 +0300
Subject: [PATCH 03/12] disable online check
Subject: [PATCH 03/13] disable online check
---
xbmc/GUIInfoManager.cpp | 1 -
@ -10,10 +10,10 @@ Subject: [PATCH 03/12] disable online check
3 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp
index 2c99f6b..bb66399 100644
index cb09e75..a218e1d 100644
--- a/xbmc/GUIInfoManager.cpp
+++ b/xbmc/GUIInfoManager.cpp
@@ -274,7 +274,6 @@ const infomap system_labels[] = {{ "hasnetwork", SYSTEM_ETHERNET_LINK_ACT
@@ -278,7 +278,6 @@ const infomap system_labels[] = {{ "hasnetwork", SYSTEM_ETHERNET_LINK_ACT
{ "currentwindow", SYSTEM_CURRENT_WINDOW },
{ "currentcontrol", SYSTEM_CURRENT_CONTROL },
{ "dvdlabel", SYSTEM_DVD_LABEL },
@ -22,10 +22,10 @@ index 2c99f6b..bb66399 100644
{ "kernelversion", SYSTEM_OS_VERSION_INFO }, // old, not correct name
{ "uptime", SYSTEM_UPTIME },
diff --git a/xbmc/utils/SystemInfo.cpp b/xbmc/utils/SystemInfo.cpp
index b322191..35555de 100644
index f423cfe..d8483d0 100644
--- a/xbmc/utils/SystemInfo.cpp
+++ b/xbmc/utils/SystemInfo.cpp
@@ -248,7 +248,6 @@ bool CSysInfoJob::DoWork()
@@ -247,7 +247,6 @@ bool CSysInfoJob::DoWork()
{
m_info.systemUptime = GetSystemUpTime(false);
m_info.systemTotalUptime = GetSystemUpTime(true);
@ -33,7 +33,7 @@ index b322191..35555de 100644
m_info.videoEncoder = GetVideoEncoder();
m_info.cpuFrequency = GetCPUFreqInfo();
m_info.osVersionInfo = CSysInfo::GetOsPrettyNameWithVersion() + " (kernel: " + CSysInfo::GetKernelName() + " " + CSysInfo::GetKernelVersionFull() + ")";
@@ -1016,9 +1015,7 @@ int CSysInfo::GetXbmcBitness(void)
@@ -1023,9 +1022,7 @@ int CSysInfo::GetXbmcBitness(void)
bool CSysInfo::HasInternet()
{
@ -45,17 +45,17 @@ index b322191..35555de 100644
std::string CSysInfo::GetHddSpaceInfo(int drive, bool shortText)
diff --git a/xbmc/windows/GUIWindowSystemInfo.cpp b/xbmc/windows/GUIWindowSystemInfo.cpp
index 68f3a43..7159d82 100644
index 6ff2391..ee73c88 100644
--- a/xbmc/windows/GUIWindowSystemInfo.cpp
+++ b/xbmc/windows/GUIWindowSystemInfo.cpp
@@ -126,7 +126,6 @@ void CGUIWindowSystemInfo::FrameMove()
@@ -125,7 +125,6 @@ void CGUIWindowSystemInfo::FrameMove()
SetControlLabel(i++, "%s: %s", 13160, NETWORK_GATEWAY_ADDRESS);
SetControlLabel(i++, "%s: %s", 13161, NETWORK_DNS1_ADDRESS);
SetControlLabel(i++, "%s: %s", 20307, NETWORK_DNS2_ADDRESS);
- SetControlLabel(i++, "%s %s", 13295, SYSTEM_INTERNET_STATE);
}
else if (m_section == CONTROL_BT_VIDEO)
{
--
2.1.4
2.5.0

View File

@ -1,7 +1,7 @@
From 4ed7aee5ab898e2050ceeff74fa4cf0eb846e28f Mon Sep 17 00:00:00 2001
From 13eddbe7c95fb224a39991a288ed1102e0739c44 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Thu, 17 Apr 2014 12:12:50 +0300
Subject: [PATCH 04/12] use udevil to umount
Subject: [PATCH 04/13] use udevil to umount
---
xbmc/linux/PosixMountProvider.cpp | 2 +-
@ -35,5 +35,5 @@ index 0ca370b..dffee34 100644
if (status == 0)
--
2.1.4
2.5.0

View File

@ -1,7 +1,7 @@
From fb58bfbb6a87666d35fde23ff08cf9a47071e188 Mon Sep 17 00:00:00 2001
From 416981e6bbcf81443e3ca8f35ca26042e174c971 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Mon, 2 Mar 2015 23:50:40 +0200
Subject: [PATCH 05/12] make binary addons executable
Subject: [PATCH 05/13] make binary addons executable
add executable mode to all files in addon's bin folder
@ -11,10 +11,10 @@ credits to vpeter4 for the patch
1 file changed, 26 insertions(+)
diff --git a/xbmc/addons/Addon.cpp b/xbmc/addons/Addon.cpp
index bf5c584..03325dd 100644
index 77c2db8..6c21c87 100644
--- a/xbmc/addons/Addon.cpp
+++ b/xbmc/addons/Addon.cpp
@@ -44,6 +44,10 @@
@@ -46,6 +46,10 @@
#include <string.h>
#include <ostream>
@ -24,10 +24,10 @@ index bf5c584..03325dd 100644
+
using XFILE::CDirectory;
using XFILE::CFile;
using namespace std;
@@ -674,6 +678,28 @@ void OnPostInstall(const AddonPtr& addon, bool update, bool modal)
if (CAddonMgr::Get().GetAddon(addon->ID(), localAddon, ADDON_CONTEXT_ITEM))
CContextMenuManager::Get().Register(std::static_pointer_cast<CContextItemAddon>(localAddon));
@@ -694,6 +698,28 @@ void OnPostInstall(const AddonPtr& addon, bool update, bool modal)
if (CAddonMgr::GetInstance().GetAddon(addon->ID(), localAddon, ADDON_REPOSITORY))
CRepositoryUpdater::GetInstance().ScheduleUpdate(); //notify updater there is a new addon or version
+ // OE: make binary addons executable, creddits to vpeter4
+ std::string addonDirPath;
@ -55,5 +55,5 @@ index bf5c584..03325dd 100644
}
--
2.1.4
2.5.0

View File

@ -1,7 +1,7 @@
From 000912d45613e278d7279bc3624aff906fd8d91b Mon Sep 17 00:00:00 2001
From c16e99234ce40f201e58a2595e6dfa0703cf554c Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Wed, 11 Mar 2015 20:56:15 +0200
Subject: [PATCH 06/12] dont set _NET_WM_STATE_FULLSCREEN
Subject: [PATCH 06/13] dont set _NET_WM_STATE_FULLSCREEN
I dont remember why I added this. I guess it was for
some 3rdparty stuff that needed to go fullscreen but
@ -13,10 +13,10 @@ this should probably be removed after OE 6
1 file changed, 2 deletions(-)
diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp
index 05f36ee..1714422 100644
index af25621..17d7f59 100644
--- a/xbmc/windowing/X11/WinSystemX11.cpp
+++ b/xbmc/windowing/X11/WinSystemX11.cpp
@@ -1155,8 +1155,6 @@ bool CWinSystemX11::SetWindow(int width, int height, bool fullscreen, const std:
@@ -1142,8 +1142,6 @@ bool CWinSystemX11::SetWindow(int width, int height, bool fullscreen, const std:
if (fullscreen && hasWM)
{
@ -26,5 +26,5 @@ index 05f36ee..1714422 100644
int one = 1;
XChangeProperty(m_dpy, m_mainWindow, XInternAtom(m_dpy, "_KDE_NET_WM_BLOCK_COMPOSITING", True), XA_CARDINAL, 32,
--
2.1.4
2.5.0

View File

@ -1,17 +1,17 @@
From 01f08b891c24d60c3e4ea5f44b6ce0f6d650e068 Mon Sep 17 00:00:00 2001
From f5f78dda7b1161779ce7a0c495f54e30f971776a Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Sat, 18 Apr 2015 14:59:29 +0300
Subject: [PATCH 07/12] disable minimize
Subject: [PATCH 07/13] disable minimize
---
xbmc/Application.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index 135b466..da6aa6e 100644
index 95ae98c..9aca1e3 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -4696,7 +4696,6 @@ bool CApplication::SwitchToFullScreen()
@@ -5044,7 +5044,6 @@ bool CApplication::SwitchToFullScreen(bool force /* = false */)
void CApplication::Minimize()
{
@ -20,5 +20,5 @@ index 135b466..da6aa6e 100644
PLAYERCOREID CApplication::GetCurrentPlayer()
--
2.1.4
2.5.0

View File

@ -1,7 +1,7 @@
From f212e2b8d9bfcacc02affd8bc396bd0aeb3a210f Mon Sep 17 00:00:00 2001
From 867d7535140dcf7b987ce86c3947c2ec5f5c7bd4 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Mon, 18 Aug 2014 17:46:54 +0300
Subject: [PATCH 08/12] setup timezone
Subject: [PATCH 08/13] setup timezone
on TZ country setting change, store the value in format
TIMEZONE=Xx/Yyy to /storage/.cache/timezone to be used with
@ -11,7 +11,7 @@ tz-data.service
1 file changed, 12 insertions(+)
diff --git a/xbmc/linux/LinuxTimezone.cpp b/xbmc/linux/LinuxTimezone.cpp
index 37130d8..3431638 100644
index 7de8f8c..e278c6a 100644
--- a/xbmc/linux/LinuxTimezone.cpp
+++ b/xbmc/linux/LinuxTimezone.cpp
@@ -42,6 +42,8 @@
@ -20,12 +20,12 @@ index 37130d8..3431638 100644
+#include <fstream>
+
using namespace std;
CLinuxTimezone::CLinuxTimezone() : m_IsDST(0)
@@ -161,6 +163,16 @@ void CLinuxTimezone::OnSettingChanged(const CSetting *setting)
{
char* line = NULL;
@@ -159,6 +161,16 @@ void CLinuxTimezone::OnSettingChanged(const CSetting *setting)
const std::string &settingId = setting->GetId();
if (settingId == "locale.timezone")
if (settingId == CSettings::SETTING_LOCALE_TIMEZONE)
{
+ std::ofstream out("/storage/.cache/timezone");
+ if (out)
@ -41,5 +41,5 @@ index 37130d8..3431638 100644
CDateTime::ResetTimezoneBias();
--
2.1.4
2.5.0

View File

@ -1,7 +1,7 @@
From ba906db17bdb834aedf88ca35b1ce30ea2d2bbd4 Mon Sep 17 00:00:00 2001
From 74ed25108f5a5c4771e001aa9921f175872c076e Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Fri, 24 Apr 2015 19:45:20 +0300
Subject: [PATCH 09/12] use a wrapper to setup systemd services
Subject: [PATCH 09/13] use a wrapper to setup systemd services
---
xbmc/addons/Addon.cpp | 30 ++++++++++++++++++++++++++++++
@ -9,10 +9,10 @@ Subject: [PATCH 09/12] use a wrapper to setup systemd services
2 files changed, 32 insertions(+)
diff --git a/xbmc/addons/Addon.cpp b/xbmc/addons/Addon.cpp
index 03325dd..b2bfafa 100644
index 377a49c..2fda194 100644
--- a/xbmc/addons/Addon.cpp
+++ b/xbmc/addons/Addon.cpp
@@ -626,6 +626,13 @@ AddonVersion CAddon::GetDependencyVersion(const std::string &dependencyID) const
@@ -638,6 +638,13 @@ AddonVersion CAddon::GetDependencyVersion(const std::string &dependencyID) const
return AddonVersion("0.0.0");
}
@ -26,62 +26,62 @@ index 03325dd..b2bfafa 100644
void OnEnabled(const std::string& id)
{
// If the addon is a special, call enabled handler
@@ -633,6 +640,11 @@ void OnEnabled(const std::string& id)
if (CAddonMgr::Get().GetAddon(id, addon, ADDON_PVRDLL))
@@ -646,6 +653,11 @@ void OnEnabled(const std::string& id)
CAddonMgr::GetInstance().GetAddon(id, addon, ADDON_ADSPDLL))
return addon->OnEnabled();
+ // OE: systemctl enable & start on addon enable
+ if (CAddonMgr::Get().GetAddon(id, addon, ADDON_SERVICE))
+ if (CAddonMgr::GetInstance().GetAddon(id, addon, ADDON_SERVICE))
+ CallOEWrapper(addon->ID(), false);
+ // OE
+
if (CAddonMgr::Get().GetAddon(id, addon, ADDON_SERVICE))
if (CAddonMgr::GetInstance().GetAddon(id, addon, ADDON_SERVICE))
std::static_pointer_cast<CService>(addon)->Start();
@@ -649,6 +661,11 @@ void OnDisabled(const std::string& id)
if (CAddonMgr::Get().GetAddon(id, addon, ADDON_SERVICE, false))
@@ -663,6 +675,11 @@ void OnDisabled(const std::string& id)
if (CAddonMgr::GetInstance().GetAddon(id, addon, ADDON_SERVICE, false))
std::static_pointer_cast<CService>(addon)->Stop();
+ // OE: systemctl stop & disable on addon disable
+ if (CAddonMgr::Get().GetAddon(id, addon, ADDON_SERVICE, false))
+ if (CAddonMgr::GetInstance().GetAddon(id, addon, ADDON_SERVICE, false))
+ CallOEWrapper(addon->ID(), true);
+ // OE
+
if (CAddonMgr::Get().GetAddon(id, addon, ADDON_CONTEXT_ITEM, false))
CContextMenuManager::Get().Unregister(std::static_pointer_cast<CContextItemAddon>(addon));
if (CAddonMgr::GetInstance().GetAddon(id, addon, ADDON_CONTEXT_ITEM, false))
CContextMenuManager::GetInstance().Unregister(std::static_pointer_cast<CContextMenuAddon>(addon));
}
@@ -672,6 +689,14 @@ void OnPreInstall(const AddonPtr& addon)
@@ -686,6 +703,14 @@ void OnPreInstall(const AddonPtr& addon)
void OnPostInstall(const AddonPtr& addon, bool update, bool modal)
{
AddonPtr localAddon;
+ // OE: systemctl stop & disable / enable & start on addon upgrade
+ if (CAddonMgr::Get().GetAddon(addon->ID(), localAddon, ADDON_SERVICE))
+ if (CAddonMgr::GetInstance().GetAddon(addon->ID(), localAddon, ADDON_SERVICE))
+ {
+ CallOEWrapper(addon->ID(), true);
+ CallOEWrapper(addon->ID(), false);
+ }
+ // OE
+
if (CAddonMgr::Get().GetAddon(addon->ID(), localAddon, ADDON_SERVICE))
if (CAddonMgr::GetInstance().GetAddon(addon->ID(), localAddon, ADDON_SERVICE))
std::static_pointer_cast<CService>(localAddon)->Start();
@@ -706,6 +731,11 @@ void OnPostInstall(const AddonPtr& addon, bool update, bool modal)
@@ -720,6 +745,11 @@ void OnPostInstall(const AddonPtr& addon, bool update, bool modal)
void OnPreUnInstall(const AddonPtr& addon)
{
AddonPtr localAddon;
+ // OE: systemctl stop & disable on addon ininstall
+ if (CAddonMgr::Get().GetAddon(addon->ID(), localAddon, ADDON_SERVICE))
+ if (CAddonMgr::GetInstance().GetAddon(addon->ID(), localAddon, ADDON_SERVICE))
+ CallOEWrapper(addon->ID(), true);
+ // OE
+
if (CAddonMgr::Get().GetAddon(addon->ID(), localAddon, ADDON_SERVICE))
if (CAddonMgr::GetInstance().GetAddon(addon->ID(), localAddon, ADDON_SERVICE))
std::static_pointer_cast<CService>(localAddon)->Stop();
diff --git a/xbmc/addons/Addon.h b/xbmc/addons/Addon.h
index ca9cddb..46e30d3 100644
index d0a40d3..0742374 100644
--- a/xbmc/addons/Addon.h
+++ b/xbmc/addons/Addon.h
@@ -171,6 +171,8 @@ public:
@@ -173,6 +173,8 @@ public:
const InfoMap &ExtraInfo() const { return m_props.extrainfo; }
const ADDONDEPS &GetDeps() const { return m_props.dependencies; }
@ -91,5 +91,5 @@ index ca9cddb..46e30d3 100644
\param dependencyID the addon ID of the dependency.
\return the version this addon requires.
--
2.1.4
2.5.0

View File

@ -1,40 +1,62 @@
From d70e7c8826a95852a05ef3de0fea71c8b85accb1 Mon Sep 17 00:00:00 2001
From 66fa8d82238e001dc81b0a266e323c6a2f8b11b2 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Mon, 15 Dec 2014 21:28:54 +0200
Subject: [PATCH 10/12] handle SIGTERM
Subject: [PATCH 10/13] handle SIGTERM
In some situations, due to deadlocks or crashes, xbmc fails to exit properly in
CApplication::Stop(), so g_powerManager.Reboot() / g_powerManager.Powerdown() never gets
called, that's a big no-no for openelec as our users can't shutdown or reboot.
There are few addons reported to cause this behaviour: trakkt.tv, watchdog, weather.underground.
0. CApplication::Stop cant be trusted. (deadlocks crashes and boo)
I've also noticed that sometimes new threads (FileCache ??) get started AFTER
CApplication::Stop() is called, delaying shutdown with 1+ minute (2 curl timeoouts?).
The problem seems to be in CJobManager::CancelJobs() but I am too lame to understand where,
why, and how to fix it.
so, when shutdown/reboot is requested:
To me, it seems best to let systemd handle it. systemd sends SIGTERM, then waits
TimeoutStopSec=xx seconds then sends SIGKILL,s so dont call g_application.Stop() from
ApplicationMessenger as it can not be trusted. save the requested exitcode instead
(that's required for CEC to switch off the tv) and do it from a simple SIGTERM handler instead.
CEC thread has enough time (5 seconds in xbmc.service) to switch of the TV after receiving OnQuit.
As a side "effect", now guisettings.xml will ALWAYS be saved, even if shutdown / rebooot
is requested externaly (ssh, 3rdparty script).
1. save an exit code (for CEC...)
2. call CPowerManager::{Reboot,PowerDown}
3. ... then systemd sends TERM and waits xx seconds before sending KILL
4. CApplication::Stop has xx seconds to save guisettings.xml and boo
5. CEC thread has xx seconds to switch off after it received OnQuit
6. addons / pvrmanager / cec / everything else.. are free to deadlock / crash now, we dont care
7. KILL
---
xbmc/Application.cpp | 10 ++++++++--
xbmc/Application.h | 1 +
xbmc/ApplicationMessenger.cpp | 6 ++++--
xbmc/XBApplicationEx.cpp | 1 +
xbmc/XBApplicationEx.h | 1 +
xbmc/main/main.cpp | 15 +++++++++++++++
6 files changed, 30 insertions(+), 4 deletions(-)
xbmc/Application.cpp | 17 ++++++++++++-----
xbmc/Application.h | 1 +
xbmc/XBApplicationEx.cpp | 1 +
xbmc/XBApplicationEx.h | 1 +
xbmc/main/main.cpp | 15 +++++++++++++++
5 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index da6aa6e..b39c906 100644
index 1c906a2..99ca567 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -2583,12 +2583,19 @@ bool CApplication::Cleanup()
@@ -2490,12 +2490,12 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg)
switch (pMsg->dwMessage)
{
case TMSG_POWERDOWN:
- Stop(EXITCODE_POWERDOWN);
+ SetExitCode(EXITCODE_POWERDOWN);
g_powerManager.Powerdown();
break;
case TMSG_QUIT:
- Stop(EXITCODE_QUIT);
+ SetExitCode(EXITCODE_QUIT);
break;
case TMSG_SHUTDOWN:
@@ -2539,12 +2539,13 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg)
case TMSG_RESTART:
case TMSG_RESET:
- Stop(EXITCODE_REBOOT);
+ SetExitCode(EXITCODE_REBOOT);
g_powerManager.Reboot();
break;
case TMSG_RESTARTAPP:
#if defined(TARGET_WINDOWS) || defined(TARGET_LINUX)
+ SetExitCode(EXITCODE_RESTARTAPP);
Stop(EXITCODE_RESTARTAPP);
#endif
break;
@@ -2890,12 +2891,19 @@ bool CApplication::Cleanup()
}
}
@ -52,10 +74,10 @@ index da6aa6e..b39c906 100644
CVariant vExitCode(CVariant::VariantTypeObject);
- vExitCode["exitcode"] = exitCode;
+ vExitCode["exitcode"] = m_ExitCode;
CAnnouncementManager::Get().Announce(System, "xbmc", "OnQuit", vExitCode);
CAnnouncementManager::GetInstance().Announce(System, "xbmc", "OnQuit", vExitCode);
SaveFileState(true);
@@ -2612,7 +2619,6 @@ void CApplication::Stop(int exitCode)
// Abort any active screensaver
@@ -2922,7 +2930,6 @@ void CApplication::Stop(int exitCode)
m_bStop = true;
m_AppFocused = false;
@ -64,56 +86,19 @@ index da6aa6e..b39c906 100644
// cancel any jobs from the jobmanager
diff --git a/xbmc/Application.h b/xbmc/Application.h
index b4da8f2..b5fdae6 100644
index f1dfe0d..200abee 100644
--- a/xbmc/Application.h
+++ b/xbmc/Application.h
@@ -154,6 +154,7 @@ public:
bool StartPVRManager();
void StartPVRManager();
void StopPVRManager();
bool IsCurrentThread() const;
+ void SetExitCode(int exitCode);
void Stop(int exitCode);
void RestartApp();
void UnloadSkin(bool forReload = false);
diff --git a/xbmc/ApplicationMessenger.cpp b/xbmc/ApplicationMessenger.cpp
index a46c9be..9bb6804 100644
--- a/xbmc/ApplicationMessenger.cpp
+++ b/xbmc/ApplicationMessenger.cpp
@@ -261,13 +261,14 @@ void CApplicationMessenger::ProcessMessage(ThreadMessage *pMsg)
case TMSG_POWERDOWN:
{
- g_application.Stop(EXITCODE_POWERDOWN);
+ g_application.SetExitCode(EXITCODE_POWERDOWN);
g_powerManager.Powerdown();
}
break;
case TMSG_QUIT:
{
+ g_application.SetExitCode(EXITCODE_QUIT);
g_application.Stop(EXITCODE_QUIT);
}
break;
@@ -289,7 +290,7 @@ void CApplicationMessenger::ProcessMessage(ThreadMessage *pMsg)
case TMSG_RESTART:
case TMSG_RESET:
{
- g_application.Stop(EXITCODE_REBOOT);
+ g_application.SetExitCode(EXITCODE_REBOOT);
g_powerManager.Reboot();
}
break;
@@ -297,6 +298,7 @@ void CApplicationMessenger::ProcessMessage(ThreadMessage *pMsg)
case TMSG_RESTARTAPP:
{
#if defined(TARGET_WINDOWS) || defined(TARGET_LINUX)
+ g_application.SetExitCode(EXITCODE_RESTARTAPP);
g_application.Stop(EXITCODE_RESTARTAPP);
#endif
}
diff --git a/xbmc/XBApplicationEx.cpp b/xbmc/XBApplicationEx.cpp
index ad6a145..6058938 100644
index 048a6c1..fa99ac1 100644
--- a/xbmc/XBApplicationEx.cpp
+++ b/xbmc/XBApplicationEx.cpp
@@ -40,6 +40,7 @@ CXBApplicationEx::CXBApplicationEx()
@ -137,10 +122,10 @@ index c46cba1..ed3f35f 100644
bool m_renderGUI;
diff --git a/xbmc/main/main.cpp b/xbmc/main/main.cpp
index 87fe2fd..3bfb338 100644
index 01027f8..4cfb04e 100644
--- a/xbmc/main/main.cpp
+++ b/xbmc/main/main.cpp
@@ -41,9 +41,24 @@
@@ -41,12 +41,27 @@
#include "input/linux/LIRC.h"
#endif
#include "XbmcContext.h"
@ -154,6 +139,9 @@ index 87fe2fd..3bfb338 100644
+ g_application.Stop(EXITCODE_RESTARTAPP);
+}
#ifdef __cplusplus
extern "C"
#endif
int main(int argc, char* argv[])
{
+ // SIGTERM handler
@ -166,5 +154,5 @@ index 87fe2fd..3bfb338 100644
XBMC::Context context;
--
2.1.4
2.5.0

View File

@ -1,7 +1,7 @@
From 0f9d760243da06c2a0d258e30033a8c980baf1fc Mon Sep 17 00:00:00 2001
From 993c50a689feee190557a98a34f76683cf46c589 Mon Sep 17 00:00:00 2001
From: Stephan Raue <stephan@openelec.tv>
Date: Mon, 1 Sep 2014 03:16:37 +0200
Subject: [PATCH 11/12] add support to read frequency output if using intel's
Subject: [PATCH 11/13] add support to read frequency output if using intel's
pstate driver
---
@ -9,10 +9,10 @@ Subject: [PATCH 11/12] add support to read frequency output if using intel's
1 file changed, 2 insertions(+)
diff --git a/xbmc/utils/CPUInfo.cpp b/xbmc/utils/CPUInfo.cpp
index 7c5b9f8..0536036 100644
index 9e709e7..9b5279f 100644
--- a/xbmc/utils/CPUInfo.cpp
+++ b/xbmc/utils/CPUInfo.cpp
@@ -269,6 +269,8 @@ CCPUInfo::CCPUInfo(void)
@@ -271,6 +271,8 @@ CCPUInfo::CCPUInfo(void)
m_fProcTemperature = fopen("/sys/class/thermal/thermal_zone0/temp", "r"); // On Raspberry PIs
m_fCPUFreq = fopen ("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", "r");
@ -22,5 +22,5 @@ index 7c5b9f8..0536036 100644
{
m_cpuInfoForFreq = true;
--
2.1.4
2.5.0

View File

@ -1,7 +1,7 @@
From 24c4341104c2fe70c39e703c98698c3025382659 Mon Sep 17 00:00:00 2001
From 84b516ffd5fbf0f7a53c30590dd412aeb4600481 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Sat, 18 Apr 2015 15:45:54 +0300
Subject: [PATCH 12/12] prevent kodi switching to windowed mode
Subject: [PATCH 12/13] prevent kodi switching to windowed mode
---
xbmc/windowing/X11/WinSystemX11.h | 1 +
@ -20,5 +20,5 @@ index 5ac2482..cb84940 100644
virtual int GetCurrentScreen() { return m_nScreen; }
virtual void ShowOSMouse(bool show);
--
2.1.4
2.5.0

View File

@ -1,4 +1,4 @@
From eca92b6b2da62765247faaad90f4efcf529a73aa Mon Sep 17 00:00:00 2001
From 62d1013382c328c8af9aeb598a253c4699accf8d Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Sun, 26 Apr 2015 15:13:15 +0300
Subject: [PATCH 13/13] udevprovider: filter out OE specific mounts
@ -33,5 +33,5 @@ index dffee34..b7cd25b 100644
const char *bus = udev_device_get_property_value(device, "ID_BUS");
const char *optical = udev_device_get_property_value(device, "ID_CDROM"); // matches also DVD, Blu-ray
--
2.1.4
2.5.0

View File

@ -0,0 +1,27 @@
From ab9f0b5ed2017e07d80156b521dd55ecd322f92c Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Tue, 25 Aug 2015 10:55:11 +0300
Subject: [PATCH] meh
---
project/cmake/scripts/common/addon-helpers.cmake | 3 +++
1 file changed, 3 insertions(+)
diff --git a/project/cmake/scripts/common/addon-helpers.cmake b/project/cmake/scripts/common/addon-helpers.cmake
index a02836a..0ceb5eb 100644
--- a/project/cmake/scripts/common/addon-helpers.cmake
+++ b/project/cmake/scripts/common/addon-helpers.cmake
@@ -55,6 +55,9 @@ macro (build_addon target prefix libs)
SET(LIBRARY_FILENAME $<TARGET_FILE_NAME:${target}>)
endif()
+ # meh
+ set(LIBRARY_FILENAME $<TARGET_LINKER_FILE_NAME:${target}>)
+
# if there's an addon.xml.in we need to generate the addon.xml
IF(EXISTS ${PROJECT_SOURCE_DIR}/${target}/addon.xml.in)
SET(PLATFORM ${CORE_SYSTEM_NAME})
--
2.5.0

View File

@ -1,37 +0,0 @@
From 7b3c2014209018b13f96af28bc8406f1633924a4 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Sun, 29 Mar 2015 21:37:21 +0300
Subject: [PATCH] add some symbol keys to english qwerty layout
now, it should be easier (less clicks) to type in email
addresses and urls
---
system/keyboardlayouts/english.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/system/keyboardlayouts/english.xml b/system/keyboardlayouts/english.xml
index eb4ca62..71ab1a9 100644
--- a/system/keyboardlayouts/english.xml
+++ b/system/keyboardlayouts/english.xml
@@ -8,14 +8,14 @@ Default font lacks support for all characters
<keyboard>
<row>1234567890</row>
<row>qwertyuiop</row>
- <row>asdfghjkl</row>
- <row>zxcvbnm</row>
+ <row>asdfghjkl:</row>
+ <row>zxcvbnm./@</row>
</keyboard>
<keyboard modifiers="shift">
<row>1234567890</row>
<row>QWERTYUIOP</row>
- <row>ASDFGHJKL</row>
- <row>ZXCVBNM</row>
+ <row>ASDFGHJKL:</row>
+ <row>ZXCVBNM./@</row>
</keyboard>
<keyboard modifiers="symbol,shift+symbol">
<row>)!@#$%^&amp;*(</row>
--
2.1.4

View File

@ -1,28 +0,0 @@
From 2a2ddb51f931d5f606638a0a3d6d76c261f09659 Mon Sep 17 00:00:00 2001
From: Arne Morten Kvarving <cptspiff@gmail.com>
Date: Sun, 10 Aug 2014 10:01:15 +0200
Subject: [PATCH] added: special setting __addonpath__ to
libXBMC_addon::GetSettings()
returns the path for an addon
---
xbmc/addons/AddonCallbacksAddon.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/xbmc/addons/AddonCallbacksAddon.cpp b/xbmc/addons/AddonCallbacksAddon.cpp
index b789648..40f1dde 100644
--- a/xbmc/addons/AddonCallbacksAddon.cpp
+++ b/xbmc/addons/AddonCallbacksAddon.cpp
@@ -187,6 +187,12 @@ bool CAddonCallbacksAddon::GetAddonSetting(void *addonData, const char *strSetti
{
CLog::Log(LOGDEBUG, "CAddonCallbacksAddon - %s - add-on '%s' requests setting '%s'", __FUNCTION__, addonHelper->m_addon->Name().c_str(), strSettingName);
+ if (strcasecmp(strSettingName, "__addonpath__") == 0)
+ {
+ strcpy((char*) settingValue, addonHelper->m_addon->Path().c_str());
+ return true;
+ }
+
if (!addonHelper->m_addon->ReloadSettings())
{
CLog::Log(LOGERROR, "CAddonCallbacksAddon - %s - could't get settings for add-on '%s'", __FUNCTION__, addonHelper->m_addon->Name().c_str());

View File

@ -40,12 +40,12 @@ diff -Naur kodi-15.0-2f34a0c/system/Lircmap.xml kodi-15.0-2f34a0c.patch/system/L
+ <volumeplus>KEY_VOLUP</volumeplus>
<volumeminus>KEY_VOLUMEDOWN</volumeminus>
+ <volumeminus>KEY_VOLDOWN</volumeminus>
<channelplus>KEY_CHANNELUP</channelplus>
+ <channelplus>KEY_CHUP</channelplus>
+ <channelplus>KEY_PAGEUP</channelplus>
<channelminus>KEY_CHANNELDOWN</channelminus>
+ <channelminus>KEY_CHDOWN</channelminus>
+ <channelminus>KEY_PAGEDOWN</channelminus>
<pageplus>KEY_CHANNELUP</pageplus>
+ <pageplus>KEY_CHUP</pageplus>
+ <pageplus>KEY_PAGEUP</pageplus>
<pageminus>KEY_CHANNELDOWN</pageminus>
+ <pageminus>KEY_CHDOWN</pageminus>
+ <pageminus>KEY_PAGEDOWN</pageminus>
<skipplus>KEY_NEXT</skipplus>
+ <skipplus>KEY_NEXTSONG</skipplus>
<skipminus>KEY_PREVIOUS</skipminus>
@ -73,7 +73,7 @@ diff -Naur kodi-15.0-2f34a0c/system/Lircmap.xml kodi-15.0-2f34a0c.patch/system/L
+ <mymusic>KEY_MP3</mymusic>
<mypictures>KEY_CAMERA</mypictures>
+ <mypictures>KEY_IMAGES</mypictures>
<mytv>KEY_TUNER</mytv>
<livetv>KEY_TUNER</livetv>
<mytv>KEY_TV</mytv>
+ <mytv>KEY_PVR</mytv>
<teletext>KEY_TEXT</teletext>

View File

@ -1,840 +0,0 @@
From 17db313334d564b34e00154e6d3d5cf6163c13fb Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Mon, 23 Mar 2015 17:12:31 +0000
Subject: [PATCH 1/6] [ffmpeg] Add support for libdcadec
---
Makefile.in | 2 +-
configure.ac | 4 +
tools/depends/target/Makefile | 4 +-
.../0001-avcodec-add-libdcadec-decoder.patch | 280 +++++++++++++++++++++
.../0002-avcodec-Fix-libdcadec-include-dir.patch | 40 +++
...vcodec-add-profile-define-for-DTS-Express.patch | 25 ++
tools/depends/target/ffmpeg/Makefile | 7 +-
tools/depends/target/libdcadec/Makefile | 38 +++
8 files changed, 396 insertions(+), 4 deletions(-)
create mode 100644 tools/depends/target/ffmpeg/0001-avcodec-add-libdcadec-decoder.patch
create mode 100644 tools/depends/target/ffmpeg/0002-avcodec-Fix-libdcadec-include-dir.patch
create mode 100644 tools/depends/target/ffmpeg/0003-avcodec-add-profile-define-for-DTS-Express.patch
create mode 100644 tools/depends/target/libdcadec/Makefile
diff --git a/Makefile.in b/Makefile.in
index 7ed7c37..4a8aeef 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -445,7 +445,7 @@ FFMPEGOBJS = @FFMPEG_LIBDIR@/libavcodec.a \
@FFMPEG_LIBDIR@/libpostproc.a \
@FFMPEG_LIBDIR@/libswscale.a
DYNOBJSXBMC+= $(FFMPEGOBJS)
-LIBS+= @GNUTLS_ALL_LIBS@ @VORBISENC_ALL_LIBS@
+LIBS+= @GNUTLS_ALL_LIBS@ @VORBISENC_ALL_LIBS@ @DCADEC_ALL_LIBS@
$(FFMPEGOBJS): dvdpcodecs
endif
diff --git a/configure.ac b/configure.ac
index cf18212..ad9ae6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1088,6 +1088,7 @@ AC_CHECK_HEADER([mpeg2dec/mpeg2convert.h],, AC_MSG_ERROR($missing_library),
AC_CHECK_HEADER([jpeglib.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([ogg/ogg.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([vorbis/vorbisfile.h],, AC_MSG_ERROR($missing_library))
+AC_CHECK_HEADER([libdcadec/dca_context.h],, AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([LIBCURL], [libcurl],, AC_MSG_ERROR([libcurl not found]))
XB_FIND_SONAME([CURL], [curl])
@@ -1119,6 +1120,7 @@ PKG_CHECK_MODULES([GNUTLS], [gnutls], [have_gnutls=yes];AC_DEFINE([HAVE_GNUTLS],
AC_CHECK_LIB([bz2], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([jpeg], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
AC_CHECK_LIB([tiff], [main],, AC_MSG_ERROR($missing_library))
+AC_CHECK_LIB([dcadec], [main],, AC_MSG_ERROR($missing_library))
if echo "$ARCH" | grep -q freebsd; then
AC_CHECK_LIB([pthread], [main],LIBS="-pthread $LIBS", AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([pthread], [pthread_set_name_np],
@@ -1806,6 +1808,7 @@ if test "${USE_STATIC_FFMPEG}" = "1"; then
FFMPEG_LIBDIR=${pkg_cfg_prefix}$(PKG_CONFIG_SYSROOT_DIR="" ${PKG_CONFIG} --static --variable=libdir libavcodec)
GNUTLS_ALL_LIBS=$(${PKG_CONFIG} --static --libs-only-l --silence-errors gnutls)
VORBISENC_ALL_LIBS=$(${PKG_CONFIG} --static --libs-only-l --silence-errors vorbisenc)
+ DCADEC_ALL_LIBS=$(${PKG_CONFIG} --static --libs-only-l --silence-errors dcadec)
# check if static libs are available
for ff_lib in ${ff_libs}; do
@@ -2630,6 +2633,7 @@ AC_SUBST(FFMPEG_LIBDIR)
AC_SUBST(USE_STATIC_FFMPEG)
AC_SUBST(GNUTLS_ALL_LIBS)
AC_SUBST(VORBISENC_ALL_LIBS)
+AC_SUBST(DCADEC_ALL_LIBS)
AC_SUBST(USE_TOUCH_SKIN)
AC_SUBST(USE_LIBAV_HACKS)
AC_SUBST(PYTHON_VERSION)
diff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile
index 915de85..5d85ca8 100644
--- a/tools/depends/target/Makefile
+++ b/tools/depends/target/Makefile
@@ -15,7 +15,7 @@ DEPENDS = \
python26 libshairplay \
libplist libcec libbluray boost tinyxml dummy-libxbmc \
libamplayer libssh taglib libusb libnfs libmp3lame \
- pythonmodule-pil libxslt ffmpeg platform
+ pythonmodule-pil libxslt ffmpeg platform libdcadec
FFMPEG_DEPENDS = gnutls
@@ -96,7 +96,7 @@ nettle: gmp
pythonmodule-pil: $(ZLIB) libjpeg-turbo libpng freetype2 python26
libsdl2: $(LINUX_SYSTEM_LIBS)
libxslt: libgcrypt
-ffmpeg: $(ICONV) $(ZLIB) bzip2 libvorbis $(FFMPEG_DEPENDS)
+ffmpeg: $(ICONV) $(ZLIB) bzip2 libvorbis libdcadec $(FFMPEG_DEPENDS)
libcec: platform
.installed-$(PLATFORM): $(DEPENDS)
diff --git a/tools/depends/target/ffmpeg/0001-avcodec-add-libdcadec-decoder.patch b/tools/depends/target/ffmpeg/0001-avcodec-add-libdcadec-decoder.patch
new file mode 100644
index 0000000..c0c2ac1
--- /dev/null
+++ b/tools/depends/target/ffmpeg/0001-avcodec-add-libdcadec-decoder.patch
@@ -0,0 +1,280 @@
+From 519868de7d9c99876efcaf57d6a9683c22732cde Mon Sep 17 00:00:00 2001
+From: Hendrik Leppkes <h.leppkes@gmail.com>
+Date: Thu, 19 Mar 2015 23:56:22 +0100
+Subject: [PATCH] avcodec: add libdcadec decoder
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ configure | 4 +
+ libavcodec/Makefile | 1 +
+ libavcodec/allcodecs.c | 1 +
+ libavcodec/libdcadec.c | 197 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 203 insertions(+)
+ create mode 100644 libavcodec/libdcadec.c
+
+diff --git a/configure b/configure
+index 1bf8f80..a449bc7 100755
+--- a/configure
++++ b/configure
+@@ -210,6 +210,7 @@ External library support:
+ --enable-libcdio enable audio CD grabbing with libcdio [no]
+ --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
+ and libraw1394 [no]
++ --enable-libdcadec enable DCA decoding via libdcadec [no]
+ --enable-libfaac enable AAC encoding via libfaac [no]
+ --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
+ --enable-libflite enable flite (voice synthesis) support via libflite [no]
+@@ -1353,6 +1354,7 @@ EXTERNAL_LIBRARY_LIST="
+ libcdio
+ libcelt
+ libdc1394
++ libdcadec
+ libfaac
+ libfdk_aac
+ libflite
+@@ -2359,6 +2361,7 @@ vc1_parser_select="mpegvideo startcode vc1_decoder"
+ # external libraries
+ libaacplus_encoder_deps="libaacplus"
+ libcelt_decoder_deps="libcelt"
++libdcadec_decoder_deps="libdcadec"
+ libfaac_encoder_deps="libfaac"
+ libfaac_encoder_select="audio_frame_queue"
+ libfdk_aac_decoder_deps="libfdk_aac"
+@@ -4922,6 +4925,7 @@ enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
+ { check_lib celt/celt.h celt_decoder_create_custom -lcelt0 ||
+ die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
+ enabled libcaca && require_pkg_config caca caca.h caca_create_canvas
++enabled libdcadec && require libdcadec dca_context.h dcadec_context_create -ldcadec
+ enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
+ enabled libfdk_aac && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac
+ flite_libs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
+diff --git a/libavcodec/Makefile b/libavcodec/Makefile
+index 4173f88..1a0c734 100644
+--- a/libavcodec/Makefile
++++ b/libavcodec/Makefile
+@@ -732,6 +732,7 @@ OBJS-$(CONFIG_ELBG_FILTER) += elbg.o
+ # external codec libraries
+ OBJS-$(CONFIG_LIBAACPLUS_ENCODER) += libaacplus.o
+ OBJS-$(CONFIG_LIBCELT_DECODER) += libcelt_dec.o
++OBJS-$(CONFIG_LIBDCADEC_DECODER) += libdcadec.o
+ OBJS-$(CONFIG_LIBFAAC_ENCODER) += libfaac.o
+ OBJS-$(CONFIG_LIBFDK_AAC_DECODER) += libfdk-aacdec.o
+ OBJS-$(CONFIG_LIBFDK_AAC_ENCODER) += libfdk-aacenc.o
+diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
+index 5194e74..bbf70a6 100644
+--- a/libavcodec/allcodecs.c
++++ b/libavcodec/allcodecs.c
+@@ -512,6 +512,7 @@ void avcodec_register_all(void)
+
+ /* external libraries */
+ REGISTER_DECODER(LIBCELT, libcelt);
++ REGISTER_DECODER(LIBDCADEC, libdcadec)
+ REGISTER_ENCODER(LIBFAAC, libfaac);
+ REGISTER_ENCDEC (LIBFDK_AAC, libfdk_aac);
+ REGISTER_ENCDEC (LIBGSM, libgsm);
+diff --git a/libavcodec/libdcadec.c b/libavcodec/libdcadec.c
+new file mode 100644
+index 0000000..d060db5
+--- /dev/null
++++ b/libavcodec/libdcadec.c
+@@ -0,0 +1,197 @@
++/*
++ * libdcadec decoder wrapper
++ * Copyright (C) 2015 Hendrik Leppkes
++ *
++ * This file is part of FFmpeg.
++ *
++ * FFmpeg is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * FFmpeg is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with FFmpeg; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#include <dca_context.h>
++
++#include "libavutil/avassert.h"
++#include "libavutil/channel_layout.h"
++#include "libavutil/common.h"
++#include "libavutil/opt.h"
++#include "avcodec.h"
++#include "dca.h"
++#include "dca_syncwords.h"
++#include "internal.h"
++
++typedef struct DCADecContext {
++ struct dcadec_context *ctx;
++ uint8_t *buffer;
++ int buffer_size;
++} DCADecContext;
++
++static int dcadec_decode_frame(AVCodecContext *avctx, void *data,
++ int *got_frame_ptr, AVPacket *avpkt)
++{
++ DCADecContext *s = avctx->priv_data;
++ AVFrame *frame = data;
++ int ret, i, k;
++ int **samples, nsamples, channel_mask, sample_rate, bits_per_sample, profile;
++ uint32_t mrk;
++ uint8_t *input = avpkt->data;
++ int input_size = avpkt->size;
++
++ /* convert bytestream syntax to RAW BE format if required */
++ mrk = AV_RB32(input);
++ if (mrk != DCA_SYNCWORD_CORE_BE && mrk != DCA_SYNCWORD_SUBSTREAM) {
++ s->buffer = av_fast_realloc(s->buffer, &s->buffer_size, avpkt->size + FF_INPUT_BUFFER_PADDING_SIZE);
++ if (!s->buffer)
++ return AVERROR(ENOMEM);
++
++ if ((ret = avpriv_dca_convert_bitstream(avpkt->data, avpkt->size, s->buffer, s->buffer_size)) < 0)
++ return ret;
++
++ input = s->buffer;
++ input_size = ret;
++ }
++
++ if ((ret = dcadec_context_parse(s->ctx, input, input_size)) < 0) {
++ av_log(avctx, AV_LOG_ERROR, "dcadec_context_parse() failed: %d (%s)\n", -ret, dcadec_strerror(ret));
++ return AVERROR_EXTERNAL;
++ }
++ if ((ret = dcadec_context_filter(s->ctx, &samples, &nsamples, &channel_mask,
++ &sample_rate, &bits_per_sample, &profile)) < 0) {
++ av_log(avctx, AV_LOG_ERROR, "dcadec_context_filter() failed: %d (%s)\n", -ret, dcadec_strerror(ret));
++ return AVERROR_EXTERNAL;
++ }
++
++ avctx->channels = av_get_channel_layout_nb_channels(channel_mask);
++ avctx->channel_layout = channel_mask;
++ avctx->sample_rate = sample_rate;
++
++ av_assert0(bits_per_sample >= 16 && bits_per_sample <= 24);
++ if (bits_per_sample == 16)
++ avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
++ else
++ avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
++
++ avctx->bits_per_raw_sample = bits_per_sample;
++
++ switch (profile) {
++ case DCADEC_PROFILE_DS:
++ avctx->profile = FF_PROFILE_DTS;
++ break;
++ case DCADEC_PROFILE_DS_96_24:
++ avctx->profile = FF_PROFILE_DTS_96_24;
++ break;
++ case DCADEC_PROFILE_DS_ES:
++ avctx->profile = FF_PROFILE_DTS_ES;
++ break;
++ case DCADEC_PROFILE_HD_HRA:
++ avctx->profile = FF_PROFILE_DTS_HD_HRA;
++ break;
++ case DCADEC_PROFILE_HD_MA:
++ avctx->profile = FF_PROFILE_DTS_HD_MA;
++ break;
++ case DCADEC_PROFILE_EXPRESS:
++ avctx->profile = FF_PROFILE_DTS_EXPRESS;
++ break;
++ case DCADEC_PROFILE_UNKNOWN:
++ default:
++ avctx->profile = FF_PROFILE_UNKNOWN;
++ break;
++ }
++
++ /* bitrate is only meaningful if there are no HD extensions, as they distort the bitrate */
++ if (profile == DCADEC_PROFILE_DS || profile == DCADEC_PROFILE_DS_96_24 || profile == DCADEC_PROFILE_DS_ES) {
++ struct dcadec_core_info *info = dcadec_context_get_core_info(s->ctx);
++ avctx->bit_rate = info->bit_rate;
++ dcadec_context_free_core_info(info);
++ } else
++ avctx->bit_rate = 0;
++
++ frame->nb_samples = nsamples;
++ if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
++ return ret;
++
++ for (i = 0; i < avctx->channels; i++) {
++ if (frame->format == AV_SAMPLE_FMT_S16P) {
++ int16_t *plane = (int16_t *)frame->extended_data[i];
++ for (k = 0; k < nsamples; k++)
++ plane[k] = samples[i][k];
++ } else {
++ int32_t *plane = (int32_t *)frame->extended_data[i];
++ int shift = 32 - bits_per_sample;
++ for (k = 0; k < nsamples; k++)
++ plane[k] = samples[i][k] << shift;
++ }
++ }
++
++ *got_frame_ptr = 1;
++
++ return avpkt->size;
++}
++
++static av_cold void dcadec_flush(AVCodecContext *avctx)
++{
++ DCADecContext *s = avctx->priv_data;
++ dcadec_context_clear(s->ctx);
++}
++
++static av_cold int dcadec_close(AVCodecContext *avctx)
++{
++ DCADecContext *s = avctx->priv_data;
++
++ dcadec_context_destroy(s->ctx);
++ s->ctx = NULL;
++
++ av_freep(&s->buffer);
++
++ return 0;
++}
++
++static av_cold int dcadec_init(AVCodecContext *avctx)
++{
++ DCADecContext *s = avctx->priv_data;
++
++ s->ctx = dcadec_context_create(0);
++ if (!s->ctx)
++ return AVERROR(ENOMEM);
++
++ avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
++ avctx->bits_per_raw_sample = 24;
++
++ return 0;
++}
++
++static const AVProfile profiles[] = {
++ { FF_PROFILE_DTS, "DTS" },
++ { FF_PROFILE_DTS_ES, "DTS-ES" },
++ { FF_PROFILE_DTS_96_24, "DTS 96/24" },
++ { FF_PROFILE_DTS_HD_HRA, "DTS-HD HRA" },
++ { FF_PROFILE_DTS_HD_MA, "DTS-HD MA" },
++ { FF_PROFILE_DTS_EXPRESS, "DTS Express" },
++ { FF_PROFILE_UNKNOWN },
++};
++
++AVCodec ff_libdcadec_decoder = {
++ .name = "libdcadec",
++ .long_name = NULL_IF_CONFIG_SMALL("dcadec DCA decoder"),
++ .type = AVMEDIA_TYPE_AUDIO,
++ .id = AV_CODEC_ID_DTS,
++ .priv_data_size = sizeof(DCADecContext),
++ .init = dcadec_init,
++ .decode = dcadec_decode_frame,
++ .close = dcadec_close,
++ .flush = dcadec_flush,
++ .capabilities = CODEC_CAP_DR1 | CODEC_CAP_CHANNEL_CONF,
++ .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_S16P,
++ AV_SAMPLE_FMT_NONE },
++ .profiles = NULL_IF_CONFIG_SMALL(profiles),
++};
+--
+1.9.1
+
diff --git a/tools/depends/target/ffmpeg/0002-avcodec-Fix-libdcadec-include-dir.patch b/tools/depends/target/ffmpeg/0002-avcodec-Fix-libdcadec-include-dir.patch
new file mode 100644
index 0000000..b4db15d
--- /dev/null
+++ b/tools/depends/target/ffmpeg/0002-avcodec-Fix-libdcadec-include-dir.patch
@@ -0,0 +1,40 @@
+From 4f3c31df3f569c7171ee9e651ddf479690367b9b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <kasper93@gmail.com>
+Date: Fri, 20 Mar 2015 01:58:25 +0100
+Subject: [PATCH] avcodec: Fix libdcadec include dir
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ configure | 2 +-
+ libavcodec/libdcadec.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index a449bc7..1ef83e3 100755
+--- a/configure
++++ b/configure
+@@ -4925,7 +4925,7 @@ enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
+ { check_lib celt/celt.h celt_decoder_create_custom -lcelt0 ||
+ die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
+ enabled libcaca && require_pkg_config caca caca.h caca_create_canvas
+-enabled libdcadec && require libdcadec dca_context.h dcadec_context_create -ldcadec
++enabled libdcadec && require libdcadec libdcadec/dca_context.h dcadec_context_create -ldcadec
+ enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
+ enabled libfdk_aac && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac
+ flite_libs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
+diff --git a/libavcodec/libdcadec.c b/libavcodec/libdcadec.c
+index d060db5..a28b983 100644
+--- a/libavcodec/libdcadec.c
++++ b/libavcodec/libdcadec.c
+@@ -19,7 +19,7 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+-#include <dca_context.h>
++#include <libdcadec/dca_context.h>
+
+ #include "libavutil/avassert.h"
+ #include "libavutil/channel_layout.h"
+--
+1.9.1
+
diff --git a/tools/depends/target/ffmpeg/0003-avcodec-add-profile-define-for-DTS-Express.patch b/tools/depends/target/ffmpeg/0003-avcodec-add-profile-define-for-DTS-Express.patch
new file mode 100644
index 0000000..1550538
--- /dev/null
+++ b/tools/depends/target/ffmpeg/0003-avcodec-add-profile-define-for-DTS-Express.patch
@@ -0,0 +1,25 @@
+From 11fe56c8bbf39cd0c3edbf0cd404dea400ff7e0c Mon Sep 17 00:00:00 2001
+From: Hendrik Leppkes <h.leppkes@gmail.com>
+Date: Thu, 19 Mar 2015 23:45:39 +0100
+Subject: [PATCH] avcodec: add profile define for DTS Express
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/avcodec.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
+index cdc8aa1..48e212f 100644
+--- a/libavcodec/avcodec.h
++++ b/libavcodec/avcodec.h
+@@ -2851,6 +2851,7 @@ typedef struct AVCodecContext {
+ #define FF_PROFILE_DTS_96_24 40
+ #define FF_PROFILE_DTS_HD_HRA 50
+ #define FF_PROFILE_DTS_HD_MA 60
++#define FF_PROFILE_DTS_EXPRESS 70
+
+ #define FF_PROFILE_MPEG2_422 0
+ #define FF_PROFILE_MPEG2_HIGH 1
+--
+1.9.1
+
diff --git a/tools/depends/target/ffmpeg/Makefile b/tools/depends/target/ffmpeg/Makefile
index 711182f..24480b2 100644
--- a/tools/depends/target/ffmpeg/Makefile
+++ b/tools/depends/target/ffmpeg/Makefile
@@ -1,6 +1,7 @@
include ../../Makefile.include
include FFMPEG-VERSION
-DEPS= ../../Makefile.include FFMPEG-VERSION Makefile
+DEPS= ../../Makefile.include FFMPEG-VERSION Makefile \
+ 0001-avcodec-add-libdcadec-decoder.patch 0002-avcodec-Fix-libdcadec-include-dir.patch 0003-avcodec-add-profile-define-for-DTS-Express.patch
# set to "yes" to enable patching
# we don't apply patches until we move to a vanilla ffmpeg tarball
@@ -55,6 +56,7 @@ endif
ifeq ($(Configuration), Release)
ffmpg_config += --disable-debug
endif
+ffmpg_config += --enable-libdcadec --disable-decoder=dca
CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
@@ -68,6 +70,9 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(PLATFORM); sed -i".bak" -e "s%pkg_config_default=pkg-config%export PKG_CONFIG_LIBDIR=$(PREFIX)/lib/pkgconfig \&\& pkg_config_default=$(NATIVEPREFIX)/bin/pkg-config%" configure
+ cd $(PLATFORM); patch -p1 < ../0001-avcodec-add-libdcadec-decoder.patch
+ cd $(PLATFORM); patch -p1 < ../0002-avcodec-Fix-libdcadec-include-dir.patch
+ cd $(PLATFORM); patch -p1 < ../0003-avcodec-add-profile-define-for-DTS-Express.patch
cd $(PLATFORM);\
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \
./configure $(ffmpg_config)
diff --git a/tools/depends/target/libdcadec/Makefile b/tools/depends/target/libdcadec/Makefile
new file mode 100644
index 0000000..e68ec46
--- /dev/null
+++ b/tools/depends/target/libdcadec/Makefile
@@ -0,0 +1,38 @@
+include ../../Makefile.include
+DEPS= ../../Makefile.include Makefile
+
+# lib name, version
+LIBNAME=dcadec
+ARCHIVE=master.tar.gz
+BASE_URL=https://github.com/foo86/dcadec/archive
+
+# configuration settings
+
+LIBDYLIB=$(PLATFORM)/.libs/lib$(LIBNAME).a
+
+CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
+
+CFLAGS += -std=gnu99
+
+all: $(LIBDYLIB) .installed-$(PLATFORM)
+
+$(TARBALLS_LOCATION)/$(ARCHIVE):
+ cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
+
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
+ rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
+ cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+
+$(LIBDYLIB): $(PLATFORM)
+ $(MAKE) -C $(PLATFORM) PREFIX=$(PREFIX) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" AR="$(AR)"
+
+.installed-$(PLATFORM): $(LIBDYLIB)
+ $(MAKE) -C $(PLATFORM) PREFIX=$(PREFIX) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" AR="$(AR)" install
+ touch $@
+
+clean:
+ $(MAKE) -C $(PLATFORM) clean
+ rm -f .installed-$(PLATFORM)
+
+distclean::
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
From bdf128de10eb980a68d8382df8f8621a61e020d1 Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger@gmail.com>
Date: Mon, 23 Mar 2015 22:33:04 +0000
Subject: [PATCH 2/6] [dcadec] Add settings option to enable libdcadec
---
addons/resource.language.en_gb/resources/strings.po | 10 ++++++++++
system/settings/imx6.xml | 20 ++++++++++++++++++++
system/settings/rbp.xml | 5 +++++
system/settings/rbp2.xml | 5 +++++
tools/depends/target/ffmpeg/Makefile | 2 +-
.../DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp | 14 ++++++++++++--
xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 15 +++++++++++++++
xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp | 10 ++++++++--
8 files changed, 76 insertions(+), 5 deletions(-)
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index 6a6f0a3..3ab966d 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -16541,3 +16541,13 @@ msgstr ""
msgctxt "#38016"
msgid "%d fps"
msgstr ""
+
+#: system/settings/rbp.xml system/settings/imx6.xml
+msgctxt "#38120"
+msgid "Support 8 channel DTS-HD audio decoding"
+msgstr ""
+
+#: system/settings/rbp.xml system/settings/imx6.xml
+msgctxt "#38121"
+msgid "Enables decoding of high quality DTS-HD audio streams. Note: This increases CPU load and is only available when DTS and DTS-HD audio passthrough are disabled."
+msgstr ""
diff --git a/system/settings/imx6.xml b/system/settings/imx6.xml
index d8b17c3..bdb5eb8 100644
--- a/system/settings/imx6.xml
+++ b/system/settings/imx6.xml
@@ -13,6 +13,26 @@
</setting>
</group>
</category>
+ <category id="audiooutput">
+ <group id="1">
+ <setting id="audiooutput.supportdtshdcpudecoding" type="boolean" label="38120" help="38121">
+ <level>2</level>
+ <default>false</default>
+ <control type="toggle" />
+ <dependencies>
+ <dependency type="enable">
+ <or>
+ <condition setting="audiooutput.passthrough" operator="is">false</condition>
+ <and>
+ <condition setting="audiooutput.dtshdpassthrough" operator="is">false</condition>
+ <condition setting="audiooutput.dtspassthrough" operator="is">false</condition>
+ </and>
+ </or>
+ </dependency>
+ </dependencies>
+ </setting>
+ </group>
+ </category>
</section>
<section id="videos">
<category id="videoacceleration">
diff --git a/system/settings/rbp.xml b/system/settings/rbp.xml
index 50fe36a..52703e9 100644
--- a/system/settings/rbp.xml
+++ b/system/settings/rbp.xml
@@ -76,6 +76,11 @@
<setting id="audiooutput.processquality">
<default>101</default> <!-- AE_QUALITY_GPU -->
</setting>
+ <setting id="audiooutput.supportdtshdcpudecoding" type="boolean" label="38120" help="38121">
+ <level>2</level>
+ <default>false</default>
+ <control type="toggle" />
+ </setting>
</group>
<group id="3">
<setting id="audiooutput.ac3transcode" help="37024">
diff --git a/system/settings/rbp2.xml b/system/settings/rbp2.xml
index 8cc8f19..b29a428 100644
--- a/system/settings/rbp2.xml
+++ b/system/settings/rbp2.xml
@@ -19,6 +19,11 @@
</group>
</category>
<category id="audiooutput">
+ <group id="1">
+ <setting id="audiooutput.supportdtshdcpudecoding">
+ <default>true</default>
+ </setting>
+ </group>
<group id="3">
<setting id="audiooutput.ac3transcode" help="36429">
</setting>
diff --git a/tools/depends/target/ffmpeg/Makefile b/tools/depends/target/ffmpeg/Makefile
index 24480b2..1e20602 100644
--- a/tools/depends/target/ffmpeg/Makefile
+++ b/tools/depends/target/ffmpeg/Makefile
@@ -56,7 +56,7 @@ endif
ifeq ($(Configuration), Release)
ffmpg_config += --disable-debug
endif
-ffmpg_config += --enable-libdcadec --disable-decoder=dca
+ffmpg_config += --enable-libdcadec
CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp
index 991449b..e6553dd 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp
@@ -33,6 +33,7 @@ extern "C" {
#include "settings/Settings.h"
#include "cores/AudioEngine/Utils/AEUtil.h"
#endif
+#include "settings/Settings.h"
CDVDAudioCodecFFmpeg::CDVDAudioCodecFFmpeg() : CDVDAudioCodec()
{
@@ -54,10 +55,19 @@ CDVDAudioCodecFFmpeg::~CDVDAudioCodecFFmpeg()
bool CDVDAudioCodecFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
{
- AVCodec* pCodec;
+ AVCodec* pCodec = NULL;
m_bOpenedCodec = false;
- pCodec = avcodec_find_decoder(hints.codec);
+ bool allow_dtshd_decoding = true;
+#if defined(TARGET_RASPBERRY_PI) || defined(HAS_IMXVPU) || defined(HAS_LIBAMCODEC)
+ allow_dtshd_decoding = CSettings::Get().GetBool("audiooutput.supportdtshdcpudecoding");
+#endif
+ if (hints.codec == AV_CODEC_ID_DTS && allow_dtshd_decoding)
+ pCodec = avcodec_find_decoder_by_name("libdcadec");
+
+ if (!pCodec)
+ pCodec = avcodec_find_decoder(hints.codec);
+
if (!pCodec)
{
CLog::Log(LOGDEBUG,"CDVDAudioCodecFFmpeg::Open() Unable to find codec %d", hints.codec);
diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
index 74ff31f..6a97135 100644
--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
@@ -439,6 +439,21 @@ bool CDVDDemuxFFmpeg::Open(CDVDInputStream* pInput, bool streaminfo, bool filein
if (m_streaminfo)
{
+#if defined(TARGET_RASPBERRY_PI) || defined(HAS_IMXVPU) || defined(HAS_LIBAMCODEC)
+ if (CSettings::Get().GetBool("audiooutput.supportdtshdcpudecoding"))
+#endif
+ {
+ for (unsigned int i = 0; i < m_pFormatContext->nb_streams; i++)
+ {
+ AVStream *st = m_pFormatContext->streams[i];
+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->codec->codec_id == AV_CODEC_ID_DTS)
+ {
+ AVCodec* pCodec = avcodec_find_decoder_by_name("libdcadec");
+ if (pCodec)
+ st->codec->codec = pCodec;
+ }
+ }
+ }
/* to speed up dvd switches, only analyse very short */
if(m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD))
av_opt_set_int(m_pFormatContext, "analyzeduration", 500000, 0);
diff --git a/xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp b/xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp
index 1a920f7..075f728 100644
--- a/xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp
+++ b/xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp
@@ -26,6 +26,7 @@
#include "cores/AudioEngine/Utils/AEUtil.h"
#include "cores/AudioEngine/AEFactory.h"
+#include "settings/Settings.h"
// the size of the audio_render output port buffers
#define AUDIO_DECODE_OUTPUT_BUFFER (32*1024)
@@ -62,10 +63,15 @@ COMXAudioCodecOMX::~COMXAudioCodecOMX()
bool COMXAudioCodecOMX::Open(CDVDStreamInfo &hints)
{
- AVCodec* pCodec;
+ AVCodec* pCodec = NULL;
m_bOpenedCodec = false;
- pCodec = avcodec_find_decoder(hints.codec);
+ if (hints.codec == AV_CODEC_ID_DTS && CSettings::Get().GetBool("audiooutput.supportdtshdcpudecoding"))
+ pCodec = avcodec_find_decoder_by_name("libdcadec");
+
+ if (!pCodec)
+ pCodec = avcodec_find_decoder(hints.codec);
+
if (!pCodec)
{
CLog::Log(LOGDEBUG,"COMXAudioCodecOMX::Open() Unable to find codec %d", hints.codec);
From 61fac1c7999532e4595ef9101c83074937dddabb Mon Sep 17 00:00:00 2001
From: wsnipex <wsnipex@a1.net>
Date: Wed, 13 May 2015 20:00:31 +0200
Subject: [PATCH 3/6] [configure] use pkg-config to detect dcadec
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index ad9ae6d..600325a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1088,7 +1088,7 @@ AC_CHECK_HEADER([mpeg2dec/mpeg2convert.h],, AC_MSG_ERROR($missing_library),
AC_CHECK_HEADER([jpeglib.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([ogg/ogg.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([vorbis/vorbisfile.h],, AC_MSG_ERROR($missing_library))
-AC_CHECK_HEADER([libdcadec/dca_context.h],, AC_MSG_ERROR($missing_library))
+PKG_CHECK_MODULES([LIBDCADEC], [dcadec],, AC_MSG_ERROR([libdcadec not found]))
PKG_CHECK_MODULES([LIBCURL], [libcurl],, AC_MSG_ERROR([libcurl not found]))
XB_FIND_SONAME([CURL], [curl])
From 035084e5c09555005aa045f67a282cecceb98900 Mon Sep 17 00:00:00 2001
From: wsnipex <wsnipex@a1.net>
Date: Wed, 13 May 2015 20:02:38 +0200
Subject: [PATCH 4/6] [ffmpeg] enabled dcadec for linux standalone builds
---
tools/depends/target/ffmpeg/autobuild.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/depends/target/ffmpeg/autobuild.sh b/tools/depends/target/ffmpeg/autobuild.sh
index 196c347..b9bfd57 100755
--- a/tools/depends/target/ffmpeg/autobuild.sh
+++ b/tools/depends/target/ffmpeg/autobuild.sh
@@ -159,6 +159,7 @@ CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" \
--disable-mips32r2 \
--disable-mipsdspr1 \
--disable-mipsdspr2 \
+ --enable-libdcadec \
${FLAGS}
make -j ${BUILDTHREADS}
From d89c29002ab09708540055f214823836e2c74c00 Mon Sep 17 00:00:00 2001
From: wsnipex <wsnipex@a1.net>
Date: Wed, 13 May 2015 20:12:31 +0200
Subject: [PATCH 5/6] [depends] use a tarball from mirrors for dcadec
---
tools/depends/target/libdcadec/Makefile | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/depends/target/libdcadec/Makefile b/tools/depends/target/libdcadec/Makefile
index e68ec46..4c98063 100644
--- a/tools/depends/target/libdcadec/Makefile
+++ b/tools/depends/target/libdcadec/Makefile
@@ -2,9 +2,10 @@ include ../../Makefile.include
DEPS= ../../Makefile.include Makefile
# lib name, version
-LIBNAME=dcadec
-ARCHIVE=master.tar.gz
-BASE_URL=https://github.com/foo86/dcadec/archive
+LIBNAME=libdcadec
+VERSION=git-396e75652
+SOURCE=$(LIBNAME)-$(VERSION)
+ARCHIVE=$(SOURCE).tar.gz
# configuration settings
From faceb91945a9064e26c55c83d9944d20f538da0d Mon Sep 17 00:00:00 2001
From: wsnipex <wsnipex@a1.net>
Date: Wed, 13 May 2015 20:18:09 +0200
Subject: [PATCH 6/6] [docs] add dcadec to linux README
---
docs/README.linux | 2 +-
docs/README.ubuntu | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/README.linux b/docs/README.linux
index ee64baf..732d606 100644
--- a/docs/README.linux
+++ b/docs/README.linux
@@ -44,7 +44,7 @@ that are used to build Kodi packages on Debian/Ubuntu (with all supported
external libraries enabled).
Build-Depends: autoconf, automake, autopoint, autotools-dev, cmake, curl,
- debhelper (>= 7.0.50~), default-jre, gawk, gperf, libao-dev, libasound2-dev,
+ dcadec-dev, default-jre, gawk, gperf, libao-dev, libasound2-dev,
libass-dev (>= 0.9.8), libavahi-client-dev, libavahi-common-dev, libbluetooth-dev,
libbluray-dev, libboost-dev, libboost-thread-dev, libbz2-dev, libcap-dev, libcdio-dev,
libcec-dev, libcurl4-gnutls-dev | libcurl4-openssl-dev | libcurl-dev, libcwiid-dev,
diff --git a/docs/README.ubuntu b/docs/README.ubuntu
index 10f1611..0369f83 100644
--- a/docs/README.ubuntu
+++ b/docs/README.ubuntu
@@ -82,7 +82,7 @@ Tip: For those with multiple computers at home is to try out distcc
For Ubuntu (all versions >= 7.04):
- $ sudo apt-get install automake bison build-essential cmake curl cvs default-jre fp-compiler gawk gdc gettext git-core gperf libasound2-dev libass-dev libboost-dev libboost-thread-dev libbz2-dev libcap-dev libcdio-dev libcurl3 libcurl4-gnutls-dev libdbus-1-dev libfontconfig-dev libfreetype6-dev libfribidi-dev libgif-dev libglew-dev libiso9660-dev libjasper-dev libjpeg-dev liblzo2-dev libmicrohttpd-dev libmodplug-dev libmpeg2-4-dev libmpeg3-dev libmysqlclient-dev libnfs-dev libogg-dev libpcre3-dev libplist-dev libpng-dev libpulse-dev libsdl2-dev libsmbclient-dev libsqlite3-dev libssh-dev libssl-dev libtiff-dev libtinyxml-dev libtool libudev-dev libusb-dev libva-dev libvdpau-dev libvorbis-dev libvorbisenc2 libxml2-dev libxmu-dev libxrandr-dev libxrender-dev libxslt1-dev libxt-dev libyajl-dev mesa-utils nasm pmount python-dev python-imaging python-sqlite swig unzip yasm zip zlib1g-dev
+ $ sudo apt-get install automake bison build-essential cmake curl cvs dcadec-dev default-jre fp-compiler gawk gdc gettext git-core gperf libasound2-dev libass-dev libboost-dev libboost-thread-dev libbz2-dev libcap-dev libcdio-dev libcurl3 libcurl4-gnutls-dev libdbus-1-dev libfontconfig-dev libfreetype6-dev libfribidi-dev libgif-dev libglew-dev libiso9660-dev libjasper-dev libjpeg-dev liblzo2-dev libmicrohttpd-dev libmodplug-dev libmpeg2-4-dev libmpeg3-dev libmysqlclient-dev libnfs-dev libogg-dev libpcre3-dev libplist-dev libpng-dev libpulse-dev libsdl2-dev libsmbclient-dev libsqlite3-dev libssh-dev libssl-dev libtiff-dev libtinyxml-dev libtool libudev-dev libusb-dev libva-dev libvdpau-dev libvorbis-dev libvorbisenc2 libxml2-dev libxmu-dev libxrandr-dev libxrender-dev libxslt1-dev libxt-dev libyajl-dev mesa-utils nasm pmount python-dev python-imaging python-sqlite swig unzip yasm zip zlib1g-dev
For >= 10.10:
$ sudo apt-get install autopoint libltdl-dev

View File

@ -1,34 +0,0 @@
From a3b0b1fd46d726d93303f823dacf69977f34d9ae Mon Sep 17 00:00:00 2001
From: Stephan Raue <stephan@openelec.tv>
Date: Sat, 16 May 2015 11:47:58 +0200
Subject: [PATCH] configure.ac: dont break if dcadec is missing, dcadec is a
ffmpeg dep
---
configure.ac | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 600325a..9daa246 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1088,7 +1088,7 @@ AC_CHECK_HEADER([mpeg2dec/mpeg2convert.h],, AC_MSG_ERROR($missing_library),
AC_CHECK_HEADER([jpeglib.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([ogg/ogg.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([vorbis/vorbisfile.h],, AC_MSG_ERROR($missing_library))
-PKG_CHECK_MODULES([LIBDCADEC], [dcadec],, AC_MSG_ERROR([libdcadec not found]))
+PKG_CHECK_MODULES([LIBDCADEC], [dcadec],, AC_MSG_WARN([dcadec not found]))
PKG_CHECK_MODULES([LIBCURL], [libcurl],, AC_MSG_ERROR([libcurl not found]))
XB_FIND_SONAME([CURL], [curl])
@@ -1120,7 +1120,6 @@ PKG_CHECK_MODULES([GNUTLS], [gnutls], [have_gnutls=yes];AC_DEFINE([HAVE_GNUTLS],
AC_CHECK_LIB([bz2], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([jpeg], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
AC_CHECK_LIB([tiff], [main],, AC_MSG_ERROR($missing_library))
-AC_CHECK_LIB([dcadec], [main],, AC_MSG_ERROR($missing_library))
if echo "$ARCH" | grep -q freebsd; then
AC_CHECK_LIB([pthread], [main],LIBS="-pthread $LIBS", AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([pthread], [pthread_set_name_np],
--
1.9.3

View File

@ -1,83 +0,0 @@
From 85e12bd9bf7bd61a9411bae415b679c9c3e54c7e Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Fri, 28 Aug 2015 19:50:39 +0300
Subject: [PATCH 1/2] [input] added KEY_MENU to linux input
---
xbmc/input/linux/LinuxInputDevices.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/xbmc/input/linux/LinuxInputDevices.cpp b/xbmc/input/linux/LinuxInputDevices.cpp
index 2610825..0b9a2c7 100644
--- a/xbmc/input/linux/LinuxInputDevices.cpp
+++ b/xbmc/input/linux/LinuxInputDevices.cpp
@@ -233,6 +233,7 @@ KeyMap keyMap[] = {
{ KEY_COMPOSE , XBMCK_LSUPER },
{ KEY_STOP , XBMCK_MEDIA_STOP },
{ KEY_HELP , XBMCK_HELP },
+ { KEY_MENU , XBMCK_MENU },
{ KEY_CLOSECD , XBMCK_EJECT },
{ KEY_EJECTCD , XBMCK_EJECT },
{ KEY_EJECTCLOSECD , XBMCK_EJECT },
From 50e216d48b6550a75d1573453bf4ed880953aa18 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Fri, 28 Aug 2015 20:11:20 +0300
Subject: [PATCH 2/2] [keymap] improve 'menu' keymaps
---
system/keymaps/keyboard.xml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/system/keymaps/keyboard.xml b/system/keymaps/keyboard.xml
index e258295..7310072 100644
--- a/system/keymaps/keyboard.xml
+++ b/system/keymaps/keyboard.xml
@@ -266,6 +266,7 @@
<return>OSD</return>
<enter>OSD</enter>
<m>OSD</m>
+ <menu>OSD</menu>
<i>Info</i>
<o>CodecInfo</o>
<z>AspectRatio</z>
@@ -301,6 +302,7 @@
<i>Back</i>
<d mod="ctrl">Back</d>
<m>OSD</m>
+ <menu>OSD</menu>
</keyboard>
</FullscreenInfo>
<PlayerControls>
@@ -320,6 +322,7 @@
<return>OSD</return>
<enter>OSD</enter>
<m>OSD</m>
+ <menu>OSD</menu>
<i>Info</i>
<p>ActivateWindow(VisualisationPresetList)</p>
<v>Addon.Default.OpenSettings(xbmc.player.musicviz)</v>
@@ -342,6 +345,7 @@
<period>SkipNext</period>
<comma>SkipPrevious</comma>
<m>Back</m>
+ <menu>Back</menu>
<i>Info</i>
<o>CodecInfo</o>
<p>ActivateWindow(VisualisationPresetList)</p>
@@ -418,6 +422,7 @@
<VideoOSD>
<keyboard>
<m>Back</m>
+ <menu>Back</menu>
<g mod="ctrl">Back</g> <!-- MCE Guide button -->
<i>Info</i>
<o>CodecInfo</o>
@@ -428,6 +433,7 @@
<opensquarebracket>BigStepForward</opensquarebracket>
<closesquarebracket>BigStepBack</closesquarebracket>
<m>OSD</m>
+ <menu>OSD</menu>
<i>Info</i>
<o>CodecInfo</o>
<z>AspectRatio</z>

View File

@ -1,210 +0,0 @@
From 958d47339a2427b66568fe7c2ea69831f111742a Mon Sep 17 00:00:00 2001
From: Roman Kraevskiy <rkraevskiy@gmail.com>
Date: Fri, 10 Jul 2015 23:36:34 +0300
Subject: [PATCH 059/100] Mouse wheel support for X11-less linux distros
(openelec)
---
xbmc/input/linux/LinuxInputDevices.cpp | 125 +++++++++++++++++++++------------
xbmc/input/linux/LinuxInputDevices.h | 2 +
2 files changed, 82 insertions(+), 45 deletions(-)
diff --git a/xbmc/input/linux/LinuxInputDevices.cpp b/xbmc/input/linux/LinuxInputDevices.cpp
index 32a3b46..b028cd1 100644
--- a/xbmc/input/linux/LinuxInputDevices.cpp
+++ b/xbmc/input/linux/LinuxInputDevices.cpp
@@ -558,22 +558,27 @@ bool CLinuxInputDevice::KeyEvent(const struct input_event& levt, XBMC_Event& dev
*/
bool CLinuxInputDevice::RelEvent(const struct input_event& levt, XBMC_Event& devt)
{
+ bool motion = false;
+ bool wheel = false;
+
switch (levt.code)
{
case REL_X:
m_mouseX += levt.value;
devt.motion.xrel = levt.value;
devt.motion.yrel = 0;
+ motion = true;
break;
-
case REL_Y:
m_mouseY += levt.value;
devt.motion.xrel = 0;
devt.motion.yrel = levt.value;
+ motion = true;
break;
-
- case REL_Z:
case REL_WHEEL:
+ wheel = (levt.value != 0); // process wheel event only when there was some delta
+ break;
+ case REL_Z:
default:
CLog::Log(LOGWARNING, "CLinuxInputDevice::RelEvent: Unknown rel event code: %d\n", levt.code);
return false;
@@ -588,13 +593,35 @@ bool CLinuxInputDevice::RelEvent(const struct input_event& levt, XBMC_Event& dev
m_mouseY = std::max(0, m_mouseY);
- devt.type = XBMC_MOUSEMOTION;
- devt.motion.type = XBMC_MOUSEMOTION;
- devt.motion.x = m_mouseX;
- devt.motion.y = m_mouseY;
- devt.motion.state = 0;
- devt.motion.which = m_deviceIndex;
-
+ if (motion)
+ {
+ devt.type = XBMC_MOUSEMOTION;
+ devt.motion.type = XBMC_MOUSEMOTION;
+ devt.motion.x = m_mouseX;
+ devt.motion.y = m_mouseY;
+ devt.motion.state = 0;
+ devt.motion.which = m_deviceIndex;
+ }
+ else if (wheel)
+ {
+ devt.type = XBMC_MOUSEBUTTONUP;
+ devt.button.state = XBMC_RELEASED;
+ devt.button.type = devt.type;
+ devt.button.x = m_mouseX;
+ devt.button.y = m_mouseY;
+ devt.button.button = (levt.value<0) ? XBMC_BUTTON_WHEELDOWN:XBMC_BUTTON_WHEELUP;
+
+ /* but WHEEL up enent to the queue */
+ m_equeue.push_back(devt);
+
+ /* prepare and return WHEEL down event */
+ devt.button.state = XBMC_PRESSED;
+ devt.type = XBMC_MOUSEBUTTONDOWN;
+ }
+ else
+ {
+ return false;
+ }
return true;
}
@@ -693,57 +720,65 @@ XBMC_Event CLinuxInputDevice::ReadEvent()
XBMC_Event devt;
- while (1)
+ if (m_equeue.empty())
{
- bzero(&levt, sizeof(levt));
+ while (1)
+ {
+ bzero(&levt, sizeof(levt));
- bzero(&devt, sizeof(devt));
- devt.type = XBMC_NOEVENT;
+ bzero(&devt, sizeof(devt));
+ devt.type = XBMC_NOEVENT;
- if(m_devicePreferredId == LI_DEVICE_NONE)
- return devt;
+ if(m_devicePreferredId == LI_DEVICE_NONE)
+ return devt;
- readlen = read(m_fd, &levt, sizeof(levt));
+ readlen = read(m_fd, &levt, sizeof(levt));
- if (readlen <= 0)
- {
- if (errno == ENODEV)
+ if (readlen <= 0)
{
- CLog::Log(LOGINFO,"input device was unplugged %s",m_deviceName);
- m_bUnplugged = true;
+ if (errno == ENODEV)
+ {
+ CLog::Log(LOGINFO,"input device was unplugged %s",m_deviceName);
+ m_bUnplugged = true;
+ }
+
+ break;
}
- break;
- }
+ //printf("read event readlen = %d device name %s m_fileName %s\n", readlen, m_deviceName, m_fileName.c_str());
- //printf("read event readlen = %d device name %s m_fileName %s\n", readlen, m_deviceName, m_fileName.c_str());
+ // sanity check if we realy read the event
+ if(readlen != sizeof(levt))
+ {
+ printf("CLinuxInputDevice: read error : %s\n", strerror(errno));
+ break;
+ }
- // sanity check if we realy read the event
- if(readlen != sizeof(levt))
- {
- printf("CLinuxInputDevice: read error : %s\n", strerror(errno));
- break;
- }
+ if (!TranslateEvent(levt, devt))
+ continue;
- if (!TranslateEvent(levt, devt))
- continue;
+ /* Flush previous event with DIEF_FOLLOW? */
+ if (devt.type != XBMC_NOEVENT)
+ {
+ //printf("new event! type = %d\n", devt.type);
+ //printf("key: %d %d %d %c\n", devt.key.keysym.scancode, devt.key.keysym.sym, devt.key.keysym.mod, devt.key.keysym.unicode);
- /* Flush previous event with DIEF_FOLLOW? */
- if (devt.type != XBMC_NOEVENT)
- {
- //printf("new event! type = %d\n", devt.type);
- //printf("key: %d %d %d %c\n", devt.key.keysym.scancode, devt.key.keysym.sym, devt.key.keysym.mod, devt.key.keysym.unicode);
+ if (m_hasLeds && (m_keyMods != m_lastKeyMods))
+ {
+ SetLed(LED_NUML, m_keyMods & XBMCKMOD_NUM);
+ SetLed(LED_CAPSL, m_keyMods & XBMCKMOD_CAPS);
+ m_lastKeyMods = m_keyMods;
+ }
- if (m_hasLeds && (m_keyMods != m_lastKeyMods))
- {
- SetLed(LED_NUML, m_keyMods & XBMCKMOD_NUM);
- SetLed(LED_CAPSL, m_keyMods & XBMCKMOD_CAPS);
- m_lastKeyMods = m_keyMods;
+ break;
}
-
- break;
}
}
+ else
+ {
+ devt = m_equeue.front();
+ m_equeue.pop_front();
+ }
return devt;
}
diff --git a/xbmc/input/linux/LinuxInputDevices.h b/xbmc/input/linux/LinuxInputDevices.h
index cf1c5ce..954d823 100644
--- a/xbmc/input/linux/LinuxInputDevices.h
+++ b/xbmc/input/linux/LinuxInputDevices.h
@@ -22,6 +22,7 @@
#include <vector>
#include <string>
+#include <deque>
#include "windowing/XBMC_events.h"
#include "input/XBMC_keyboard.h"
#include "threads/SingleLock.h"
@@ -79,6 +80,7 @@ class CLinuxInputDevice
int m_deviceMaxAxis;
bool m_bSkipNonKeyEvents;
bool m_bUnplugged;
+ std::deque<XBMC_Event> m_equeue;
};
class CLinuxInputDevices

View File

@ -1,337 +0,0 @@
From 8ff131750e527416274e4f21685312785a8d0bb2 Mon Sep 17 00:00:00 2001
From: Floris Bos <bos@je-eigen-domein.nl>
Date: Wed, 23 Sep 2015 22:34:20 +0200
Subject: [PATCH 1/3] Fix Linux touchscreen support
Touch devices tend to send a key event first and coordinates later.
==
Event: type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: type 3 (EV_ABS), code 0 (ABS_X), value 45
Event: type 3 (EV_ABS), code 1 (ABS_Y), value 27
==
This does not go along well with the XBMC mouse handling code that
expects to already have the coordinates when processing the EV_KEY.
Fetch the current coordinates with ioctl() as workaround.
Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
---
xbmc/input/linux/LinuxInputDevices.cpp | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/xbmc/input/linux/LinuxInputDevices.cpp b/xbmc/input/linux/LinuxInputDevices.cpp
index b028cd1..b8f13d3 100644
--- a/xbmc/input/linux/LinuxInputDevices.cpp
+++ b/xbmc/input/linux/LinuxInputDevices.cpp
@@ -275,6 +275,7 @@ typedef enum
LI_CAPS_KEYS = 1,
LI_CAPS_BUTTONS = 2,
LI_CAPS_AXES = 4,
+ LI_CAPS_ABS = 8
} LinuxInputCapsType;
static char remoteStatus = 0xFF; // paired, battery OK
@@ -470,6 +471,23 @@ bool CLinuxInputDevice::KeyEvent(const struct input_event& levt, XBMC_Event& dev
if (levt.value == 2)
return false;
+ /* touch devices tend to send the key event before the coordinates, so we
+ cannot rely on m_mouseX and m_mouseY already having the correct values */
+ if (m_deviceCaps & LI_CAPS_ABS)
+ {
+ struct input_absinfo absinfo;
+
+ if (ioctl(m_fd, EVIOCGABS(ABS_X), &absinfo) == 0)
+ {
+ m_mouseX = absinfo.value;
+ }
+
+ if (ioctl(m_fd, EVIOCGABS(ABS_Y), &absinfo) == 0)
+ {
+ m_mouseY = absinfo.value;
+ }
+ }
+
devt.type = levt.value ? XBMC_MOUSEBUTTONDOWN : XBMC_MOUSEBUTTONUP;
devt.button.state = levt.value ? XBMC_PRESSED : XBMC_RELEASED;
devt.button.type = devt.type;
@@ -954,6 +972,12 @@ void CLinuxInputDevice::GetInfo(int fd)
m_deviceMaxAxis = std::max(num_rels, num_abs) - 1;
}
+ /* Absolute X,Y coordinates */
+ if (num_abs >= 2 && num_rels == 0)
+ {
+ m_deviceCaps |= LI_CAPS_ABS;
+ }
+
/* Decide which primary input device to be. */
if (m_deviceType & LI_DEVICE_KEYBOARD)
m_devicePreferredId = LI_DEVICE_KEYBOARD;
From a7b5f1489dbfcb577e12c747626fe7d45ff2009d Mon Sep 17 00:00:00 2001
From: Floris Bos <bos@je-eigen-domein.nl>
Date: Fri, 25 Sep 2015 01:07:30 +0200
Subject: [PATCH 2/3] LinuxInputDevice: add support for multi-touch devices
Adds support for multi-touch devices on Linux.
Support is limited to devices that are capable of
tracking identifiable contacts, and use the type B events of:
https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt
Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
---
Makefile.in | 2 +
xbmc/input/linux/LinuxInputDevices.cpp | 109 ++++++++++++++++++++++++++++++++-
xbmc/input/linux/LinuxInputDevices.h | 8 +++
xbmc/input/touch/ITouchInputHandler.h | 1 +
xbmc/windowing/WinEventsLinux.cpp | 5 ++
xbmc/windowing/WinEventsLinux.h | 1 +
6 files changed, 125 insertions(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index d579e11..2d4b1c8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -157,6 +157,8 @@ DIRECTORY_ARCHIVES += xbmc/storage/android/storage_android.a
DIRECTORY_ARCHIVES += xbmc/windowing/X11/windowing_X11.a
else
DIRECTORY_ARCHIVES += xbmc/input/linux/input_linux.a
+DIRECTORY_ARCHIVES += xbmc/input/touch/input_touch.a
+DIRECTORY_ARCHIVES += xbmc/input/touch/generic/input_touch_generic.a
DIRECTORY_ARCHIVES += xbmc/network/linux/network_linux.a
DIRECTORY_ARCHIVES += xbmc/powermanagement/linux/powermanagement_linux.a
DIRECTORY_ARCHIVES += xbmc/storage/linux/storage_linux.a
diff --git a/xbmc/input/linux/LinuxInputDevices.cpp b/xbmc/input/linux/LinuxInputDevices.cpp
index b8f13d3..6e1cd1d 100644
--- a/xbmc/input/linux/LinuxInputDevices.cpp
+++ b/xbmc/input/linux/LinuxInputDevices.cpp
@@ -96,6 +96,8 @@ typedef unsigned long kernel_ulong_t;
#include "LinuxInputDevices.h"
#include "input/MouseStat.h"
#include "utils/log.h"
+#include "input/touch/generic/GenericTouchActionHandler.h"
+#include "input/touch/generic/GenericTouchInputHandler.h"
#ifndef BITS_PER_LONG
#define BITS_PER_LONG (sizeof(long) * 8)
@@ -267,7 +269,8 @@ typedef enum
LI_DEVICE_MOUSE = 1,
LI_DEVICE_JOYSTICK = 2,
LI_DEVICE_KEYBOARD = 4,
- LI_DEVICE_REMOTE = 8
+ LI_DEVICE_REMOTE = 8,
+ LI_DEVICE_MULTITOUCH = 16
} LinuxInputDeviceType;
typedef enum
@@ -302,6 +305,10 @@ CLinuxInputDevice::CLinuxInputDevice(const std::string& fileName, int index):
m_deviceMaxKeyCode = 0;
m_deviceMaxAxis = 0;
m_bUnplugged = false;
+ m_mt_currentSlot = 0;
+ memset(&m_mt_x, 0, sizeof(m_mt_x));
+ memset(&m_mt_y, 0, sizeof(m_mt_y));
+ memset(&m_mt_event, 0, sizeof(m_mt_event));
Open();
}
@@ -681,11 +688,102 @@ bool CLinuxInputDevice::AbsEvent(const struct input_event& levt, XBMC_Event& dev
}
/*
+ * Process multi-touch absolute events
+ * Only store the information, do not fire event until we receive an EV_SYN
+ */
+bool CLinuxInputDevice::mtAbsEvent(const struct input_event& levt)
+{
+ switch (levt.code)
+ {
+ case ABS_MT_SLOT:
+ m_mt_currentSlot = levt.value;
+ break;
+
+ case ABS_MT_TRACKING_ID:
+ if (m_mt_currentSlot < TOUCH_MAX_POINTERS)
+ {
+ if (levt.value == -1)
+ m_mt_event[m_mt_currentSlot] = TouchInputUp;
+ else
+ m_mt_event[m_mt_currentSlot] = TouchInputDown;
+ }
+ break;
+
+ case ABS_MT_POSITION_X:
+ if (m_mt_currentSlot < TOUCH_MAX_POINTERS)
+ {
+ m_mt_x[m_mt_currentSlot] = levt.value;
+ if (m_mt_event[m_mt_currentSlot] == TouchInputUnchanged)
+ m_mt_event[m_mt_currentSlot] = TouchInputMove;
+ }
+ break;
+
+ case ABS_MT_POSITION_Y:
+ if (m_mt_currentSlot < TOUCH_MAX_POINTERS)
+ {
+ m_mt_y[m_mt_currentSlot] = levt.value;
+ if (m_mt_event[m_mt_currentSlot] == TouchInputUnchanged)
+ m_mt_event[m_mt_currentSlot] = TouchInputMove;
+ }
+ break;
+
+ default:
+ return false;
+ }
+
+ return true;
+}
+
+/*
+ * Process stored multi-touch events
+ */
+bool CLinuxInputDevice::mtSynEvent(const struct input_event& levt)
+{
+ float size = 10.0f;
+ int64_t nanotime = levt.time.tv_sec * 1000000000LL + levt.time.tv_usec * 1000LL;
+
+ for (int ptr=0; ptr < TOUCH_MAX_POINTERS; ptr++)
+ {
+ /* While the comments of ITouchInputHandler::UpdateTouchPointer() say
+ "If there's an event for every touch action this method does not need to be called at all"
+ gesture detection currently doesn't work properly without this call. */
+ CGenericTouchInputHandler::Get().UpdateTouchPointer(ptr, m_mt_x[ptr], m_mt_y[ptr], nanotime, size);
+ }
+
+ for (int ptr=0; ptr < TOUCH_MAX_POINTERS; ptr++)
+ {
+ if (m_mt_event[ptr] != TouchInputUnchanged)
+ {
+ CGenericTouchInputHandler::Get().HandleTouchInput(m_mt_event[ptr], m_mt_x[ptr], m_mt_y[ptr], nanotime, ptr, size);
+ m_mt_event[ptr] = TouchInputUnchanged;
+ }
+ }
+
+ return true;
+}
+
+/*
* Translates a Linux input event into a DirectFB input event.
*/
bool CLinuxInputDevice::TranslateEvent(const struct input_event& levt,
XBMC_Event& devt)
{
+ if (m_devicePreferredId == LI_DEVICE_MULTITOUCH)
+ {
+ switch (levt.type)
+ {
+ case EV_ABS:
+ return mtAbsEvent(levt);
+
+ case EV_SYN:
+ return mtSynEvent(levt);
+
+ default:
+ // Ignore legacy (key) events
+ return false;
+ }
+ }
+
switch (levt.type)
{
case EV_KEY:
@@ -930,6 +1028,10 @@ void CLinuxInputDevice::GetInfo(int fd)
for (i = 0; i < ABS_PRESSURE; i++)
if (test_bit( i, absbit ))
num_abs++;
+
+ /* test if it is a multi-touch type B device */
+ if (test_bit(ABS_MT_SLOT, absbit))
+ m_deviceType |= LI_DEVICE_MULTITOUCH;
}
/* Mouse, Touchscreen or Smartpad ? */
@@ -981,6 +1083,11 @@ void CLinuxInputDevice::GetInfo(int fd)
/* Decide which primary input device to be. */
if (m_deviceType & LI_DEVICE_KEYBOARD)
m_devicePreferredId = LI_DEVICE_KEYBOARD;
+ else if (m_deviceType & LI_DEVICE_MULTITOUCH)
+ {
+ m_devicePreferredId = LI_DEVICE_MULTITOUCH;
+ CGenericTouchInputHandler::Get().RegisterHandler(&CGenericTouchActionHandler::Get());
+ }
else if (m_deviceType & LI_DEVICE_REMOTE)
m_devicePreferredId = LI_DEVICE_REMOTE;
else if (m_deviceType & LI_DEVICE_JOYSTICK)
diff --git a/xbmc/input/linux/LinuxInputDevices.h b/xbmc/input/linux/LinuxInputDevices.h
index 954d823..8c88a1d 100644
--- a/xbmc/input/linux/LinuxInputDevices.h
+++ b/xbmc/input/linux/LinuxInputDevices.h
@@ -26,6 +26,8 @@
#include "windowing/XBMC_events.h"
#include "input/XBMC_keyboard.h"
#include "threads/SingleLock.h"
+#include "input/touch/ITouchInputHandler.h"
+#include "input/touch/generic/IGenericTouchGestureDetector.h"
struct KeymapEntry
{
@@ -60,6 +62,8 @@ class CLinuxInputDevice
XBMCMod UpdateModifiers(XBMC_Event& devt);
bool GetKeymapEntry(KeymapEntry& entry);
int KeyboardGetSymbol(unsigned short value);
+ bool mtAbsEvent(const struct input_event& levt);
+ bool mtSynEvent(const struct input_event& levt);
int m_fd;
int m_vt_fd;
@@ -81,6 +85,10 @@ class CLinuxInputDevice
bool m_bSkipNonKeyEvents;
bool m_bUnplugged;
std::deque<XBMC_Event> m_equeue;
+ int m_mt_currentSlot;
+ int m_mt_x[TOUCH_MAX_POINTERS];
+ int m_mt_y[TOUCH_MAX_POINTERS];
+ TouchInput m_mt_event[TOUCH_MAX_POINTERS];
};
class CLinuxInputDevices
diff --git a/xbmc/input/touch/ITouchInputHandler.h b/xbmc/input/touch/ITouchInputHandler.h
index 6ea47db..43c7a76 100644
--- a/xbmc/input/touch/ITouchInputHandler.h
+++ b/xbmc/input/touch/ITouchInputHandler.h
@@ -28,6 +28,7 @@
* \brief Touch input event
*/
typedef enum {
+ TouchInputUnchanged = 0,
TouchInputAbort,
TouchInputDown,
TouchInputUp,
diff --git a/xbmc/windowing/WinEventsLinux.cpp b/xbmc/windowing/WinEventsLinux.cpp
index 89aca2b..04e3544 100644
--- a/xbmc/windowing/WinEventsLinux.cpp
+++ b/xbmc/windowing/WinEventsLinux.cpp
@@ -241,4 +241,9 @@ size_t CWinEventsLinux::GetQueueSize()
return m_devices.Size();
}
+void CWinEventsLinux::MessagePush(XBMC_Event *ev)
+{
+ g_application.OnEvent(*ev);
+}
+
#endif
diff --git a/xbmc/windowing/WinEventsLinux.h b/xbmc/windowing/WinEventsLinux.h
index 5c2b583..dc73b39 100644
--- a/xbmc/windowing/WinEventsLinux.h
+++ b/xbmc/windowing/WinEventsLinux.h
@@ -31,6 +31,7 @@ class CWinEventsLinux : public IWinEvents
CWinEventsLinux();
bool MessagePump();
size_t GetQueueSize();
+ void MessagePush(XBMC_Event *ev);
void RefreshDevices();
void Notify(const Observable &obs, const ObservableMessage msg)
{

View File

@ -1,40 +0,0 @@
diff -Naur kodi-15.2-02e7013/xbmc/windows/GUIWindowScreensaverDim.cpp kodi-15.2-02e7013.patch/xbmc/windows/GUIWindowScreensaverDim.cpp
--- kodi-15.2-02e7013/xbmc/windows/GUIWindowScreensaverDim.cpp 2015-10-20 23:51:49.000000000 +0200
+++ kodi-15.2-02e7013.patch/xbmc/windows/GUIWindowScreensaverDim.cpp 2015-10-26 08:33:22.899595510 +0100
@@ -29,6 +29,7 @@
{
m_needsScaling = false;
m_dimLevel = 100.0f;
+ m_newDimLevel = 100.0f;
m_animations.push_back(CAnimation::CreateFader(0, 100, 0, 1000, ANIM_TYPE_WINDOW_OPEN));
m_animations.push_back(CAnimation::CreateFader(100, 0, 0, 1000, ANIM_TYPE_WINDOW_CLOSE));
m_renderOrder = INT_MAX;
@@ -40,8 +41,8 @@
void CGUIWindowScreensaverDim::UpdateVisibility()
{
- m_dimLevel = g_application.GetDimScreenSaverLevel();
- if (m_dimLevel)
+ m_newDimLevel = g_application.GetDimScreenSaverLevel();
+ if (m_newDimLevel)
Show();
else
Close();
@@ -49,6 +50,8 @@
void CGUIWindowScreensaverDim::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions)
{
+ if (m_newDimLevel != m_dimLevel && !IsAnimating(ANIM_TYPE_WINDOW_CLOSE))
+ m_dimLevel = m_newDimLevel;
CGUIDialog::Process(currentTime, dirtyregions);
m_renderRegion.SetRect(0, 0, (float)g_graphicsContext.GetWidth(), (float)g_graphicsContext.GetHeight());
}
diff -Naur kodi-15.2-02e7013/xbmc/windows/GUIWindowScreensaverDim.h kodi-15.2-02e7013.patch/xbmc/windows/GUIWindowScreensaverDim.h
--- kodi-15.2-02e7013/xbmc/windows/GUIWindowScreensaverDim.h 2015-10-20 23:51:49.000000000 +0200
+++ kodi-15.2-02e7013.patch/xbmc/windows/GUIWindowScreensaverDim.h 2015-10-26 08:29:37.079092044 +0100
@@ -34,4 +34,5 @@
virtual void UpdateVisibility();
private:
float m_dimLevel;
+ float m_newDimLevel;
};

View File

@ -1,217 +0,0 @@
From f2d12c9b6fb41a1a920afa54beaae9045f11a3c5 Mon Sep 17 00:00:00 2001
From: ace20022 <ace20022@xbmc.org>
Date: Fri, 20 Mar 2015 16:38:47 +0100
Subject: [PATCH 02/12] [curl][udf] The separator between the image path and
the file path (inside the image) must be '/'.
---
xbmc/URL.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/xbmc/URL.cpp b/xbmc/URL.cpp
index ac4a9c6..2ecf050 100644
--- a/xbmc/URL.cpp
+++ b/xbmc/URL.cpp
@@ -160,6 +160,17 @@ void CURL::Parse(const std::string& strURL1)
return;
}
+ if (IsProtocol("udf"))
+ {
+ std::string lower(strURL);
+ StringUtils::ToLower(lower);
+ size_t isoPos = lower.find(".iso\\", iPos);
+ if (isoPos != std::string::npos)
+ {
+ strURL = strURL.replace(isoPos + 4, 1, "/");
+ }
+ }
+
// check for username/password - should occur before first /
if (iPos == std::string::npos) iPos = 0;
From 4e38b5c178e089adc30c6f31d7a52b388c6e73f7 Mon Sep 17 00:00:00 2001
From: ace20022 <ace20022@xbmc.org>
Date: Tue, 9 Sep 2014 14:45:04 +0200
Subject: [PATCH 03/12] [bluray] Add PLAYMARK event.
---
xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
index 544261c..ccbdbad 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
@@ -586,6 +586,8 @@ void CDVDInputStreamBluray::ProcessEvent() {
case BD_EVENT_SECONDARY_VIDEO:
case BD_EVENT_SECONDARY_VIDEO_SIZE:
case BD_EVENT_SECONDARY_VIDEO_STREAM:
+ case BD_EVENT_PLAYMARK:
+ break;
case BD_EVENT_NONE:
break;
From 24e1fa5424ef73c8951f21081c95cb79df5e686f Mon Sep 17 00:00:00 2001
From: ace20022 <ace20022@xbmc.org>
Date: Thu, 6 Nov 2014 11:54:29 +0100
Subject: [PATCH 04/12] [bluray] Move player setup to an own method and
refactor it.
---
.../DVDInputStreams/DVDInputStreamBluray.cpp | 32 +++++++++++++---------
.../DVDInputStreams/DVDInputStreamBluray.h | 3 ++
2 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
index ccbdbad..cb8fff4 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
@@ -384,19 +384,8 @@ bool CDVDInputStreamBluray::Open(const char* strFile, const std::string& content
if(m_navmode)
{
- int region = CSettings::Get().GetInt("dvds.playerregion");
- if(region == 0)
- {
- CLog::Log(LOGWARNING, "CDVDInputStreamBluray::Open - region dvd must be set in setting, assuming region 1");
- region = 1;
- }
- m_dll->bd_set_player_setting (m_bd, BLURAY_PLAYER_SETTING_REGION_CODE, region);
- m_dll->bd_set_player_setting (m_bd, BLURAY_PLAYER_SETTING_PARENTAL, 0);
- m_dll->bd_set_player_setting (m_bd, BLURAY_PLAYER_SETTING_PLAYER_PROFILE, 0);
- m_dll->bd_set_player_setting_str(m_bd, BLURAY_PLAYER_SETTING_AUDIO_LANG, g_langInfo.GetDVDAudioLanguage().c_str());
- m_dll->bd_set_player_setting_str(m_bd, BLURAY_PLAYER_SETTING_PG_LANG, g_langInfo.GetDVDSubtitleLanguage().c_str());
- m_dll->bd_set_player_setting_str(m_bd, BLURAY_PLAYER_SETTING_MENU_LANG, g_langInfo.GetDVDMenuLanguage().c_str());
- m_dll->bd_set_player_setting_str(m_bd, BLURAY_PLAYER_SETTING_COUNTRY_CODE, "us");
+ SetupPlayerSettings();
+
m_dll->bd_register_overlay_proc (m_bd, this, bluray_overlay_cb);
#ifdef HAVE_LIBBLURAY_BDJ
m_dll->bd_register_argb_overlay_proc (m_bd, this, bluray_overlay_argb_cb, NULL);
@@ -1130,4 +1119,21 @@ bool CDVDInputStreamBluray::HasMenu()
return m_navmode;
}
+void CDVDInputStreamBluray::SetupPlayerSettings()
+{
+ int region = CSettings::Get().GetInt("dvds.playerregion");
+ if (region == 0)
+ {
+ CLog::Log(LOGWARNING, "CDVDInputStreamBluray::Open - region dvd must be set in setting, assuming region 1");
+ region = 1;
+ }
+ m_dll->bd_set_player_setting(m_bd, BLURAY_PLAYER_SETTING_REGION_CODE, region);
+ m_dll->bd_set_player_setting(m_bd, BLURAY_PLAYER_SETTING_PARENTAL, 0);
+ m_dll->bd_set_player_setting(m_bd, BLURAY_PLAYER_SETTING_PLAYER_PROFILE, 0);
+ m_dll->bd_set_player_setting_str(m_bd, BLURAY_PLAYER_SETTING_AUDIO_LANG, g_langInfo.GetDVDAudioLanguage().c_str());
+ m_dll->bd_set_player_setting_str(m_bd, BLURAY_PLAYER_SETTING_PG_LANG, g_langInfo.GetDVDSubtitleLanguage().c_str());
+ m_dll->bd_set_player_setting_str(m_bd, BLURAY_PLAYER_SETTING_MENU_LANG, g_langInfo.GetDVDMenuLanguage().c_str());
+ m_dll->bd_set_player_setting_str(m_bd, BLURAY_PLAYER_SETTING_COUNTRY_CODE, "us");
+}
+
#endif
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h
index f05c406..19a6f65 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h
@@ -161,4 +161,7 @@ class CDVDInputStreamBluray
#ifdef HAVE_LIBBLURAY_BDJ
struct bd_argb_buffer_s m_argb;
#endif
+
+ private:
+ void SetupPlayerSettings();
};
From 0c3cb1e2deffd63a779fe58b586f3d34b077e854 Mon Sep 17 00:00:00 2001
From: ace20022 <ace20022@ymail.com>
Date: Sun, 16 Nov 2014 16:53:43 +0100
Subject: [PATCH 10/12] [bluray] Initialize m_angle.
---
xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
index 5031799..17a7318 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
@@ -189,6 +189,7 @@ CDVDInputStreamBluray::CDVDInputStreamBluray(IDVDPlayer* player) :
{
m_title = NULL;
m_clip = (uint32_t)-1;
+ m_angle = 0;
m_playlist = (uint32_t)-1;
m_menu = false;
m_bd = NULL;
From 10ea7cc8057604d960fd505c854cb7d745880dc3 Mon Sep 17 00:00:00 2001
From: ace20022 <ace20022@ymail.com>
Date: Sat, 13 Sep 2014 14:13:34 +0200
Subject: [PATCH 11/12] [bluray] Add Abort implementation.
---
xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp | 10 ++++++++--
xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h | 4 +++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
index 17a7318..c8abbc1 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.cpp
@@ -216,6 +216,11 @@ CDVDInputStreamBluray::~CDVDInputStreamBluray()
delete m_dll;
}
+void CDVDInputStreamBluray::Abort()
+{
+ m_hold = HOLD_EXIT;
+}
+
bool CDVDInputStreamBluray::IsEOF()
{
return false;
@@ -605,7 +610,8 @@ int CDVDInputStreamBluray::Read(uint8_t* buf, int buf_size)
if(m_hold == HOLD_HELD)
return 0;
- if(m_hold == HOLD_ERROR)
+ if( m_hold == HOLD_ERROR
+ || m_hold == HOLD_EXIT)
return -1;
result = m_dll->bd_read_ext (m_bd, buf, buf_size, &m_event);
@@ -1011,7 +1017,7 @@ void CDVDInputStreamBluray::GetStreamInfo(int pid, char* language)
CDVDInputStream::ENextStream CDVDInputStreamBluray::NextStream()
{
- if(!m_navmode)
+ if(!m_navmode || m_hold == HOLD_EXIT)
return NEXTSTREAM_NONE;
if (m_hold == HOLD_ERROR)
diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h
index af06e82..b41f64c 100644
--- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h
+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamBluray.h
@@ -54,6 +54,7 @@ class CDVDInputStreamBluray
virtual int Read(uint8_t* buf, int buf_size);
virtual int64_t Seek(int64_t offset, int whence);
virtual bool Pause(double dTime) { return false; };
+ void Abort();
virtual bool IsEOF();
virtual int64_t GetLength();
virtual int GetBlockSize() { return 6144; }
@@ -156,7 +157,8 @@ class CDVDInputStreamBluray
HOLD_HELD,
HOLD_DATA,
HOLD_STILL,
- HOLD_ERROR
+ HOLD_ERROR,
+ HOLD_EXIT
} m_hold;
BD_EVENT m_event;
#ifdef HAVE_LIBBLURAY_BDJ

File diff suppressed because it is too large Load Diff

View File

@ -1,101 +0,0 @@
From 001de52ae30377edcd03ba050c454255da99cb07 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Wed, 16 Apr 2014 23:08:58 +0300
Subject: [PATCH 03/17] Enable true 1920x1080 output without upscaling on
Amlogic-based devices.
---
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 44 +++++++++++++++++++++++++++--
xbmc/windowing/egl/EGLNativeTypeAmlogic.h | 3 ++
2 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
index f2073cb..3c7a8e6 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
@@ -88,9 +88,12 @@ bool CEGLNativeTypeAmlogic::CreateNativeWindow()
if (!nativeWindow)
return false;
- nativeWindow->width = 1280;
- nativeWindow->height = 720;
+ nativeWindow->width = 1920;
+ nativeWindow->height = 1080;
m_nativeWindow = nativeWindow;
+
+ SetFramebufferResolution(nativeWindow->width, nativeWindow->height);
+
return true;
#else
return false;
@@ -135,6 +138,12 @@ bool CEGLNativeTypeAmlogic::GetNativeResolution(RESOLUTION_INFO *res) const
bool CEGLNativeTypeAmlogic::SetNativeResolution(const RESOLUTION_INFO &res)
{
+ if (m_nativeWindow)
+ {
+ ((fbdev_window *)m_nativeWindow)->width = res.iScreenWidth;
+ ((fbdev_window *)m_nativeWindow)->height = res.iScreenHeight;
+ }
+
switch((int)(0.5 + res.fRefreshRate))
{
default:
@@ -220,7 +229,10 @@ bool CEGLNativeTypeAmlogic::SetDisplayResolution(const char *resolution)
std::string mode = resolution;
// switch display resolution
SysfsUtils::SetString("/sys/class/display/mode", mode.c_str());
- SetupVideoScaling(mode.c_str());
+
+ RESOLUTION_INFO res;
+ aml_mode_to_resolution(mode.c_str(), &res);
+ SetFramebufferResolution(res);
return true;
}
@@ -305,3 +317,29 @@ void CEGLNativeTypeAmlogic::DisableFreeScale()
close(fd0);
}
}
+
+void CEGLNativeTypeAmlogic::SetFramebufferResolution(const RESOLUTION_INFO &res) const
+{
+ SetFramebufferResolution(res.iScreenWidth, res.iScreenHeight);
+}
+
+void CEGLNativeTypeAmlogic::SetFramebufferResolution(int width, int height) const
+{
+ int fd0;
+ std::string framebuffer = "/dev/" + m_framebuffer_name;
+
+ if ((fd0 = open(framebuffer.c_str(), O_RDWR)) >= 0)
+ {
+ struct fb_var_screeninfo vinfo;
+ if (ioctl(fd0, FBIOGET_VSCREENINFO, &vinfo) == 0)
+ {
+ vinfo.xres = width;
+ vinfo.yres = height;
+ vinfo.xres_virtual = 1920;
+ vinfo.yres_virtual = 2160;
+ vinfo.bits_per_pixel = 32;
+ ioctl(fd0, FBIOPUT_VSCREENINFO, &vinfo);
+ }
+ close(fd0);
+ }
+}
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.h b/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
index cc34ff7..781a153 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
@@ -54,5 +54,8 @@ protected:
void DisableFreeScale();
private:
+ void SetFramebufferResolution(const RESOLUTION_INFO &res) const;
+ void SetFramebufferResolution(int width, int height) const;
+
std::string m_framebuffer_name;
};
--
2.1.4

View File

@ -1,104 +0,0 @@
From 0fdd487aa04abdbf65402b720e363e4890d98ad1 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Tue, 29 Jul 2014 10:31:07 +0300
Subject: [PATCH 06/17] Fix the issue when the video display is disabled after
a resolution change
---
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 55 +----------------------------
xbmc/windowing/egl/EGLNativeTypeAmlogic.h | 1 -
2 files changed, 1 insertion(+), 55 deletions(-)
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
index c9a3bd8..6b38889 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
@@ -66,7 +66,7 @@ void CEGLNativeTypeAmlogic::Initialize()
aml_permissions();
aml_cpufreq_min(true);
aml_cpufreq_max(true);
- return;
+ DisableFreeScale();
}
void CEGLNativeTypeAmlogic::Destroy()
{
@@ -278,64 +278,11 @@ void CEGLNativeTypeAmlogic::SetupVideoScaling(const char *mode)
SysfsUtils::SetInt("/sys/class/graphics/fb0/blank", 0);
}
-void CEGLNativeTypeAmlogic::EnableFreeScale()
-{
- // enable OSD free scale using frame buffer size of 720p
- SysfsUtils::SetInt("/sys/class/graphics/fb0/free_scale", 0);
- SysfsUtils::SetInt("/sys/class/graphics/fb1/free_scale", 0);
- SysfsUtils::SetInt("/sys/class/graphics/fb0/scale_width", 1280);
- SysfsUtils::SetInt("/sys/class/graphics/fb0/scale_height", 720);
- SysfsUtils::SetInt("/sys/class/graphics/fb1/scale_width", 1280);
- SysfsUtils::SetInt("/sys/class/graphics/fb1/scale_height", 720);
-
- // enable video free scale (scaling to 1920x1080 with frame buffer size 1280x720)
- SysfsUtils::SetInt("/sys/class/ppmgr/ppscaler", 0);
- SysfsUtils::SetInt("/sys/class/video/disable_video", 1);
- SysfsUtils::SetInt("/sys/class/ppmgr/ppscaler", 1);
- SysfsUtils::SetString("/sys/class/ppmgr/ppscaler_rect", "0 0 1919 1079 0");
- SysfsUtils::SetString("/sys/class/ppmgr/disp", "1280 720");
- //
- SysfsUtils::SetInt("/sys/class/graphics/fb0/scale_width", 1280);
- SysfsUtils::SetInt("/sys/class/graphics/fb0/scale_height", 720);
- SysfsUtils::SetInt("/sys/class/graphics/fb1/scale_width", 1280);
- SysfsUtils::SetInt("/sys/class/graphics/fb1/scale_height", 720);
- //
- SysfsUtils::SetInt("/sys/class/video/disable_video", 2);
- SysfsUtils::SetString("/sys/class/display/axis", "0 0 1279 719 0 0 0 0");
- SysfsUtils::SetString("/sys/class/ppmgr/ppscaler_rect", "0 0 1279 719 1");
- //
- SysfsUtils::SetInt("/sys/class/graphics/fb0/free_scale", 1);
- SysfsUtils::SetInt("/sys/class/graphics/fb1/free_scale", 1);
- SysfsUtils::SetString("/sys/class/graphics/fb0/free_scale_axis", "0 0 1279 719");
-}
-
void CEGLNativeTypeAmlogic::DisableFreeScale()
{
// turn off frame buffer freescale
SysfsUtils::SetInt("/sys/class/graphics/fb0/free_scale", 0);
SysfsUtils::SetInt("/sys/class/graphics/fb1/free_scale", 0);
- SysfsUtils::SetString("/sys/class/graphics/fb0/free_scale_axis", "0 0 1279 719");
-
- SysfsUtils::SetInt("/sys/class/ppmgr/ppscaler", 0);
- SysfsUtils::SetInt("/sys/class/video/disable_video", 0);
- // now default video display to off
- SysfsUtils::SetInt("/sys/class/video/disable_video", 1);
-
- // revert display axis
- int fd0;
- std::string framebuffer = "/dev/" + m_framebuffer_name;
-
- if ((fd0 = open(framebuffer.c_str(), O_RDWR)) >= 0)
- {
- struct fb_var_screeninfo vinfo;
- if (ioctl(fd0, FBIOGET_VSCREENINFO, &vinfo) == 0)
- {
- char daxis_str[256] = {0};
- sprintf(daxis_str, "%d %d %d %d 0 0 0 0", 0, 0, vinfo.xres-1, vinfo.yres-1);
- SysfsUtils::SetString("/sys/class/display/axis", daxis_str);
- }
- close(fd0);
- }
}
void CEGLNativeTypeAmlogic::SetFramebufferResolution(const RESOLUTION_INFO &res) const
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.h b/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
index 8042f36..2e52b7e 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
@@ -50,7 +50,6 @@ public:
protected:
bool SetDisplayResolution(const char *resolution);
void SetupVideoScaling(const char *mode);
- void EnableFreeScale();
void DisableFreeScale();
private:
--
2.1.4

View File

@ -1,27 +0,0 @@
From 780dc8555d1f66fc1c0eebf08d91788d36659bde Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Thu, 4 Sep 2014 00:28:23 +0300
Subject: [PATCH 07/17] [aml] Update all virtual consoles when changing
framebuffer geometry after a resolution change
That helps to resolve the issue when framebuffer size is not always correctly change according to the resolution set.
It seems that the issue appeared after updating to the U-Boot bootloader released 2014-08-24 by Amlogic.
---
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
index 2d5c4a1..1652226 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
@@ -304,6 +304,7 @@ void CEGLNativeTypeAmlogic::SetFramebufferResolution(int width, int height) cons
vinfo.xres_virtual = 1920;
vinfo.yres_virtual = 2160;
vinfo.bits_per_pixel = 32;
+ vinfo.activate = FB_ACTIVATE_ALL;
ioctl(fd0, FBIOPUT_VSCREENINFO, &vinfo);
}
close(fd0);
--
1.7.10.4

View File

@ -1,13 +0,0 @@
diff --git a/system/settings/settings.xml b/system/settings/settings.xml
index f92bd59..387bd3d 100644
--- a/system/settings/settings.xml
+++ b/system/settings/settings.xml
@@ -2605,7 +2605,7 @@
<group id="2">
<setting id="input.remoteaskeyboard" type="boolean" label="21449" help="36376">
<level>1</level>
- <default>false</default>
+ <default>true</default>
<control type="toggle" />
</setting>
<setting id="input.enablemouse" type="boolean" label="21369" help="36377">

View File

@ -1,21 +1,21 @@
diff --git a/system/keymaps/keyboard.xml b/system/keymaps/keyboard.xml
index 45682a2..74fbd13 100644
index 89254b8..2eefa75 100644
--- a/system/keymaps/keyboard.xml
+++ b/system/keymaps/keyboard.xml
@@ -57,7 +57,7 @@
<key id='65446'>Back</key>
<m>ActivateWindow(PlayerControls)</m>
@@ -67,7 +67,7 @@
<m>Menu</m>
<m mod="ctrl">ActivateWindow(PlayerControls)</m>
<s>ActivateWindow(shutdownmenu)</s>
- <escape>PreviousMenu</escape>
+ <escape>Back</escape>
<i>Info</i>
<menu>ContextMenu</menu>
<c>ContextMenu</c>
@@ -167,6 +167,7 @@
<VirtualKeyboard>
<keyboard>
<backspace>Backspace</backspace>
<menu mod="longpress">Menu</menu>
@@ -201,6 +201,7 @@
<browser_back>Backspace</browser_back>
<backspace mod="longpress">PreviousMenu</backspace>
<browser_back mod="longpress">PreviousMenu</browser_back>
+ <escape>PreviousMenu</escape>
</keyboard>
</VirtualKeyboard>
<MyTV>
<MyTVChannels>

View File

@ -1,67 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="kodi"
PKG_VERSION=""
BRANCH="Isengard"
GIT_REPO="git://github.com/xbmc/xbmc.git"
DEST_DIR="$PKG_NAME-$BRANCH"
echo "getting sources..."
if [ ! -d $DEST_DIR.git ]; then
git clone $GIT_REPO -b $BRANCH $DEST_DIR.git
fi
cd $DEST_DIR.git
git pull
echo "getting version..."
GIT_HASH=`git log -n1 --format=%h`
VERSION_MAJOR=$(grep ^VERSION_MAJOR version.txt | cut -d" " -f2)
VERSION_MINOR=$(grep ^VERSION_MINOR version.txt | cut -d" " -f2)
VERSION_TAG=$(grep ^VERSION_TAG version.txt | cut -d" " -f2 | tr A-Z a-z)
PKG_VERSION="$VERSION_MAJOR.$VERSION_MINOR-$VERSION_TAG-$GIT_HASH"
# hack: empty version tag on release builds:
if [ "$VERSION_TAG" = "version_tag" ] ; then
PKG_VERSION="$VERSION_MAJOR.$VERSION_MINOR-$GIT_HASH"
fi
echo $PKG_VERSION
cd ..
echo "copying sources..."
rm -rf $PKG_NAME-$PKG_VERSION
cp -R $DEST_DIR.git $PKG_NAME-$PKG_VERSION
echo "$GIT_HASH" > $PKG_NAME-$PKG_VERSION/VERSION
echo "cleaning sources..."
rm -rf $PKG_NAME-$PKG_VERSION/.git
echo "seperating theme..."
rm -rf $PKG_NAME-theme-Confluence-$PKG_VERSION
mv $PKG_NAME-$PKG_VERSION/addons/skin.confluence $PKG_NAME-theme-Confluence-$PKG_VERSION
echo "packing sources..."
tar cvJf $PKG_NAME-$PKG_VERSION.tar.xz $PKG_NAME-$PKG_VERSION
tar cvJf $PKG_NAME-theme-Confluence-$PKG_VERSION.tar.xz $PKG_NAME-theme-Confluence-$PKG_VERSION
echo "remove temporary sourcedir..."
rm -rf $PKG_NAME-$PKG_VERSION
rm -rf $PKG_NAME-theme-Confluence-$PKG_VERSION