xbmc: add xbmc-aml-frodo

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-05-23 15:22:27 +02:00
parent 43face8dfc
commit 2f0afe4cd7
27 changed files with 2872 additions and 0 deletions

View File

@ -22,6 +22,8 @@ PKG_NAME="xbmc-theme-Confluence"
PKG_VERSION="12.2.0"
if [ "$XBMC" = "master" ]; then
PKG_VERSION="f81d56e"
elif [ "$XBMC" = "xbmc-aml" ]; then
PKG_VERSION="aml-frodo-d9119f2"
fi
PKG_REV="1"
PKG_ARCH="any"

View File

@ -200,6 +200,13 @@ elif [ "$XBMCPLAYER_DRIVER" = "marvell-libgfx" ]; then
XBMC_OPENMAX="--disable-openmax"
XBMC_PLAYER="--with-platform=marvell-dove"
XBMC_CODEC=""
elif [ "$XBMCPLAYER_DRIVER" = "libamlplayer-m3" ]; then
XBMC_OPENMAX="--disable-openmax"
XBMC_PLAYER="--enable-player=amlplayer"
XBMC_CODEC="--enable-codec=amcodec"
AMLPLAYER_INCLUDES="-I$SYSROOT_PREFIX/usr/include/amlplayer"
CFLAGS="$CFLAGS $AMLPLAYER_INCLUDES"
CXXFLAGS="$CXXFLAGS $AMLPLAYER_INCLUDES"
else
XBMC_OPENMAX="--disable-openmax"
fi

View File

@ -22,6 +22,8 @@ PKG_NAME="xbmc"
PKG_VERSION="12.2.0"
if [ "$XBMC" = "master" ]; then
PKG_VERSION="f81d56e"
elif [ "$XBMC" = "xbmc-aml" ]; then
PKG_VERSION="aml-frodo-d9119f2"
fi
PKG_REV="1"
PKG_ARCH="any"

View File

@ -0,0 +1,107 @@
From ca0ddf0673dea966af5bf0bc562f9ff69a551cd9 Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger@gmail.com>
Date: Sat, 12 Jan 2013 13:03:50 +0100
Subject: [PATCH] dvdplayer: Allow multithread decoding for hi10p content by
default
This allows decoding of some hi10p material on e.g. AMD Fusion with
both cores at the max. This introduces a new advancedsetting named
disablehi10pmultithreading to disable hi10p decoded multithreaded.
---
.../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 18 ++++++++++++++++--
.../dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h | 1 +
xbmc/settings/AdvancedSettings.cpp | 2 ++
xbmc/settings/AdvancedSettings.h | 1 +
4 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
index 8f81637..77ac6b1 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
@@ -138,6 +138,7 @@ enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx
m_iScreenHeight = 0;
m_iOrientation = 0;
m_bSoftware = false;
+ m_isHi10p = false;
m_pHardware = NULL;
m_iLastKeyframe = 0;
m_dts = DVD_NOPTS_VALUE;
@@ -187,7 +188,10 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options
case FF_PROFILE_H264_HIGH_444_PREDICTIVE:
case FF_PROFILE_H264_HIGH_444_INTRA:
case FF_PROFILE_H264_CAVLC_444:
+ // this is needed to not open the decoders
m_bSoftware = true;
+ // this we need to enable multithreading for hi10p via advancedsettings
+ m_isHi10p = true;
break;
}
}
@@ -247,8 +251,18 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options
m_pCodecContext->codec_tag = hints.codec_tag;
/* Only allow slice threading, since frame threading is more
* sensitive to changes in frame sizes, and it causes crashes
- * during HW accell */
- m_pCodecContext->thread_type = FF_THREAD_SLICE;
+ * during HW accell - so we unset it in this case.
+ *
+ * When we detect Hi10p and user did not disable hi10pmultithreading
+ * via advancedsettings.xml we keep the ffmpeg default thread type.
+ * */
+ if(m_isHi10p && !g_advancedSettings.m_videoDisableHi10pMultithreading)
+ {
+ CLog::Log(LOGDEBUG,"CDVDVideoCodecFFmpeg::Open() Keep default threading for Hi10p: %d",
+ m_pCodecContext->thread_type);
+ }
+ else
+ m_pCodecContext->thread_type = FF_THREAD_SLICE;
#if defined(TARGET_DARWIN_IOS)
// ffmpeg with enabled neon will crash and burn if this is enabled
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
index 61d0305..827b2d9 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
@@ -114,6 +114,7 @@ class CDVDVideoCodecFFmpeg : public CDVDVideoCodec
std::string m_name;
bool m_bSoftware;
+ bool m_isHi10p;
IHardwareDecoder *m_pHardware;
int m_iLastKeyframe;
double m_dts;
diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp
index 16800b7..1e0f3e0 100644
--- a/xbmc/settings/AdvancedSettings.cpp
+++ b/xbmc/settings/AdvancedSettings.cpp
@@ -112,6 +112,7 @@ void CAdvancedSettings::Initialize()
m_DXVANoDeintProcForProgressive = false;
m_videoFpsDetect = 1;
m_videoDefaultLatency = 0.0;
+ m_videoDisableHi10pMultithreading = false;
m_musicUseTimeSeeking = true;
m_musicTimeSeekForward = 10;
@@ -498,6 +499,7 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file)
XMLUtils::GetBoolean(pElement,"enablehighqualityhwscalers", m_videoEnableHighQualityHwScalers);
XMLUtils::GetFloat(pElement,"autoscalemaxfps",m_videoAutoScaleMaxFps, 0.0f, 1000.0f);
XMLUtils::GetBoolean(pElement,"allowmpeg4vdpau",m_videoAllowMpeg4VDPAU);
+ XMLUtils::GetBoolean(pElement,"disablehi10pmultithreading",m_videoDisableHi10pMultithreading);
XMLUtils::GetBoolean(pElement,"allowmpeg4vaapi",m_videoAllowMpeg4VAAPI);
XMLUtils::GetBoolean(pElement, "disablebackgrounddeinterlace", m_videoDisableBackgroundDeinterlace);
XMLUtils::GetInt(pElement, "useocclusionquery", m_videoCaptureUseOcclusionQuery, -1, 1);
diff --git a/xbmc/settings/AdvancedSettings.h b/xbmc/settings/AdvancedSettings.h
index 27887d4..fc05e41 100644
--- a/xbmc/settings/AdvancedSettings.h
+++ b/xbmc/settings/AdvancedSettings.h
@@ -164,6 +164,7 @@ class CAdvancedSettings
bool m_DXVAForceProcessorRenderer;
bool m_DXVANoDeintProcForProgressive;
int m_videoFpsDetect;
+ bool m_videoDisableHi10pMultithreading;
CStdString m_videoDefaultPlayer;
CStdString m_videoDefaultDVDPlayer;
--
1.7.10

View File

@ -0,0 +1,57 @@
diff -Naur xbmc-12.1.8/xbmc/cores/dvdplayer/DVDPlayer.cpp xbmc-12.1.8.patch/xbmc/cores/dvdplayer/DVDPlayer.cpp
--- xbmc-12.1.8/xbmc/cores/dvdplayer/DVDPlayer.cpp 2013-04-24 23:38:36.000000000 +0200
+++ xbmc-12.1.8.patch/xbmc/cores/dvdplayer/DVDPlayer.cpp 2013-04-26 00:49:07.732011721 +0200
@@ -470,7 +470,7 @@
#endif
Create();
- if(!m_ready.WaitMSec(100))
+ if(!m_ready.WaitMSec(g_advancedSettings.m_videoBusyDialogDelay_ms))
{
CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
if(dialog)
diff -Naur xbmc-12.1.8/xbmc/cores/omxplayer/OMXPlayer.cpp xbmc-12.1.8.patch/xbmc/cores/omxplayer/OMXPlayer.cpp
--- xbmc-12.1.8/xbmc/cores/omxplayer/OMXPlayer.cpp 2013-04-24 23:38:36.000000000 +0200
+++ xbmc-12.1.8.patch/xbmc/cores/omxplayer/OMXPlayer.cpp 2013-04-26 00:50:56.974691417 +0200
@@ -474,7 +474,7 @@
g_renderManager.PreInit();
Create();
- if(!m_ready.WaitMSec(100))
+ if(!m_ready.WaitMSec(g_advancedSettings.m_videoBusyDialogDelay_ms))
{
CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY);
if(dialog)
diff -Naur xbmc-12.1.8/xbmc/settings/AdvancedSettings.cpp xbmc-12.1.8.patch/xbmc/settings/AdvancedSettings.cpp
--- xbmc-12.1.8/xbmc/settings/AdvancedSettings.cpp 2013-04-26 00:48:59.375036542 +0200
+++ xbmc-12.1.8.patch/xbmc/settings/AdvancedSettings.cpp 2013-04-26 00:49:07.732011721 +0200
@@ -111,6 +111,7 @@
m_DXVAForceProcessorRenderer = true;
m_DXVANoDeintProcForProgressive = false;
m_videoFpsDetect = 1;
+ m_videoBusyDialogDelay_ms = 100;
m_videoDefaultLatency = 0.0;
m_videoDisableHi10pMultithreading = false;
@@ -592,6 +593,10 @@
//0 = disable fps detect, 1 = only detect on timestamps with uniform spacing, 2 detect on all timestamps
XMLUtils::GetInt(pElement, "fpsdetect", m_videoFpsDetect, 0, 2);
+ // controls the delay, in milliseconds, until
+ // the busy dialog is shown when starting video playback.
+ XMLUtils::GetInt(pElement, "busydialogdelayms", m_videoBusyDialogDelay_ms, 0, 1000);
+
// Store global display latency settings
TiXmlElement* pVideoLatency = pElement->FirstChildElement("latency");
if (pVideoLatency)
diff -Naur xbmc-12.1.8/xbmc/settings/AdvancedSettings.h xbmc-12.1.8.patch/xbmc/settings/AdvancedSettings.h
--- xbmc-12.1.8/xbmc/settings/AdvancedSettings.h 2013-04-26 00:48:59.383036518 +0200
+++ xbmc-12.1.8.patch/xbmc/settings/AdvancedSettings.h 2013-04-26 00:49:07.732011721 +0200
@@ -165,6 +165,7 @@
bool m_DXVANoDeintProcForProgressive;
int m_videoFpsDetect;
bool m_videoDisableHi10pMultithreading;
+ int m_videoBusyDialogDelay_ms;
CStdString m_videoDefaultPlayer;
CStdString m_videoDefaultDVDPlayer;

View File

@ -0,0 +1,94 @@
diff -Naur xbmc-12.0.6/xbmc/powermanagement/linux/FallbackPowerSyscall.h xbmc-12.0.6.patch/xbmc/powermanagement/linux/FallbackPowerSyscall.h
--- xbmc-12.0.6/xbmc/powermanagement/linux/FallbackPowerSyscall.h 1970-01-01 01:00:00.000000000 +0100
+++ xbmc-12.0.6.patch/xbmc/powermanagement/linux/FallbackPowerSyscall.h 2013-03-13 22:25:29.220700789 +0100
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2005-2013 Team XBMC
+ * http://www.xbmc.org
+ *
+ * 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 XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+#pragma once
+#include "powermanagement/IPowerSyscall.h"
+#include "system.h"
+#if defined(TARGET_LINUX)
+
+class CFallbackPowerSyscall : public CPowerSyscallWithoutEvents
+{
+public:
+ virtual bool Powerdown() {return true; }
+ virtual bool Suspend() {return false; }
+ virtual bool Hibernate() {return false; }
+ virtual bool Reboot() {return true; }
+
+ virtual bool CanPowerdown() {return true; }
+ virtual bool CanSuspend() {return false; }
+ virtual bool CanHibernate() {return false; }
+ virtual bool CanReboot() {return true; }
+ virtual int BatteryLevel() {return 0; }
+};
+#endif
diff -Naur xbmc-12.0.6/xbmc/powermanagement/PowerManager.cpp xbmc-12.0.6.patch/xbmc/powermanagement/PowerManager.cpp
--- xbmc-12.0.6/xbmc/powermanagement/PowerManager.cpp 2013-03-11 18:01:45.000000000 +0100
+++ xbmc-12.0.6.patch/xbmc/powermanagement/PowerManager.cpp 2013-03-14 00:20:43.263315592 +0100
@@ -41,14 +41,17 @@
#include "osx/CocoaPowerSyscall.h"
#elif defined(TARGET_ANDROID)
#include "android/AndroidPowerSyscall.h"
-#elif defined(_LINUX) && defined(HAS_DBUS)
+#elif defined(TARGET_LINUX)
+#include "linux/FallbackPowerSyscall.h"
+#if defined(HAS_DBUS)
#include "linux/ConsoleUPowerSyscall.h"
#include "linux/ConsoleDeviceKitPowerSyscall.h"
#include "linux/SystemdUPowerSyscall.h"
#include "linux/UPowerSyscall.h"
-#ifdef HAS_HAL
+#if defined(HAS_HAL)
#include "linux/HALPowerSyscall.h"
-#endif
+#endif // HAS_HAL
+#endif // HAS_DBUS
#elif defined(_WIN32)
#include "powermanagement/windows/Win32PowerSyscall.h"
extern HWND g_hWnd;
@@ -74,7 +77,8 @@
m_instance = new CCocoaPowerSyscall();
#elif defined(TARGET_ANDROID)
m_instance = new CAndroidPowerSyscall();
-#elif defined(_LINUX) && defined(HAS_DBUS)
+#elif defined(TARGET_LINUX)
+#if defined(HAS_DBUS)
if (CConsoleUPowerSyscall::HasConsoleKitAndUPower())
m_instance = new CConsoleUPowerSyscall();
else if (CConsoleDeviceKitPowerSyscall::HasDeviceConsoleKit())
@@ -83,10 +87,13 @@
m_instance = new CSystemdUPowerSyscall();
else if (CUPowerSyscall::HasUPower())
m_instance = new CUPowerSyscall();
-#ifdef HAS_HAL
- else
+#if defined(HAS_HAL)
+ else if(1)
m_instance = new CHALPowerSyscall();
-#endif
+#endif // HAS_HAL
+#endif // HAS_DBUS
+ else
+ m_instance = new CFallbackPowerSyscall();
#elif defined(_WIN32)
m_instance = new CWin32PowerSyscall();
#endif

View File

@ -0,0 +1,184 @@
From 2da77839fbf972e8c6f09c56d25f8c7bf999f3fa Mon Sep 17 00:00:00 2001
From: dezi <dezi@kappa-mm.de>
Date: Mon, 18 Mar 2013 12:29:27 +0000
Subject: [PATCH] Added hotplug support for Linux input devices.
---
xbmc/input/linux/LinuxInputDevices.cpp | 80 ++++++++++++++++++++++++++++++++++
xbmc/input/linux/LinuxInputDevices.h | 6 +++
2 files changed, 86 insertions(+)
diff --git a/xbmc/input/linux/LinuxInputDevices.cpp b/xbmc/input/linux/LinuxInputDevices.cpp
index 9d253bb..1d3d315 100644
--- a/xbmc/input/linux/LinuxInputDevices.cpp
+++ b/xbmc/input/linux/LinuxInputDevices.cpp
@@ -338,6 +338,7 @@
m_deviceMinKeyCode = 0;
m_deviceMaxKeyCode = 0;
m_deviceMaxAxis = 0;
+ m_bUnplugged = false;
Open();
}
@@ -744,7 +745,15 @@ XBMC_Event CLinuxInputDevice::ReadEvent()
readlen = read(m_fd, &levt, sizeof(levt));
if (readlen <= 0)
+ {
+ if (errno == ENODEV)
+ {
+ CLog::Log(LOGINFO,"input device was unplugged %s",m_deviceName);
+ m_bUnplugged = true;
+ }
+
break;
+ }
//printf("read event readlen = %d device name %s m_fileName %s\n", readlen, m_deviceName, m_fileName.c_str());
@@ -963,6 +972,16 @@ void CLinuxInputDevice::GetInfo(int fd)
//printf("pref: %d\n", m_devicePreferredId);
}
+char* CLinuxInputDevice::GetDeviceName()
+{
+ return m_deviceName;
+}
+
+bool CLinuxInputDevice::IsUnplugged()
+{
+ return m_bUnplugged;
+}
+
bool CLinuxInputDevices::CheckDevice(const char *device)
{
int fd;
@@ -1021,6 +1040,41 @@ void CLinuxInputDevices::InitAvailable()
}
/*
+ * Check for hot plugged devices.
+ */
+void CLinuxInputDevices::CheckHotplugged()
+{
+ CSingleLock lock(m_devicesListLock);
+
+ int deviceId = m_devices.size();
+
+ /* No devices specified. Try to guess some. */
+ for (int i = 0; i < MAX_LINUX_INPUT_DEVICES; i++)
+ {
+ char buf[32];
+ bool ispresent = false;
+
+ snprintf(buf, 32, "/dev/input/event%d", i);
+
+ for (size_t j = 0; j < m_devices.size(); j++)
+ {
+ if (strcmp(m_devices[j]->GetDeviceName(),buf) == 0)
+ {
+ ispresent = true;
+ break;
+ }
+ }
+
+ if (!ispresent && CheckDevice(buf))
+ {
+ CLog::Log(LOGINFO, "Found input device %s", buf);
+ m_devices.push_back(new CLinuxInputDevice(buf, deviceId));
+ ++deviceId;
+ }
+ }
+}
+
+/*
* Open the device, fill out information about it,
* allocate and fill private data, start input thread.
*/
@@ -1076,6 +1130,9 @@ bool CLinuxInputDevice::Open()
{
if (m_vt_fd < 0)
m_vt_fd = open("/dev/tty0", O_RDWR | O_NOCTTY);
+
+ if (m_vt_fd < 0)
+ m_vt_fd = open("/dev/tty1", O_RDWR | O_NOCTTY);
if (m_vt_fd < 0)
CLog::Log(LOGWARNING, "no keymap support (requires /dev/tty0 - CONFIG_VT)");
@@ -1195,6 +1252,23 @@ void CLinuxInputDevice::Close()
XBMC_Event CLinuxInputDevices::ReadEvent()
{
+ if (m_bReInitialize)
+ {
+ InitAvailable();
+ m_bReInitialize = false;
+ }
+ else
+ {
+ time_t now;
+ time(&now);
+
+ if ((now - m_lastHotplugCheck) >= 10)
+ {
+ CheckHotplugged();
+ m_lastHotplugCheck = now;
+ }
+ }
+
CSingleLock lock(m_devicesListLock);
XBMC_Event event;
@@ -1207,6 +1281,12 @@ XBMC_Event CLinuxInputDevices::ReadEvent()
{
break;
}
+
+ if (m_devices[i]->IsUnplugged())
+ {
+ m_bReInitialize = true;
+ break;
+ }
}
return event;
diff --git a/xbmc/input/linux/LinuxInputDevices.h b/xbmc/input/linux/LinuxInputDevices.h
index 18224a9..b7626f4 100644
--- a/xbmc/input/linux/LinuxInputDevices.h
+++ b/xbmc/input/linux/LinuxInputDevices.h
@@ -41,6 +41,8 @@ class CLinuxInputDevice
CLinuxInputDevice(const std::string fileName, int index);
~CLinuxInputDevice();
XBMC_Event ReadEvent();
+ char* GetDeviceName();
+ bool IsUnplugged();
private:
void SetupKeyboardAutoRepeat(int fd);
@@ -76,12 +78,14 @@ class CLinuxInputDevice
int m_deviceMaxKeyCode;
int m_deviceMaxAxis;
bool m_bSkipNonKeyEvents;
+ bool m_bUnplugged;
};
class CLinuxInputDevices
{
public:
void InitAvailable();
+ void CheckHotplugged();
XBMC_Event ReadEvent();
bool IsRemoteLowBattery();
bool IsRemoteNotPaired();
@@ -89,6 +93,8 @@ class CLinuxInputDevices
CCriticalSection m_devicesListLock;
bool CheckDevice(const char *device);
std::vector<CLinuxInputDevice*> m_devices;
+ bool m_bReInitialize;
+ time_t m_lastHotplugCheck;
};
#endif /* LINUXINPUTDEVICES_H_ */
--
1.8.1.5

