mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 04:16:46 +02:00
main/xbmc: removed in favor of kodi
This commit is contained in:
parent
9dc337abcc
commit
938bb293ab
@ -1,41 +0,0 @@
|
||||
From 4037c9fd07fbec1873549e71e0b1c2833a5a87db Mon Sep 17 00:00:00 2001
|
||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
||||
Date: Mon, 27 Oct 2014 14:42:30 +0100
|
||||
Subject: [PATCH 1/8] [CEC] fixed: don't try to stick a value > 255 in a byte
|
||||
|
||||
---
|
||||
system/peripherals.xml | 2 +-
|
||||
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/system/peripherals.xml b/system/peripherals.xml
|
||||
index 57af5d1..5fcff7c 100644
|
||||
--- a/system/peripherals.xml
|
||||
+++ b/system/peripherals.xml
|
||||
@@ -30,7 +30,7 @@
|
||||
<setting key="device_type" type="int" value="1" configurable="0" />
|
||||
<setting key="wake_devices_advanced" type="string" value="" configurable="0" />
|
||||
<setting key="standby_devices_advanced" type="string" value="" configurable="0" />
|
||||
- <setting key="double_tap_timeout_ms" type="int" min="0" value="2000" configurable="0" />
|
||||
+ <setting key="double_tap_timeout_ms" type="int" min="0" value="300" configurable="0" />
|
||||
</peripheral>
|
||||
|
||||
<peripheral vendor_product="2548:1001,2548:1002" bus="usb" name="Pulse-Eight CEC Adapter" mapTo="cec">
|
||||
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
index 9907ba2..1d068dc 100644
|
||||
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
@@ -1347,8 +1347,8 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
|
||||
m_configuration.bPowerOffOnStandby = iStandbyAction == 13011 ? 1 : 0;
|
||||
m_configuration.bShutdownOnStandby = iStandbyAction == 13005 ? 1 : 0;
|
||||
|
||||
- // double tap prevention timeout in ms
|
||||
- m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
|
||||
+ // double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50
|
||||
+ m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms") / 50;
|
||||
}
|
||||
|
||||
void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses)
|
||||
--
|
||||
2.1.2
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
From 6cd70921650dda8864a844033e36f1bea55d034b Mon Sep 17 00:00:00 2001
|
||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
||||
Date: Mon, 27 Oct 2014 12:29:09 +0100
|
||||
Subject: [PATCH 2/8] [CEC] bump libCEC to 2.2.0
|
||||
|
||||
---
|
||||
project/BuildDependencies/scripts/libcec_d.txt | 2 +-
|
||||
tools/depends/target/libcec/Makefile | 6 +++---
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/project/BuildDependencies/scripts/libcec_d.txt b/project/BuildDependencies/scripts/libcec_d.txt
|
||||
index a126c74..3d0265e 100644
|
||||
--- a/project/BuildDependencies/scripts/libcec_d.txt
|
||||
+++ b/project/BuildDependencies/scripts/libcec_d.txt
|
||||
@@ -1,3 +1,3 @@
|
||||
; filename source of the file
|
||||
|
||||
-libcec-2.1.4.zip http://mirrors.xbmc.org/build-deps/win32/
|
||||
+libcec-2.2.0-win32.zip http://mirrors.xbmc.org/build-deps/win32/
|
||||
diff --git a/tools/depends/target/libcec/Makefile b/tools/depends/target/libcec/Makefile
|
||||
index 16fec1b..6c72240 100644
|
||||
--- a/tools/depends/target/libcec/Makefile
|
||||
+++ b/tools/depends/target/libcec/Makefile
|
||||
@@ -3,9 +3,9 @@ DEPS= ../../Makefile.include Makefile
|
||||
|
||||
# lib name, version
|
||||
LIBNAME=libcec
|
||||
-VERSION=2.1.4
|
||||
-SOURCE=$(LIBNAME)-$(VERSION)-2
|
||||
-ARCHIVE=$(SOURCE).tar.gz
|
||||
+VERSION=2.2.0
|
||||
+SOURCE=$(LIBNAME)-$(VERSION)
|
||||
+ARCHIVE=$(SOURCE)-3.tar.gz
|
||||
|
||||
# configuration settings
|
||||
CONFIGURE=./configure --prefix=$(PREFIX) --disable-rpi \
|
||||
--
|
||||
2.1.2
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From e59d7e028288464e6890141a830e4a83d4b9d065 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
||||
Date: Mon, 27 Oct 2014 15:32:36 +0100
|
||||
Subject: [PATCH 3/8] [CEC] prevent bus rescan on a Pi, since the adapter
|
||||
cannot be removed
|
||||
|
||||
---
|
||||
xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp b/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
|
||||
index b02535a..4941ae6 100644
|
||||
--- a/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
|
||||
+++ b/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
|
||||
@@ -101,6 +101,8 @@ bool CPeripheralBusCEC::PerformDeviceScan(PeripheralScanResults &results)
|
||||
break;
|
||||
case ADAPTERTYPE_RPI:
|
||||
result.m_mappedBusType = PERIPHERAL_BUS_RPI;
|
||||
+ /** the Pi's adapter cannot be removed, no need to rescan */
|
||||
+ m_bNeedsPolling = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
--
|
||||
2.1.2
|
||||
|
||||
@ -1,112 +0,0 @@
|
||||
From 6544830d1a0b9810c2feb2fcb34df3f90b010d2f Mon Sep 17 00:00:00 2001
|
||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
||||
Date: Mon, 27 Oct 2014 21:01:00 +0100
|
||||
Subject: [PATCH 4/8] [CEC] fixed: don't return garbage from CEC related app
|
||||
messenger methods see
|
||||
https://github.com/xbmc/xbmc/commit/19d37944ca2a2ac2f3e71a40a94e9ea289d8f2db#commitcomment-8248480
|
||||
|
||||
---
|
||||
xbmc/Application.cpp | 14 ++++++++------
|
||||
xbmc/ApplicationMessenger.cpp | 20 +++++---------------
|
||||
xbmc/ApplicationMessenger.h | 4 ++--
|
||||
3 files changed, 15 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
|
||||
index d5604dc..4d26183 100644
|
||||
--- a/xbmc/Application.cpp
|
||||
+++ b/xbmc/Application.cpp
|
||||
@@ -2351,16 +2351,18 @@
|
||||
|
||||
if (StringUtils::StartsWithNoCase(action.GetName(),"CECToggleState") || StringUtils::StartsWithNoCase(action.GetName(),"CECStandby"))
|
||||
{
|
||||
- bool ret = true;
|
||||
-
|
||||
- CLog::Log(LOGDEBUG, "%s: action %s [%d], toggling state of playing device", __FUNCTION__, action.GetName().c_str(), action.GetID());
|
||||
// do not wake up the screensaver right after switching off the playing device
|
||||
if (StringUtils::StartsWithNoCase(action.GetName(),"CECToggleState"))
|
||||
- ret = CApplicationMessenger::Get().CECToggleState();
|
||||
+ {
|
||||
+ CLog::Log(LOGDEBUG, "%s: action %s [%d], toggling state of playing device", __FUNCTION__, action.GetName().c_str(), action.GetID());
|
||||
+ if (!CApplicationMessenger::Get().CECToggleState())
|
||||
+ return true;
|
||||
+ }
|
||||
else
|
||||
- ret = CApplicationMessenger::Get().CECStandby();
|
||||
- if (!ret) /* display is switched off */
|
||||
+ {
|
||||
+ CApplicationMessenger::Get().CECStandby();
|
||||
return true;
|
||||
+ }
|
||||
}
|
||||
|
||||
ResetScreenSaver();
|
||||
diff --git a/xbmc/ApplicationMessenger.cpp b/xbmc/ApplicationMessenger.cpp
|
||||
index 1a59c5c..d228273 100644
|
||||
--- a/xbmc/ApplicationMessenger.cpp
|
||||
+++ b/xbmc/ApplicationMessenger.cpp
|
||||
@@ -843,12 +843,12 @@ void CApplicationMessenger::ProcessMessage(ThreadMessage *pMsg)
|
||||
}
|
||||
case TMSG_CECACTIVATESOURCE:
|
||||
{
|
||||
- *((bool*)pMsg->lpVoid) = g_peripherals.ToggleDeviceState(STATE_ACTIVATE_SOURCE);
|
||||
+ g_peripherals.ToggleDeviceState(STATE_ACTIVATE_SOURCE);
|
||||
break;
|
||||
}
|
||||
case TMSG_CECSTANDBY:
|
||||
{
|
||||
- *((bool*)pMsg->lpVoid) = g_peripherals.ToggleDeviceState(STATE_STANDBY);
|
||||
+ g_peripherals.ToggleDeviceState(STATE_STANDBY);
|
||||
break;
|
||||
}
|
||||
case TMSG_START_ANDROID_ACTIVITY:
|
||||
@@ -1396,29 +1396,19 @@ bool CApplicationMessenger::CECToggleState()
|
||||
|
||||
ThreadMessage tMsg = {TMSG_CECTOGGLESTATE};
|
||||
tMsg.lpVoid = (void*)&result;
|
||||
- SendMessage(tMsg, false);
|
||||
+ SendMessage(tMsg, true);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
-bool CApplicationMessenger::CECActivateSource()
|
||||
+void CApplicationMessenger::CECActivateSource()
|
||||
{
|
||||
- bool result;
|
||||
-
|
||||
ThreadMessage tMsg = {TMSG_CECACTIVATESOURCE};
|
||||
- tMsg.lpVoid = (void*)&result;
|
||||
SendMessage(tMsg, false);
|
||||
-
|
||||
- return result;
|
||||
}
|
||||
|
||||
-bool CApplicationMessenger::CECStandby()
|
||||
+void CApplicationMessenger::CECStandby()
|
||||
{
|
||||
- bool result;
|
||||
-
|
||||
ThreadMessage tMsg = {TMSG_CECSTANDBY};
|
||||
- tMsg.lpVoid = (void*)&result;
|
||||
SendMessage(tMsg, false);
|
||||
-
|
||||
- return result;
|
||||
}
|
||||
diff --git a/xbmc/ApplicationMessenger.h b/xbmc/ApplicationMessenger.h
|
||||
index 9013567..543e065 100644
|
||||
--- a/xbmc/ApplicationMessenger.h
|
||||
+++ b/xbmc/ApplicationMessenger.h
|
||||
@@ -219,8 +219,8 @@ public:
|
||||
|
||||
void LoadProfile(unsigned int idx);
|
||||
bool CECToggleState();
|
||||
- bool CECActivateSource();
|
||||
- bool CECStandby();
|
||||
+ void CECActivateSource();
|
||||
+ void CECStandby();
|
||||
|
||||
CStdString GetResponse();
|
||||
int SetResponse(CStdString response);
|
||||
--
|
||||
2.1.2
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
From 9f1e45a10860dd23239de35673643e9e0e4a74f8 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
||||
Date: Tue, 28 Oct 2014 14:52:16 +0100
|
||||
Subject: [PATCH 5/8] [CEC] renamed the iDoubleTapTimeoutMs in the new libCEC
|
||||
for clarity. does not change binary compatibility
|
||||
|
||||
---
|
||||
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
index 1d068dc..ad123d9 100644
|
||||
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
@@ -1347,8 +1347,13 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
|
||||
m_configuration.bPowerOffOnStandby = iStandbyAction == 13011 ? 1 : 0;
|
||||
m_configuration.bShutdownOnStandby = iStandbyAction == 13005 ? 1 : 0;
|
||||
|
||||
+#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD)
|
||||
// double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50
|
||||
- m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms") / 50;
|
||||
+ m_configuration.iDoubleTapTimeout50Ms = GetSettingInt("double_tap_timeout_ms") / 50;
|
||||
+#else
|
||||
+ // backwards compatibility. will be removed once the next major release of libCEC is out
|
||||
+ m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
|
||||
+#endif
|
||||
}
|
||||
|
||||
void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses)
|
||||
--
|
||||
2.1.2
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
From fa01c108b60f74abb16992c1376bcca896093eac Mon Sep 17 00:00:00 2001
|
||||
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
||||
Date: Tue, 28 Oct 2014 16:08:00 +0100
|
||||
Subject: [PATCH 6/8] [CEC] fixed - don't use CEC_CLIENT_VERSION_CURRENT for
|
||||
the client version, because it will lead to issues when XBMC is rebuilt after
|
||||
a libCEC bump that changes something
|
||||
|
||||
---
|
||||
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
index ad123d9..015daef 100644
|
||||
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
@@ -1268,8 +1268,8 @@ void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configu
|
||||
|
||||
void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
|
||||
{
|
||||
- // use the same client version as libCEC version
|
||||
- m_configuration.clientVersion = CEC_CLIENT_VERSION_CURRENT;
|
||||
+ // client version matches the version of libCEC that we originally used the API from
|
||||
+ m_configuration.clientVersion = CEC_CLIENT_VERSION_2_2_0;
|
||||
|
||||
// device name 'XBMC'
|
||||
snprintf(m_configuration.strDeviceName, 13, "%s", GetSettingString("device_name").c_str());
|
||||
--
|
||||
2.1.2
|
||||
|
||||
@ -1,123 +0,0 @@
|
||||
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
|
||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||
pkgname=xbmc
|
||||
pkgver=13.2
|
||||
pkgrel=2
|
||||
pkgdesc="A software media player and entertainment hub for digital media"
|
||||
url="http://xbmc.org"
|
||||
arch="x86 x86_64"
|
||||
license="GPL"
|
||||
depends="python hicolor-icon-theme xdpyinfo libcrystalhd unrar mesa-demos curl"
|
||||
depends_dev="gettext-dev boost-dev mesa-dev glew-dev glu-dev mysql-dev libass-dev
|
||||
libogg-dev libvorbis-dev libmodplug-dev curl-dev flac-dev libgcrypt-dev
|
||||
bzip2-dev tiff-dev lzo-dev yajl-dev bluez-dev tinyxml-dev fribidi-dev
|
||||
sqlite-dev libpng-dev libcdio-dev pcre-dev freetype-dev taglib-dev
|
||||
jasper-dev alsa-lib-dev dbus-dev sdl-dev sdl_image-dev lame-dev
|
||||
libmicrohttpd-dev libbluray-dev avahi-dev libxrandr-dev libxt-dev
|
||||
libxmu-dev samba-dev gawk libssh-dev libva-dev libnfs-dev
|
||||
yasm-dev libmpeg2-dev libmad-dev libsamplerate-dev rtmpdump-dev
|
||||
libjpeg-turbo-dev libcrystalhd-dev udev-dev libcap-dev udisks-dev
|
||||
faac-dev gnutls-dev libxslt-dev
|
||||
libshairport-dev ffmpeg-dev afpfs-ng-dev libcec-dev
|
||||
bsd-compat-headers"
|
||||
makedepends="$depends_dev automake autoconf m4 libtool swig findutils openjdk7-jre-base
|
||||
boost-thread zip gperf cmake coreutils nasm"
|
||||
subpackages="$pkgname-dev $pkgname-doc"
|
||||
install=""
|
||||
options="ldpath-recursive"
|
||||
source="http://mirrors.xbmc.org/releases/source/$pkgname-$pkgver.tar.gz
|
||||
no-snesapu.patch
|
||||
fix-musl.patch
|
||||
fix-fileemu.patch
|
||||
fix-rsxs.patch
|
||||
|
||||
0001-CEC-fixed-don-t-try-to-stick-a-value-255-in-a-byte.patch
|
||||
0002-CEC-bump-libCEC-to-2.2.0.patch
|
||||
0003-CEC-prevent-bus-rescan-on-a-Pi-since-the-adapter-can.patch
|
||||
0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch
|
||||
0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch
|
||||
0006-CEC-fixed-don-t-use-CEC_CLIENT_VERSION_CURRENT-for-t.patch
|
||||
enable-external-ffmpeg.patch
|
||||
"
|
||||
|
||||
_builddir="$srcdir/$pkgname-$pkgver-Gotham"
|
||||
|
||||
prepare() {
|
||||
local i
|
||||
cd "$_builddir"
|
||||
for i in $source; do
|
||||
case $i in
|
||||
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$_builddir"
|
||||
MAKEFLAGS= ./bootstrap || return 1
|
||||
autoconf || return 1
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--localstatedir=/var \
|
||||
--disable-non-free \
|
||||
--disable-debug \
|
||||
--disable-ccache \
|
||||
--enable-crystalhd \
|
||||
--enable-vaapi \
|
||||
--enable-ffmpeg-libvorbis \
|
||||
--enable-rtmp \
|
||||
--enable-joystick \
|
||||
--enable-xrandr \
|
||||
--enable-optical-drive \
|
||||
--enable-external-libraries \
|
||||
|| return 1
|
||||
make || return 1
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$_builddir"
|
||||
make DESTDIR="$pkgdir" install || return 1
|
||||
rm -f "$pkgdir"/usr/lib/*.la
|
||||
}
|
||||
|
||||
md5sums="d80153b2cc78b88966458ab136e9494f xbmc-13.2.tar.gz
|
||||
5ad388f29ab8f4ca6bc9e2b73bf946ef no-snesapu.patch
|
||||
9d61cf68c8d994d11d7c4c0ab9383098 fix-musl.patch
|
||||
69049c53ffc4a403ccff3bba77e47793 fix-fileemu.patch
|
||||
1c8cc1618f29613fe3521db3e4a99db5 fix-rsxs.patch
|
||||
d00af955c000f285a230568004209117 0001-CEC-fixed-don-t-try-to-stick-a-value-255-in-a-byte.patch
|
||||
6ee855d2cd6ada08b2c72b5c15d5ae76 0002-CEC-bump-libCEC-to-2.2.0.patch
|
||||
3e810f451e58d5704cdd15b83552aa53 0003-CEC-prevent-bus-rescan-on-a-Pi-since-the-adapter-can.patch
|
||||
693869eb72d696c3457e795722e707c6 0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch
|
||||
b6346f66286195189e41839e9a23ef87 0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch
|
||||
47b765e1d4299fac32bf92f108548d06 0006-CEC-fixed-don-t-use-CEC_CLIENT_VERSION_CURRENT-for-t.patch
|
||||
9f9b41cfc1e21b1e7d0bb10d6e85b3c6 enable-external-ffmpeg.patch"
|
||||
sha256sums="acbf5dffa3034a3406240ee3cf81e721386cd383d23d056ddde1f769e050e585 xbmc-13.2.tar.gz
|
||||
3c04c2cd6909cfb587b194e6c5a3025f1a3f03a0c5178ad70541ff7e69915935 no-snesapu.patch
|
||||
c07906ae884919cce64abae77f9facbb1aa68ba214ae7ec3195c260ae1a15c27 fix-musl.patch
|
||||
cd566ae87c0ecc3e7cbeee9d80b042ae937d4f243413293616bd31f24efffec7 fix-fileemu.patch
|
||||
e5de7cf5e781de9288f362c9d1c88d226297ba4aae3f75e5980f0a7cfc2258f0 fix-rsxs.patch
|
||||
f4b436a64e32af6728fc9a584292b56de356d9090f0db0af30798a43aaa077f3 0001-CEC-fixed-don-t-try-to-stick-a-value-255-in-a-byte.patch
|
||||
9d9ccbd140a71b90d43a22b7722804b9cb509b4e1e1fec02c0e2bceaed3b3958 0002-CEC-bump-libCEC-to-2.2.0.patch
|
||||
0f0401189cc8481f05d7b68c50d66e18144c7d261be783e32c5b269f4b356ad7 0003-CEC-prevent-bus-rescan-on-a-Pi-since-the-adapter-can.patch
|
||||
33d6bd2b0da3d8563bfdf6059ad59ca10d9fe617e51990220ceb40d6fb3129d3 0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch
|
||||
d98f86ceefb039b43a66332658aeee4aff25370248955ece10d04ae21f33d2a9 0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch
|
||||
d829a5267f0b8042308b291366915253b3104d85a780a03cdaff6bec82493b95 0006-CEC-fixed-don-t-use-CEC_CLIENT_VERSION_CURRENT-for-t.patch
|
||||
0239e33e87292c7340ed2092f2b5f1e82f5e283b1f763fb125b3aee78f50c355 enable-external-ffmpeg.patch"
|
||||
sha512sums="83a514410748b05da4c626caff34fec7b6b26a8bdea9f158e1c75721d3a47d36eb1f97ed4c162f6c2472a97f658e3b5285c1e0b144bfb4f654932586eee4d1c8 xbmc-13.2.tar.gz
|
||||
8b2b3159b536719bad7c00f2eb51c4778f8e6c049cfe07e2555a530ad8587ca7b83623e1b5f40220d2e490e38442f893f87496620aa94da27d37a8bddc72f434 no-snesapu.patch
|
||||
ddcd22512656607dd077135f95c7342081fbbeb9f78f8dc7e55e4a3a98b19d7c046faebb2925443c27dbd1cd7889e054a43a36e1efdbb8df2817997876c35513 fix-musl.patch
|
||||
d2c284a7156a842e23a1089053cb28af1a825fddbeb5b5e8d4a8f2d8b37a7861a7082529e603cfe56eb2c7fd35c4ce1aa7e9f224690ab42689c9886d60dafbc7 fix-fileemu.patch
|
||||
e1ed2e2e53c20b59f2ea926e9097e99438fdaed9b9d4c0133567bd1c8dc26b003961ad045ce4aaba62e9825e1a2d9651e72bd21bdb09dcc840c8e14d9602d109 fix-rsxs.patch
|
||||
53723e36216a115631ec0600824f30e30400eca2ebecad7d0b8d2b976704cf6a9a3c9be9ed9325eddfacc33058d71f11b65f5137e72db914ce4858f9a8d563f5 0001-CEC-fixed-don-t-try-to-stick-a-value-255-in-a-byte.patch
|
||||
a96644b0047b7e43039bd66984155532662cf25a16a0a569a46cb919f32f73e0accf1f8f4c399499d2da8f44e59462c436b3012e86653bc7c3fde53bc5461951 0002-CEC-bump-libCEC-to-2.2.0.patch
|
||||
30839838fe1644fb995af57f14ebbc9dd396c706c30fad407c5958b268c3f61674e1726c67447b0399f31fc1f96bb4fe90682d83e914319ad0b6b56dab73719a 0003-CEC-prevent-bus-rescan-on-a-Pi-since-the-adapter-can.patch
|
||||
dc7a6e5b4dbbed6cdfbb99011e9bae11c7b09542efdf4755daeead816f3d50eac7410081ae74cb5ffffbd38060b0ec2a6cc082538f9fb844be6ef3cc28508290 0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch
|
||||
05074fff8c4ff0133380a44202bdc26e15f5b6e924d54190ecfa9c5991f19c65f6cb5705205d3ffe1f108baf397ecaf316db1ca29524e1cf89534c797633994a 0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch
|
||||
becb625f28c81802c105e6ff8632aae25a5d78eb7140893d85f0f9420e695cee8cbe30ddfb18748fb294d72fe817db7e219fa512cd861f53ca56e04cdc7e2ade 0006-CEC-fixed-don-t-use-CEC_CLIENT_VERSION_CURRENT-for-t.patch
|
||||
f0ee0fcb52d0e34cfb20a8eeeedba7f82cee4c2c1657810e4f29a77981b4800df7df20d9769436757ded48504b17f1b1c4b5dbd8ff9114fb4a0839576443511e enable-external-ffmpeg.patch"
|
||||
@ -1,100 +0,0 @@
|
||||
diff -rupN a/configure.in b/configure.in
|
||||
--- a/configure.in 2014-05-03 21:03:25.000000000 +0000
|
||||
+++ b/configure.in 2014-05-07 09:56:30.039177391 +0000
|
||||
@@ -600,7 +600,7 @@ PKG_PROG_PKG_CONFIG
|
||||
MAKE="${MAKE:-make}"
|
||||
OBJDUMP="${OBJDUMP:-objdump}"
|
||||
|
||||
-use_external_ffmpeg=no
|
||||
+use_external_ffmpeg=yes
|
||||
use_static_ffmpeg=no
|
||||
|
||||
# ffmpeg needs the output of uname -s (e.x. linux, darwin) for the target_os
|
||||
@@ -632,7 +632,7 @@ case $host in
|
||||
use_arch="x86"
|
||||
use_cpu="i686"
|
||||
fi
|
||||
- use_static_ffmpeg=yes
|
||||
+ use_static_ffmpeg=no
|
||||
;;
|
||||
x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
|
||||
ARCH="x86_64-linux"
|
||||
@@ -640,7 +640,7 @@ case $host in
|
||||
use_arch="x86_64"
|
||||
use_cpu="x86_64"
|
||||
fi
|
||||
- use_static_ffmpeg=yes
|
||||
+ use_static_ffmpeg=no
|
||||
;;
|
||||
i386-*-freebsd*)
|
||||
ARCH="x86-freebsd"
|
||||
@@ -696,7 +696,7 @@ case $host in
|
||||
use_sdl=no
|
||||
use_x11=no
|
||||
use_wayland=no
|
||||
- use_static_ffmpeg=yes
|
||||
+ use_static_ffmpeg=no
|
||||
;;
|
||||
arm*-*linux-android*)
|
||||
target_platform=target_android
|
||||
diff -rupN a/lib/DllAvCodec.h b/lib/DllAvCodec.h
|
||||
--- a/lib/DllAvCodec.h 2014-05-03 21:03:25.000000000 +0000
|
||||
+++ b/lib/DllAvCodec.h 2014-05-07 10:10:06.298165915 +0000
|
||||
@@ -43,6 +43,7 @@ extern "C" {
|
||||
|
||||
#if (defined USE_EXTERNAL_FFMPEG)
|
||||
#include <libavcodec/avcodec.h>
|
||||
+ #include <libavutil/frame.h>
|
||||
#else
|
||||
#include "libavcodec/avcodec.h"
|
||||
#endif
|
||||
diff -rupN a/lib/DllAvUtil.h b/lib/DllAvUtil.h
|
||||
--- a/lib/DllAvUtil.h 2014-05-03 21:03:25.000000000 +0000
|
||||
+++ b/lib/DllAvUtil.h 2014-05-07 10:17:31.415798448 +0000
|
||||
@@ -31,33 +31,19 @@
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
-#if (defined USE_EXTERNAL_FFMPEG)
|
||||
- #include <libavutil/avutil.h>
|
||||
- // for av_get_default_channel_layout
|
||||
- #include <libavutil/audioconvert.h>
|
||||
- #include <libavutil/crc.h>
|
||||
- #include <libavutil/fifo.h>
|
||||
- // for LIBAVCODEC_VERSION_INT:
|
||||
- #include <libavcodec/avcodec.h>
|
||||
- // for enum AVSampleFormat
|
||||
- #include <libavutil/samplefmt.h>
|
||||
- #include <libavutil/opt.h>
|
||||
- #include <libavutil/mem.h>
|
||||
- #include <libavutil/mathematics.h>
|
||||
- #if (defined USE_LIBAV_HACKS)
|
||||
- #include "xbmc-libav-hacks/libav_hacks.h"
|
||||
- #endif
|
||||
-#else
|
||||
- #include "libavutil/avutil.h"
|
||||
- //for av_get_default_channel_layout
|
||||
- #include "libavutil/audioconvert.h"
|
||||
- #include "libavutil/crc.h"
|
||||
- #include "libavutil/opt.h"
|
||||
- #include "libavutil/mem.h"
|
||||
- #include "libavutil/fifo.h"
|
||||
- // for enum AVSampleFormat
|
||||
- #include "libavutil/samplefmt.h"
|
||||
-#endif
|
||||
+#include <libavutil/avutil.h>
|
||||
+#include <libavutil/frame.h>
|
||||
+// for av_get_default_channel_layout
|
||||
+#include <libavutil/audioconvert.h>
|
||||
+#include <libavutil/crc.h>
|
||||
+#include <libavutil/fifo.h>
|
||||
+// for LIBAVCODEC_VERSION_INT:
|
||||
+#include <libavcodec/avcodec.h>
|
||||
+// for enum AVSampleFormat
|
||||
+#include <libavutil/samplefmt.h>
|
||||
+#include <libavutil/opt.h>
|
||||
+#include <libavutil/mem.h>
|
||||
+#include <libavutil/mathematics.h>
|
||||
}
|
||||
|
||||
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,29,100)
|
||||
@ -1,467 +0,0 @@
|
||||
diff --git a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
|
||||
index ae7ccb5..d8fd7fc 100644
|
||||
--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
|
||||
+++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
|
||||
@@ -49,6 +49,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
#include <signal.h>
|
||||
+#include <paths.h>
|
||||
#ifdef TARGET_POSIX
|
||||
#include "PlatformDefs.h" // for __stat64
|
||||
#endif
|
||||
@@ -466,13 +467,10 @@ extern "C"
|
||||
EmuFileObject* o = g_emuFileWrapper.GetFileObjectByDescriptor(fd);
|
||||
if (o)
|
||||
{
|
||||
- if(!o->used)
|
||||
- return NULL;
|
||||
-
|
||||
int nmode = convert_fmode(mode);
|
||||
if( (o->mode & nmode) != nmode)
|
||||
CLog::Log(LOGWARNING, "dll_fdopen - mode 0x%x differs from fd mode 0x%x", nmode, o->mode);
|
||||
- return &o->file_emu;
|
||||
+ return g_emuFileWrapper.GetStreamByFileObject(o);
|
||||
}
|
||||
else if (!IS_STD_DESCRIPTOR(fd))
|
||||
{
|
||||
@@ -535,7 +533,7 @@ extern "C"
|
||||
return -1;
|
||||
}
|
||||
object->mode = iMode;
|
||||
- return g_emuFileWrapper.GetDescriptorByStream(&object->file_emu);
|
||||
+ return g_emuFileWrapper.GetDescriptorByFileObject(object);
|
||||
}
|
||||
delete pFile;
|
||||
return -1;
|
||||
@@ -1181,8 +1179,8 @@ extern "C"
|
||||
{
|
||||
FILE* file = NULL;
|
||||
#if defined(TARGET_LINUX) && !defined(TARGET_ANDROID)
|
||||
- if (strcmp(filename, MOUNTED) == 0
|
||||
- || strcmp(filename, MNTTAB) == 0)
|
||||
+ if (strcmp(filename, _PATH_MOUNTED) == 0
|
||||
+ || strcmp(filename, _PATH_MNTTAB) == 0)
|
||||
{
|
||||
CLog::Log(LOGINFO, "%s - something opened the mount file, let's hope it knows what it's doing", __FUNCTION__);
|
||||
return fopen(filename, mode);
|
||||
@@ -1572,7 +1570,7 @@ extern "C"
|
||||
int ret;
|
||||
|
||||
ret = dll_fgetpos64(stream, &tmpPos);
|
||||
-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
|
||||
+#if !defined(GLIBC) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
|
||||
*pos = (fpos_t)tmpPos;
|
||||
#else
|
||||
pos->__pos = (off_t)tmpPos.__pos;
|
||||
@@ -1585,8 +1583,9 @@ extern "C"
|
||||
CFile* pFile = g_emuFileWrapper.GetFileXbmcByStream(stream);
|
||||
if (pFile != NULL)
|
||||
{
|
||||
-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
|
||||
- *pos = pFile->GetPosition();
|
||||
+#if !defined(GLIBC) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
|
||||
+ uint64_t *ppos = (uint64_t *) pos;
|
||||
+ *ppos = pFile->GetPosition();
|
||||
#else
|
||||
pos->__pos = pFile->GetPosition();
|
||||
#endif
|
||||
@@ -1607,8 +1606,9 @@ extern "C"
|
||||
int fd = g_emuFileWrapper.GetDescriptorByStream(stream);
|
||||
if (fd >= 0)
|
||||
{
|
||||
-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
|
||||
- if (dll_lseeki64(fd, *pos, SEEK_SET) >= 0)
|
||||
+#if !defined(GLIBC) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
|
||||
+ const uint64_t *ppos = (const uint64_t *) pos;
|
||||
+ if (dll_lseeki64(fd, *ppos, SEEK_SET) >= 0)
|
||||
#else
|
||||
if (dll_lseeki64(fd, (__off64_t)pos->__pos, SEEK_SET) >= 0)
|
||||
#endif
|
||||
@@ -1624,7 +1624,7 @@ extern "C"
|
||||
{
|
||||
// it might be something else than a file, or the file is not emulated
|
||||
// let the operating system handle it
|
||||
-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
|
||||
+#if !defined(GLIBC) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
|
||||
return fsetpos(stream, pos);
|
||||
#else
|
||||
return fsetpos64(stream, pos);
|
||||
@@ -1640,7 +1640,7 @@ extern "C"
|
||||
if (fd >= 0)
|
||||
{
|
||||
fpos64_t tmpPos;
|
||||
-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
|
||||
+#if !defined(GLIBC) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
|
||||
tmpPos= *pos;
|
||||
#else
|
||||
tmpPos.__pos = (off64_t)(pos->__pos);
|
||||
diff --git a/xbmc/cores/DllLoader/exports/emu_msvcrt.h b/xbmc/cores/DllLoader/exports/emu_msvcrt.h
|
||||
index ae9b1c4..3b19122 100644
|
||||
--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.h
|
||||
+++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.h
|
||||
@@ -26,7 +26,7 @@
|
||||
#define _onexit_t void*
|
||||
#endif
|
||||
|
||||
-#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
|
||||
+#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) || !defined(GLIBC)
|
||||
typedef off_t __off_t;
|
||||
typedef int64_t off64_t;
|
||||
typedef off64_t __off64_t;
|
||||
diff --git a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp
|
||||
index cf8a060..9110312 100644
|
||||
--- a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp
|
||||
+++ b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp
|
||||
@@ -27,12 +27,7 @@ CEmuFileWrapper g_emuFileWrapper;
|
||||
CEmuFileWrapper::CEmuFileWrapper()
|
||||
{
|
||||
// since we always use dlls we might just initialize it directly
|
||||
- for (int i = 0; i < MAX_EMULATED_FILES; i++)
|
||||
- {
|
||||
- memset(&m_files[i], 0, sizeof(EmuFileObject));
|
||||
- m_files[i].used = false;
|
||||
- m_files[i].file_emu._file = -1;
|
||||
- }
|
||||
+ memset(m_files, 0, sizeof(m_files));
|
||||
}
|
||||
|
||||
CEmuFileWrapper::~CEmuFileWrapper()
|
||||
@@ -43,22 +38,7 @@ void CEmuFileWrapper::CleanUp()
|
||||
{
|
||||
CSingleLock lock(m_criticalSection);
|
||||
for (int i = 0; i < MAX_EMULATED_FILES; i++)
|
||||
- {
|
||||
- if (m_files[i].used)
|
||||
- {
|
||||
- m_files[i].file_xbmc->Close();
|
||||
- delete m_files[i].file_xbmc;
|
||||
-
|
||||
- if (m_files[i].file_lock)
|
||||
- {
|
||||
- delete m_files[i].file_lock;
|
||||
- m_files[i].file_lock = NULL;
|
||||
- }
|
||||
- memset(&m_files[i], 0, sizeof(EmuFileObject));
|
||||
- m_files[i].used = false;
|
||||
- m_files[i].file_emu._file = -1;
|
||||
- }
|
||||
- }
|
||||
+ UnRegisterFileObject(&m_files[i], true);
|
||||
}
|
||||
|
||||
EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile)
|
||||
@@ -69,13 +49,11 @@ EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile)
|
||||
|
||||
for (int i = 0; i < MAX_EMULATED_FILES; i++)
|
||||
{
|
||||
- if (!m_files[i].used)
|
||||
+ if (!m_files[i].file_xbmc)
|
||||
{
|
||||
// found a free location
|
||||
object = &m_files[i];
|
||||
- object->used = true;
|
||||
object->file_xbmc = pFile;
|
||||
- object->file_emu._file = (i + FILE_WRAPPER_OFFSET);
|
||||
object->file_lock = new CCriticalSection();
|
||||
break;
|
||||
}
|
||||
@@ -84,82 +62,71 @@ EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile)
|
||||
return object;
|
||||
}
|
||||
|
||||
-void CEmuFileWrapper::UnRegisterFileObjectByDescriptor(int fd)
|
||||
+void CEmuFileWrapper::UnRegisterFileObject(EmuFileObject *object, bool free_file)
|
||||
{
|
||||
- int i = fd - FILE_WRAPPER_OFFSET;
|
||||
- if (i >= 0 && i < MAX_EMULATED_FILES)
|
||||
+ if (object && object->file_xbmc)
|
||||
{
|
||||
- if (m_files[i].used)
|
||||
+ if (object->file_xbmc && free_file)
|
||||
{
|
||||
- CSingleLock lock(m_criticalSection);
|
||||
-
|
||||
- // we assume the emulated function alreay deleted the CFile object
|
||||
- if (m_files[i].used)
|
||||
- {
|
||||
- if (m_files[i].file_lock)
|
||||
- {
|
||||
- delete m_files[i].file_lock;
|
||||
- m_files[i].file_lock = NULL;
|
||||
- }
|
||||
- memset(&m_files[i], 0, sizeof(EmuFileObject));
|
||||
- m_files[i].used = false;
|
||||
- m_files[i].file_emu._file = -1;
|
||||
- }
|
||||
+ object->file_xbmc->Close();
|
||||
+ delete object->file_xbmc;
|
||||
}
|
||||
+ if (object->file_lock)
|
||||
+ {
|
||||
+ delete object->file_lock;
|
||||
+ }
|
||||
+
|
||||
+ memset(object, 0, sizeof(*object));
|
||||
}
|
||||
}
|
||||
|
||||
+void CEmuFileWrapper::UnRegisterFileObjectByDescriptor(int fd)
|
||||
+{
|
||||
+ CSingleLock lock(m_criticalSection);
|
||||
+ UnRegisterFileObject(GetFileObjectByDescriptor(fd), false);
|
||||
+}
|
||||
+
|
||||
void CEmuFileWrapper::UnRegisterFileObjectByStream(FILE* stream)
|
||||
{
|
||||
- if (stream != NULL)
|
||||
- {
|
||||
- return UnRegisterFileObjectByDescriptor(stream->_file);
|
||||
- }
|
||||
+ CSingleLock lock(m_criticalSection);
|
||||
+ UnRegisterFileObject(GetFileObjectByStream(stream), false);
|
||||
}
|
||||
|
||||
void CEmuFileWrapper::LockFileObjectByDescriptor(int fd)
|
||||
{
|
||||
- int i = fd - FILE_WRAPPER_OFFSET;
|
||||
- if (i >= 0 && i < MAX_EMULATED_FILES)
|
||||
+ EmuFileObject* object = GetFileObjectByDescriptor(fd);
|
||||
+ if (object && object->file_xbmc)
|
||||
{
|
||||
- if (m_files[i].used)
|
||||
- {
|
||||
- m_files[i].file_lock->lock();
|
||||
- }
|
||||
+ object->file_lock->lock();
|
||||
}
|
||||
}
|
||||
|
||||
bool CEmuFileWrapper::TryLockFileObjectByDescriptor(int fd)
|
||||
-{
|
||||
- int i = fd - FILE_WRAPPER_OFFSET;
|
||||
- if (i >= 0 && i < MAX_EMULATED_FILES)
|
||||
- {
|
||||
- if (m_files[i].used)
|
||||
- {
|
||||
- return m_files[i].file_lock->try_lock();
|
||||
- }
|
||||
+{
|
||||
+ EmuFileObject* object = GetFileObjectByDescriptor(fd);
|
||||
+ if (object && object->file_xbmc)
|
||||
+ {
|
||||
+ return object->file_lock->try_lock();
|
||||
}
|
||||
+
|
||||
return false;
|
||||
}
|
||||
|
||||
void CEmuFileWrapper::UnlockFileObjectByDescriptor(int fd)
|
||||
-{
|
||||
- int i = fd - FILE_WRAPPER_OFFSET;
|
||||
- if (i >= 0 && i < MAX_EMULATED_FILES)
|
||||
- {
|
||||
- if (m_files[i].used)
|
||||
- {
|
||||
- m_files[i].file_lock->unlock();
|
||||
- }
|
||||
+{
|
||||
+ EmuFileObject* object = GetFileObjectByDescriptor(fd);
|
||||
+ if (object && object->file_xbmc)
|
||||
+ {
|
||||
+ object->file_lock->unlock();
|
||||
}
|
||||
}
|
||||
|
||||
EmuFileObject* CEmuFileWrapper::GetFileObjectByDescriptor(int fd)
|
||||
{
|
||||
- int i = fd - FILE_WRAPPER_OFFSET;
|
||||
+ int i = fd - 0x7000000;
|
||||
if (i >= 0 && i < MAX_EMULATED_FILES)
|
||||
{
|
||||
- if (m_files[i].used)
|
||||
+ if (m_files[i].file_xbmc)
|
||||
{
|
||||
return &m_files[i];
|
||||
}
|
||||
@@ -167,20 +134,38 @@ EmuFileObject* CEmuFileWrapper::GetFileObjectByDescriptor(int fd)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-EmuFileObject* CEmuFileWrapper::GetFileObjectByStream(FILE* stream)
|
||||
+int CEmuFileWrapper::GetDescriptorByFileObject(EmuFileObject *object)
|
||||
{
|
||||
- if (stream != NULL)
|
||||
+ int i = object - m_files;
|
||||
+ if (i >= 0 && i < MAX_EMULATED_FILES)
|
||||
{
|
||||
- return GetFileObjectByDescriptor(stream->_file);
|
||||
+ return 0x7000000 + i;
|
||||
}
|
||||
+ return -1;
|
||||
+}
|
||||
|
||||
+EmuFileObject* CEmuFileWrapper::GetFileObjectByStream(FILE* stream)
|
||||
+{
|
||||
+ EmuFileObject *object = (EmuFileObject*) stream;
|
||||
+ if (object >= &m_files[0] || object < &m_files[MAX_EMULATED_FILES])
|
||||
+ {
|
||||
+ if (object->file_xbmc)
|
||||
+ {
|
||||
+ return object;
|
||||
+ }
|
||||
+ }
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+FILE* CEmuFileWrapper::GetStreamByFileObject(EmuFileObject *object)
|
||||
+{
|
||||
+ return (FILE*) object;
|
||||
+}
|
||||
+
|
||||
XFILE::CFile* CEmuFileWrapper::GetFileXbmcByDescriptor(int fd)
|
||||
{
|
||||
EmuFileObject* object = GetFileObjectByDescriptor(fd);
|
||||
- if (object != NULL && object->used)
|
||||
+ if (object != NULL)
|
||||
{
|
||||
return object->file_xbmc;
|
||||
}
|
||||
@@ -191,8 +176,8 @@ XFILE::CFile* CEmuFileWrapper::GetFileXbmcByStream(FILE* stream)
|
||||
{
|
||||
if (stream != NULL)
|
||||
{
|
||||
- EmuFileObject* object = GetFileObjectByDescriptor(stream->_file);
|
||||
- if (object != NULL && object->used)
|
||||
+ EmuFileObject* object = GetFileObjectByStream(stream);
|
||||
+ if (object != NULL)
|
||||
{
|
||||
return object->file_xbmc;
|
||||
}
|
||||
@@ -202,42 +187,20 @@ XFILE::CFile* CEmuFileWrapper::GetFileXbmcByStream(FILE* stream)
|
||||
|
||||
int CEmuFileWrapper::GetDescriptorByStream(FILE* stream)
|
||||
{
|
||||
- if (stream != NULL)
|
||||
- {
|
||||
- int i = stream->_file - FILE_WRAPPER_OFFSET;
|
||||
- if (i >= 0 && i < MAX_EMULATED_FILES)
|
||||
- {
|
||||
- return stream->_file;
|
||||
- }
|
||||
- }
|
||||
- return -1;
|
||||
+ return GetDescriptorByFileObject(GetFileObjectByStream(stream));
|
||||
}
|
||||
|
||||
FILE* CEmuFileWrapper::GetStreamByDescriptor(int fd)
|
||||
{
|
||||
- EmuFileObject* object = GetFileObjectByDescriptor(fd);
|
||||
- if (object != NULL && object->used)
|
||||
- {
|
||||
- return &object->file_emu;
|
||||
- }
|
||||
- return NULL;
|
||||
+ return GetStreamByFileObject(GetFileObjectByDescriptor(fd));
|
||||
}
|
||||
|
||||
bool CEmuFileWrapper::DescriptorIsEmulatedFile(int fd)
|
||||
{
|
||||
- int i = fd - FILE_WRAPPER_OFFSET;
|
||||
- if (i >= 0 && i < MAX_EMULATED_FILES)
|
||||
- {
|
||||
- return true;
|
||||
- }
|
||||
- return false;
|
||||
+ return GetFileObjectByDescriptor(fd) != NULL;
|
||||
}
|
||||
|
||||
bool CEmuFileWrapper::StreamIsEmulatedFile(FILE* stream)
|
||||
{
|
||||
- if (stream != NULL)
|
||||
- {
|
||||
- return DescriptorIsEmulatedFile(stream->_file);
|
||||
- }
|
||||
- return false;
|
||||
+ return GetFileObjectByStream(stream) != NULL;
|
||||
}
|
||||
diff --git a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h
|
||||
index 3d79c7a..1b3e62f 100644
|
||||
--- a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h
|
||||
+++ b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h
|
||||
@@ -27,14 +27,14 @@
|
||||
#include "system.h"
|
||||
#include "threads/CriticalSection.h"
|
||||
|
||||
-#if defined(TARGET_POSIX) && !defined(TARGET_DARWIN) && !defined(TARGET_FREEBSD) && !defined(TARGET_ANDROID) && !defined(__UCLIBC__)
|
||||
-#define _file _fileno
|
||||
-#elif defined(__UCLIBC__)
|
||||
-#define _file __filedes
|
||||
-#endif
|
||||
+//#if defined(TARGET_POSIX) && !defined(TARGET_DARWIN) && !defined(TARGET_FREEBSD) && !defined(TARGET_ANDROID) && !defined(__UCLIBC__)
|
||||
+//#define _file _fileno
|
||||
+//#elif defined(__UCLIBC__)
|
||||
+//#define _file __filedes
|
||||
+//#endif
|
||||
|
||||
#define MAX_EMULATED_FILES 50
|
||||
-#define FILE_WRAPPER_OFFSET 0x00000100
|
||||
+//#define FILE_WRAPPER_OFFSET 0x00000100
|
||||
|
||||
namespace XFILE
|
||||
{
|
||||
@@ -43,11 +43,9 @@ namespace XFILE
|
||||
|
||||
typedef struct stEmuFileObject
|
||||
{
|
||||
- bool used;
|
||||
- FILE file_emu;
|
||||
- XFILE::CFile* file_xbmc;
|
||||
+ XFILE::CFile* file_xbmc;
|
||||
CCriticalSection *file_lock;
|
||||
- int mode;
|
||||
+ int mode;
|
||||
} EmuFileObject;
|
||||
|
||||
class CEmuFileWrapper
|
||||
@@ -62,19 +60,22 @@ public:
|
||||
void CleanUp();
|
||||
|
||||
EmuFileObject* RegisterFileObject(XFILE::CFile* pFile);
|
||||
+ void UnRegisterFileObject(EmuFileObject*, bool free_file);
|
||||
void UnRegisterFileObjectByDescriptor(int fd);
|
||||
void UnRegisterFileObjectByStream(FILE* stream);
|
||||
void LockFileObjectByDescriptor(int fd);
|
||||
bool TryLockFileObjectByDescriptor(int fd);
|
||||
void UnlockFileObjectByDescriptor(int fd);
|
||||
- EmuFileObject* GetFileObjectByDescriptor(int fd);
|
||||
- EmuFileObject* GetFileObjectByStream(FILE* stream);
|
||||
+ EmuFileObject* GetFileObjectByDescriptor(int fd);
|
||||
+ int GetDescriptorByFileObject(EmuFileObject*);
|
||||
+ EmuFileObject* GetFileObjectByStream(FILE* stream);
|
||||
+ FILE* GetStreamByFileObject(EmuFileObject*);
|
||||
XFILE::CFile* GetFileXbmcByDescriptor(int fd);
|
||||
XFILE::CFile* GetFileXbmcByStream(FILE* stream);
|
||||
- static int GetDescriptorByStream(FILE* stream);
|
||||
+ int GetDescriptorByStream(FILE* stream);
|
||||
FILE* GetStreamByDescriptor(int fd);
|
||||
- static bool DescriptorIsEmulatedFile(int fd);
|
||||
- static bool StreamIsEmulatedFile(FILE* stream);
|
||||
+ bool DescriptorIsEmulatedFile(int fd);
|
||||
+ bool StreamIsEmulatedFile(FILE* stream);
|
||||
private:
|
||||
EmuFileObject m_files[MAX_EMULATED_FILES];
|
||||
CCriticalSection m_criticalSection;
|
||||
diff --git a/xbmc/cores/DllLoader/exports/wrapper.c b/xbmc/cores/DllLoader/exports/wrapper.c
|
||||
index a9225e5..355da1c 100644
|
||||
--- a/xbmc/cores/DllLoader/exports/wrapper.c
|
||||
+++ b/xbmc/cores/DllLoader/exports/wrapper.c
|
||||
@@ -39,7 +39,7 @@
|
||||
#endif
|
||||
#include <dlfcn.h>
|
||||
|
||||
-#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
|
||||
+#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) || !defined(GLIBC)
|
||||
typedef off_t __off_t;
|
||||
typedef int64_t off64_t;
|
||||
typedef off64_t __off64_t;
|
||||
@ -1,107 +0,0 @@
|
||||
diff -ru xbmc-12.3-Frodo.orig/configure.in xbmc-12.3-Frodo/configure.in
|
||||
diff -ru xbmc-12.3-Frodo.orig/lib/SlingboxLib/SlingboxLib.cpp xbmc-12.3-Frodo/lib/SlingboxLib/SlingboxLib.cpp
|
||||
--- xbmc-12.3-Frodo.orig/lib/SlingboxLib/SlingboxLib.cpp 2013-12-12 21:47:49.000000000 +0000
|
||||
+++ xbmc-12.3-Frodo/lib/SlingboxLib/SlingboxLib.cpp 2014-04-15 06:07:15.746789122 +0000
|
||||
@@ -29,7 +29,9 @@
|
||||
#include <time.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
+#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <sys/select.h>
|
||||
#define INVALID_SOCKET (SOCKET)(~0)
|
||||
#define SOCKET_ERROR (-1)
|
||||
#endif
|
||||
diff -ru xbmc-12.3-Frodo.orig/lib/libXDAAP/thread.h xbmc-12.3-Frodo/lib/libXDAAP/thread.h
|
||||
--- xbmc-12.3-Frodo.orig/lib/libXDAAP/thread.h 2013-12-12 21:47:49.000000000 +0000
|
||||
+++ xbmc-12.3-Frodo/lib/libXDAAP/thread.h 2014-04-15 06:11:09.940947997 +0000
|
||||
@@ -37,7 +37,7 @@
|
||||
#define ts_mutex pthread_mutex_t
|
||||
#define ts_condition pthread_cond_t
|
||||
|
||||
-#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
+#if !defined(PTHREAD_MUTEX_RECURSIVE_NP)
|
||||
#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
|
||||
#endif
|
||||
|
||||
diff -ru xbmc-12.3-Frodo.orig/xbmc/visualizations/XBMCProjectM/libprojectM/BeatDetect.cpp xbmc-12.3-Frodo/xbmc/visualizations/XBMCProjectM/libprojectM/BeatDetect.cpp
|
||||
--- xbmc-12.3-Frodo.orig/xbmc/visualizations/XBMCProjectM/libprojectM/BeatDetect.cpp 2014-04-15 05:52:42.214313750 +0000
|
||||
+++ xbmc-12.3-Frodo/xbmc/visualizations/XBMCProjectM/libprojectM/BeatDetect.cpp 2014-04-15 05:49:51.921324165 +0000
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "Common.hpp"
|
||||
#include "PCM.hpp"
|
||||
-#include <cmath>
|
||||
+#include "math.h"
|
||||
#include "BeatDetect.hpp"
|
||||
|
||||
#ifdef _WIN32
|
||||
--- ./configure.in.orig
|
||||
+++ ./configure.in
|
||||
@@ -628,7 +628,7 @@
|
||||
use_x11=no
|
||||
build_shared_lib=yes
|
||||
;;
|
||||
- i*86*-linux-gnu*|i*86*-*-linux-uclibc*)
|
||||
+ i*86*-linux-gnu*|i*86*-*-linux-uclibc*|i*86*-linux-musl*)
|
||||
ARCH="i486-linux"
|
||||
if test "$use_cpu" = "no" -a "$cross_compiling" = "yes"; then
|
||||
use_arch="x86"
|
||||
@@ -636,7 +636,7 @@
|
||||
fi
|
||||
use_static_ffmpeg=yes
|
||||
;;
|
||||
- x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
|
||||
+ x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*)
|
||||
ARCH="x86_64-linux"
|
||||
if test "$use_cpu" = "no" -a "$cross_compiling" = "yes"; then
|
||||
use_arch="x86_64"
|
||||
@@ -688,7 +688,7 @@
|
||||
powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*)
|
||||
ARCH="powerpc64-linux"
|
||||
;;
|
||||
- arm*-*-linux-gnu*|arm*-*-linux-uclibc*)
|
||||
+ arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-muslgnu*)
|
||||
ARCH="arm"
|
||||
use_arch="arm"
|
||||
ffmpeg_target_os=linux
|
||||
--- ./xbmc/cores/DllLoader/ldt_keeper.c.orig
|
||||
+++ ./xbmc/cores/DllLoader/ldt_keeper.c
|
||||
@@ -48,7 +48,7 @@
|
||||
#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0))
|
||||
_syscall3( int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount );
|
||||
#else
|
||||
-#if defined(TARGET_ANDROID) && defined(__i386__) && !defined(modify_ldt)
|
||||
+#if defined(__linux__) && !defined(__GLIBC__) && !defined(modify_ldt)
|
||||
#define modify_ldt(a,b,c) syscall( __NR_modify_ldt, a, b, c);
|
||||
#else
|
||||
int modify_ldt(int func, void *ptr, unsigned long bytecount);
|
||||
--- ./tools/TexturePacker/XBTFWriter.cpp.orig
|
||||
+++ ./tools/TexturePacker/XBTFWriter.cpp
|
||||
@@ -23,11 +23,7 @@
|
||||
#include <inttypes.h>
|
||||
#include "guilib/XBTF.h"
|
||||
#include "utils/EndianSwap.h"
|
||||
-#if defined(TARGET_FREEBSD) || defined(TARGET_DARWIN)
|
||||
#include <stdlib.h>
|
||||
-#elif !defined(TARGET_DARWIN)
|
||||
-#include <malloc.h>
|
||||
-#endif
|
||||
#include <memory.h>
|
||||
|
||||
#define WRITE_STR(str, size, file) fwrite(str, size, 1, file)
|
||||
--- ./m4/xbmc_arch.m4.orig
|
||||
+++ ./m4/xbmc_arch.m4
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
# host detection and setup
|
||||
case $host in
|
||||
- i*86*-linux-gnu*|i*86*-*-linux-uclibc*)
|
||||
+ i*86*-linux-gnu*|i*86*-*-linux-uclibc|*i*86*-linux-musl*)
|
||||
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
|
||||
;;
|
||||
- x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
|
||||
+ x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*)
|
||||
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
|
||||
;;
|
||||
i386-*-freebsd*)
|
||||
@ -1,24 +0,0 @@
|
||||
--- xbmc-12.3-Frodo/xbmc/screensavers/rsxs-0.9/configure.ac 2014-04-15 10:22:51.025587069 +0000
|
||||
+++ xbmc-12.3-Frodo/xbmc/screensavers/rsxs-0.9/configure.ac 2014-04-15 10:21:51.947852111 +0000
|
||||
@@ -14,18 +14,13 @@
|
||||
|
||||
# Checks for programs.
|
||||
LT_AC_PROG_SED
|
||||
-AC_LANG(C++)
|
||||
-AC_PROG_CXX
|
||||
-#CXXFLAGS=`echo $CXXFLAGS | sed -e s,-O2,-O3,`
|
||||
-AC_PROG_CXXCPP
|
||||
-
|
||||
-#if test x"$GXX" = x"yes"; then
|
||||
-# CXXFLAGS=`echo $CXXFLAGS -Wall`
|
||||
-#fi
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
gl_EARLY
|
||||
+AC_PROG_CXX
|
||||
+AC_PROG_CXXCPP
|
||||
+
|
||||
AC_PROG_RANLIB
|
||||
|
||||
# Cut-down version of AC_LIB_LTDL. We don't want the option to install
|
||||
@ -1,46 +0,0 @@
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 31826b1..2f468e7 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -168,7 +168,6 @@ PAPCODECS_DIRS= \
|
||||
lib/timidity \
|
||||
lib/libsidplay2 \
|
||||
lib/stsound/StSoundLibrary \
|
||||
- lib/snesapu/SNES/SNESAPU \
|
||||
lib/vgmstream
|
||||
|
||||
ifeq (@USE_ASAP_CODEC@,1)
|
||||
@@ -373,9 +372,6 @@ ifeq (@USE_ASAP_CODEC@,1)
|
||||
endif
|
||||
endif
|
||||
$(MAKE) -C lib/stsound/StSoundLibrary
|
||||
-ifeq ($(or $(findstring powerpc,@ARCH@),$(findstring x86_64-linux,@ARCH@),$(findstring arm, @ARCH@),$(findstring freebsd,@ARCH@)),)
|
||||
- $(MAKE) -C lib/snesapu/SNES/SNESAPU
|
||||
-endif
|
||||
imagelib: dllloader
|
||||
$(MAKE) -C lib/cximage-6.0
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 538d9af..3f04545 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -2348,7 +2348,6 @@ OUTPUT_FILES="Makefile \
|
||||
lib/nosefart/Makefile \
|
||||
lib/libsidplay2/Makefile \
|
||||
lib/vgmstream/Makefile \
|
||||
- lib/snesapu/SNES/SNESAPU/Makefile \
|
||||
lib/stsound/StSoundLibrary/Makefile \
|
||||
xbmc/cores/playercorefactory/Makefile \
|
||||
xbmc/music/karaoke/Makefile \
|
||||
diff --git a/xbmc/cores/paplayer/Makefile.in b/xbmc/cores/paplayer/Makefile.in
|
||||
index 31cc8bd..a433e82 100644
|
||||
--- a/xbmc/cores/paplayer/Makefile.in
|
||||
+++ b/xbmc/cores/paplayer/Makefile.in
|
||||
@@ -31,7 +31,6 @@ SRCS += ASAPCodec.cpp
|
||||
endif
|
||||
|
||||
ifneq ($(ARCH), arm)
|
||||
-CXXFLAGS += -DHAS_SPC_CODEC
|
||||
SRCS += SPCCodec.cpp
|
||||
endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user