mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
xbmc-pvr: update to xbmc-pvr-11.0.2
This commit is contained in:
parent
28ef25041c
commit
0e7f129621
@ -20,7 +20,7 @@
|
||||
|
||||
PKG_NAME="xbmc-theme-Confluence"
|
||||
if [ "$PVR" = yes ]; then
|
||||
PKG_VERSION="pvr-11.0.1"
|
||||
PKG_VERSION="pvr-11.0.2"
|
||||
else
|
||||
PKG_VERSION="11.0.1"
|
||||
fi
|
||||
|
@ -172,7 +172,7 @@ fi
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"`
|
||||
|
||||
# dont build parallel
|
||||
MAKEFLAGS=-j1
|
||||
# MAKEFLAGS=-j1
|
||||
|
||||
export PYTHON_VERSION="2.7"
|
||||
export PYTHON_CPPFLAGS="-I$SYSROOT_PREFIX/usr/include/python$PYTHON_VERSION"
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
PKG_NAME="xbmc"
|
||||
if [ "$PVR" = yes ]; then
|
||||
PKG_VERSION="pvr-11.0.1"
|
||||
PKG_VERSION="pvr-11.0.2"
|
||||
else
|
||||
PKG_VERSION="11.0.1"
|
||||
fi
|
||||
@ -29,8 +29,8 @@ PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.xbmc.org"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS="boost Python zlib bzip2 systemd pcre ffmpeg alsa-lib libass curl libssh rtmpdump fontconfig freetype libmad libogg libvorbis libmodplug faad2 flac lame libmpeg2 SDL SDL_mixer SDL_image yajl sqlite alsa bc xbmc-addon-settings"
|
||||
PKG_BUILD_DEPENDS="toolchain boost Python zlib bzip2 systemd lzo pcre alsa-lib ffmpeg libass enca curl libssh rtmpdump fontconfig fribidi libjpeg-turbo libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmodplug faad2 flac lame libmpeg2 SDL SDL_mixer SDL_image yajl sqlite mysql"
|
||||
PKG_DEPENDS="boost Python zlib bzip2 systemd pcre ffmpeg alsa-lib libass curl libssh rtmpdump fontconfig tinyxml freetype libmad libogg libvorbis libmodplug faad2 flac lame libmpeg2 SDL SDL_mixer SDL_image yajl sqlite alsa bc xbmc-addon-settings"
|
||||
PKG_BUILD_DEPENDS="toolchain boost Python zlib bzip2 systemd lzo pcre alsa-lib ffmpeg libass enca curl libssh rtmpdump fontconfig fribidi tinyxml libjpeg-turbo libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmodplug faad2 flac lame libmpeg2 SDL SDL_mixer SDL_image yajl sqlite mysql"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="mediacenter"
|
||||
PKG_SHORTDESC="xbmc: XBMC Mediacenter"
|
||||
|
@ -2325,7 +2325,7 @@ diff -Naur xbmc-11.0.1/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -809,20 +768,9 @@
|
||||
@@ -809,24 +768,9 @@
|
||||
{
|
||||
int result, frames;
|
||||
|
||||
@ -2333,6 +2333,9 @@ diff -Naur xbmc-11.0.1/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.
|
||||
-
|
||||
if (frame)
|
||||
{
|
||||
-#if (defined USE_OLD_AV_VSRC_BUFFER_ADD_FRAME)
|
||||
- result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, frame->pts, m_pCodecContext->sample_aspect_ratio);
|
||||
-#else
|
||||
-#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0)
|
||||
result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, 0);
|
||||
-#elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
|
||||
@ -2342,11 +2345,12 @@ diff -Naur xbmc-11.0.1/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.
|
||||
-#else
|
||||
- result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, frame->pts, m_pCodecContext->sample_aspect_ratio);
|
||||
-#endif
|
||||
-#endif
|
||||
-
|
||||
if (result < 0)
|
||||
{
|
||||
CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterProcess - av_vsrc_buffer_add_frame");
|
||||
@@ -830,7 +778,13 @@
|
||||
@@ -834,7 +778,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -2361,7 +2365,7 @@ diff -Naur xbmc-11.0.1/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.
|
||||
{
|
||||
CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterProcess - avfilter_poll_frame");
|
||||
return VC_ERROR;
|
||||
@@ -838,19 +792,9 @@
|
||||
@@ -842,19 +792,9 @@
|
||||
|
||||
if (frames > 0)
|
||||
{
|
||||
@ -2383,7 +2387,7 @@ diff -Naur xbmc-11.0.1/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.
|
||||
{
|
||||
CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterProcess - cur_buf");
|
||||
return VC_ERROR;
|
||||
@@ -861,11 +805,11 @@
|
||||
@@ -865,11 +805,11 @@
|
||||
else
|
||||
m_pFrame->repeat_pict = -(frames - 1);
|
||||
|
||||
@ -2399,6 +2403,7 @@ diff -Naur xbmc-11.0.1/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.
|
||||
|
||||
if(frames > 1)
|
||||
return VC_PICTURE;
|
||||
|
||||
diff -Naur xbmc-11.0.1/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h xbmc-11.0.1.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
|
||||
--- xbmc-11.0.1/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h 2012-03-21 23:57:34.000000000 +0100
|
||||
+++ xbmc-11.0.1.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h 2012-06-05 15:19:23.946496292 +0200
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,29 +0,0 @@
|
||||
From 35e4a2eb5515fe72d87b6d78b0567609df79df2b Mon Sep 17 00:00:00 2001
|
||||
From: bobo1on1 <bob-nospam-@xbmc.org>
|
||||
Date: Wed, 28 Mar 2012 21:30:25 +0200
|
||||
Subject: [PATCH] fixed: possible deadlock
|
||||
|
||||
---
|
||||
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 6 ++++--
|
||||
1 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
index 0cb6602..1c91341 100644
|
||||
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
@@ -140,8 +140,10 @@ void CPeripheralCecAdapter::Announce(AnnouncementFlag flag, const char *sender,
|
||||
else if (flag == System && !strcmp(sender, "xbmc") && !strcmp(message, "OnSleep"))
|
||||
{
|
||||
// this will also power off devices when we're the active source
|
||||
- CSingleLock lock(m_critSection);
|
||||
- m_bStop = true;
|
||||
+ {
|
||||
+ CSingleLock lock(m_critSection);
|
||||
+ m_bStop = true;
|
||||
+ }
|
||||
WaitForThreadExit(0);
|
||||
}
|
||||
else if (flag == System && !strcmp(sender, "xbmc") && !strcmp(message, "OnWake"))
|
||||
--
|
||||
1.7.5.4
|
||||
|
@ -1,41 +0,0 @@
|
||||
From de4cd8d63257af1cb9060c4b2b304a82655adb99 Mon Sep 17 00:00:00 2001
|
||||
From: bobo1on1 <bob-nospam-@xbmc.org>
|
||||
Date: Wed, 28 Mar 2012 21:31:46 +0200
|
||||
Subject: [PATCH] fixed: make sure the old thread is stopped before starting a
|
||||
new one, fixes throwing an exception in the main thread
|
||||
|
||||
---
|
||||
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 14 ++++++++------
|
||||
1 files changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
index 1c91341..a898a16 100644
|
||||
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
@@ -148,15 +148,17 @@ void CPeripheralCecAdapter::Announce(AnnouncementFlag flag, const char *sender,
|
||||
}
|
||||
else if (flag == System && !strcmp(sender, "xbmc") && !strcmp(message, "OnWake"))
|
||||
{
|
||||
- // reconnect to the device
|
||||
- CSingleLock lock(m_critSection);
|
||||
- CLog::Log(LOGDEBUG, "%s - reconnecting to the CEC adapter after standby mode", __FUNCTION__);
|
||||
+ {
|
||||
+ // reconnect to the device
|
||||
+ CSingleLock lock(m_critSection);
|
||||
+ CLog::Log(LOGDEBUG, "%s - reconnecting to the CEC adapter after standby mode", __FUNCTION__);
|
||||
|
||||
- // close the previous connection
|
||||
- m_cecAdapter->Close();
|
||||
+ // close the previous connection
|
||||
+ m_cecAdapter->Close();
|
||||
+ }
|
||||
|
||||
// and open a new one
|
||||
- m_bStop = false;
|
||||
+ StopThread();
|
||||
Create();
|
||||
}
|
||||
}
|
||||
--
|
||||
1.7.5.4
|
||||
|
@ -1,630 +0,0 @@
|
||||
diff -Naur xbmc-pvr-11.0.1/configure.in xbmc-pvr-11.0.1.patch/configure.in
|
||||
--- xbmc-pvr-11.0.1/configure.in 2012-04-17 14:08:05.972587511 +0200
|
||||
+++ xbmc-pvr-11.0.1.patch/configure.in 2012-04-17 14:18:39.755586920 +0200
|
||||
@@ -1173,7 +1173,7 @@
|
||||
|
||||
# libcec is dyloaded, so we need to check for its headers and link any depends.
|
||||
if test "x$use_libcec" != "xno"; then
|
||||
- PKG_CHECK_MODULES([CEC],[libcec >= 1.5.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)])
|
||||
+ PKG_CHECK_MODULES([CEC],[libcec >= 1.6.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)])
|
||||
|
||||
if test "x$use_libcec" != "xno"; then
|
||||
INCLUDES="$INCLUDES $CEC_CFLAGS"
|
||||
diff -Naur xbmc-pvr-11.0.1/language/English/strings.xml xbmc-pvr-11.0.1.patch/language/English/strings.xml
|
||||
--- xbmc-pvr-11.0.1/language/English/strings.xml 2012-04-17 14:08:05.974587546 +0200
|
||||
+++ xbmc-pvr-11.0.1.patch/language/English/strings.xml 2012-04-17 14:18:39.757586958 +0200
|
||||
@@ -2853,7 +2853,7 @@
|
||||
<string id="36011">Could not detect the CEC port. Set it up manually.</string>
|
||||
<string id="36012">Could not initialise the CEC adapter. Check your settings.</string>
|
||||
<string id="36013">Unsupported libCEC interface version. %d is greater than the version XBMC supports (%d)</string>
|
||||
- <string id="36014">Put this PC in standby mode when the TV is switched off</string>
|
||||
+ <string id="36014">When the TV is switched off</string>
|
||||
<string id="36015">HDMI port number</string>
|
||||
<string id="36016">Connected</string> <!-- max. 13 characters -->
|
||||
<string id="36017">Adapter found, but libCEC is not available</string>
|
||||
@@ -2865,4 +2865,7 @@
|
||||
<string id="36023">Configuration updated</string>
|
||||
<string id="36024">Failed to set the new configuration. Please check your settings.</string>
|
||||
<string id="36025">Send 'inactive source' command when stopping XBMC</string>
|
||||
+ <string id="36026">Put devices in standby mode when putting the PC in standby</string>
|
||||
+ <string id="36027">This device needs servicing</string>
|
||||
+ <string id="36028">Ignore</string>
|
||||
</strings>
|
||||
diff -Naur xbmc-pvr-11.0.1/system/peripherals.xml xbmc-pvr-11.0.1.patch/system/peripherals.xml
|
||||
--- xbmc-pvr-11.0.1/system/peripherals.xml 2012-04-17 14:08:05.975587564 +0200
|
||||
+++ xbmc-pvr-11.0.1.patch/system/peripherals.xml 2012-04-17 14:18:39.757586958 +0200
|
||||
@@ -14,13 +14,14 @@
|
||||
<setting key="wake_devices" type="string" value="0" label="36007" order="3" />
|
||||
<setting key="standby_devices" type="string" value="0" label="36008" order="4" />
|
||||
<setting key="cec_standby_screensaver" type="bool" value="1" label="36009" order="5" />
|
||||
- <setting key="standby_pc_on_tv_standby" type="bool" value="1" label="36014" order="6" />
|
||||
- <setting key="send_inactive_source" type="bool" value="1" label="36025" order="7" />
|
||||
- <setting key="use_tv_menu_language" type="bool" value="1" label="36018" order="8" />
|
||||
- <setting key="physical_address" type="string" label="36021" value="0" order="9" />
|
||||
- <setting key="cec_hdmi_port" type="int" value="1" min="1" max="16" label="36015" order="10" />
|
||||
- <setting key="connected_device" type="int" label="36019" value="0" min="0" max="15" step="1" order="11" />
|
||||
- <setting key="port" type="string" value="" label="36022" order="12" />
|
||||
+ <setting key="standby_pc_on_tv_standby" type="enum" value="13011" label="36014" order="6" lvalues="36028|13005|13011" />
|
||||
+ <setting key="standby_tv_on_pc_standby" type="bool" value="1" label="36026" order="7" />
|
||||
+ <setting key="send_inactive_source" type="bool" value="1" label="36025" order="8" />
|
||||
+ <setting key="use_tv_menu_language" type="bool" value="1" label="36018" order="9" />
|
||||
+ <setting key="physical_address" type="string" label="36021" value="0" order="10" />
|
||||
+ <setting key="cec_hdmi_port" type="int" value="1" min="1" max="15" label="36015" order="11" />
|
||||
+ <setting key="connected_device" type="int" label="36019" value="0" min="0" max="15" step="1" order="12" />
|
||||
+ <setting key="port" type="string" value="" label="36022" order="13" />
|
||||
|
||||
<setting key="tv_vendor" type="int" value="0" configurable="0" />
|
||||
<setting key="device_name" type="string" value="XBMC" configurable="0" />
|
||||
diff -Naur xbmc-pvr-11.0.1/xbmc/peripherals/bus/PeripheralBus.cpp xbmc-pvr-11.0.1.patch/xbmc/peripherals/bus/PeripheralBus.cpp
|
||||
--- xbmc-pvr-11.0.1/xbmc/peripherals/bus/PeripheralBus.cpp 2012-03-27 17:55:34.000000000 +0200
|
||||
+++ xbmc-pvr-11.0.1.patch/xbmc/peripherals/bus/PeripheralBus.cpp 2012-04-17 14:18:39.758586977 +0200
|
||||
@@ -323,6 +323,7 @@
|
||||
peripheralFile->SetProperty("bus", PeripheralTypeTranslator::BusTypeToString(peripheral->GetBusType()));
|
||||
peripheralFile->SetProperty("location", peripheral->Location());
|
||||
peripheralFile->SetProperty("class", PeripheralTypeTranslator::TypeToString(peripheral->Type()));
|
||||
+ peripheralFile->SetProperty("version", peripheral->GetVersionInfo());
|
||||
items.Add(peripheralFile);
|
||||
}
|
||||
}
|
||||
diff -Naur xbmc-pvr-11.0.1/xbmc/peripherals/devices/PeripheralCecAdapter.cpp xbmc-pvr-11.0.1.patch/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
|
||||
--- xbmc-pvr-11.0.1/xbmc/peripherals/devices/PeripheralCecAdapter.cpp 2012-04-17 14:17:35.207364830 +0200
|
||||
+++ xbmc-pvr-11.0.1.patch/xbmc/peripherals/devices/PeripheralCecAdapter.cpp 2012-04-17 14:18:39.760587015 +0200
|
||||
@@ -41,7 +41,7 @@
|
||||
using namespace ANNOUNCEMENT;
|
||||
using namespace CEC;
|
||||
|
||||
-#define CEC_LIB_SUPPORTED_VERSION 0x1500
|
||||
+#define CEC_LIB_SUPPORTED_VERSION 0x1600
|
||||
|
||||
/* time in seconds to ignore standby commands from devices after the screensaver has been activated */
|
||||
#define SCREENSAVER_TIMEOUT 10
|
||||
@@ -80,7 +80,9 @@
|
||||
m_lastKeypress(0),
|
||||
m_lastChange(VOLUME_CHANGE_NONE),
|
||||
m_iExitCode(0),
|
||||
- m_bIsMuted(false) // TODO fetch the correct initial value when system audiostatus is implemented in libCEC
|
||||
+ m_bIsMuted(false), // TODO fetch the correct initial value when system audiostatus is implemented in libCEC
|
||||
+ m_bGoingToStandby(false),
|
||||
+ m_bIsRunning(false)
|
||||
{
|
||||
m_button.iButton = 0;
|
||||
m_button.iDuration = 0;
|
||||
@@ -96,6 +98,7 @@
|
||||
|
||||
m_bStop = true;
|
||||
StopThread(true);
|
||||
+ CAnnouncementManager::RemoveAnnouncer(this);
|
||||
|
||||
if (m_dll && m_cecAdapter)
|
||||
{
|
||||
@@ -110,7 +113,11 @@
|
||||
{
|
||||
if (flag == System && !strcmp(sender, "xbmc") && !strcmp(message, "OnQuit") && m_bIsReady)
|
||||
{
|
||||
- m_iExitCode = data.asInteger(0);
|
||||
+ {
|
||||
+ CSingleLock lock(m_critSection);
|
||||
+ m_iExitCode = data.asInteger(0);
|
||||
+ }
|
||||
+ CAnnouncementManager::RemoveAnnouncer(this);
|
||||
StopThread(false);
|
||||
}
|
||||
else if (flag == GUI && !strcmp(sender, "xbmc") && !strcmp(message, "OnScreensaverDeactivated") && m_bIsReady)
|
||||
@@ -142,23 +149,22 @@
|
||||
// this will also power off devices when we're the active source
|
||||
{
|
||||
CSingleLock lock(m_critSection);
|
||||
- m_bStop = true;
|
||||
+ m_bGoingToStandby = false;
|
||||
}
|
||||
- WaitForThreadExit(0);
|
||||
+ StopThread();
|
||||
}
|
||||
else if (flag == System && !strcmp(sender, "xbmc") && !strcmp(message, "OnWake"))
|
||||
{
|
||||
{
|
||||
- // reconnect to the device
|
||||
CSingleLock lock(m_critSection);
|
||||
- CLog::Log(LOGDEBUG, "%s - reconnecting to the CEC adapter after standby mode", __FUNCTION__);
|
||||
-
|
||||
- // close the previous connection
|
||||
- m_cecAdapter->Close();
|
||||
+ m_iExitCode = EXITCODE_RESTARTAPP;
|
||||
}
|
||||
|
||||
- // and open a new one
|
||||
+ CLog::Log(LOGDEBUG, "%s - reconnecting to the CEC adapter after standby mode", __FUNCTION__);
|
||||
+ CAnnouncementManager::RemoveAnnouncer(this);
|
||||
StopThread();
|
||||
+
|
||||
+ // and open a new one
|
||||
Create();
|
||||
}
|
||||
}
|
||||
@@ -172,6 +178,7 @@
|
||||
m_callbacks.CBCecKeyPress = &CecKeyPress;
|
||||
m_callbacks.CBCecCommand = &CecCommand;
|
||||
m_callbacks.CBCecConfigurationChanged = &CecConfiguration;
|
||||
+ m_callbacks.CBCecAlert = &CecAlert;
|
||||
m_configuration.callbackParam = this;
|
||||
m_configuration.callbacks = &m_callbacks;
|
||||
|
||||
@@ -200,6 +207,8 @@
|
||||
else
|
||||
{
|
||||
CLog::Log(LOGDEBUG, "%s - using libCEC v%s", __FUNCTION__, m_cecAdapter->ToString((cec_server_version)m_configuration.serverVersion));
|
||||
+ if (m_configuration.serverVersion >= CEC_SERVER_VERSION_1_6_0)
|
||||
+ m_strVersionInfo.Format("%d", m_configuration.iFirmwareVersion);
|
||||
}
|
||||
|
||||
m_bStarted = true;
|
||||
@@ -297,6 +306,13 @@
|
||||
if (!OpenConnection())
|
||||
return;
|
||||
|
||||
+ {
|
||||
+ CSingleLock lock(m_critSection);
|
||||
+ m_iExitCode = EXITCODE_QUIT;
|
||||
+ m_bGoingToStandby = false;
|
||||
+ m_bIsRunning = true;
|
||||
+ }
|
||||
+
|
||||
CAnnouncementManager::AddAnnouncer(this);
|
||||
|
||||
m_queryThread = new CPeripheralCecAdapterUpdateThread(this, &m_configuration);
|
||||
@@ -312,8 +328,17 @@
|
||||
}
|
||||
|
||||
delete m_queryThread;
|
||||
+ m_queryThread = NULL;
|
||||
+
|
||||
+ bool bSendStandbyCommands(false);
|
||||
+ {
|
||||
+ CSingleLock lock(m_critSection);
|
||||
+ bSendStandbyCommands = m_iExitCode != EXITCODE_REBOOT &&
|
||||
+ m_iExitCode != EXITCODE_RESTARTAPP &&
|
||||
+ (!m_bGoingToStandby || GetSettingBool("standby_tv_on_pc_standby"));
|
||||
+ }
|
||||
|
||||
- if (m_iExitCode != EXITCODE_REBOOT)
|
||||
+ if (bSendStandbyCommands)
|
||||
{
|
||||
if (m_cecAdapter->IsLibCECActiveSource())
|
||||
{
|
||||
@@ -337,7 +362,12 @@
|
||||
m_cecAdapter->Close();
|
||||
|
||||
CLog::Log(LOGDEBUG, "%s - CEC adapter processor thread ended", __FUNCTION__);
|
||||
- m_bStarted = false;
|
||||
+
|
||||
+ {
|
||||
+ CSingleLock lock(m_critSection);
|
||||
+ m_bStarted = false;
|
||||
+ m_bIsRunning = false;
|
||||
+ }
|
||||
}
|
||||
|
||||
bool CPeripheralCecAdapter::HasConnectedAudioSystem(void)
|
||||
@@ -556,11 +586,15 @@
|
||||
case CEC_OPCODE_STANDBY:
|
||||
/* a device was put in standby mode */
|
||||
CLog::Log(LOGDEBUG, "%s - device %1x was put in standby mode", __FUNCTION__, command.initiator);
|
||||
- if (command.initiator == CECDEVICE_TV && adapter->m_configuration.bPowerOffOnStandby == 1 &&
|
||||
+ if (command.initiator == CECDEVICE_TV &&
|
||||
+ (adapter->m_configuration.bPowerOffOnStandby == 1 || adapter->m_configuration.bShutdownOnStandby == 1) &&
|
||||
(!adapter->m_screensaverLastActivated.IsValid() || CDateTime::GetCurrentDateTime() - adapter->m_screensaverLastActivated > CDateTimeSpan(0, 0, 0, SCREENSAVER_TIMEOUT)))
|
||||
{
|
||||
adapter->m_bStarted = false;
|
||||
- g_application.getApplicationMessenger().Suspend();
|
||||
+ if (adapter->m_configuration.bPowerOffOnStandby == 1)
|
||||
+ g_application.getApplicationMessenger().Suspend();
|
||||
+ else if (adapter->m_configuration.bShutdownOnStandby == 1)
|
||||
+ g_application.getApplicationMessenger().Shutdown();
|
||||
}
|
||||
break;
|
||||
case CEC_OPCODE_SET_MENU_LANGUAGE:
|
||||
@@ -634,6 +668,30 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
+int CPeripheralCecAdapter::CecAlert(void *cbParam, const libcec_alert alert, const libcec_parameter &data)
|
||||
+{
|
||||
+ (void)data;
|
||||
+
|
||||
+ CPeripheralCecAdapter *adapter = (CPeripheralCecAdapter *)cbParam;
|
||||
+ if (!adapter)
|
||||
+ return 0;
|
||||
+
|
||||
+ int iAlertString(0);
|
||||
+ switch (alert)
|
||||
+ {
|
||||
+ case CEC_ALERT_SERVICE_DEVICE:
|
||||
+ iAlertString = 36027;
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (iAlertString)
|
||||
+ CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(36000), g_localizeStrings.Get(iAlertString));
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
int CPeripheralCecAdapter::CecKeyPress(void *cbParam, const cec_keypress &key)
|
||||
{
|
||||
CPeripheralCecAdapter *adapter = (CPeripheralCecAdapter *)cbParam;
|
||||
@@ -695,6 +753,10 @@
|
||||
case CEC_USER_CONTROL_CODE_RIGHT_DOWN:
|
||||
iButton = XINPUT_IR_REMOTE_RIGHT;
|
||||
break;
|
||||
+ case CEC_USER_CONTROL_CODE_NEXT_FAVORITE:
|
||||
+ case CEC_USER_CONTROL_CODE_SETUP_MENU:
|
||||
+ case CEC_USER_CONTROL_CODE_CONTENTS_MENU:
|
||||
+ case CEC_USER_CONTROL_CODE_FAVORITE_MENU:
|
||||
case CEC_USER_CONTROL_CODE_ROOT_MENU:
|
||||
iButton = XINPUT_IR_REMOTE_MENU;
|
||||
break;
|
||||
@@ -711,7 +773,11 @@
|
||||
iButton = XINPUT_IR_REMOTE_CHANNEL_PLUS;
|
||||
break;
|
||||
case CEC_USER_CONTROL_CODE_PREVIOUS_CHANNEL:
|
||||
+#if defined(XINPUT_IR_REMOTE_TELETEXT)
|
||||
+ iButton = XINPUT_IR_REMOTE_TELETEXT; // only supported by the pvr branch
|
||||
+#else
|
||||
iButton = XINPUT_IR_REMOTE_BACK;
|
||||
+#endif
|
||||
break;
|
||||
case CEC_USER_CONTROL_CODE_SOUND_SELECT:
|
||||
iButton = XINPUT_IR_REMOTE_LANGUAGE;
|
||||
@@ -806,13 +872,23 @@
|
||||
case CEC_USER_CONTROL_CODE_F4_YELLOW:
|
||||
iButton = XINPUT_IR_REMOTE_YELLOW;
|
||||
break;
|
||||
+ case CEC_USER_CONTROL_CODE_ELECTRONIC_PROGRAM_GUIDE:
|
||||
+#if defined(XINPUT_IR_REMOTE_GUIDE)
|
||||
+ iButton = XINPUT_IR_REMOTE_GUIDE;
|
||||
+#else
|
||||
+ bHasButton = false;
|
||||
+#endif
|
||||
+ break;
|
||||
+ case CEC_USER_CONTROL_CODE_AN_CHANNELS_LIST:
|
||||
+#if defined(XINPUT_IR_REMOTE_LIVE_TV)
|
||||
+ iButton = XINPUT_IR_REMOTE_LIVE_TV;
|
||||
+#else
|
||||
+ bHasButton = false;
|
||||
+#endif
|
||||
+ break;
|
||||
case CEC_USER_CONTROL_CODE_POWER_ON_FUNCTION:
|
||||
case CEC_USER_CONTROL_CODE_EJECT:
|
||||
- case CEC_USER_CONTROL_CODE_SETUP_MENU:
|
||||
- case CEC_USER_CONTROL_CODE_CONTENTS_MENU:
|
||||
- case CEC_USER_CONTROL_CODE_FAVORITE_MENU:
|
||||
case CEC_USER_CONTROL_CODE_DOT:
|
||||
- case CEC_USER_CONTROL_CODE_NEXT_FAVORITE:
|
||||
case CEC_USER_CONTROL_CODE_INPUT_SELECT:
|
||||
case CEC_USER_CONTROL_CODE_INITIAL_CONFIGURATION:
|
||||
case CEC_USER_CONTROL_CODE_HELP:
|
||||
@@ -821,7 +897,6 @@
|
||||
case CEC_USER_CONTROL_CODE_ANGLE:
|
||||
case CEC_USER_CONTROL_CODE_SUB_PICTURE:
|
||||
case CEC_USER_CONTROL_CODE_VIDEO_ON_DEMAND:
|
||||
- case CEC_USER_CONTROL_CODE_ELECTRONIC_PROGRAM_GUIDE:
|
||||
case CEC_USER_CONTROL_CODE_TIMER_PROGRAMMING:
|
||||
case CEC_USER_CONTROL_CODE_PLAY_FUNCTION:
|
||||
case CEC_USER_CONTROL_CODE_PAUSE_PLAY_FUNCTION:
|
||||
@@ -894,11 +969,15 @@
|
||||
else if (bEnabled && !m_cecAdapter && m_bStarted)
|
||||
InitialiseFeature(FEATURE_CEC);
|
||||
}
|
||||
- else
|
||||
+ else if (IsRunning())
|
||||
{
|
||||
SetConfigurationFromSettings();
|
||||
m_queryThread->UpdateConfiguration(&m_configuration);
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ InitialiseFeature(FEATURE_CEC);
|
||||
+ }
|
||||
}
|
||||
|
||||
int CPeripheralCecAdapter::CecLogMessage(void *cbParam, const cec_log_message &message)
|
||||
@@ -962,7 +1041,7 @@
|
||||
|
||||
// set the physical address, when baseDevice or iHDMIPort are not set
|
||||
if (m_configuration.baseDevice == CECDEVICE_UNKNOWN ||
|
||||
- m_configuration.iHDMIPort == 0 || m_configuration.iHDMIPort > 4)
|
||||
+ m_configuration.iHDMIPort == 0 || m_configuration.iHDMIPort > 15)
|
||||
{
|
||||
m_configuration.iPhysicalAddress = config.iPhysicalAddress;
|
||||
CStdString strPhysicalAddress;
|
||||
@@ -977,7 +1056,7 @@
|
||||
// set the devices to wake when starting
|
||||
m_configuration.wakeDevices = config.wakeDevices;
|
||||
CStdString strWakeDevices;
|
||||
- for (unsigned int iPtr = 0; iPtr <= 16; iPtr++)
|
||||
+ for (unsigned int iPtr = CECDEVICE_TV; iPtr <= CECDEVICE_BROADCAST; iPtr++)
|
||||
if (config.wakeDevices[iPtr])
|
||||
strWakeDevices.AppendFormat(" %X", iPtr);
|
||||
SetSetting("wake_devices", strWakeDevices.Trim());
|
||||
@@ -985,10 +1064,10 @@
|
||||
// set the devices to power off when stopping
|
||||
m_configuration.powerOffDevices = config.powerOffDevices;
|
||||
CStdString strPowerOffDevices;
|
||||
- for (unsigned int iPtr = 0; iPtr <= 16; iPtr++)
|
||||
+ for (unsigned int iPtr = CECDEVICE_TV; iPtr <= CECDEVICE_BROADCAST; iPtr++)
|
||||
if (config.powerOffDevices[iPtr])
|
||||
strPowerOffDevices.AppendFormat(" %X", iPtr);
|
||||
- SetSetting("wake_devices", strPowerOffDevices.Trim());
|
||||
+ SetSetting("standby_devices", strPowerOffDevices.Trim());
|
||||
|
||||
// set the boolean settings
|
||||
m_configuration.bUseTVMenuLanguage = config.bUseTVMenuLanguage;
|
||||
@@ -1001,17 +1080,27 @@
|
||||
SetSetting("cec_standby_screensaver", m_configuration.bPowerOffScreensaver == 1);
|
||||
|
||||
m_configuration.bPowerOffOnStandby = config.bPowerOffOnStandby;
|
||||
- SetSetting("standby_pc_on_tv_standby", m_configuration.bPowerOffOnStandby == 1);
|
||||
|
||||
if (config.serverVersion >= CEC_SERVER_VERSION_1_5_1)
|
||||
m_configuration.bSendInactiveSource = config.bSendInactiveSource;
|
||||
SetSetting("send_inactive_source", m_configuration.bSendInactiveSource == 1);
|
||||
+
|
||||
+ if (config.serverVersion >= CEC_SERVER_VERSION_1_6_0)
|
||||
+ {
|
||||
+ m_configuration.iFirmwareVersion = config.iFirmwareVersion;
|
||||
+ m_strVersionInfo.Format("%d", m_configuration.iFirmwareVersion);
|
||||
+ m_configuration.bShutdownOnStandby = config.bShutdownOnStandby;
|
||||
+ }
|
||||
+
|
||||
+ SetSetting("standby_pc_on_tv_standby",
|
||||
+ m_configuration.bPowerOffOnStandby == 1 ? 13011 :
|
||||
+ m_configuration.bShutdownOnStandby == 1 ? 13005 : 36028);
|
||||
}
|
||||
|
||||
void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
|
||||
{
|
||||
- // client version 1.5.0
|
||||
- m_configuration.clientVersion = CEC_CLIENT_VERSION_1_5_1;
|
||||
+ // client version 1.6.0
|
||||
+ m_configuration.clientVersion = CEC_CLIENT_VERSION_1_6_0;
|
||||
|
||||
// device name 'XBMC'
|
||||
snprintf(m_configuration.strDeviceName, 13, "%s", GetSettingString("device_name").c_str());
|
||||
@@ -1061,15 +1150,16 @@
|
||||
m_configuration.powerOffDevices.Clear();
|
||||
ReadLogicalAddresses(strStandbyDevices, m_configuration.powerOffDevices);
|
||||
|
||||
- // always get the settings from the rom, when supported by the firmware
|
||||
- m_configuration.bGetSettingsFromROM = 1;
|
||||
-
|
||||
// read the boolean settings
|
||||
m_configuration.bUseTVMenuLanguage = GetSettingBool("use_tv_menu_language") ? 1 : 0;
|
||||
m_configuration.bActivateSource = GetSettingBool("activate_source") ? 1 : 0;
|
||||
m_configuration.bPowerOffScreensaver = GetSettingBool("cec_standby_screensaver") ? 1 : 0;
|
||||
- m_configuration.bPowerOffOnStandby = GetSettingBool("standby_pc_on_tv_standby") ? 1 : 0;
|
||||
m_configuration.bSendInactiveSource = GetSettingBool("send_inactive_source") ? 1 : 0;
|
||||
+
|
||||
+ // read the mutually exclusive boolean settings
|
||||
+ int iStandbyAction(GetSettingInt("standby_pc_on_tv_standby"));
|
||||
+ m_configuration.bPowerOffOnStandby = iStandbyAction == 13011 ? 1 : 0;
|
||||
+ m_configuration.bShutdownOnStandby = iStandbyAction == 13005 ? 1 : 0;
|
||||
}
|
||||
|
||||
void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses)
|
||||
@@ -1203,6 +1293,12 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
+bool CPeripheralCecAdapter::IsRunning(void) const
|
||||
+{
|
||||
+ CSingleLock lock(m_critSection);
|
||||
+ return m_bIsRunning;
|
||||
+}
|
||||
+
|
||||
void CPeripheralCecAdapterUpdateThread::Process(void)
|
||||
{
|
||||
// set the initial configuration
|
||||
diff -Naur xbmc-pvr-11.0.1/xbmc/peripherals/devices/PeripheralCecAdapter.h xbmc-pvr-11.0.1.patch/xbmc/peripherals/devices/PeripheralCecAdapter.h
|
||||
--- xbmc-pvr-11.0.1/xbmc/peripherals/devices/PeripheralCecAdapter.h 2012-04-17 14:08:06.071589381 +0200
|
||||
+++ xbmc-pvr-11.0.1.patch/xbmc/peripherals/devices/PeripheralCecAdapter.h 2012-04-17 14:18:39.761587034 +0200
|
||||
@@ -115,6 +115,8 @@
|
||||
static int CecLogMessage(void *cbParam, const CEC::cec_log_message &message);
|
||||
static int CecCommand(void *cbParam, const CEC::cec_command &command);
|
||||
static int CecConfiguration(void *cbParam, const CEC::libcec_configuration &config);
|
||||
+ static int CecAlert(void *cbParam, const CEC::libcec_alert alert, const CEC::libcec_parameter &data);
|
||||
+ bool IsRunning(void) const;
|
||||
|
||||
virtual bool GetNextKey(void);
|
||||
virtual bool GetNextCecKey(CEC::cec_keypress &key);
|
||||
@@ -140,6 +142,8 @@
|
||||
CecVolumeChange m_lastChange;
|
||||
int m_iExitCode;
|
||||
bool m_bIsMuted;
|
||||
+ bool m_bGoingToStandby;
|
||||
+ bool m_bIsRunning;
|
||||
CPeripheralCecAdapterUpdateThread*m_queryThread;
|
||||
CEC::ICECCallbacks m_callbacks;
|
||||
CCriticalSection m_critSection;
|
||||
diff -Naur xbmc-pvr-11.0.1/xbmc/peripherals/devices/Peripheral.cpp xbmc-pvr-11.0.1.patch/xbmc/peripherals/devices/Peripheral.cpp
|
||||
--- xbmc-pvr-11.0.1/xbmc/peripherals/devices/Peripheral.cpp 2012-04-17 14:08:06.104590004 +0200
|
||||
+++ xbmc-pvr-11.0.1.patch/xbmc/peripherals/devices/Peripheral.cpp 2012-04-17 14:18:39.752586865 +0200
|
||||
@@ -211,7 +211,15 @@
|
||||
case SETTINGS_TYPE_INT:
|
||||
{
|
||||
const CSettingInt *mappedSetting = (const CSettingInt *) setting;
|
||||
- CSettingInt *intSetting = new CSettingInt(mappedSetting->GetOrder(), strKey.c_str(), mappedSetting->GetLabel(), mappedSetting->GetData(), mappedSetting->m_iMin, mappedSetting->m_iStep, mappedSetting->m_iMax, mappedSetting->GetControlType(), mappedSetting->m_strFormat);
|
||||
+ CSettingInt *intSetting(NULL);
|
||||
+ if (mappedSetting->GetControlType() == SPIN_CONTROL_INT)
|
||||
+ {
|
||||
+ intSetting = new CSettingInt(mappedSetting->GetOrder(), strKey.c_str(), mappedSetting->GetLabel(), mappedSetting->GetData(), mappedSetting->m_iMin, mappedSetting->m_iStep, mappedSetting->m_iMax, mappedSetting->GetControlType(), mappedSetting->m_strFormat);
|
||||
+ }
|
||||
+ else if (mappedSetting->GetControlType() == SPIN_CONTROL_TEXT)
|
||||
+ {
|
||||
+ intSetting = new CSettingInt(mappedSetting->GetOrder(), strKey.c_str(), mappedSetting->GetLabel(), mappedSetting->GetData(), mappedSetting->m_entries, mappedSetting->GetControlType());
|
||||
+ }
|
||||
if (intSetting)
|
||||
{
|
||||
intSetting->SetVisible(mappedSetting->IsVisible());
|
||||
diff -Naur xbmc-pvr-11.0.1/xbmc/peripherals/devices/Peripheral.h xbmc-pvr-11.0.1.patch/xbmc/peripherals/devices/Peripheral.h
|
||||
--- xbmc-pvr-11.0.1/xbmc/peripherals/devices/Peripheral.h 2012-04-17 14:08:06.104590004 +0200
|
||||
+++ xbmc-pvr-11.0.1.patch/xbmc/peripherals/devices/Peripheral.h 2012-04-17 14:18:39.758586977 +0200
|
||||
@@ -53,6 +53,7 @@
|
||||
const CStdString &DeviceName(void) const { return m_strDeviceName; }
|
||||
bool IsHidden(void) const { return m_bHidden; }
|
||||
void SetHidden(bool bSetTo = true) { m_bHidden = bSetTo; }
|
||||
+ const CStdString &GetVersionInfo(void) const { return m_strVersionInfo; }
|
||||
|
||||
/*!
|
||||
* @brief Check whether this device has the given feature.
|
||||
@@ -161,6 +162,7 @@
|
||||
CStdString m_strVendorId;
|
||||
int m_iProductId;
|
||||
CStdString m_strProductId;
|
||||
+ CStdString m_strVersionInfo;
|
||||
bool m_bInitialised;
|
||||
bool m_bHidden;
|
||||
bool m_bError;
|
||||
diff -Naur xbmc-pvr-11.0.1/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp xbmc-pvr-11.0.1.patch/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp
|
||||
--- xbmc-pvr-11.0.1/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp 2012-04-17 14:08:06.105590023 +0200
|
||||
+++ xbmc-pvr-11.0.1.patch/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.cpp 2012-04-17 14:18:39.753586884 +0200
|
||||
@@ -51,6 +51,7 @@
|
||||
delete m_item;
|
||||
m_boolSettings.clear();
|
||||
m_intSettings.clear();
|
||||
+ m_intTextSettings.clear();
|
||||
m_floatSettings.clear();
|
||||
m_stringSettings.clear();
|
||||
m_settings.clear();
|
||||
@@ -96,8 +97,23 @@
|
||||
CSettingInt *intSetting = (CSettingInt *) setting;
|
||||
if (intSetting)
|
||||
{
|
||||
- m_intSettings.insert(make_pair(CStdString(intSetting->GetSetting()), (float) intSetting->GetData()));
|
||||
- AddSlider(intSetting->GetOrder(), intSetting->GetLabel(), &m_intSettings[intSetting->GetSetting()], (float)intSetting->m_iMin, (float)intSetting->m_iStep, (float)intSetting->m_iMax, CGUIDialogVideoSettings::FormatInteger, false);
|
||||
+ if (intSetting->GetControlType() == SPIN_CONTROL_INT)
|
||||
+ {
|
||||
+ m_intSettings.insert(make_pair(CStdString(intSetting->GetSetting()), (float) intSetting->GetData()));
|
||||
+ AddSlider(intSetting->GetOrder(), intSetting->GetLabel(), &m_intSettings[intSetting->GetSetting()], (float)intSetting->m_iMin, (float)intSetting->m_iStep, (float)intSetting->m_iMax, CGUIDialogVideoSettings::FormatInteger, false);
|
||||
+ }
|
||||
+ else if (intSetting->GetControlType() == SPIN_CONTROL_TEXT)
|
||||
+ {
|
||||
+ m_intTextSettings.insert(make_pair(CStdString(intSetting->GetSetting()), intSetting->GetData()));
|
||||
+ vector<pair<int, int> > entries;
|
||||
+ map<int, int>::iterator entriesItr = intSetting->m_entries.begin();
|
||||
+ while (entriesItr != intSetting->m_entries.end())
|
||||
+ {
|
||||
+ entries.push_back(make_pair(entriesItr->first, entriesItr->second));
|
||||
+ ++entriesItr;
|
||||
+ }
|
||||
+ AddSpin(intSetting->GetOrder(), intSetting->GetLabel(), &m_intTextSettings[intSetting->GetSetting()], entries);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -160,6 +176,13 @@
|
||||
++intItr;
|
||||
}
|
||||
|
||||
+ map<CStdString, int>::iterator intTextItr = m_intTextSettings.begin();
|
||||
+ while (intTextItr != m_intTextSettings.end())
|
||||
+ {
|
||||
+ peripheral->SetSetting((*intTextItr).first, (*intTextItr).second);
|
||||
+ ++intTextItr;
|
||||
+ }
|
||||
+
|
||||
map<CStdString, float>::iterator floatItr = m_floatSettings.begin();
|
||||
while (floatItr != m_floatSettings.end())
|
||||
{
|
||||
@@ -210,6 +233,7 @@
|
||||
/* clear the settings */
|
||||
m_boolSettings.clear();
|
||||
m_intSettings.clear();
|
||||
+ m_intTextSettings.clear();
|
||||
m_floatSettings.clear();
|
||||
m_stringSettings.clear();
|
||||
m_settings.clear();
|
||||
diff -Naur xbmc-pvr-11.0.1/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.h xbmc-pvr-11.0.1.patch/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.h
|
||||
--- xbmc-pvr-11.0.1/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.h 2012-03-27 17:55:34.000000000 +0200
|
||||
+++ xbmc-pvr-11.0.1.patch/xbmc/peripherals/dialogs/GUIDialogPeripheralSettings.h 2012-04-17 14:18:39.753586884 +0200
|
||||
@@ -44,6 +44,7 @@
|
||||
bool m_bIsInitialising;
|
||||
std::map<CStdString, bool> m_boolSettings;
|
||||
std::map<CStdString, float> m_intSettings;
|
||||
+ std::map<CStdString, int> m_intTextSettings;
|
||||
std::map<CStdString, float> m_floatSettings;
|
||||
std::map<CStdString, CStdString> m_stringSettings;
|
||||
};
|
||||
diff -Naur xbmc-pvr-11.0.1/xbmc/peripherals/Peripherals.cpp xbmc-pvr-11.0.1.patch/xbmc/peripherals/Peripherals.cpp
|
||||
--- xbmc-pvr-11.0.1/xbmc/peripherals/Peripherals.cpp 2012-04-17 14:08:06.106590043 +0200
|
||||
+++ xbmc-pvr-11.0.1.patch/xbmc/peripherals/Peripherals.cpp 2012-04-17 14:18:39.752586865 +0200
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "guilib/LocalizeStrings.h"
|
||||
#include "dialogs/GUIDialogKaiToast.h"
|
||||
#include "utils/StringUtils.h"
|
||||
+#include "Util.h"
|
||||
#include "guilib/Key.h"
|
||||
|
||||
using namespace PERIPHERALS;
|
||||
@@ -486,29 +487,46 @@
|
||||
float fMax = currentNode->Attribute("max") ? (float) atof(currentNode->Attribute("max")) : 0;
|
||||
setting = new CSettingFloat(0, strKey, iLabelId, fValue, fMin, fStep, fMax, SPIN_CONTROL_FLOAT);
|
||||
}
|
||||
+ else if (strSettingsType.Equals("enum"))
|
||||
+ {
|
||||
+ CStdString strEnums(currentNode->Attribute("lvalues"));
|
||||
+ if (!strEnums.IsEmpty())
|
||||
+ {
|
||||
+ map<int,int> enums;
|
||||
+ vector<CStdString> valuesVec;
|
||||
+ CUtil::Tokenize(strEnums, valuesVec, "|");
|
||||
+ for (unsigned int i = 0; i < valuesVec.size(); i++)
|
||||
+ enums.insert(make_pair(atoi(valuesVec[i]), atoi(valuesVec[i])));
|
||||
+ int iValue = currentNode->Attribute("value") ? atoi(currentNode->Attribute("value")) : 0;
|
||||
+ setting = new CSettingInt(0, strKey, iLabelId, iValue, enums, SPIN_CONTROL_TEXT);
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
{
|
||||
CStdString strValue(currentNode->Attribute("value"));
|
||||
setting = new CSettingString(0, strKey, iLabelId, strValue, EDIT_CONTROL_INPUT, !bConfigurable, -1);
|
||||
}
|
||||
|
||||
- //TODO add more types if needed
|
||||
+ if (setting)
|
||||
+ {
|
||||
+ //TODO add more types if needed
|
||||
|
||||
- /* set the visibility */
|
||||
- setting->SetVisible(bConfigurable);
|
||||
+ /* set the visibility */
|
||||
+ setting->SetVisible(bConfigurable);
|
||||
|
||||
- /* set the order */
|
||||
- int iOrder(0);
|
||||
- currentNode->Attribute("order", &iOrder);
|
||||
- /* if the order attribute is invalid or 0, then the setting will be added at the end */
|
||||
- if (iOrder < 0)
|
||||
- iOrder = 0;
|
||||
- setting->SetOrder(iOrder);
|
||||
- if (iOrder > iMaxOrder)
|
||||
- iMaxOrder = iOrder;
|
||||
+ /* set the order */
|
||||
+ int iOrder(0);
|
||||
+ currentNode->Attribute("order", &iOrder);
|
||||
+ /* if the order attribute is invalid or 0, then the setting will be added at the end */
|
||||
+ if (iOrder < 0)
|
||||
+ iOrder = 0;
|
||||
+ setting->SetOrder(iOrder);
|
||||
+ if (iOrder > iMaxOrder)
|
||||
+ iMaxOrder = iOrder;
|
||||
|
||||
- /* and add this new setting */
|
||||
- m_settings[strKey] = setting;
|
||||
+ /* and add this new setting */
|
||||
+ m_settings[strKey] = setting;
|
||||
+ }
|
||||
|
||||
currentNode = currentNode->NextSiblingElement("setting");
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,15 @@
|
||||
--- xbmc-pvr-11.0.2/configure.in.orig 2012-08-29 01:02:48.633007939 +0200
|
||||
+++ xbmc-pvr-11.0.2/configure.in 2012-08-29 01:03:40.593006545 +0200
|
||||
@@ -1287,11 +1287,7 @@
|
||||
AC_DEFINE([USE_EXTERNAL_FFMPEG], [1], [Whether to use external FFmpeg libraries.])
|
||||
|
||||
# Disable vdpau support if external libavcodec doesn't have it
|
||||
- AC_RUN_IFELSE(
|
||||
- AC_LANG_PROGRAM([[#include <libavcodec/avcodec.h>]],
|
||||
- [[avcodec_register_all();
|
||||
- AVCodec *codec = avcodec_find_decoder_by_name("vc1_vdpau");
|
||||
- return (codec) ? 0 : 1;]]),,
|
||||
+ AC_CHECK_LIB([avcodec], [ff_vdpau_vc1_decode_picture],,
|
||||
[if test "x$use_vdpau" = "xyes"; then
|
||||
AC_MSG_ERROR($ffmpeg_vdpau_not_supported)
|
||||
else
|
Loading…
x
Reference in New Issue
Block a user