View File

@ -0,0 +1,60 @@
From d4c34400b9bdebbb1a943603a54fdf207034ddd1 Mon Sep 17 00:00:00 2001
From: Dag Wieers <dag@wieers.com>
Date: Sat, 20 Apr 2013 02:59:47 +0200
Subject: [PATCH] Increase USB and CEC rescan interval to 5 seconds
In one of my investigations to see why XBMC performance is so bad (even when idle) I found one of the threads (in my case PeripheralBusCEC) scan a big sysfs tree recursively. On the 1Ghz AppleTV 1 device this would be about 2% of the CPU *every* second. For the USB thread we luckily have Udev events, but for CEC it is using sysfs polling which is quite expensive. It would be better to make use of Udev as well for CEC (where available) however 5 seconds should be fine for everyone.
In my own builds I even brought it down to 30 seconds. Which means 29 seconds of reduced CPU usage.
The CEC polling probably should be more restricted to specific sysfs sections, or preferably use Udev as well, when available.
PS XBMC needs a special idle-state where it can turn down these expensive threads to make sure hardware can go into deeper sleep states. Especially for devices that doesn't do suspend for various reasons this is a requirement. (The ATV1 device for instance gets warm even when idle) If we can combine display-sleep with low-power states and a less expensive main-loop, that would be already quite an improvement without needing a complete refactoring of the code.
---
xbmc/peripherals/bus/PeripheralBus.cpp | 2 +-
xbmc/peripherals/bus/PeripheralBus.h | 2 +-
xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/xbmc/peripherals/bus/PeripheralBus.cpp b/xbmc/peripherals/bus/PeripheralBus.cpp
index 0e673ee..f0219f1 100644
--- a/xbmc/peripherals/bus/PeripheralBus.cpp
+++ b/xbmc/peripherals/bus/PeripheralBus.cpp
@@ -27,7 +27,7 @@
using namespace std;
using namespace PERIPHERALS;
-#define PERIPHERAL_DEFAULT_RESCAN_INTERVAL 1000
+#define PERIPHERAL_DEFAULT_RESCAN_INTERVAL 5000
CPeripheralBus::CPeripheralBus(CPeripherals *manager, PeripheralBusType type) :
CThread("PeripheralBus"),
diff --git a/xbmc/peripherals/bus/PeripheralBus.h b/xbmc/peripherals/bus/PeripheralBus.h
index cc368ac..24e1524 100644
--- a/xbmc/peripherals/bus/PeripheralBus.h
+++ b/xbmc/peripherals/bus/PeripheralBus.h
@@ -33,7 +33,7 @@
/*!
* @class CPeripheralBus
- * This represents a bus on the system. By default, this bus instance will scan for changes every second.
+ * This represents a bus on the system. By default, this bus instance will scan for changes every 5 seconds.
* If this bus only has to be updated after a notification sent by the system, set m_bNeedsPolling to false
* in the constructor, and implement the OnDeviceAdded(), OnDeviceChanged() and OnDeviceRemoved() methods.
*
diff --git a/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp b/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
index da169c1..0db7423 100644
--- a/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
+++ b/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
@@ -57,7 +57,7 @@ class PERIPHERALS::DllLibCEC : public DllDynamic, DllLibCECInterface
m_dll(new DllLibCEC),
m_cecAdapter(NULL)
{
- m_iRescanTime = 1000;
+ m_iRescanTime = 5000;
if (!m_dll->Load() || !m_dll->IsLoaded())
{
delete m_dll;
--
1.8.1.6

View File

@ -0,0 +1,12 @@
diff --git a/xbmc/windowing/WinEventsX11.cpp b/xbmc/windowing/WinEventsX11.cpp
index ed31c04..34fcfae 100644
--- a/xbmc/windowing/WinEventsX11.cpp
+++ b/xbmc/windowing/WinEventsX11.cpp
@@ -709,7 +709,6 @@ bool CWinEventsX11::ProcessShortcuts(XBMC_Event& event)
switch(event.key.keysym.sym)
{
case XBMCK_TAB: // ALT+TAB to minimize/hide
- g_application.Minimize();
return true;
default:

View File

@ -0,0 +1,12 @@
diff -Naur xbmc-pvr-3513480/userdata/LCD.xml xbmc-pvr-3513480.patch/userdata/LCD.xml
--- xbmc-pvr-3513480/userdata/LCD.xml 2011-04-25 02:36:33.000000000 +0200
+++ xbmc-pvr-3513480.patch/userdata/LCD.xml 2011-04-25 05:27:34.956125133 +0200
@@ -21,7 +21,7 @@
<line>Freemem: $INFO[System.FreeMemory]</line>
</video>
<general>
- <line>XBMC running...</line>
+ <line>*** OpenELEC ***</line>
<line>$INFO[System.Time] $INFO[System.Date]</line>
<line>Freemem: $INFO[System.FreeMemory]</line>
<line>$INFO[System.ScreenWidth]x$INFO[System.ScreenHeight] $INFO[System.ScreenMode]</line>

View File

@ -0,0 +1,11 @@
diff -Naur xbmc-10.1-Dharma/userdata/RssFeeds.xml xbmc-10.1-Dharma.patch/userdata/RssFeeds.xml
--- xbmc-10.1-Dharma/userdata/RssFeeds.xml 2011-03-08 02:49:24.000000000 +0100
+++ xbmc-10.1-Dharma.patch/userdata/RssFeeds.xml 2011-06-14 17:07:08.450880123 +0200
@@ -3,6 +3,7 @@
<!-- RSS feeds. To have multiple feeds, just add a feed to the set. You can also have multiple sets. !-->
<!-- To use different sets in your skin, each must be called from skin with a unique id. !-->
<set id="1">
+ <feed updateinterval="30">http://openelec.tv/news?format=feed&type=rss</feed>
<feed updateinterval="30">http://feeds.feedburner.com/xbmc</feed>
</set>
</rssfeeds>

View File

@ -0,0 +1,13 @@
diff --git a/xbmc/settings/GUIWindowSettingsCategory.cpp b/xbmc/settings/GUIWindowSettingsCategory.cpp
index cbf0acb..f789e18 100644
--- a/xbmc/settings/GUIWindowSettingsCategory.cpp
+++ b/xbmc/settings/GUIWindowSettingsCategory.cpp
@@ -2434,7 +2434,7 @@ DisplayMode CGUIWindowSettingsCategory::FillInScreens(CStdString strSetting, RES
pControl->Clear();
CStdString strScreen;
- if (g_advancedSettings.m_canWindowed)
+ if (g_advancedSettings.m_canWindowed && !g_application.IsStandAlone())
pControl->AddLabel(g_localizeStrings.Get(242), -1);
#if !defined(HAS_GLX)

View File

@ -0,0 +1,55 @@
From 1704ff69ba704bf53505f7f9ac51ec06f93401ee Mon Sep 17 00:00:00 2001
From: wsnipex <wsnipex@a1.net>
Date: Sun, 9 Dec 2012 14:37:21 +0100
Subject: [PATCH 1/2] configure: allow GIT_REV to be read from VERSION file
needed for building outside of a git repo
---
configure.in | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure.in b/configure.in
index d8c7804..ac1445c 100644
--- a/configure.in
+++ b/configure.in
@@ -2160,7 +2160,12 @@ if test "$HAVE_GIT" = "yes"; then
GIT_REV=$(git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}')
fi
if test "$GIT_REV" = ""; then
- GIT_REV="Unknown"
+ if test -f VERSION ; then
+ GIT_REV=$(awk 'END{print substr($1,1,16)}' VERSION)
+ if test -z $GIT_REV ; then GIT_REV="Unknown" ; fi
+ else
+ GIT_REV="Unknown"
+ fi
fi
if test "$host_vendor" = "apple"; then
echo "#define GIT_REV \"$GIT_REV\"" > git_revision.h
--
1.7.10
From 4377a985c7e4e4d1f1c0abba68c2367d33ddab03 Mon Sep 17 00:00:00 2001
From: wsnipex <wsnipex@a1.net>
Date: Sun, 16 Dec 2012 17:46:12 +0100
Subject: [PATCH 2/2] release-source script needs bash on some systems /bin/sh
is a simplistic posix shell
---
tools/mk-release-source | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/mk-release-source b/tools/mk-release-source
index 7964665..68bdfa1 100755
--- a/tools/mk-release-source
+++ b/tools/mk-release-source
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
REVISION="${1}"
COMPRESS="gzip"
WORKDIR="xbmc-${REVISION}"
--
1.7.10

View File

@ -0,0 +1,88 @@
From 1e3abea7b9a4212005b11dbb5a9542ca9cbcd21a Mon Sep 17 00:00:00 2001
From: Stephan Raue <stephan@openelec.tv>
Date: Thu, 7 Feb 2013 18:27:08 +0100
Subject: [PATCH] configure.in: change check for 'VERSION' file: - first check
if this file exist and use the content from there - if it
not exist check with 'git log' - if this fails set to
'Unknown'
This patch also shows the GIT_REV in the configure summary message. To display This message on top of the messages we move the whole block a bit above
---
configure.in | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/configure.in b/configure.in
index ac1445c..869fd29 100644
--- a/configure.in
+++ b/configure.in
@@ -687,6 +687,25 @@ case $use_platform in
;;
esac
+# check for GIT_REV
+AC_CHECK_PROG(HAVE_GIT,git,"yes","no",)
+if test "$GIT_REV" = ""; then
+ if test -f VERSION ; then
+ GIT_REV=$(awk 'END{print substr($1,1,16)}' VERSION)
+ elif test "$HAVE_GIT" = "yes"; then
+ GIT_REV=$(git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}')
+ else
+ GIT_REV="Unknown"
+ fi
+fi
+final_message="$final_message\n git Rev.:\t${GIT_REV}"
+
+if test "$host_vendor" = "apple"; then
+ echo "#define GIT_REV \"$GIT_REV\"" > git_revision.h
+else
+ SDL_DEFINES="$SDL_DEFINES -D'GIT_REV=\"$GIT_REV\"'"
+fi
+
if test "$build_shared_lib" = "yes"; then
final_message="$final_message\n Shared lib\tYes"
AC_SUBST(USE_LIBXBMC,1)
@@ -1886,8 +1905,6 @@ if test "$ARCH" = "i486-linux" || test "$ARCH" = "x86-freebsd"; then
fi
fi
-AC_CHECK_PROG(HAVE_GIT,git,"yes","no",)
-
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
@@ -1943,7 +1960,7 @@ else
USE_OPENGL=1
else
final_message="$final_message\n OpenGL:\tNo (Very Slow)"
- SDL_DEFINES="-DHAS_SDL_2D"
+ SDL_DEFINES="$SDL_DEFINES -DHAS_SDL_2D"
USE_OPENGL=0
fi
fi
@@ -2156,23 +2173,6 @@ else
final_message="$final_message\n Avahi:\tNo"
fi
-if test "$HAVE_GIT" = "yes"; then
- GIT_REV=$(git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}')
-fi
-if test "$GIT_REV" = ""; then
- if test -f VERSION ; then
- GIT_REV=$(awk 'END{print substr($1,1,16)}' VERSION)
- if test -z $GIT_REV ; then GIT_REV="Unknown" ; fi
- else
- GIT_REV="Unknown"
- fi
-fi
-if test "$host_vendor" = "apple"; then
- echo "#define GIT_REV \"$GIT_REV\"" > git_revision.h
-else
- SDL_DEFINES="$SDL_DEFINES -D'GIT_REV=\"$GIT_REV\"'"
-fi
-
if test "$use_nonfree" = "yes"; then
final_message="$final_message\n Non-free:\tYes"
HAVE_XBMC_NONFREE=1
--
1.7.10

View File

@ -0,0 +1,26 @@
From 3180ec7e5e065c0f9276a2d8999e8e8d997c4dba Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sat, 16 Mar 2013 15:52:55 +0100
Subject: [PATCH] dvdplayer: put line break into video codec info because it
gets too long
---
xbmc/cores/dvdplayer/DVDPlayer.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp
index be89406..bb1fc42 100644
--- a/xbmc/cores/dvdplayer/DVDPlayer.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp
@@ -2579,7 +2579,7 @@ void CDVDPlayer::GetVideoInfo(CStdString& strVideoInfo)
{ CSingleLock lock(m_StateSection);
strVideoInfo.Format("D(%s)", m_StateInput.demux_video.c_str());
}
- strVideoInfo.AppendFormat(" P(%s)", m_dvdPlayerVideo.GetPlayerInfo().c_str());
+ strVideoInfo.AppendFormat("\nP(%s)", m_dvdPlayerVideo.GetPlayerInfo().c_str());
}
void CDVDPlayer::GetGeneralInfo(CStdString& strGeneralInfo)
--
1.8.1.5

View File

@ -0,0 +1,138 @@
From 07b4e2c80c046bad566ed4a70e49ae4bfb3ecc47 Mon Sep 17 00:00:00 2001
From: stupid-boy <amushatov@gmail.com>
Date: Wed, 13 Feb 2013 20:56:12 +0200
Subject: [PATCH] Changed cpu frequency for all Linux platforms, added RPI
specific cpu temp command and removed irrelevant gpu temp
for all ARM platforms.
---
xbmc/utils/CPUInfo.cpp | 41 +++++++++++++++++-----------------
xbmc/utils/CPUInfo.h | 2 +-
xbmc/windows/GUIWindowSystemInfo.cpp | 4 +++-
3 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/xbmc/utils/CPUInfo.cpp b/xbmc/utils/CPUInfo.cpp
index 64c90b9..f605751 100644
--- a/xbmc/utils/CPUInfo.cpp
+++ b/xbmc/utils/CPUInfo.cpp
@@ -107,7 +107,7 @@ static inline int _private_gettimeofday( struct timeval *tv, void *tz )
CCPUInfo::CCPUInfo(void)
{
- m_fProcStat = m_fProcTemperature = m_fCPUInfo = NULL;
+ m_fProcStat = m_fProcTemperature = m_fCPUFreq = NULL;
m_lastUsedPercentage = 0;
m_cpuFeatures = 0;
@@ -235,15 +235,20 @@ static inline int _private_gettimeofday( struct timeval *tv, void *tz )
// read from the new location of the temperature data on new kernels, 2.6.39, 3.0 etc
if (m_fProcTemperature == NULL)
m_fProcTemperature = fopen("/sys/class/hwmon/hwmon0/temp1_input", "r");
-
- m_fCPUInfo = fopen("/proc/cpuinfo", "r");
+ if (m_fProcTemperature == NULL)
+ 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");
+
+
+ FILE* fCPUInfo = fopen("/proc/cpuinfo", "r");
m_cpuCount = 0;
- if (m_fCPUInfo)
+ if (fCPUInfo)
{
char buffer[512];
int nCurrId = 0;
- while (fgets(buffer, sizeof(buffer), m_fCPUInfo))
+ while (fgets(buffer, sizeof(buffer), fCPUInfo))
{
if (strncmp(buffer, "processor", strlen("processor"))==0)
{
@@ -369,6 +374,7 @@ static inline int _private_gettimeofday( struct timeval *tv, void *tz )
}
}
}
+ fclose(fCPUInfo);
}
else
{
@@ -409,8 +415,8 @@ static inline int _private_gettimeofday( struct timeval *tv, void *tz )
if (m_fProcTemperature != NULL)
fclose(m_fProcTemperature);
- if (m_fCPUInfo != NULL)
- fclose(m_fCPUInfo);
+ if (m_fCPUFreq != NULL)
+ fclose(m_fCPUFreq);
}
int CCPUInfo::getUsedPercentage()
@@ -482,21 +488,14 @@ float CCPUInfo::getCPUFrequency()
hz = 0;
return (float)hz;
#else
- float mhz = 0.f;
- char buf[256],
- *needle = NULL;
- if (!m_fCPUInfo)
- return mhz;
- rewind(m_fCPUInfo);
- fflush(m_fCPUInfo);
- while (fgets(buf, 256, m_fCPUInfo) != NULL) {
- if (strncmp(buf, "cpu MHz", 7) == 0) {
- needle = strchr(buf, ':');
- sscanf(++needle, "%f", &mhz);
- break;
- }
+ int value = 0;
+ if (m_fCPUFreq)
+ {
+ rewind(m_fCPUFreq);
+ fflush(m_fCPUFreq);
+ fscanf(m_fCPUFreq, "%d", &value);
}
- return mhz;
+ return value / 1000.0;
#endif
}
diff --git a/xbmc/utils/CPUInfo.h b/xbmc/utils/CPUInfo.h
index 638c19f..ae9447d 100644
--- a/xbmc/utils/CPUInfo.h
+++ b/xbmc/utils/CPUInfo.h
@@ -93,7 +93,7 @@ class CCPUInfo
FILE* m_fProcStat;
FILE* m_fProcTemperature;
- FILE* m_fCPUInfo;
+ FILE* m_fCPUFreq;
unsigned long long m_userTicks;
unsigned long long m_niceTicks;
diff --git a/xbmc/windows/GUIWindowSystemInfo.cpp b/xbmc/windows/GUIWindowSystemInfo.cpp
index fcc1f89..75fd0cd 100644
--- a/xbmc/windows/GUIWindowSystemInfo.cpp
+++ b/xbmc/windows/GUIWindowSystemInfo.cpp
@@ -141,7 +141,9 @@ void CGUIWindowSystemInfo::FrameMove()
SetControlLabel(i++, "%s %s", 22023, SYSTEM_RENDER_VENDOR);
SetControlLabel(i++, "%s %s", 22024, SYSTEM_RENDER_VERSION);
#endif
+#ifndef __arm__
SetControlLabel(i++, "%s %s", 22010, SYSTEM_GPU_TEMPERATURE);
+#endif
}
else if (m_section == CONTROL_BT_HARDWARE)
{
@@ -155,7 +157,7 @@ void CGUIWindowSystemInfo::FrameMove()
SET_CONTROL_LABEL(i++, g_sysinfo.GetCPUSerial());
#endif
SetControlLabel(i++, "%s %s", 22011, SYSTEM_CPU_TEMPERATURE);
-#if !defined(__arm__)
+#if !defined(__arm__) || defined(TARGET_RASPBERRY_PI)
SetControlLabel(i++, "%s %s", 13284, SYSTEM_CPUFREQUENCY);
#endif
#endif
--
1.7.10

View File

@ -0,0 +1,32 @@
From 7ee7e59e858c7f1901c6879e39b30480c42ef126 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Mon, 29 Apr 2013 22:50:08 +0100
Subject: [PATCH] [rbp] Remove unnecessary gl ifdef
I'm not sure why this was originally added.
I couldn't think of a reason why the Pi would want things done differently here,
so I tried without the ifdef. I can't see any difference in behaviour,
so I think we're better off removing it.
---
xbmc/rendering/gles/RenderSystemGLES.cpp | 4 ----
1 file changed, 4 deletions(-)
diff --git a/xbmc/rendering/gles/RenderSystemGLES.cpp b/xbmc/rendering/gles/RenderSystemGLES.cpp
index e7795fb..472f441 100644
--- a/xbmc/rendering/gles/RenderSystemGLES.cpp
+++ b/xbmc/rendering/gles/RenderSystemGLES.cpp
@@ -138,11 +138,7 @@ bool CRenderSystemGLES::ResetRenderSystem(int width, int height, bool fullScreen
g_matrices.MatrixMode(MM_PROJECTION);
g_matrices.LoadIdentity();
-#ifdef TARGET_RASPBERRY_PI
- g_matrices.Ortho(0.0f, width-1, height-1, 0.0f, +1.0f, 1.0f);
-#else
g_matrices.Ortho(0.0f, width-1, height-1, 0.0f, -1.0f, 1.0f);
-#endif
g_matrices.MatrixMode(MM_MODELVIEW);
g_matrices.LoadIdentity();
--
1.8.1.6

View File

@ -0,0 +1,331 @@
From 1c12a2f021cceee0d7eee2de5df993d73d790aa5 Mon Sep 17 00:00:00 2001
From: Cory Fields <theuni-nospam-@xbmc.org>
Date: Thu, 9 May 2013 19:27:14 -0400
Subject: [PATCH 1/2] texture: combine Load() and GetTexture() since they must
be used together
---
xbmc/guilib/GUITexture.cpp | 19 ++++++++--------
xbmc/guilib/TextureManager.cpp | 51 ++++++++++++++++++++----------------------
xbmc/guilib/TextureManager.h | 3 +--
3 files changed, 34 insertions(+), 39 deletions(-)
diff --git a/xbmc/guilib/GUITexture.cpp b/xbmc/guilib/GUITexture.cpp
index 9da2030..5896606 100644
--- a/xbmc/guilib/GUITexture.cpp
+++ b/xbmc/guilib/GUITexture.cpp
@@ -301,11 +301,12 @@ bool CGUITextureBase::AllocResources()
{ // we want to use the large image loader, but we first check for bundled textures
if (!IsAllocated())
{
- int images = g_TextureManager.Load(m_info.filename, true);
- if (images)
+ CTextureArray texture;
+ texture = g_TextureManager.Load(m_info.filename, true);
+ if (texture.size())
{
m_isAllocated = NORMAL;
- m_texture = g_TextureManager.GetTexture(m_info.filename);
+ m_texture = texture;
changed = true;
}
}
@@ -329,15 +330,14 @@ bool CGUITextureBase::AllocResources()
}
else if (!IsAllocated())
{
- int images = g_TextureManager.Load(m_info.filename);
+ CTextureArray texture = g_TextureManager.Load(m_info.filename);
// set allocated to true even if we couldn't load the image to save
// us hitting the disk every frame
- m_isAllocated = images ? NORMAL : NORMAL_FAILED;
- if (!images)
+ m_isAllocated = texture.size() ? NORMAL : NORMAL_FAILED;
+ if (!texture.size())
return false;
-
- m_texture = g_TextureManager.GetTexture(m_info.filename);
+ m_texture = texture;
changed = true;
}
m_frameWidth = (float)m_texture.m_width;
@@ -346,8 +346,7 @@ bool CGUITextureBase::AllocResources()
// load the diffuse texture (if necessary)
if (!m_info.diffuse.IsEmpty())
{
- g_TextureManager.Load(m_info.diffuse);
- m_diffuse = g_TextureManager.GetTexture(m_info.diffuse);
+ m_diffuse = g_TextureManager.Load(m_info.diffuse);
}
CalculateSize();
diff --git a/xbmc/guilib/TextureManager.cpp b/xbmc/guilib/TextureManager.cpp
index 93fdcd1..6d6c4d9 100644
--- a/xbmc/guilib/TextureManager.cpp
+++ b/xbmc/guilib/TextureManager.cpp
@@ -221,22 +221,6 @@ void CTextureMap::Add(CBaseTexture* texture, int delay)
Cleanup();
}
-const CTextureArray& CGUITextureManager::GetTexture(const CStdString& strTextureName)
-{
- static CTextureArray emptyTexture;
- // CLog::Log(LOGINFO, " refcount++ for GetTexture(%s)\n", strTextureName.c_str());
- for (int i = 0; i < (int)m_vecTextures.size(); ++i)
- {
- CTextureMap *pMap = m_vecTextures[i];
- if (pMap->GetName() == strTextureName)
- {
- //CLog::Log(LOGDEBUG, "Total memusage %u", GetMemoryUsage());
- return pMap->GetTexture();
- }
- }
- return emptyTexture;
-}
-
/************************************************************************/
/* */
/************************************************************************/
@@ -290,19 +274,32 @@ bool CGUITextureManager::HasTexture(const CStdString &textureName, CStdString *p
return !fullPath.IsEmpty();
}
-int CGUITextureManager::Load(const CStdString& strTextureName, bool checkBundleOnly /*= false */)
+const CTextureArray& CGUITextureManager::Load(const CStdString& strTextureName, bool checkBundleOnly /*= false */)
{
CStdString strPath;
+ static CTextureArray emptyTexture;
int bundle = -1;
int size = 0;
if (!HasTexture(strTextureName, &strPath, &bundle, &size))
- return 0;
+ return emptyTexture;
if (size) // we found the texture
- return size;
+ {
+ for (int i = 0; i < (int)m_vecTextures.size(); ++i)
+ {
+ CTextureMap *pMap = m_vecTextures[i];
+ if (pMap->GetName() == strTextureName)
+ {
+ //CLog::Log(LOGDEBUG, "Total memusage %u", GetMemoryUsage());
+ return pMap->GetTexture();
+ }
+ }
+ // Whoops, not there.
+ return emptyTexture;
+ }
if (checkBundleOnly && bundle == -1)
- return 0;
+ return emptyTexture;
//Lock here, we will do stuff that could break rendering
CSingleLock lock(g_graphicsContext);
@@ -327,7 +324,7 @@ int CGUITextureManager::Load(const CStdString& strTextureName, bool checkBundleO
CLog::Log(LOGERROR, "Texture manager unable to load bundled file: %s", strTextureName.c_str());
delete [] pTextures;
delete [] Delay;
- return 0;
+ return emptyTexture;
}
pMap = new CTextureMap(strTextureName, width, height, nLoops);
@@ -348,7 +345,7 @@ int CGUITextureManager::Load(const CStdString& strTextureName, bool checkBundleO
CStdString rootPath = strPath.Left(g_SkinInfo->Path().GetLength());
if (0 == rootPath.CompareNoCase(g_SkinInfo->Path()))
CLog::Log(LOGERROR, "Texture manager unable to load file: %s", strPath.c_str());
- return 0;
+ return emptyTexture;
}
int iWidth = AnimatedGifSet.FrameWidth;
int iHeight = AnimatedGifSet.FrameHeight;
@@ -386,7 +383,7 @@ int CGUITextureManager::Load(const CStdString& strTextureName, bool checkBundleO
#endif
m_vecTextures.push_back(pMap);
- return 1;
+ return pMap->GetTexture();
} // of if (strPath.Right(4).ToLower()==".gif")
CBaseTexture *pTexture = NULL;
@@ -396,19 +393,19 @@ int CGUITextureManager::Load(const CStdString& strTextureName, bool checkBundleO
if (!m_TexBundle[bundle].LoadTexture(strTextureName, &pTexture, width, height))
{
CLog::Log(LOGERROR, "Texture manager unable to load bundled file: %s", strTextureName.c_str());
- return 0;
+ return emptyTexture;
}
}
else
{
pTexture = CBaseTexture::LoadFromFile(strPath);
if (!pTexture)
- return 0;
+ return emptyTexture;
width = pTexture->GetWidth();
height = pTexture->GetHeight();
}
- if (!pTexture) return 0;
+ if (!pTexture) return emptyTexture;
CTextureMap* pMap = new CTextureMap(strTextureName, width, height, 0);
pMap->Add(pTexture, 100);
@@ -423,7 +420,7 @@ int CGUITextureManager::Load(const CStdString& strTextureName, bool checkBundleO
OutputDebugString(temp);
#endif
- return 1;
+ return pMap->GetTexture();
}
diff --git a/xbmc/guilib/TextureManager.h b/xbmc/guilib/TextureManager.h
index c982e6a..22fc192 100644
--- a/xbmc/guilib/TextureManager.h
+++ b/xbmc/guilib/TextureManager.h
@@ -108,8 +108,7 @@ class CGUITextureManager
bool HasTexture(const CStdString &textureName, CStdString *path = NULL, int *bundle = NULL, int *size = NULL);
bool CanLoad(const CStdString &texturePath) const; ///< Returns true if the texture manager can load this texture
- int Load(const CStdString& strTextureName, bool checkBundleOnly = false);
- const CTextureArray& GetTexture(const CStdString& strTextureName);
+ const CTextureArray& Load(const CStdString& strTextureName, bool checkBundleOnly = false);
void ReleaseTexture(const CStdString& strTextureName);
void Cleanup();
void Dump() const;
--
1.8.1.6
From ece7ac520231ff144d7bc4d8393d1ca36f227927 Mon Sep 17 00:00:00 2001
From: Cory Fields <theuni-nospam-@xbmc.org>
Date: Tue, 30 Apr 2013 23:01:57 -0400
Subject: [PATCH 2/2] texture: two texture speedups
1. Check to see if we have a texture loaded already before opening/uploading
another instance of it.
2. Set a time-out for deleting textures. If they are needed again before the
time-out expires, they are re-added to the loaded textures array and ready
for use again. Otherwise, they are deleted after X msec. This helps to avoid
doing _really_ nasty things, like re-loading the background image when
moving from home to settings.
---
xbmc/Application.cpp | 2 +-
xbmc/guilib/TextureManager.cpp | 30 +++++++++++++++++++++++++-----
xbmc/guilib/TextureManager.h | 6 ++++--
3 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index 37d17e3..df456ec 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -4953,7 +4953,7 @@ void CApplication::ProcessSlow()
if (!IsPlayingVideo())
g_largeTextureManager.CleanupUnusedImages();
- g_TextureManager.FreeUnusedTextures();
+ g_TextureManager.FreeUnusedTextures(5000);
#ifdef HAS_DVD_DRIVE
// checks whats in the DVD drive and tries to autostart the content (xbox games, dvd, cdda, avi files...)
diff --git a/xbmc/guilib/TextureManager.cpp b/xbmc/guilib/TextureManager.cpp
index 6d6c4d9..f214489 100644
--- a/xbmc/guilib/TextureManager.cpp
+++ b/xbmc/guilib/TextureManager.cpp
@@ -29,6 +29,7 @@
#ifdef _DEBUG
#include "utils/TimeUtils.h"
#endif
+#include "threads/SystemClock.h"
#include "filesystem/File.h"
#include "filesystem/Directory.h"
#include "URL.h"
@@ -298,6 +299,17 @@ bool CGUITextureManager::HasTexture(const CStdString &textureName, CStdString *p
return emptyTexture;
}
+ for (ilistUnused i = m_unusedTextures.begin(); i != m_unusedTextures.end(); i++)
+ {
+ CTextureMap* pMap = i->first;
+ if (pMap->GetName() == strTextureName)
+ {
+ m_vecTextures.push_back(pMap);
+ m_unusedTextures.erase(i);
+ return pMap->GetTexture();
+ }
+ }
+
if (checkBundleOnly && bundle == -1)
return emptyTexture;
@@ -439,7 +451,7 @@ void CGUITextureManager::ReleaseTexture(const CStdString& strTextureName)
{
//CLog::Log(LOGINFO, " cleanup:%s", strTextureName.c_str());
// add to our textures to free
- m_unusedTextures.push_back(pMap);
+ m_unusedTextures.push_back(make_pair(pMap, XbmcThreads::SystemClockMillis()));
i = m_vecTextures.erase(i);
}
return;
@@ -449,12 +461,20 @@ void CGUITextureManager::ReleaseTexture(const CStdString& strTextureName)
CLog::Log(LOGWARNING, "%s: Unable to release texture %s", __FUNCTION__, strTextureName.c_str());
}
-void CGUITextureManager::FreeUnusedTextures()
+void CGUITextureManager::FreeUnusedTextures(unsigned int timeDelay)
{
+ unsigned int currFrameTime = XbmcThreads::SystemClockMillis();
CSingleLock lock(g_graphicsContext);
- for (ivecTextures i = m_unusedTextures.begin(); i != m_unusedTextures.end(); ++i)
- delete *i;
- m_unusedTextures.clear();
+ for (ilistUnused i = m_unusedTextures.begin(); i != m_unusedTextures.end();)
+ {
+ if (currFrameTime - i->second >= timeDelay)
+ {
+ delete i->first;
+ i = m_unusedTextures.erase(i);
+ }
+ else
+ i++;
+ }
#if defined(HAS_GL) || defined(HAS_GLES)
for (unsigned int i = 0; i < m_unusedHwTextures.size(); ++i)
diff --git a/xbmc/guilib/TextureManager.h b/xbmc/guilib/TextureManager.h
index 22fc192..2633c39d 100644
--- a/xbmc/guilib/TextureManager.h
+++ b/xbmc/guilib/TextureManager.h
@@ -27,6 +27,7 @@
#define GUILIB_TEXTUREMANAGER_H
#include <vector>
+#include <list>
#include "TextureBundle.h"
#include "threads/CriticalSection.h"
@@ -121,13 +122,14 @@ class CGUITextureManager
void SetTexturePath(const CStdString &texturePath); ///< Set a single path as the path to check when loading media (clear then add)
void RemoveTexturePath(const CStdString &texturePath); ///< Remove a path from the paths to check when loading media
- void FreeUnusedTextures(); ///< Free textures (called from app thread only)
+ void FreeUnusedTextures(unsigned int timeDelay = 0); ///< Free textures (called from app thread only)
void ReleaseHwTexture(unsigned int texture);
protected:
std::vector<CTextureMap*> m_vecTextures;
- std::vector<CTextureMap*> m_unusedTextures;
+ std::list<std::pair<CTextureMap*, unsigned int> > m_unusedTextures;
std::vector<unsigned int> m_unusedHwTextures;
typedef std::vector<CTextureMap*>::iterator ivecTextures;
+ typedef std::list<std::pair<CTextureMap*, unsigned int> >::iterator ilistUnused;
// we have 2 texture bundles (one for the base textures, one for the theme)
CTextureBundle m_TexBundle[2];
--
1.8.1.6

View File

@ -0,0 +1,77 @@
From 101fbc2d6869d6f02c4345a232854dbbb3f1a855 Mon Sep 17 00:00:00 2001
From: Cory Fields <theuni-nospam-@xbmc.org>
Date: Thu, 2 May 2013 16:45:41 -0400
Subject: [PATCH] build: stop using whole-archive for our final binary
This nasty hack has been around for ages. By changing, we get the following
benefits:
- We don't link in _every_ object in _every_ archive!
- Builds will no longer fail if a source file has been removed but its object
still exists in the archive
- Filesize reduction
- Ability to use lto, garbage collection, dead-code stripping, etc in a
useful manner
This is achieved by specifying a main object on the link line, and using
start-group/end-group to search through the archives multiple times until each
symbol is found.
---
Makefile.in | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 3cbe1a2..f0827f2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -92,6 +92,9 @@ DIRECTORY_ARCHIVES=$(DVDPLAYER_ARCHIVES) \
xbmc/windows/windows.a \
xbmc/xbmc.a \
+ifneq (@USE_LIBXBMC@,1)
+DIRECTORY_ARCHIVES +=xbmc/main/main.a
+endif
NWAOBJSXBMC= xbmc/threads/threads.a \
xbmc/commons/commons.a
@@ -425,24 +428,29 @@ endif
OBJSXBMC:=$(filter-out $(DYNOBJSXBMC), $(OBJSXBMC))
-libxbmc.so: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC)
+MAINOBJS=xbmc/xbmc.o
+ifeq (@USE_ANDROID@,1)
+MAINOBJS+=xbmc/android/activity/android_main.o
+endif
+ifneq (@USE_LIBXBMC@,1)
+MAINOBJS+=xbmc/main/main.o
+endif
+
+libxbmc.so: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(MAINOBJS)
ifeq ($(findstring osx,@ARCH@), osx)
$(SILENT_LD) $(CXX) $(LDFLAGS) -bundle -o $@ -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS)
else
- $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ -Wl,--whole-archive $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--no-whole-archive -Wl,--no-undefined $(NWAOBJSXBMC) $(LIBS)
+ $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(MAINOBJS) -Wl,--start-group $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--end-group -Wl,--no-undefined $(NWAOBJSXBMC) $(LIBS)
endif
-xbmc.bin: xbmc/main/main.a $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC)
+xbmc.bin: $(OBJSXBMC) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(MAINOBJS)
ifeq ($(findstring osx,@ARCH@), osx)
- $(SILENT_LD) $(CXX) $(LDFLAGS) -o xbmc.bin -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) xbmc/main/main.a $(LIBS) -rdynamic
+ $(SILENT_LD) $(CXX) $(LDFLAGS) -o xbmc.bin -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS) -rdynamic
else
- $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o xbmc.bin -Wl,--whole-archive $(DYNOBJSXBMC) $(OBJSXBMC) xbmc/main/main.a -Wl,--no-whole-archive $(NWAOBJSXBMC) $(LIBS) -rdynamic
+ $(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o xbmc.bin $(MAINOBJS) -Wl,--start-group $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--end-group $(NWAOBJSXBMC) $(LIBS) -rdynamic
endif
-xbmc/main/main.a: force
- $(MAKE) -C xbmc/main
-
xbmc-xrandr: xbmc-xrandr.c
ifneq (1,@USE_XRANDR@)
# xbmc-xrandr.c gets picked up by the default make rules
--
1.8.1.6

View File

@ -0,0 +1,89 @@
From 0aaeb72ed3d76134f11b80a4d17e50b40d6459be Mon Sep 17 00:00:00 2001
From: hmis <hubert.mis@gmail.com>
Date: Mon, 8 Apr 2013 21:35:35 +0300
Subject: [PATCH] Read CD audio USB drive bug fixed
libcdio seems to allow read no more than about 10 audio sectors at once when CD audio device is connected via USB.
This patch makes XBMC read small number of sectors if default one fails. It uses more CPU but allows to use USB CD devices.
Tested on GNU/Linux x86 and RPi. (On Rpi OMXPlayer does not play CD, but I can rip tracks).
---
xbmc/filesystem/CDDAFile.cpp | 34 +++++++++++++++++++++++++++-------
xbmc/filesystem/CDDAFile.h | 1 +
2 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/xbmc/filesystem/CDDAFile.cpp b/xbmc/filesystem/CDDAFile.cpp
index 5342629..f5eaf37 100644
--- a/xbmc/filesystem/CDDAFile.cpp
+++ b/xbmc/filesystem/CDDAFile.cpp
@@ -40,6 +40,7 @@
m_lsnCurrent = CDIO_INVALID_LSN;
m_lsnEnd = CDIO_INVALID_LSN;
m_cdio = CLibcdio::GetInstance();
+ m_iSectorCount = 52;
}
CFileCDDA::~CFileCDDA(void)
@@ -120,7 +121,8 @@ unsigned int CFileCDDA::Read(void* lpBuf, int64_t uiBufSize)
if (!m_pCdIo || !g_mediaManager.IsDiscInDrive())
return 0;
- int iSectorCount = (int)uiBufSize / CDIO_CD_FRAMESIZE_RAW;
+ // limit number of sectors that fits in buffer by m_iSectorCount
+ int iSectorCount = std::min((int)uiBufSize / CDIO_CD_FRAMESIZE_RAW, m_iSectorCount);
if (iSectorCount <= 0)
return 0;
@@ -129,14 +131,32 @@ unsigned int CFileCDDA::Read(void* lpBuf, int64_t uiBufSize)
if (m_lsnCurrent + iSectorCount > m_lsnEnd)
iSectorCount = m_lsnEnd - m_lsnCurrent;
- int iret = m_cdio->cdio_read_audio_sectors(m_pCdIo, lpBuf, m_lsnCurrent, iSectorCount);
-
- if ( iret != DRIVER_OP_SUCCESS)
+ // The loop tries to solve read error problem by lowering number of sectors to read (iSectorCount).
+ // When problem is solved the proper number of sectors is stored in m_iSectorCount
+ int big_iSectorCount = iSectorCount;
+ while (iSectorCount > 0)
{
- CLog::Log(LOGERROR, "file cdda: Reading %d sectors of audio data starting at lsn %d failed with error code %i", iSectorCount, m_lsnCurrent, iret);
- return 0;
+ int iret = m_cdio->cdio_read_audio_sectors(m_pCdIo, lpBuf, m_lsnCurrent, iSectorCount);
+
+ if (iret == DRIVER_OP_SUCCESS)
+ {
+ // If lower iSectorCount solved the problem limit it's value
+ if (iSectorCount < big_iSectorCount)
+ {
+ m_iSectorCount = iSectorCount;
+ }
+ break;
+ }
+
+ // iSectorCount is low so it cannot solve read problem
+ if (iSectorCount <= 10)
+ {
+ CLog::Log(LOGERROR, "file cdda: Reading %d sectors of audio data starting at lsn %d failed with error code %i", iSectorCount, m_lsnCurrent, iret);
+ return 0;
+ }
+
+ iSectorCount = 10;
}
-
m_lsnCurrent += iSectorCount;
return iSectorCount*CDIO_CD_FRAMESIZE_RAW;
diff --git a/xbmc/filesystem/CDDAFile.h b/xbmc/filesystem/CDDAFile.h
index f041e0b..72b8d5b 100644
--- a/xbmc/filesystem/CDDAFile.h
+++ b/xbmc/filesystem/CDDAFile.h
@@ -53,6 +53,7 @@ class CFileCDDA : public IFile
lsn_t m_lsnStart; // Start of m_iTrack in logical sector number
lsn_t m_lsnCurrent; // Position inside the track in logical sector number
lsn_t m_lsnEnd; // End of m_iTrack in logical sector number
+ int m_iSectorCount; // max number of sectors to read at once
boost::shared_ptr<MEDIA_DETECT::CLibcdio> m_cdio;
};
}
--
1.8.1.6

View File

@ -0,0 +1,555 @@
diff -Naur xbmc-12.2.0/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxCDDA.cpp xbmc-12.2.0.patch/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxCDDA.cpp
--- xbmc-12.2.0/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxCDDA.cpp 1970-01-01 01:00:00.000000000 +0100
+++ xbmc-12.2.0.patch/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxCDDA.cpp 2013-05-10 07:16:56.061904946 +0200
@@ -0,0 +1,180 @@
+/*
+ * Copyright (C) 2013 Team XBMC
+ * http://www.xbmc.org
+ *
+ * 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 XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "DVDInputStreams/DVDInputStream.h"
+#include "DVDDemuxCDDA.h"
+#include "DVDDemuxUtils.h"
+#include "utils/log.h"
+#include "../DVDClock.h"
+
+// CDDA audio demuxer based on AirTunes audio Demuxer.
+
+using namespace std;
+
+class CDemuxStreamAudioCDDA
+ : public CDemuxStreamAudio
+{
+public:
+ void GetStreamInfo(string& strInfo)
+ {
+ strInfo = "pcm";
+ }
+};
+
+CDVDDemuxCDDA::CDVDDemuxCDDA() : CDVDDemux()
+{
+ m_pInput = NULL;
+ m_stream = NULL;
+ m_bytes = 0;
+}
+
+CDVDDemuxCDDA::~CDVDDemuxCDDA()
+{
+ Dispose();
+}
+
+bool CDVDDemuxCDDA::Open(CDVDInputStream* pInput)
+{
+ Abort();
+
+ Dispose();
+
+ if(!pInput || !pInput->IsStreamType(DVDSTREAM_TYPE_FILE))
+ return false;
+
+ m_pInput = pInput;
+
+ m_stream = new CDemuxStreamAudioCDDA();
+
+ if(!m_stream)
+ return false;
+
+ m_stream->iSampleRate = 44100;
+ m_stream->iBitsPerSample = 16;
+ m_stream->iBitRate = 44100 * 2 * 16;
+ m_stream->iChannels = 2;
+ m_stream->type = STREAM_AUDIO;
+ m_stream->codec = CODEC_ID_PCM_S16LE;
+
+ return true;
+}
+
+void CDVDDemuxCDDA::Dispose()
+{
+ delete m_stream;
+ m_stream = NULL;
+
+ m_pInput = NULL;
+ m_bytes = 0;
+}
+
+void CDVDDemuxCDDA::Reset()
+{
+ CDVDInputStream* pInputStream = m_pInput;
+ Dispose();
+ Open(pInputStream);
+}
+
+void CDVDDemuxCDDA::Abort()
+{
+ if(m_pInput)
+ return m_pInput->Abort();
+}
+
+void CDVDDemuxCDDA::Flush()
+{
+}
+
+#define CDDA_READ_SIZE 4096
+DemuxPacket* CDVDDemuxCDDA::Read()
+{
+ if(!m_pInput)
+ return NULL;
+
+ DemuxPacket* pPacket = CDVDDemuxUtils::AllocateDemuxPacket(CDDA_READ_SIZE);
+
+ if (!pPacket)
+ {
+ if (m_pInput)
+ m_pInput->Close();
+ return NULL;
+ }
+
+ pPacket->iSize = m_pInput->Read(pPacket->pData, CDDA_READ_SIZE);
+ pPacket->iStreamId = 0;
+
+ if(pPacket->iSize < 1)
+ {
+ delete pPacket;
+ pPacket = NULL;
+ }
+ else
+ {
+ int n = m_stream->iBitRate>>3;
+ if (n > 0)
+ {
+ m_bytes += pPacket->iSize;
+ pPacket->dts = (double)m_bytes * DVD_TIME_BASE / n;
+ pPacket->pts = pPacket->dts;
+ }
+ else
+ {
+ pPacket->dts = DVD_NOPTS_VALUE;
+ pPacket->pts = DVD_NOPTS_VALUE;
+ }
+ }
+
+ return pPacket;
+}
+
+int CDVDDemuxCDDA::GetStreamLength()
+{
+ int64_t num_track_bytes = m_pInput->GetLength();
+ int bytes_per_second = (m_stream->iBitRate>>3);
+ int64_t track_mseconds = num_track_bytes*1000 / bytes_per_second;
+ return (int)track_mseconds;
+}
+
+CDemuxStream* CDVDDemuxCDDA::GetStream(int iStreamId)
+{
+ if(iStreamId != 0)
+ return NULL;
+
+ return m_stream;
+}
+
+int CDVDDemuxCDDA::GetNrOfStreams()
+{
+ return (m_stream == NULL ? 0 : 1);
+}
+
+std::string CDVDDemuxCDDA::GetFileName()
+{
+ if(m_pInput)
+ return m_pInput->GetFileName();
+ else
+ return "";
+}
+
+void CDVDDemuxCDDA::GetStreamCodecName(int iStreamId, CStdString &strName)
+{
+ if (m_stream && iStreamId == 0)
+ strName = "pcm";
+}
diff -Naur xbmc-12.2.0/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxCDDA.h xbmc-12.2.0.patch/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxCDDA.h
--- xbmc-12.2.0/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxCDDA.h 1970-01-01 01:00:00.000000000 +0100
+++ xbmc-12.2.0.patch/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxCDDA.h 2013-05-10 07:16:56.061904946 +0200
@@ -0,0 +1,59 @@
+#pragma once
+/*
+ * Copyright (C) 2013 Team XBMC
+ * http://www.xbmc.org
+ *
+ * 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 XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "DVDDemux.h"
+
+#ifdef _WIN32
+#define __attribute__(dummy_val)
+#else
+#include <config.h>
+#endif
+
+class CDemuxStreamAudioCDDA;
+
+class CDVDDemuxCDDA : public CDVDDemux
+{
+public:
+
+ CDVDDemuxCDDA();
+ ~CDVDDemuxCDDA();
+
+ bool Open(CDVDInputStream* pInput);
+ void Dispose();
+ void Reset();
+ void Abort();
+ void Flush();
+ DemuxPacket* Read();
+ bool SeekTime(int time, bool backwords = false, double* startpts = NULL) { return false; };
+ void SetSpeed(int iSpeed) {};
+ int GetStreamLength() ;
+ CDemuxStream* GetStream(int iStreamId);
+ int GetNrOfStreams();
+ std::string GetFileName();
+ virtual void GetStreamCodecName(int iStreamId, CStdString &strName);
+
+protected:
+ friend class CDemuxStreamAudioCDDA;
+ CDVDInputStream* m_pInput;
+ int64_t m_bytes;
+
+ CDemuxStreamAudioCDDA *m_stream;
+};
diff -Naur xbmc-12.2.0/xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp xbmc-12.2.0.patch/xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp
--- xbmc-12.2.0/xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp 2013-05-02 17:00:07.000000000 +0200
+++ xbmc-12.2.0.patch/xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp 2013-05-10 07:16:56.061904946 +0200
@@ -31,6 +31,7 @@
#include "DVDDemuxHTSP.h"
#endif
#include "DVDDemuxBXA.h"
+#include "DVDDemuxCDDA.h"
#include "DVDDemuxPVRClient.h"
#include "pvr/PVRManager.h"
#include "pvr/addons/PVRClients.h"
@@ -51,6 +52,22 @@
else
return NULL;
}
+
+ // Try to open CDDA demuxer
+ if (pInputStream->IsStreamType(DVDSTREAM_TYPE_FILE) && pInputStream->GetContent().compare("application/octet-stream") == 0)
+ {
+ std::string filename = pInputStream->GetFileName();
+ if (filename.substr(0, 7) == "cdda://")
+ {
+ CLog::Log(LOGDEBUG, "DVDFactoryDemuxer: Stream is probably CD audio. Creating CDDA demuxer.");
+
+ auto_ptr<CDVDDemuxCDDA> demuxer(new CDVDDemuxCDDA());
+ if (demuxer->Open(pInputStream))
+ {
+ return demuxer.release();
+ }
+ }
+ }
if (pInputStream->IsStreamType(DVDSTREAM_TYPE_HTTP))
{
diff -Naur xbmc-12.2.0/xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp.orig xbmc-12.2.0.patch/xbmc/cores/dvdplayer/DVDDemuxers/DVDFactoryDemuxer.cpp.orig
diff -Naur xbmc-12.2.0/xbmc/cores/dvdplayer/DVDDemuxers/Makefile.in xbmc-12.2.0.patch/xbmc/cores/dvdplayer/DVDDemuxers/Makefile.in
--- xbmc-12.2.0/xbmc/cores/dvdplayer/DVDDemuxers/Makefile.in 2013-05-02 17:00:07.000000000 +0200
+++ xbmc-12.2.0.patch/xbmc/cores/dvdplayer/DVDDemuxers/Makefile.in 2013-05-10 07:16:56.061904946 +0200
@@ -2,6 +2,7 @@
SRCS = DVDDemux.cpp
SRCS += DVDDemuxBXA.cpp
+SRCS += DVDDemuxCDDA.cpp
SRCS += DVDDemuxFFmpeg.cpp
SRCS += DVDDemuxHTSP.cpp
SRCS += DVDDemuxPVRClient.cpp
diff -Naur xbmc-12.2.0/xbmc/cores/paplayer/CDDAcodec.cpp xbmc-12.2.0.patch/xbmc/cores/paplayer/CDDAcodec.cpp
--- xbmc-12.2.0/xbmc/cores/paplayer/CDDAcodec.cpp 2013-05-02 17:00:08.000000000 +0200
+++ xbmc-12.2.0.patch/xbmc/cores/paplayer/CDDAcodec.cpp 1970-01-01 01:00:00.000000000 +0100
@@ -1,159 +0,0 @@
-/*
- * Copyright (C) 2005-2012 Team XBMC
- * http://www.xbmc.org
- *
- * 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 XBMC; see the file COPYING. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "CDDAcodec.h"
-#if !defined(TARGET_DARWIN_IOS)
-#include <cdio/sector.h>
-#else
-typedef int32_t lsn_t;
-#define CDIO_CD_FRAMESIZE_RAW 2352
-#define CDIO_CD_FRAMES_PER_SEC 75
-#endif
-#include "cores/AudioEngine/Utils/AEUtil.h"
-
-#define SECTOR_COUNT 55 // max. sectors that can be read at once
-#define MAX_BUFFER_SIZE 2*SECTOR_COUNT*CDIO_CD_FRAMESIZE_RAW
-
-CDDACodec::CDDACodec()
-{
- m_SampleRate = 44100;
- m_Channels = 2;
- m_BitsPerSample = 16;
- m_DataFormat = AE_FMT_S16NE;
- m_TotalTime = 0;
- m_Bitrate = 0;
- m_CodecName = "cdda";
-
- m_BufferSize=0;
- m_Buffer = new BYTE[MAX_BUFFER_SIZE];
- m_BufferPos = 0;
-}
-
-CDDACodec::~CDDACodec()
-{
- DeInit();
-
- if (m_Buffer)
- {
- delete[] m_Buffer;
- m_Buffer = NULL;
- }
-}
-
-bool CDDACodec::Init(const CStdString &strFile, unsigned int filecache)
-{
- if (!m_file.Open(strFile, READ_CACHED))
- return false;
-
- // Calculate total time of the track
- m_TotalTime=(m_file.GetLength()/CDIO_CD_FRAMESIZE_RAW)/CDIO_CD_FRAMES_PER_SEC;
- if (m_TotalTime > 0)
- m_Bitrate = (int)((m_file.GetLength() * 8) / m_TotalTime);
- else
- m_Bitrate = 0;
- m_TotalTime*=1000; // ms
- return true;
-}
-
-void CDDACodec::DeInit()
-{
- m_file.Close();
-}
-
-int64_t CDDACodec::Seek(int64_t iSeekTime)
-{
- // Calculate the next full second...
- int iSeekTimeFullSec=(int)(iSeekTime+(1000-(iSeekTime%1000)))/1000;
-
- // ...and the logical sector on the cd...
- lsn_t lsnSeek=iSeekTimeFullSec*CDIO_CD_FRAMES_PER_SEC;
-
- // ... then seek to its position...
- int iNewOffset=(int)m_file.Seek(lsnSeek*CDIO_CD_FRAMESIZE_RAW, SEEK_SET);
- m_BufferSize=m_BufferPos=0;
-
- // ... and look if we really got there.
- int iNewSeekTime=(iNewOffset/CDIO_CD_FRAMESIZE_RAW)/CDIO_CD_FRAMES_PER_SEC;
- return iNewSeekTime*(int64_t)1000; // ms
-}
-
-int CDDACodec::ReadPCM(BYTE *pBuffer, int size, int *actualsize)
-{
- *actualsize=0;
-
- bool bEof=false;
- // Reached end of track?
- if (m_file.GetLength()==m_file.GetPosition())
- bEof=true;
-
- // Do we have to refill our audio buffer?
- if (m_BufferSize-m_BufferPos<MAX_BUFFER_SIZE/2 && !bEof)
- {
- // Move the remaining audio data to the beginning of the buffer
- memmove(m_Buffer, m_Buffer + m_BufferPos, m_BufferSize-m_BufferPos);
- m_BufferSize=m_BufferSize-m_BufferPos;
- m_BufferPos = 0;
-
- // Fill our buffer with a chunk of audio data
- int iAmountRead=m_file.Read(m_Buffer+m_BufferSize, MAX_BUFFER_SIZE/2);
- if (iAmountRead<=0)
- return READ_ERROR;
-
- m_BufferSize+=iAmountRead;
- }
-
- // Our buffer is empty and no data left to read from the cd
- if (m_BufferSize-m_BufferPos==0 && bEof)
- return READ_EOF;
-
- // Try to give the player the amount of audio data he wants
- if (m_BufferSize-m_BufferPos>=size)
- { // we have enough data in our buffer
- memcpy(pBuffer, m_Buffer + m_BufferPos, size);
- m_BufferPos+=size;
- *actualsize=size;
- }
- else
- { // Only a smaller amount of data left as the player wants
- memcpy(pBuffer, m_Buffer + m_BufferPos, m_BufferSize-m_BufferPos);
- *actualsize=m_BufferSize-m_BufferPos;
- m_BufferPos+=m_BufferSize-m_BufferPos;
- }
-
- return READ_SUCCESS;
-}
-
-bool CDDACodec::CanInit()
-{
- return true;
-}
-
-CAEChannelInfo CDDACodec::GetChannelInfo()
-{
- static enum AEChannel map[2][3] = {
- {AE_CH_FC, AE_CH_NULL},
- {AE_CH_FL, AE_CH_FR , AE_CH_NULL}
- };
-
- if (m_Channels > 2)
- return CAEUtil::GuessChLayout(m_Channels);
-
- return CAEChannelInfo(map[m_Channels - 1]);
-}
diff -Naur xbmc-12.2.0/xbmc/cores/paplayer/CDDAcodec.h xbmc-12.2.0.patch/xbmc/cores/paplayer/CDDAcodec.h
--- xbmc-12.2.0/xbmc/cores/paplayer/CDDAcodec.h 2013-05-02 17:00:08.000000000 +0200
+++ xbmc-12.2.0.patch/xbmc/cores/paplayer/CDDAcodec.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,43 +0,0 @@
-#pragma once
-
-/*
- * Copyright (C) 2005-2012 Team XBMC
- * http://www.xbmc.org
- *
- * 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 XBMC; see the file COPYING. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "CachingCodec.h"
-
-class CDDACodec : public CachingCodec
-{
-public:
- CDDACodec();
- virtual ~CDDACodec();
-
- virtual bool Init(const CStdString &strFile, unsigned int filecache);
- virtual void DeInit();
- virtual int64_t Seek(int64_t iSeekTime);
- virtual int ReadPCM(BYTE *pBuffer, int size, int *actualsize);
- virtual bool CanInit();
- virtual CAEChannelInfo GetChannelInfo();
-
-private:
- // Input buffer to read our cdda data into
- BYTE* m_Buffer;
- int m_BufferSize;
- int m_BufferPos;
-};
diff -Naur xbmc-12.2.0/xbmc/cores/paplayer/CodecFactory.cpp xbmc-12.2.0.patch/xbmc/cores/paplayer/CodecFactory.cpp
--- xbmc-12.2.0/xbmc/cores/paplayer/CodecFactory.cpp 2013-05-02 17:00:08.000000000 +0200
+++ xbmc-12.2.0.patch/xbmc/cores/paplayer/CodecFactory.cpp 2013-05-10 07:16:56.061904946 +0200
@@ -21,7 +21,6 @@
#include "system.h"
#include "CodecFactory.h"
#include "MP3codec.h"
-#include "CDDAcodec.h"
#include "OGGcodec.h"
#include "FLACcodec.h"
#include "WAVcodec.h"
@@ -51,7 +50,7 @@
else if (strFileType.Equals("ape") || strFileType.Equals("mac"))
return new DVDPlayerCodec();
else if (strFileType.Equals("cdda"))
- return new CDDACodec();
+ return new DVDPlayerCodec();
else if (strFileType.Equals("mpc") || strFileType.Equals("mp+") || strFileType.Equals("mpp"))
return new DVDPlayerCodec();
else if (strFileType.Equals("shn"))
@@ -183,20 +182,6 @@
}
delete codec;
}
- if (urlFile.GetFileType().Equals("cdda"))
- {
- //lets see what it contains...
- //this kinda sucks 'cause if it's plain cdda the file
- //will be opened, sniffed and closed before it is opened *again* for cdda
- //would be better if the papcodecs could work with bitstreams instead of filenames.
- DVDPlayerCodec *dvdcodec = new DVDPlayerCodec();
- dvdcodec->SetContentType("audio/x-spdif-compressed");
- if (dvdcodec->Init(strFile, filecache))
- {
- return dvdcodec;
- }
- delete dvdcodec;
- }
else if (urlFile.GetFileType().Equals("ogg") || urlFile.GetFileType().Equals("oggstream") || urlFile.GetFileType().Equals("oga"))
return CreateOGGCodec(strFile,filecache);
diff -Naur xbmc-12.2.0/xbmc/cores/paplayer/Makefile.in xbmc-12.2.0.patch/xbmc/cores/paplayer/Makefile.in
--- xbmc-12.2.0/xbmc/cores/paplayer/Makefile.in 2013-05-02 17:00:08.000000000 +0200
+++ xbmc-12.2.0.patch/xbmc/cores/paplayer/Makefile.in 2013-05-10 07:16:56.062904942 +0200
@@ -9,7 +9,6 @@
SRCS = ADPCMCodec.cpp
SRCS += AudioDecoder.cpp
-SRCS += CDDAcodec.cpp
SRCS += CodecFactory.cpp
SRCS += DVDPlayerCodec.cpp
SRCS += FLACcodec.cpp

View File

@ -0,0 +1,29 @@
From ff283b0861afd35410d20c52fee8ba0542e91f8a Mon Sep 17 00:00:00 2001
From: ulion <ulion2002@gmail.com>
Date: Sun, 24 Mar 2013 13:19:39 +0800
Subject: [PATCH] Check exists before listing dir, to avoid produce error log,
fix #14210
---
xbmc/video/VideoInfoScanner.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/xbmc/video/VideoInfoScanner.cpp b/xbmc/video/VideoInfoScanner.cpp
index 170b5a9..fbe7913 100644
--- a/xbmc/video/VideoInfoScanner.cpp
+++ b/xbmc/video/VideoInfoScanner.cpp
@@ -1771,7 +1771,10 @@
void CVideoInfoScanner::FetchActorThumbs(vector<SActorInfo>& actors, const CStdString& strPath)
{
CFileItemList items;
- CDirectory::GetDirectory(URIUtils::AddFileToFolder(strPath, ".actors"), items, ".png|.jpg|.tbn", DIR_FLAG_NO_FILE_DIRS | DIR_FLAG_NO_FILE_INFO);
+ CStdString actorsDir = URIUtils::AddFileToFolder(strPath, ".actors");
+ if (CDirectory::Exists(actorsDir))
+ CDirectory::GetDirectory(actorsDir, items, ".png|.jpg|.tbn", DIR_FLAG_NO_FILE_DIRS |
+ DIR_FLAG_NO_FILE_INFO);
for (vector<SActorInfo>::iterator i = actors.begin(); i != actors.end(); ++i)
{
if (i->thumb.IsEmpty())
--
1.8.1.6

View File

@ -0,0 +1,32 @@
From 5b75f44b448bcefb9b802a3a28d0e6846284d22e Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Mon, 6 May 2013 14:20:05 +0100
Subject: [PATCH] [rbp/omxplayer] Fix for hang following seek after eos
If you seek after the demuxer eof, the eof state is cleared, but we are not clearing the flags relating to sending eos stream to audio/video players
---
xbmc/cores/omxplayer/OMXPlayer.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp
index 156a3ad..82d0024 100644
--- a/xbmc/cores/omxplayer/OMXPlayer.cpp
+++ b/xbmc/cores/omxplayer/OMXPlayer.cpp
@@ -1178,7 +1178,13 @@ void COMXPlayer::Process()
CDVDDemuxUtils::FreeDemuxPacket(pPacket);
continue;
}
-
+ if (pPacket)
+ {
+ // reset eos state when we get a packet (e.g. for case of seek after eos)
+ bOmxWaitVideo = false;
+ bOmxWaitAudio = false;
+ bOmxSentEOFs = false;
+ }
if (!pPacket)
{
// when paused, demuxer could be be returning empty
--
1.8.1.6

View File

@ -0,0 +1,295 @@
From 4a61baea4a936089b589f0b7a834aa180a1017ea Mon Sep 17 00:00:00 2001
From: Bob van Loosen <bob.loosen@gmail.com>
Date: Tue, 14 May 2013 12:28:45 +0200
Subject: [PATCH 1/2] fixed: when doing a format conversion from float to 32
bit int, multiply with INT32_MAX - 127, since this is the maximum value that
can be stored in 32 bit float and int, if INT32_MAX gets converted to float,
it gets rounded to INT32_MAX + 1 which can cause wrap around distortion
---
xbmc/cores/AudioEngine/Utils/AEConvert.cpp | 32 +++++++++++++++++-------------
1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/xbmc/cores/AudioEngine/Utils/AEConvert.cpp b/xbmc/cores/AudioEngine/Utils/AEConvert.cpp
index 97ec87b..5f0af63 100644
--- a/xbmc/cores/AudioEngine/Utils/AEConvert.cpp
+++ b/xbmc/cores/AudioEngine/Utils/AEConvert.cpp
@@ -922,17 +922,21 @@ unsigned int CAEConvert::Float_S24NE3(float *data, const unsigned int samples, u
return samples * 3;
}
+//float can't store INT32_MAX, it gets rounded up to INT32_MAX + 1
+//INT32_MAX - 127 is the maximum value that can exactly be stored in both 32 bit float and int
+#define MUL32 ((float)(INT32_MAX - 127))
+
unsigned int CAEConvert::Float_S32LE(float *data, const unsigned int samples, uint8_t *dest)
{
int32_t *dst = (int32_t*)dest;
#ifdef __SSE__
- const __m128 mul = _mm_set_ps1((float)INT32_MAX);
+ const __m128 mul = _mm_set_ps1(MUL32);
unsigned int count = samples;
/* work around invalid alignment */
while ((((uintptr_t)data & 0xF) || ((uintptr_t)dest & 0xF)) && count > 0)
{
- dst[0] = safeRound(data[0] * (float)INT32_MAX);
+ dst[0] = safeRound(data[0] * MUL32);
++data;
++dst;
--count;
@@ -955,7 +959,7 @@ unsigned int CAEConvert::Float_S32LE(float *data, const unsigned int samples, ui
const uint32_t odd = samples - even;
if (odd == 1)
{
- dst[0] = safeRound(data[0] * (float)INT32_MAX);
+ dst[0] = safeRound(data[0] * MUL32);
dst[0] = Endian_SwapLE32(dst[0]);
}
else
@@ -988,7 +992,7 @@ unsigned int CAEConvert::Float_S32LE(float *data, const unsigned int samples, ui
/* no SIMD */
for (uint32_t i = 0; i < samples; ++i, ++data, ++dst)
{
- dst[0] = safeRound(data[0] * (float)INT32_MAX);
+ dst[0] = safeRound(data[0] * MUL32);
dst[0] = Endian_SwapLE32(dst[0]);
}
#endif
@@ -1002,7 +1006,7 @@ unsigned int CAEConvert::Float_S32LE_Neon(float *data, const unsigned int sample
int32_t *dst = (int32_t*)dest;
for (float *end = data + (samples & ~0x3); data < end; data += 4, dst += 4)
{
- float32x4_t val = vmulq_n_f32(vld1q_f32((const float32_t *)data), INT32_MAX);
+ float32x4_t val = vmulq_n_f32(vld1q_f32((const float32_t *)data), MUL32);
int32x4_t ret = vcvtq_s32_f32(val);
#ifdef __BIG_ENDIAN__
ret = vrev64q_s32(ret);
@@ -1012,7 +1016,7 @@ unsigned int CAEConvert::Float_S32LE_Neon(float *data, const unsigned int sample
if (samples & 0x2)
{
- float32x2_t val = vmul_n_f32(vld1_f32((const float32_t *)data), INT32_MAX);
+ float32x2_t val = vmul_n_f32(vld1_f32((const float32_t *)data), MUL32);
int32x2_t ret = vcvt_s32_f32(val);
#ifdef __BIG_ENDIAN__
ret = vrev64_s32(ret);
@@ -1024,7 +1028,7 @@ unsigned int CAEConvert::Float_S32LE_Neon(float *data, const unsigned int sample
if (samples & 0x1)
{
- dst[0] = safeRound(data[0] * (float)INT32_MAX);
+ dst[0] = safeRound(data[0] * MUL32);
dst[0] = Endian_SwapLE32(dst[0]);
}
#endif
@@ -1035,13 +1039,13 @@ unsigned int CAEConvert::Float_S32BE(float *data, const unsigned int samples, ui
{
int32_t *dst = (int32_t*)dest;
#ifdef __SSE__
- const __m128 mul = _mm_set_ps1((float)INT32_MAX);
+ const __m128 mul = _mm_set_ps1(MUL32);
unsigned int count = samples;
/* work around invalid alignment */
while ((((uintptr_t)data & 0xF) || ((uintptr_t)dest & 0xF)) && count > 0)
{
- dst[0] = safeRound(data[0] * (float)INT32_MAX);
+ dst[0] = safeRound(data[0] * MUL32);
++data;
++dst;
--count;
@@ -1064,7 +1068,7 @@ unsigned int CAEConvert::Float_S32BE(float *data, const unsigned int samples, ui
const uint32_t odd = samples - even;
if (odd == 1)
{
- dst[0] = safeRound(data[0] * (float)INT32_MAX);
+ dst[0] = safeRound(data[0] * MUL32);
dst[0] = Endian_SwapBE32(dst[0]);
}
else
@@ -1096,7 +1100,7 @@ unsigned int CAEConvert::Float_S32BE(float *data, const unsigned int samples, ui
/* no SIMD */
for (uint32_t i = 0; i < samples; ++i, ++data, ++dst)
{
- dst[0] = safeRound(data[0] * (float)INT32_MAX);
+ dst[0] = safeRound(data[0] * MUL32);
dst[0] = Endian_SwapBE32(dst[0]);
}
#endif
@@ -1110,7 +1114,7 @@ unsigned int CAEConvert::Float_S32BE_Neon(float *data, const unsigned int sample
int32_t *dst = (int32_t*)dest;
for (float *end = data + (samples & ~0x3); data < end; data += 4, dst += 4)
{
- float32x4_t val = vmulq_n_f32(vld1q_f32((const float32_t *)data), INT32_MAX);
+ float32x4_t val = vmulq_n_f32(vld1q_f32((const float32_t *)data), MUL32);
int32x4_t ret = vcvtq_s32_f32(val);
#ifndef __BIG_ENDIAN__
ret = vrev64q_s32(ret);
@@ -1120,7 +1124,7 @@ unsigned int CAEConvert::Float_S32BE_Neon(float *data, const unsigned int sample
if (samples & 0x2)
{
- float32x2_t val = vmul_n_f32(vld1_f32((const float32_t *)data), INT32_MAX);
+ float32x2_t val = vmul_n_f32(vld1_f32((const float32_t *)data), MUL32);
int32x2_t ret = vcvt_s32_f32(val);
#ifndef __BIG_ENDIAN__
ret = vrev64_s32(ret);
@@ -1132,7 +1136,7 @@ unsigned int CAEConvert::Float_S32BE_Neon(float *data, const unsigned int sample
if (samples & 0x1)
{
- dst[0] = safeRound(data[0] * (float)INT32_MAX);
+ dst[0] = safeRound(data[0] * MUL32);
dst[0] = Endian_SwapBE32(dst[0]);
}
#endif
--
1.8.1.6
From edf2e3d3c9b124446961a9b66aaf401cf1770500 Mon Sep 17 00:00:00 2001
From: Bob van Loosen <bob.loosen@gmail.com>
Date: Tue, 14 May 2013 18:43:01 +0200
Subject: [PATCH 2/2] rename: MUL32 -> AE_MUL32
---
xbmc/cores/AudioEngine/Utils/AEConvert.cpp | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/xbmc/cores/AudioEngine/Utils/AEConvert.cpp b/xbmc/cores/AudioEngine/Utils/AEConvert.cpp
index 5f0af63..0b0b646 100644
--- a/xbmc/cores/AudioEngine/Utils/AEConvert.cpp
+++ b/xbmc/cores/AudioEngine/Utils/AEConvert.cpp
@@ -924,19 +924,19 @@ unsigned int CAEConvert::Float_S24NE3(float *data, const unsigned int samples, u
//float can't store INT32_MAX, it gets rounded up to INT32_MAX + 1
//INT32_MAX - 127 is the maximum value that can exactly be stored in both 32 bit float and int
-#define MUL32 ((float)(INT32_MAX - 127))
+#define AE_MUL32 ((float)(INT32_MAX - 127))
unsigned int CAEConvert::Float_S32LE(float *data, const unsigned int samples, uint8_t *dest)
{
int32_t *dst = (int32_t*)dest;
#ifdef __SSE__
- const __m128 mul = _mm_set_ps1(MUL32);
+ const __m128 mul = _mm_set_ps1(AE_MUL32);
unsigned int count = samples;
/* work around invalid alignment */
while ((((uintptr_t)data & 0xF) || ((uintptr_t)dest & 0xF)) && count > 0)
{
- dst[0] = safeRound(data[0] * MUL32);
+ dst[0] = safeRound(data[0] * AE_MUL32);
++data;
++dst;
--count;
@@ -959,7 +959,7 @@ unsigned int CAEConvert::Float_S32LE(float *data, const unsigned int samples, ui
const uint32_t odd = samples - even;
if (odd == 1)
{
- dst[0] = safeRound(data[0] * MUL32);
+ dst[0] = safeRound(data[0] * AE_MUL32);
dst[0] = Endian_SwapLE32(dst[0]);
}
else
@@ -992,7 +992,7 @@ unsigned int CAEConvert::Float_S32LE(float *data, const unsigned int samples, ui
/* no SIMD */
for (uint32_t i = 0; i < samples; ++i, ++data, ++dst)
{
- dst[0] = safeRound(data[0] * MUL32);
+ dst[0] = safeRound(data[0] * AE_MUL32);
dst[0] = Endian_SwapLE32(dst[0]);
}
#endif
@@ -1006,7 +1006,7 @@ unsigned int CAEConvert::Float_S32LE_Neon(float *data, const unsigned int sample
int32_t *dst = (int32_t*)dest;
for (float *end = data + (samples & ~0x3); data < end; data += 4, dst += 4)
{
- float32x4_t val = vmulq_n_f32(vld1q_f32((const float32_t *)data), MUL32);
+ float32x4_t val = vmulq_n_f32(vld1q_f32((const float32_t *)data), AE_MUL32);
int32x4_t ret = vcvtq_s32_f32(val);
#ifdef __BIG_ENDIAN__
ret = vrev64q_s32(ret);
@@ -1016,7 +1016,7 @@ unsigned int CAEConvert::Float_S32LE_Neon(float *data, const unsigned int sample
if (samples & 0x2)
{
- float32x2_t val = vmul_n_f32(vld1_f32((const float32_t *)data), MUL32);
+ float32x2_t val = vmul_n_f32(vld1_f32((const float32_t *)data), AE_MUL32);
int32x2_t ret = vcvt_s32_f32(val);
#ifdef __BIG_ENDIAN__
ret = vrev64_s32(ret);
@@ -1028,7 +1028,7 @@ unsigned int CAEConvert::Float_S32LE_Neon(float *data, const unsigned int sample
if (samples & 0x1)
{
- dst[0] = safeRound(data[0] * MUL32);
+ dst[0] = safeRound(data[0] * AE_MUL32);
dst[0] = Endian_SwapLE32(dst[0]);
}
#endif
@@ -1039,13 +1039,13 @@ unsigned int CAEConvert::Float_S32BE(float *data, const unsigned int samples, ui
{
int32_t *dst = (int32_t*)dest;
#ifdef __SSE__
- const __m128 mul = _mm_set_ps1(MUL32);
+ const __m128 mul = _mm_set_ps1(AE_MUL32);
unsigned int count = samples;
/* work around invalid alignment */
while ((((uintptr_t)data & 0xF) || ((uintptr_t)dest & 0xF)) && count > 0)
{
- dst[0] = safeRound(data[0] * MUL32);
+ dst[0] = safeRound(data[0] * AE_MUL32);
++data;
++dst;
--count;
@@ -1068,7 +1068,7 @@ unsigned int CAEConvert::Float_S32BE(float *data, const unsigned int samples, ui
const uint32_t odd = samples - even;
if (odd == 1)
{
- dst[0] = safeRound(data[0] * MUL32);
+ dst[0] = safeRound(data[0] * AE_MUL32);
dst[0] = Endian_SwapBE32(dst[0]);
}
else
@@ -1100,7 +1100,7 @@ unsigned int CAEConvert::Float_S32BE(float *data, const unsigned int samples, ui
/* no SIMD */
for (uint32_t i = 0; i < samples; ++i, ++data, ++dst)
{
- dst[0] = safeRound(data[0] * MUL32);
+ dst[0] = safeRound(data[0] * AE_MUL32);
dst[0] = Endian_SwapBE32(dst[0]);
}
#endif
@@ -1114,7 +1114,7 @@ unsigned int CAEConvert::Float_S32BE_Neon(float *data, const unsigned int sample
int32_t *dst = (int32_t*)dest;
for (float *end = data + (samples & ~0x3); data < end; data += 4, dst += 4)
{
- float32x4_t val = vmulq_n_f32(vld1q_f32((const float32_t *)data), MUL32);
+ float32x4_t val = vmulq_n_f32(vld1q_f32((const float32_t *)data), AE_MUL32);
int32x4_t ret = vcvtq_s32_f32(val);
#ifndef __BIG_ENDIAN__
ret = vrev64q_s32(ret);
@@ -1124,7 +1124,7 @@ unsigned int CAEConvert::Float_S32BE_Neon(float *data, const unsigned int sample
if (samples & 0x2)
{
- float32x2_t val = vmul_n_f32(vld1_f32((const float32_t *)data), MUL32);
+ float32x2_t val = vmul_n_f32(vld1_f32((const float32_t *)data), AE_MUL32);
int32x2_t ret = vcvt_s32_f32(val);
#ifndef __BIG_ENDIAN__
ret = vrev64_s32(ret);
@@ -1136,7 +1136,7 @@ unsigned int CAEConvert::Float_S32BE_Neon(float *data, const unsigned int sample
if (samples & 0x1)
{
- dst[0] = safeRound(data[0] * MUL32);
+ dst[0] = safeRound(data[0] * AE_MUL32);
dst[0] = Endian_SwapBE32(dst[0]);
}
#endif
--
1.8.1.6

View File

@ -0,0 +1,456 @@
From 0c2eaf5082a30fb06bad553775e805a745d59ee2 Mon Sep 17 00:00:00 2001
From: theuni <theuni-nospam@xbmc.org>
Date: Tue, 22 Jan 2013 04:09:07 -0500
Subject: [PATCH] depends: mark our wrapped functions as used
otherwise they get stripped when enabling dead code stripping
---
xbmc/cores/DllLoader/exports/wrapper.c | 138 ++++++++++++++++-----------------
1 file changed, 69 insertions(+), 69 deletions(-)
diff --git a/xbmc/cores/DllLoader/exports/wrapper.c b/xbmc/cores/DllLoader/exports/wrapper.c
index cb7bbf7..67189e9 100644
--- a/xbmc/cores/DllLoader/exports/wrapper.c
+++ b/xbmc/cores/DllLoader/exports/wrapper.c
@@ -115,7 +115,7 @@
int dll_setvbuf(FILE *stream, char *buf, int type, size_t size);
struct mntent *dll_getmntent(FILE *fp);
-void *__wrap_dlopen(const char *filename, int flag)
+__attribute__((used)) void *__wrap_dlopen(const char *filename, int flag)
{
#if defined(TARGET_ANDROID)
return dll_dlopen(filename, flag);
@@ -124,213 +124,213 @@ void *__wrap_dlopen(const char *filename, int flag)
#endif
}
-FILE *__wrap_popen(const char *command, const char *mode)
+__attribute__((used)) FILE *__wrap_popen(const char *command, const char *mode)
{
return dll_popen(command, mode);
}
-void* __wrap_calloc( size_t num, size_t size )
+__attribute__((used)) void* __wrap_calloc( size_t num, size_t size )
{
return dllcalloc(num, size);
}
-void* __wrap_malloc(size_t size)
+__attribute__((used)) void* __wrap_malloc(size_t size)
{
return dllmalloc(size);
}
-void* __wrap_realloc( void *memblock, size_t size )
+__attribute__((used)) void* __wrap_realloc( void *memblock, size_t size )
{
return dllrealloc(memblock, size);
}
-void __wrap_free( void* pPtr )
+__attribute__((used)) void __wrap_free( void* pPtr )
{
dllfree(pPtr);
}
-int __wrap_open(const char *file, int oflag, ...)
+__attribute__((used)) int __wrap_open(const char *file, int oflag, ...)
{
return dll_open(file, oflag);
}
-int __wrap_open64(const char *file, int oflag, ...)
+__attribute__((used)) int __wrap_open64(const char *file, int oflag, ...)
{
return dll_open(file, oflag);
}
-int __wrap_close(int fd)
+__attribute__((used)) int __wrap_close(int fd)
{
return dll_close(fd);
}
-ssize_t __wrap_write(int fd, const void *buf, size_t count)
+__attribute__((used)) ssize_t __wrap_write(int fd, const void *buf, size_t count)
{
return dll_write(fd, buf, count);
}
-ssize_t __wrap_read(int fd, void *buf, size_t count)
+__attribute__((used)) ssize_t __wrap_read(int fd, void *buf, size_t count)
{
return dll_read(fd, buf, count);
}
-__off_t __wrap_lseek(int fildes, __off_t offset, int whence)
+__attribute__((used)) __off_t __wrap_lseek(int fildes, __off_t offset, int whence)
{
return dll_lseek(fildes, offset, whence);
}
-__off64_t __wrap_lseek64(int fildes, __off64_t offset, int whence)
+__attribute__((used)) __off64_t __wrap_lseek64(int fildes, __off64_t offset, int whence)
{
__off64_t seekRes = dll_lseeki64(fildes, offset, whence);
return seekRes;
}
-int __wrap_fclose(FILE *fp)
+__attribute__((used)) int __wrap_fclose(FILE *fp)
{
return dll_fclose(fp);
}
-int __wrap_ferror(FILE *stream)
+__attribute__((used)) int __wrap_ferror(FILE *stream)
{
return dll_ferror(stream);
}
-void __wrap_clearerr(FILE *stream)
+__attribute__((used)) void __wrap_clearerr(FILE *stream)
{
return dll_clearerr(stream);
}
-int __wrap_feof(FILE *stream)
+__attribute__((used)) int __wrap_feof(FILE *stream)
{
return dll_feof(stream);
}
-int __wrap_fileno(FILE *stream)
+__attribute__((used)) int __wrap_fileno(FILE *stream)
{
return dll_fileno(stream);
}
-FILE *__wrap_fopen(const char *path, const char *mode)
+__attribute__((used)) FILE *__wrap_fopen(const char *path, const char *mode)
{
return dll_fopen(path, mode);
}
-FILE *__wrap_fopen64(const char *path, const char *mode)
+__attribute__((used)) FILE *__wrap_fopen64(const char *path, const char *mode)
{
return dll_fopen(path, mode);
}
-FILE *__wrap_fdopen(int fildes, const char *mode)
+__attribute__((used)) FILE *__wrap_fdopen(int fildes, const char *mode)
{
return dll_fdopen(fildes, mode);
}
-FILE *__wrap_freopen(const char *path, const char *mode, FILE *stream)
+__attribute__((used)) FILE *__wrap_freopen(const char *path, const char *mode, FILE *stream)
{
return dll_freopen(path, mode, stream);
}
-size_t __wrap_fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
+__attribute__((used)) size_t __wrap_fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
{
return dll_fread(ptr, size, nmemb, stream);
}
-size_t __wrap_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)
+__attribute__((used)) size_t __wrap_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)
{
return dll_fwrite(ptr, size, nmemb, stream);
}
-int __wrap_fflush(FILE *stream)
+__attribute__((used)) int __wrap_fflush(FILE *stream)
{
return dll_fflush(stream);
}
-int __wrap_fputc(int c, FILE *stream)
+__attribute__((used)) int __wrap_fputc(int c, FILE *stream)
{
return dll_fputc(c, stream);
}
-int __wrap_fputs(const char *s, FILE *stream)
+__attribute__((used)) int __wrap_fputs(const char *s, FILE *stream)
{
return dll_fputs(s, stream);
}
-int __wrap__IO_putc(int c, FILE *stream)
+__attribute__((used)) int __wrap__IO_putc(int c, FILE *stream)
{
return dll_putc(c, stream);
}
-int __wrap_fseek(FILE *stream, long offset, int whence)
+__attribute__((used)) int __wrap_fseek(FILE *stream, long offset, int whence)
{
return dll_fseek(stream, offset, whence);
}
-int __wrap_fseeko64(FILE *stream, off64_t offset, int whence)
+__attribute__((used)) int __wrap_fseeko64(FILE *stream, off64_t offset, int whence)
{
return dll_fseek64(stream, offset, whence);
}
-long __wrap_ftell(FILE *stream)
+__attribute__((used)) long __wrap_ftell(FILE *stream)
{
return dll_ftell(stream);
}
-off64_t __wrap_ftello64(FILE *stream)
+__attribute__((used)) off64_t __wrap_ftello64(FILE *stream)
{
return dll_ftell64(stream);
}
-void __wrap_rewind(FILE *stream)
+__attribute__((used)) void __wrap_rewind(FILE *stream)
{
dll_rewind(stream);
}
-int __wrap_fgetpos(FILE *stream, fpos_t *pos)
+__attribute__((used)) int __wrap_fgetpos(FILE *stream, fpos_t *pos)
{
return dll_fgetpos(stream, pos);
}
-int __wrap_fgetpos64(FILE *stream, fpos64_t *pos)
+__attribute__((used)) int __wrap_fgetpos64(FILE *stream, fpos64_t *pos)
{
return dll_fgetpos64(stream, pos);
}
-int __wrap_fsetpos(FILE *stream, fpos_t *pos)
+__attribute__((used)) int __wrap_fsetpos(FILE *stream, fpos_t *pos)
{
return dll_fsetpos(stream, pos);
}
-int __wrap_fsetpos64(FILE *stream, fpos64_t *pos)
+__attribute__((used)) int __wrap_fsetpos64(FILE *stream, fpos64_t *pos)
{
return dll_fsetpos64(stream, pos);
}
-DIR * __wrap_opendir(const char *name)
+__attribute__((used)) DIR * __wrap_opendir(const char *name)
{
return dll_opendir(name);
}
-struct dirent * __wrap_readdir(DIR* dirp)
+__attribute__((used)) struct dirent * __wrap_readdir(DIR* dirp)
{
return dll_readdir(dirp);
}
-struct dirent * __wrap_readdir64(DIR* dirp)
+__attribute__((used)) struct dirent * __wrap_readdir64(DIR* dirp)
{
return dll_readdir(dirp);
}
-int __wrap_closedir(DIR* dirp)
+__attribute__((used)) int __wrap_closedir(DIR* dirp)
{
return dll_closedir(dirp);
}
-void __wrap_rewinddir(DIR* dirp)
+__attribute__((used)) void __wrap_rewinddir(DIR* dirp)
{
dll_rewinddir(dirp);
}
-int __wrap_fprintf(FILE *stream, const char *format, ...)
+__attribute__((used)) int __wrap_fprintf(FILE *stream, const char *format, ...)
{
int res;
va_list va;
@@ -340,12 +340,12 @@ int __wrap_fprintf(FILE *stream, const char *format, ...)
return res;
}
-int __wrap_vfprintf(FILE *stream, const char *format, va_list ap)
+__attribute__((used)) int __wrap_vfprintf(FILE *stream, const char *format, va_list ap)
{
return dll_vfprintf(stream, format, ap);
}
-int __wrap_printf(const char *format, ...)
+__attribute__((used)) int __wrap_printf(const char *format, ...)
{
int res;
va_list va;
@@ -355,42 +355,42 @@ int __wrap_printf(const char *format, ...)
return res;
}
-int __wrap_fgetc(FILE *stream)
+__attribute__((used)) int __wrap_fgetc(FILE *stream)
{
return dll_fgetc(stream);
}
-char *__wrap_fgets(char *s, int size, FILE *stream)
+__attribute__((used)) char *__wrap_fgets(char *s, int size, FILE *stream)
{
return dll_fgets(s, size, stream);
}
-int __wrap__IO_getc(FILE *stream)
+__attribute__((used)) int __wrap__IO_getc(FILE *stream)
{
return dll_getc(stream);
}
-int __wrap__IO_getc_unlocked(FILE *stream)
+__attribute__((used)) int __wrap__IO_getc_unlocked(FILE *stream)
{
return dll_getc(stream);
}
-int __wrap_getc_unlocked(FILE *stream)
+__attribute__((used)) int __wrap_getc_unlocked(FILE *stream)
{
return dll_getc(stream);
}
-int __wrap_ungetc(int c, FILE *stream)
+__attribute__((used)) int __wrap_ungetc(int c, FILE *stream)
{
return dll_ungetc(c, stream);
}
-int __wrap_getc(FILE *stream)
+__attribute__((used)) int __wrap_getc(FILE *stream)
{
return dll_getc(stream);
}
-int __wrap_ioctl(int d, unsigned long int request, ...)
+__attribute__((used)) int __wrap_ioctl(int d, unsigned long int request, ...)
{
int res;
va_list va;
@@ -400,52 +400,52 @@ int __wrap_ioctl(int d, unsigned long int request, ...)
return res;
}
-int __wrap__stat(const char *path, struct _stat *buffer)
+__attribute__((used)) int __wrap__stat(const char *path, struct _stat *buffer)
{
return dll_stat(path, buffer);
}
-int __wrap___xstat64(int __ver, const char *__filename, struct stat64 *__stat_buf)
+__attribute__((used)) int __wrap___xstat64(int __ver, const char *__filename, struct stat64 *__stat_buf)
{
return dll_stat64(__filename, __stat_buf);
}
-int __wrap___lxstat64(int __ver, const char *__filename, struct stat64 *__stat_buf)
+__attribute__((used)) int __wrap___lxstat64(int __ver, const char *__filename, struct stat64 *__stat_buf)
{
return dll_stat64(__filename, __stat_buf);
}
-void __wrap_flockfile(FILE *file)
+__attribute__((used)) void __wrap_flockfile(FILE *file)
{
dll_flockfile(file);
}
-int __wrap_ftrylockfile(FILE *file)
+__attribute__((used)) int __wrap_ftrylockfile(FILE *file)
{
return dll_ftrylockfile(file);
}
-void __wrap_funlockfile(FILE *file)
+__attribute__((used)) void __wrap_funlockfile(FILE *file)
{
dll_funlockfile(file);
}
-int __wrap___fxstat64(int ver, int fd, struct stat64 *buf)
+__attribute__((used)) int __wrap___fxstat64(int ver, int fd, struct stat64 *buf)
{
return dll_fstat64(fd, buf);
}
-int __wrap_fstat(int fd, struct _stat *buf)
+__attribute__((used)) int __wrap_fstat(int fd, struct _stat *buf)
{
return dll_fstat(fd, buf);
}
-int __wrap_setvbuf(FILE *stream, char *buf, int type, size_t size)
+__attribute__((used)) int __wrap_setvbuf(FILE *stream, char *buf, int type, size_t size)
{
return dll_setvbuf(stream, buf, type, size);
}
-struct mntent *__wrap_getmntent(FILE *fp)
+__attribute__((used)) struct mntent *__wrap_getmntent(FILE *fp)
{
#ifdef _LINUX
return dll_getmntent(fp);
@@ -459,12 +459,12 @@ struct mntent *__wrap_getmntent(FILE *fp)
// thing to actually call our wrapped functions.
#if _FORTIFY_SOURCE > 1
-size_t __wrap___fread_chk(void * ptr, size_t ptrlen, size_t size, size_t n, FILE * stream)
+__attribute__((used)) size_t __wrap___fread_chk(void * ptr, size_t ptrlen, size_t size, size_t n, FILE * stream)
{
return dll_fread(ptr, size, n, stream);
}
-int __wrap___printf_chk(int flag, const char *format, ...)
+__attribute__((used)) int __wrap___printf_chk(int flag, const char *format, ...)
{
int res;
va_list va;
@@ -474,12 +474,12 @@ int __wrap___printf_chk(int flag, const char *format, ...)
return res;
}
-int __wrap___vfprintf_chk(FILE* stream, int flag, const char *format, _G_va_list ap)
+__attribute__((used)) int __wrap___vfprintf_chk(FILE* stream, int flag, const char *format, _G_va_list ap)
{
return dll_vfprintf(stream, format, ap);
}
-int __wrap___fprintf_chk(FILE * stream, int flag, const char *format, ...)
+__attribute__((used)) int __wrap___fprintf_chk(FILE * stream, int flag, const char *format, ...)
{
int res;
va_list va;
@@ -489,12 +489,12 @@ int __wrap___fprintf_chk(FILE * stream, int flag, const char *format, ...)
return res;
}
-char *__wrap___fgets_chk(char *s, size_t size, int n, FILE *stream)
+__attribute__((used)) char *__wrap___fgets_chk(char *s, size_t size, int n, FILE *stream)
{
return dll_fgets(s, n, stream);
}
-size_t __wrap___read_chk(int fd, void *buf, size_t nbytes, size_t buflen)
+__attribute__((used)) size_t __wrap___read_chk(int fd, void *buf, size_t nbytes, size_t buflen)
{
return dll_read(fd, buf, nbytes);
}
--
1.8.1.6

View File

@ -0,0 +1,27 @@
From 7abb1f31a53cc0147ba6f5ed5fc796e2ac8584ff Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Thu, 9 May 2013 21:11:47 +0300
Subject: [PATCH] xbmc: revert 799d6ff03 (setwakeup.sh)
this reverts upstream commit 799d6ff03
https://github.com/xbmc/xbmc/commit/799d6ff03
---
xbmc/settings/GUISettings.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xbmc/settings/GUISettings.cpp b/xbmc/settings/GUISettings.cpp
index 67aeec9..96f738c 100644
--- a/xbmc/settings/GUISettings.cpp
+++ b/xbmc/settings/GUISettings.cpp
@@ -1001,7 +1001,7 @@ void CGUISettings::Initialize()
AddBool(pvrpwr, "pvrpowermanagement.enabled", 305, false);
AddSeparator(pvrpwr, "pvrpowermanagement.sep1");
AddInt(pvrpwr, "pvrpowermanagement.backendidletime", 19244, 15, 0, 5, 360, SPIN_CONTROL_INT_PLUS, MASK_MINS, TEXT_OFF);
- AddString(pvrpwr, "pvrpowermanagement.setwakeupcmd", 19245, "", EDIT_CONTROL_INPUT, true);
+ AddString(pvrpwr, "pvrpowermanagement.setwakeupcmd", 19245, "/usr/bin/setwakeup.sh", EDIT_CONTROL_INPUT, true);
AddInt(pvrpwr, "pvrpowermanagement.prewakeup", 19246, 15, 0, 1, 60, SPIN_CONTROL_INT_PLUS, MASK_MINS, TEXT_OFF);
AddSeparator(pvrpwr, "pvrpowermanagement.sep2");
AddBool(pvrpwr, "pvrpowermanagement.dailywakeup", 19247, false);
--
1.7.2.5

View File

@ -0,0 +1,81 @@
#!/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="xbmc"
PKG_VERSION=""
GIT_REPO="git://github.com/Pivosgroup/xbmc.git"
DEST_DIR="$PKG_NAME-aml-frodo"
echo "getting sources..."
if [ ! -d $DEST_DIR-latest ]; then
git clone $GIT_REPO $DEST_DIR-latest
fi
cd $DEST_DIR-latest
git pull
echo "getting version..."
GIT_REV=`git log -n1 --format=%h`
echo $GIT_REV
cd ..
if [ -z "$PKG_VERSION" ]; then
PKG_VERSION="aml-frodo-$GIT_REV"
fi
echo "copying sources..."
rm -rf $PKG_NAME-$PKG_VERSION
cp -R $DEST_DIR-latest $PKG_NAME-$PKG_VERSION
echo "$GIT_REV" > $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 "cleaning sources..."
rm -rf $PKG_NAME-$PKG_VERSION/visualisations
rm -rf $PKG_NAME-$PKG_VERSION/lib/libSDL-*
rm -rf $PKG_NAME-$PKG_VERSION/lib/libcurl-*
rm -rf $PKG_NAME-$PKG_VERSION/project
for i in "Changelog" "Fake\ Episode\ Maker" "MingwBuildEnvironment" \
"PackageMaker" "Translator" "XBMCLive" "XprPack" \
"HardwareConfigure" "Mach5" "osx" "UpdateThumbs.py" "XBMCTex"; do
rm -rf $PKG_NAME-$PKG_VERSION/tools/$i
done
for i in dll a lib so bat; do
find $PKG_NAME-$PKG_VERSION -name *.$i -exec rm -rf {} ";"
done
# bundled win32 binaries
rm -r $PKG_NAME-$PKG_VERSION/xbmc/visualizations/XBMCProjectM/win32
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