Merge branch 'master' of github.com:OpenELEC/OpenELEC.tv into openelec-3.0

This commit is contained in:
Stephan Raue 2013-02-12 05:28:25 +01:00
commit 2e24540df2
64 changed files with 1660 additions and 618 deletions

View File

@ -20,7 +20,7 @@
################################################################################
PKG_NAME="CouchPotatoServer"
PKG_VERSION="393c14d"
PKG_VERSION="811f35b"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="OSS"

View File

@ -19,7 +19,7 @@
################################################################################
PKG_NAME="SABnzbd"
PKG_VERSION="0.7.9"
PKG_VERSION="0.7.11"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="OSS"

View File

@ -20,7 +20,7 @@
################################################################################
PKG_NAME="SickBeard"
PKG_VERSION="e6dcfb3"
PKG_VERSION="6cb5e76"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="OSS"

View File

@ -1,3 +1,9 @@
3.0.3
- update to SABnzbd-0.7.11
- update to CouchPotatoServer-811f35b
- update to SickBeard-6cb5e76
- added option to restart the suite on suspend / resume
3.0.2
- Fixed bug causing configobj to throw an exception with Couchpotato v2s config
- corrected a bug causing most of the suite to crash on first launch in certain circumstances

View File

@ -10,4 +10,5 @@
<setting id="COUCHPOTATO_LAUNCH" value="true" />
<setting id="COUCHPOTATO_VERSION" value="1" />
<setting id="HEADPHONES_LAUNCH" value="true" />
<setting id="RESTART_ON_RESUME" value="false" />
</settings>

View File

@ -20,7 +20,7 @@
PKG_NAME="SABnzbd-Suite"
PKG_VERSION="3.0"
PKG_REV="2"
PKG_REV="3"
PKG_ARCH="any"
PKG_LICENSE="OSS"
PKG_SITE="http://www.openelec.tv"

View File

@ -59,7 +59,7 @@ if sabNzbdLaunch:
sabNzbdApiKey = sabConfiguration['misc']['api_key']
sabNzbdUser = sabConfiguration['misc']['username']
sabNzbdPass = sabConfiguration['misc']['password']
sabNzbdQueue = 'http://' + sabNzbdAddress + '/sabnzbd/api?mode=queue&output=xml&apikey=' + sabNzbdApiKey + '&ma_username=' + sabNzbdUser + '&ma_password=' + sabNzbdUser
sabNzbdQueue = 'http://' + sabNzbdAddress + '/api?mode=queue&output=xml&apikey=' + sabNzbdApiKey + '&ma_username=' + sabNzbdUser + '&ma_password=' + sabNzbdPass
# start checking SABnzbd for activity and prevent sleeping if necessary
socket.setdefaulttimeout(timeout)
@ -83,29 +83,30 @@ while (not xbmc.abortRequested):
wakeHourIdx = int(__settings__.getSetting('SABNZBD_WAKE_AT'))
# check if SABnzbd is downloading
sabIsActive = False
req = urllib2.Request(sabNzbdQueue)
try: handle = urllib2.urlopen(req)
except IOError, e:
xbmc.log('SABnzbd-Suite: could not determine SABnzbds status', level=xbmc.LOGERROR)
else:
queue = handle.read()
handle.close()
sabIsActive = (queue.find('<status>Downloading</status>') >= 0)
if shouldKeepAwake:
sabIsActive = False
req = urllib2.Request(sabNzbdQueue)
try: handle = urllib2.urlopen(req)
except IOError, e:
xbmc.log('SABnzbd-Suite: could not determine SABnzbds status', level=xbmc.LOGERROR)
else:
queue = handle.read()
handle.close()
sabIsActive = (queue.find('<status>Downloading</status>') >= 0)
# reset idle timer when we're close to idle sleep/shutdown
if (shouldKeepAwake and sabIsActive):
response = xbmc.executehttpapi("GetGUISetting(0;powermanagement.shutdowntime)").replace('<li>','')
shutdownTime = int(response) * 60
idleTime = xbmc.getGlobalIdleTime()
timeToShutdown = shutdownTime - idleTime
# reset idle timer when we're close to idle sleep/shutdown
if sabIsActive:
response = xbmc.executehttpapi("GetGUISetting(0;powermanagement.shutdowntime)").replace('<li>','')
shutdownTime = int(response) * 60
idleTime = xbmc.getGlobalIdleTime()
timeToShutdown = shutdownTime - idleTime
if (sabIsActive and timeToShutdown <= checkInterval - timeout):
xbmc.log('SABnzbd-Suite: still downloading. Resetting XBMC idle timer.')
xbmc.executehttpapi("SendKey(0xF000)")
if (timeToShutdown <= checkInterval - timeout):
xbmc.log('SABnzbd-Suite: still downloading. Resetting XBMC idle timer.')
xbmc.executehttpapi("SendKey(0xF000)")
# calculate and set the time to wake up at (if any)
if (wakePeriodically):
if wakePeriodically:
wakeHour = wakeHourIdx * 2 + 1
timeOfDay = datetime.time(hour=wakeHour)
now = datetime.datetime.now()

View File

@ -17,5 +17,6 @@
<string id="3021">Keep awake while downloading</string>
<string id="3030">Wake up periodically</string>
<string id="3031">Wake up at</string>
<string id="3032">Restart on suspend / resume</string>
</strings>

View File

@ -24,6 +24,7 @@
<setting id="SABNZBD_WAKE_AT" type="enum" subsetting="true" enable="eq(-1,true)"
label="3031" default="01"
values="|01:00|03:00|05:00|07:00|09:00|11:00|13:00|15:00|17:00|19:00|21:00|23:00"/>
<setting id="RESTART_ON_RESUME" type="bool" label="3032" default="false" />
</category>
</settings>

View File

@ -0,0 +1,51 @@
#!/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
################################################################################
. /etc/profile
ADDON_HOME="$HOME/.xbmc/userdata/addon_data/service.downloadmanager.SABnzbd-Suite"
ADDON_SETTINGS="$ADDON_HOME/settings.xml"
RESTART_ON_RESUME=`grep RESTART_ON_RESUME $ADDON_SETTINGS | awk '{print $3}' | sed -e "s,value=,," -e "s,\",,g"`
LOCKFILE="/var/lock/SABnzbd-Suite.sleep"
if [ "$RESTART_ON_RESUME" == "true" ] ; then
case "$1" in
hibernate|suspend)
if [ ! -z "`ps | grep -E 'python.*service.downloadmanager.SABnzbd-Suite' | awk '{print $1}'`" ] ; then
progress "Shutting down SABnzbd-Suite for suspending..."
SABnzbd-Suite.stop
touch $LOCKFILE
fi
;;
thaw|resume)
progress "Restarting SABnzbd-Suite for wakeup..."
if [ -f "$LOCKFILE" ] ; then
rm -rf "$LOCKFILE"
python $HOME/.xbmc/addons/service.downloadmanager.SABnzbd-Suite/bin/SABnzbd-Suite.py
fi
;;
*) exit $NA
;;
esac
fi

View File

@ -1,3 +1,6 @@
3.0.6
- update to oscam-8334
3.0.5
- update to oscam-8119
- use internal crypto functions

View File

@ -20,8 +20,8 @@
################################################################################
PKG_NAME="oscam"
PKG_VERSION="8119"
PKG_REV="5"
PKG_VERSION="8334"
PKG_REV="6"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.streamboard.tv/oscam/wiki"

View File

@ -0,0 +1,87 @@
From: Takashi Iwai <tiwai <at> suse.de>
Subject: [PATCH RFC 1/2] control: Simplify using snd_config_get_bool()
Newsgroups: gmane.linux.alsa.devel
Date: 2012-10-12 15:25:23 GMT (17 weeks, 8 hours and 26 minutes ago)
snd_config_get_bool() was improved to parse also ASCII strings now,
so we don't have to open-code the boolean parser in
src/control/setup.c any longer.
Signed-off-by: Takashi Iwai <tiwai <at> suse.de>
---
src/control/setup.c | 37 ++++++-------------------------------
1 file changed, 6 insertions(+), 31 deletions(-)
diff --git a/src/control/setup.c b/src/control/setup.c
index eecda45..bd3599d 100644
--- a/src/control/setup.c
+++ b/src/control/setup.c
@@ -400,7 +400,6 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da
{
snd_config_t *conf;
snd_config_iterator_t i, next;
- char *tmp;
int iface = SND_CTL_ELEM_IFACE_MIXER;
const char *name = NULL;
long index = 0;
@@ -464,33 +463,17 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da
continue;
}
if (strcmp(id, "lock") == 0) {
- if ((err = snd_config_get_ascii(n, &tmp)) < 0) {
- SNDERR("field %s has an invalid type", id);
- goto _err;
- }
- err = snd_config_get_bool_ascii(tmp);
- if (err < 0) {
- SNDERR("field %s is not a boolean", id);
- free(tmp);
+ err = snd_config_get_bool(n);
+ if (err < 0)
goto _err;
- }
lock = err;
- free(tmp);
continue;
}
if (strcmp(id, "preserve") == 0) {
- if ((err = snd_config_get_ascii(n, &tmp)) < 0) {
- SNDERR("field %s has an invalid type", id);
- goto _err;
- }
- err = snd_config_get_bool_ascii(tmp);
- if (err < 0) {
- SNDERR("field %s is not a boolean", id);
- free(tmp);
+ err = snd_config_get_bool(n);
+ if (err < 0)
goto _err;
- }
preserve = err;
- free(tmp);
continue;
}
if (strcmp(id, "value") == 0) {
@@ -502,18 +485,10 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da
continue;
}
if (strcmp(id, "optional") == 0) {
- if ((err = snd_config_get_ascii(n, &tmp)) < 0) {
- SNDERR("field %s has an invalid type", id);
- goto _err;
- }
- err = snd_config_get_bool_ascii(tmp);
- if (err < 0) {
- SNDERR("field %s is not a boolean", id);
- free(tmp);
+ err = snd_config_get_bool(n);
+ if (err < 0)
goto _err;
- }
optional = err;
- free(tmp);
continue;
}
SNDERR("Unknown field %s", id);
--
1.7.12.2

View File

@ -0,0 +1,122 @@
From: Takashi Iwai <tiwai <at> suse.de>
Subject: [PATCH RFC 2/2] Add workaround for conflicting IEC958 controls for HD-audio
Newsgroups: gmane.linux.alsa.devel
Date: 2012-10-12 15:25:49 GMT (17 weeks, 8 hours and 27 minutes ago)
When both an SPDIF and an HDMI output are present on HD-audio, both
try to access IEC958 controls with index=0 although one of them must
be wrong. For avoiding this conflict, the recent kernel code moves
the IEC958 controls of an SPDIF with device=1 once when the conflict
happens.
In this patch, the corresponding support is added in alsa-lib side.
The new "skip_rest" boolean flag is added to the hooked element
definition which indicates that the rest of element array will be
ignored once when this element is present and evaluated. With this
new flag, the HD-audio config takes device=1 primarily, then take
device=0 as fallback.
Signed-off-by: Takashi Iwai <tiwai <at> suse.de>
---
src/conf/cards/HDA-Intel.conf | 16 ++++++++++++++++
src/control/setup.c | 19 ++++++++++++++++---
2 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/src/conf/cards/HDA-Intel.conf b/src/conf/cards/HDA-Intel.conf
index d4f2667..55fb624 100644
--- a/src/conf/cards/HDA-Intel.conf
+++ b/src/conf/cards/HDA-Intel.conf
@@ -113,6 +113,22 @@ HDA-Intel.pcm.iec958.0 {
hook_args [
{
name "IEC958 Playback Default"
+ device 1
+ optional true
+ lock true
+ preserve true
+ value [ $AES0 $AES1 $AES2 $AES3 ]
+ }
+ {
+ name "IEC958 Playback Switch"
+ device 1
+ optional true
+ value true
+ # if this element is present, skip the rest
+ skip_rest true
+ }
+ {
+ name "IEC958 Playback Default"
lock true
preserve true
value [ $AES0 $AES1 $AES2 $AES3 ]
diff --git a/src/control/setup.c b/src/control/setup.c
index bd3599d..f23bf2c 100644
--- a/src/control/setup.c
+++ b/src/control/setup.c
@@ -396,7 +396,7 @@ static int snd_config_get_ctl_elem_value(snd_config_t *conf,
return 0;
}
-static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_data)
+static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_data, int *quit)
{
snd_config_t *conf;
snd_config_iterator_t i, next;
@@ -408,6 +408,7 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da
int lock = 0;
int preserve = 0;
int optional = 0;
+ int skip_rest = 0;
snd_config_t *value = NULL, *mask = NULL;
snd_sctl_elem_t *elem = NULL;
int err;
@@ -491,6 +492,13 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da
optional = err;
continue;
}
+ if (strcmp(id, "skip_rest") == 0) {
+ err = snd_config_get_bool(n);
+ if (err < 0)
+ goto _err;
+ skip_rest = err;
+ continue;
+ }
SNDERR("Unknown field %s", id);
return -EINVAL;
}
@@ -539,6 +547,9 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da
if (! optional)
SNDERR("Cannot obtain info for CTL elem (%s,'%s',%li,%li,%li): %s",snd_ctl_elem_iface_name(iface), name, index, device, subdevice, snd_strerror(err));
goto _err;
+ } else {
+ if (skip_rest)
+ *quit = 1;
}
snd_ctl_elem_value_set_id(elem->val, elem->id);
snd_ctl_elem_value_set_id(elem->old, elem->id);
@@ -594,7 +605,7 @@ int snd_sctl_build(snd_sctl_t **sctl, snd_ctl_t *handle, snd_config_t *conf, snd
{
snd_sctl_t *h;
snd_config_iterator_t i, next;
- int err;
+ int err, quit = 0;
assert(sctl);
assert(handle);
@@ -614,11 +625,13 @@ int snd_sctl_build(snd_sctl_t **sctl, snd_ctl_t *handle, snd_config_t *conf, snd
INIT_LIST_HEAD(&h->elems);
snd_config_for_each(i, next, conf) {
snd_config_t *n = snd_config_iterator_entry(i);
- err = add_elem(h, n, private_data);
+ err = add_elem(h, n, private_data, &quit);
if (err < 0) {
free_elems(h);
return err;
}
+ if (quit)
+ break;
}
*sctl = h;
return 0;
--
1.7.12.2

View File

@ -0,0 +1,37 @@
From b7f85e4b35aeead9b3c64f06c0c4a4617baaf7f5 Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi.hannula@iki.fi>
Date: Sat, 9 Feb 2013 01:37:48 +0200
Subject: [PATCH] hcontrol: Add workaround for handling IEC958 workaround
IEC958 workaround in the kernel can cause controls that have same the
same name and index but a different device.
Temporarily ignore failure of adding such conflicting controls if the
mixer class fails on them.
---
src/control/hcontrol.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/control/hcontrol.c b/src/control/hcontrol.c
index ee1d907..dfc0a5a 100644
--- a/src/control/hcontrol.c
+++ b/src/control/hcontrol.c
@@ -612,8 +612,13 @@ int snd_hctl_load(snd_hctl_t *hctl)
for (idx = 0; idx < hctl->count; idx++) {
int res = snd_hctl_throw_event(hctl, SNDRV_CTL_EVENT_MASK_ADD,
hctl->pelems[idx]);
- if (res < 0)
- return res;
+ if (res < 0) {
+ if (res == -EINVAL && snd_hctl_elem_get_device(hctl->pelems[idx]) == 1) {
+ SNDERR("ignoring mixer element addition failure on device 1 - IEC958 conflict workaround");
+ } else {
+ return res;
+ }
+ }
}
err = snd_ctl_subscribe_events(hctl->ctl, 1);
_end:
--
1.7.10

View File

@ -2,7 +2,7 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2013 Dag Wieers (dag@wieers.com)
#
# 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
@ -20,12 +20,9 @@
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. /etc/profile
. config/options $1
case "$1" in
thaw|resume)
xbmc-send --host=127.0.0.1 -a "ReloadSkin()" &
;;
*) exit $NA
;;
esac
mkdir -p $INSTALL/usr/bin/
cp $PKG_BUILD/dstat $INSTALL/usr/bin/
mkdir -p $INSTALL/usr/share/dstat/
cp $PKG_BUILD/plugins/dstat_*.py $INSTALL/usr/share/dstat/

36
packages/debug/dstat/meta Normal file
View File

@ -0,0 +1,36 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2013 Dag Wieers (dag@wieers.com)
#
# 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="dstat"
PKG_VERSION="0.7.2"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://dag.wieers.com/home-made/dstat/"
PKG_URL="http://dag.wieers.com/home-made/dstat/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_DEPENDS="Python"
PKG_BUILD_DEPENDS="toolchain Python"
PKG_PRIORITY="optional"
PKG_SECTION="system"
PKG_SHORTDESC="dstat: versatile resource statistics tool"
PKG_LONGDESC="Dstat is a versatile replacement for vmstat, iostat, netstat and ifstat. Dstat overcomes some of their limitations and adds some extra features, more counters and flexibility. Dstat is handy for monitoring systems during performance tuning tests, benchmarks or troubleshooting."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

View File

@ -25,7 +25,7 @@ PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.openelec.tv"
PKG_URL=""
PKG_DEPENDS="acpica cpuid dmidecode evtest gdb hddtemp htop i2c-tools pmtools powertop strace"
PKG_DEPENDS="acpica cpuid dmidecode dstat evtest gdb hddtemp htop i2c-tools pmtools powertop strace"
PKG_BUILD_DEPENDS="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="debug"

View File

@ -19,7 +19,7 @@
################################################################################
PKG_NAME="linux"
PKG_VERSION="3.7.6"
PKG_VERSION="3.7.7"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"

View File

@ -0,0 +1,94 @@
From 1aec20670bfd1c0680d2ea4b29c4e5d8f1bdb43f Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi.hannula@iki.fi>
Date: Sat, 9 Feb 2013 00:19:09 +0200
Subject: [PATCH] ALSA: hda - Fix the workaround for conflicting IEC958
controls
Commit dcda5806165c155d90b9aa466a1602cf4726012b ("ALSA: hda - Add
workaround for conflicting IEC958 controls") added a workaround for
cards that have both an S/PDIF and an HDMI device, so that S/PDIF IEC958
controls will be moved to device=1 on such cards.
However, the workaround did not take it into account that the S/PDIF and
HDMI devices may be on different codecs of the same card. Currently this
is always the case, and the workaround therefore fails to work.
Fix the workaround to handle card-wide IEC958 conflicts.
Reported-by: Stephan Raue <stephan@openelec.tv>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
---
sound/pci/hda/hda_codec.c | 27 +++++++++++++++------------
sound/pci/hda/hda_codec.h | 4 +++-
2 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 822df97..fe5d6fc 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -3135,25 +3135,28 @@ int snd_hda_create_dig_out_ctls(struct hda_codec *codec,
int idx, dev = 0;
const int spdif_pcm_dev = 1;
struct hda_spdif_out *spdif;
+ struct hda_codec *c;
- if (codec->primary_dig_out_type == HDA_PCM_TYPE_HDMI &&
+ if (codec->bus->primary_dig_out_type == HDA_PCM_TYPE_HDMI &&
type == HDA_PCM_TYPE_SPDIF) {
dev = spdif_pcm_dev;
- } else if (codec->primary_dig_out_type == HDA_PCM_TYPE_SPDIF &&
+ } else if (codec->bus->primary_dig_out_type == HDA_PCM_TYPE_SPDIF &&
type == HDA_PCM_TYPE_HDMI) {
- for (idx = 0; idx < codec->spdif_out.used; idx++) {
- spdif = snd_array_elem(&codec->spdif_out, idx);
- for (dig_mix = dig_mixes; dig_mix->name; dig_mix++) {
- kctl = find_mixer_ctl(codec, dig_mix->name, 0, idx);
- if (!kctl)
- break;
- kctl->id.device = spdif_pcm_dev;
+ list_for_each_entry(c, &codec->bus->codec_list, list) {
+ for (idx = 0; idx < c->spdif_out.used; idx++) {
+ spdif = snd_array_elem(&c->spdif_out, idx);
+ for (dig_mix = dig_mixes; dig_mix->name; dig_mix++) {
+ kctl = find_mixer_ctl(c, dig_mix->name, 0, idx);
+ if (!kctl)
+ break;
+ kctl->id.device = spdif_pcm_dev;
+ }
}
}
- codec->primary_dig_out_type = HDA_PCM_TYPE_HDMI;
+ codec->bus->primary_dig_out_type = HDA_PCM_TYPE_HDMI;
}
- if (!codec->primary_dig_out_type)
- codec->primary_dig_out_type = type;
+ if (!codec->bus->primary_dig_out_type)
+ codec->bus->primary_dig_out_type = type;
idx = find_empty_mixer_ctl_idx(codec, "IEC958 Playback Switch", dev);
if (idx < 0) {
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 8665540..ab807f7 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -671,6 +671,9 @@ struct hda_bus {
unsigned int response_reset:1; /* controller was reset */
unsigned int in_reset:1; /* during reset operation */
unsigned int power_keep_link_on:1; /* don't power off HDA link */
+
+ /* primary digital out PCM type */
+ int primary_dig_out_type;
};
/*
@@ -837,7 +840,6 @@ struct hda_codec {
struct mutex hash_mutex;
struct snd_array spdif_out;
unsigned int spdif_in_enable; /* SPDIF input enable? */
- int primary_dig_out_type; /* primary digital out PCM type */
const hda_nid_t *slave_dig_outs; /* optional digital out slave widgets */
struct snd_array init_pins; /* initial (BIOS) pin configurations */
struct snd_array driver_pins; /* pin configs set by codec parser */
--
1.7.10

View File

@ -0,0 +1,12 @@
diff -uNr linux-3.6.4-orig/arch/x86/kernel/tsc.c linux-3.6.4-new/arch/x86/kernel/tsc.c
--- linux-3.6.4-orig/arch/x86/kernel/tsc.c 2012-11-03 14:19:55.000000000 +0100
+++ linux-3.6.4-new/arch/x86/kernel/tsc.c 2012-11-03 14:23:05.000000000 +0100
@@ -374,7 +374,7 @@
goto success;
}
}
- pr_err("Fast TSC calibration failed\n");
+ pr_info("Fast TSC calibration failed\n");
return 0;
success:

View File

@ -31,6 +31,8 @@
<setting id="SAMBA_SECURITY" value="false" />
<setting id="SAMBA_USERNAME" value="openelec" />
<setting id="SAMBA_PASSWORD" value="openelec" />
<setting id="SYSLOG_REMOTE" value="false" />
<setting id="SYSLOG_SERVER" value="" />
<setting id="CROND_START" value="false" />
<setting id="UPDATE_AUTO" value="manual" />
<setting id="X11_KEYMAP" value="us" />

View File

@ -50,4 +50,8 @@
<string id="5030">crond</string>
<string id="5031">Start cron daemon at boot</string>
<string id="5040">syslog</string>
<string id="5041">Use remote syslog server</string>
<string id="5042">Remote syslog IP address</string>
</strings>

View File

@ -81,5 +81,9 @@
<setting label="5030" type="lsep"/>
<setting type="sep" />
<setting id="CROND_START" type="bool" label="5031" default="false" />
<setting label="5040" type="lsep"/>
<setting type="sep" />
<setting id="SYSLOG_REMOTE" type="bool" label="5041" default="false" />
<setting id="SYSLOG_SERVER" type="ipaddress" label="5042" default="" visible="eq(-1,true)" />
</category>
</settings>

View File

@ -22,6 +22,8 @@
#
# runlevels: openelec
progress "clean up log files"
rm -f /storage/.xbmc/userdata/addon_data/*/*.log 2>/dev/null
rm -rf /storage/.xbmc/userdata/addon_data/*/log/* 2>/dev/null
if [ ! "$DEBUG" = "yes" ]; then
progress "clean up log files"
rm -f /storage/.xbmc/userdata/addon_data/*/*.log 2>/dev/null
rm -rf /storage/.xbmc/userdata/addon_data/*/log/* 2>/dev/null
fi

View File

@ -27,7 +27,11 @@ progress "setup XBMC"
#
# clean temp dir
#
rm -rf $HOME/.xbmc/temp/*
# hack... we should always clean this temp dir, but we should keep
# the logfiles in debug mode
if [ ! "$DEBUG" = "yes" ]; then
rm -rf $HOME/.xbmc/temp/*
fi
#
# add some default settings

View File

@ -1,7 +1,7 @@
From bfd49543c49747236d401df4351767d584f756ac Mon Sep 17 00:00:00 2001
From: wsnipex <wsnipex@a1.net>
Date: Sun, 4 Nov 2012 14:05:52 +0100
Subject: [PATCH 01/72] configure: add --enable-pvraddons-with-dependencies
Subject: [PATCH 01/73] configure: add --enable-pvraddons-with-dependencies
switch for intree building of PVR Addons
---
@ -51,7 +51,7 @@ index 4769315..350d960 100644
From dc83e2351e8bf8e904102782ea489d2c8caa2802 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Mon, 28 May 2012 10:03:31 +0200
Subject: [PATCH 02/72] VideoRenerers: add buffering
Subject: [PATCH 02/73] VideoRenerers: add buffering
---
xbmc/Application.cpp | 3 +
@ -1037,7 +1037,7 @@ index 3008c25..a4bb1ba 100644
From dacc0167c993efa6ac884fd3c439fc5f0c823934 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Tue, 2 Oct 2012 10:49:09 +0200
Subject: [PATCH 03/72] linuxrenderer: delete all textures on reconfigure
Subject: [PATCH 03/73] linuxrenderer: delete all textures on reconfigure
---
xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 2 +-
@ -1063,7 +1063,7 @@ index b32a7ea..a2dc2be 100644
From 226539d21ba940ea8add89417df7102302c7ba79 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Mon, 28 May 2012 10:17:33 +0200
Subject: [PATCH 04/72] drop frame counter in application, ask render manager
Subject: [PATCH 04/73] drop frame counter in application, ask render manager
instead
---
@ -1245,7 +1245,7 @@ index 34ff8d0..288175e 100644
From 0f81843cb7279f3b99607551967354ff30e15e4d Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Mon, 28 May 2012 10:34:39 +0200
Subject: [PATCH 05/72] videoplayer: adopt lateness detection and dropping to
Subject: [PATCH 05/73] videoplayer: adopt lateness detection and dropping to
buffering
---
@ -1787,7 +1787,7 @@ index fe7e12c..4913712 100644
From 4bc6ff77b121468020578f9d393e8aaae1a419f6 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Mon, 28 May 2012 10:41:31 +0200
Subject: [PATCH 06/72] videoplayer: update frametime, it might change due to
Subject: [PATCH 06/73] videoplayer: update frametime, it might change due to
fps detection
---
@ -1814,7 +1814,7 @@ index 93908a7..4675556 100644
From 723a731d68b9360f9804e8711255afa62c4ce34d Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Mon, 28 May 2012 10:43:06 +0200
Subject: [PATCH 07/72] videoplayer: give streams with invalid fps a chance
Subject: [PATCH 07/73] videoplayer: give streams with invalid fps a chance
for fps detection
---
@ -1841,7 +1841,7 @@ index 4675556..2ef6358 100644
From 60c955c30cdfcf361396e47fc92a1e1883b085fe Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Mon, 28 May 2012 10:49:05 +0200
Subject: [PATCH 08/72] dvdplayer: allow rewinding at end of stream, do a seek
Subject: [PATCH 08/73] dvdplayer: allow rewinding at end of stream, do a seek
after rewind
---
@ -1881,7 +1881,7 @@ index 315d64a..6fcb6b3 100644
From 8d237cf023501560fc394679819463034a209413 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sun, 2 Sep 2012 16:05:21 +0200
Subject: [PATCH 09/72] video player: present correct pts to user for a/v sync
Subject: [PATCH 09/73] video player: present correct pts to user for a/v sync
(after buffering in renderer)
---
@ -1975,7 +1975,7 @@ index 4913712..509d5f7 100644
From 04a6a8b4ca29c17da6bbb9591685922b2f6f1442 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Mon, 28 May 2012 11:02:29 +0200
Subject: [PATCH 10/72] vaapi: adopt to buffering in renderer
Subject: [PATCH 10/73] vaapi: adopt to buffering in renderer
---
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 2 +-
@ -2036,7 +2036,7 @@ index 863edc4..417cbc0 100644
From 4d237410264bbff9c4ac373de498f80ecb15f7a3 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sat, 7 Apr 2012 09:19:00 +0200
Subject: [PATCH 11/72] vdpau: redesign
Subject: [PATCH 11/73] vdpau: redesign
---
language/English/strings.po | 12 +-
@ -8199,7 +8199,7 @@ index e7af3cb..2dd8a9f 100644
From c088467d9d0955051a510dadbddb270ddc3e3c20 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Tue, 25 Sep 2012 12:14:15 +0200
Subject: [PATCH 12/72] linuxrenderer: drop method RenderMultiPass
Subject: [PATCH 12/73] linuxrenderer: drop method RenderMultiPass
---
xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 9 ++-------
@ -8252,7 +8252,7 @@ index 3218cd5..afc78c2 100644
From 0de3939247a63509e6bfab2e77c298eaa28aa29c Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Tue, 25 Sep 2012 13:20:47 +0200
Subject: [PATCH 13/72] linuxrenderer: implement progressive weave for vdpau
Subject: [PATCH 13/73] linuxrenderer: implement progressive weave for vdpau
---
xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 55 ++++++++++++++++++-------
@ -8383,7 +8383,7 @@ index afc78c2..2fc34ae 100644
From c12380f4b9c9c2671bfd1ebd3e29ba7cd83ac95e Mon Sep 17 00:00:00 2001
From: FernetMenta <fernetmenta@online.de>
Date: Thu, 5 Jul 2012 15:22:05 +0200
Subject: [PATCH 14/72] X11: ditch SDL for video and window events
Subject: [PATCH 14/73] X11: ditch SDL for video and window events
---
xbmc/Application.cpp | 2 +-
@ -9870,7 +9870,7 @@ index 2dd8a9f..9616d17 100644
From 58fa894afaffbc990ee1ab87ff55db30e36ab2c2 Mon Sep 17 00:00:00 2001
From: FernetMenta <fernetmenta@online.de>
Date: Thu, 5 Jul 2012 15:24:22 +0200
Subject: [PATCH 15/72] X11: Add xbmc icon
Subject: [PATCH 15/73] X11: Add xbmc icon
---
xbmc/windowing/X11/WinSystemX11.cpp | 126 ++++++++++++++++++++++++++++++++++-
@ -10062,7 +10062,7 @@ index 9616d17..debf714 100644
From cad2ac7f357906f10f100a038ff28e83a69c68e8 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sun, 20 May 2012 14:11:26 +0200
Subject: [PATCH 16/72] X11: add SDL joystick until we have a better solution
Subject: [PATCH 16/73] X11: add SDL joystick until we have a better solution
---
xbmc/windowing/WinEventsX11.cpp | 26 ++++++++++++++++++++++++++
@ -10119,7 +10119,7 @@ index 24477ae..2ec86a8 100644
From fdefd4cf296518f31ad1165268fccd651e08dd3c Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@xbmc.org>
Date: Thu, 5 Jul 2012 12:35:55 +0200
Subject: [PATCH 17/72] X11: factor out code handling device reset
Subject: [PATCH 17/73] X11: factor out code handling device reset
notification
---
@ -10186,7 +10186,7 @@ index debf714..8c28e3f 100644
From 9a409794d1eb8ee0c4b0b1124dea7dd30af32c06 Mon Sep 17 00:00:00 2001
From: FernetMenta <fernetmenta@online.de>
Date: Thu, 5 Jul 2012 15:02:00 +0200
Subject: [PATCH 18/72] X11: move xrandr events to WinEventsX11
Subject: [PATCH 18/73] X11: move xrandr events to WinEventsX11
---
xbmc/windowing/WinEventsX11.cpp | 42 +++++++++++++++++++++++++++++++++++
@ -10333,7 +10333,7 @@ index 70557d0..1cce843 100644
From 1dc579a2d5c608cfd4f799971759d18cbd2957e5 Mon Sep 17 00:00:00 2001
From: FernetMenta <fernetmenta@online.de>
Date: Thu, 12 Apr 2012 15:43:56 +0200
Subject: [PATCH 19/72] xrandr: remove method RestoreState
Subject: [PATCH 19/73] xrandr: remove method RestoreState
---
xbmc/windowing/X11/WinSystemX11.cpp | 13 +++++++++++--
@ -10415,7 +10415,7 @@ index 2a269d0..5b64633 100644
From 4a6f0e986fc27b356041a4b1bb989e0e594c8aa7 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sun, 20 May 2012 13:17:10 +0200
Subject: [PATCH 20/72] xrandr: observe orientation
Subject: [PATCH 20/73] xrandr: observe orientation
---
xbmc/windowing/X11/WinSystemX11.cpp | 61 +++++++++++++++++++++++++++++++++--
@ -10587,7 +10587,7 @@ index 5b64633..618bd68 100644
From 97e5811e05a4ecde7249b2f76283729ff300fda9 Mon Sep 17 00:00:00 2001
From: FernetMenta <fernetmenta@online.de>
Date: Thu, 5 Jul 2012 11:54:15 +0200
Subject: [PATCH 21/72] xrandr: allow getting info for multiple screen's
Subject: [PATCH 21/73] xrandr: allow getting info for multiple screen's
Refactored by: Joakim Plate <elupus@xbmc.org>
---
@ -10765,7 +10765,7 @@ index 618bd68..0824af5 100644
From 2b379b9ce21b6d61b44b647b79ef3587dbbcf0ec Mon Sep 17 00:00:00 2001
From: FernetMenta <fernetmenta@online.de>
Date: Thu, 5 Jul 2012 11:44:00 +0200
Subject: [PATCH 22/72] X11: fix multi-head setups
Subject: [PATCH 22/73] X11: fix multi-head setups
---
language/English/strings.po | 4 +-
@ -11500,7 +11500,7 @@ index 93cf5db..71034fc 100644
From 2a747f13a0a50dea0883d0d3c701ef290235a99b Mon Sep 17 00:00:00 2001
From: FernetMenta <fernetmenta@online.de>
Date: Thu, 5 Jul 2012 11:36:32 +0200
Subject: [PATCH 23/72] X11: remove all DefaultScreen and RootWindow macros
Subject: [PATCH 23/73] X11: remove all DefaultScreen and RootWindow macros
---
xbmc/windowing/X11/WinSystemX11.cpp | 6 +++---
@ -11571,7 +11571,7 @@ index f858f88..d192697 100644
From cf018ebbf1eae8f5ae2914ef347aac5f963c0d71 Mon Sep 17 00:00:00 2001
From: FernetMenta <fernetmenta@online.de>
Date: Thu, 5 Jul 2012 11:45:22 +0200
Subject: [PATCH 24/72] X11: remove all DefaultScreen and RootWindow macros
Subject: [PATCH 24/73] X11: remove all DefaultScreen and RootWindow macros
(VideoRefClock)
Note this is on a separate display connection.
@ -11646,7 +11646,7 @@ index 9785fe7..0004e07 100644
From 5d8bfcd52e5a189515629c15c73434ef6c6bcc88 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Wed, 20 Jun 2012 17:37:11 +0200
Subject: [PATCH 25/72] X11: recreate gl context after output has changed
Subject: [PATCH 25/73] X11: recreate gl context after output has changed
---
xbmc/windowing/X11/WinSystemX11.cpp | 24 ++++++++++++++----------
@ -11800,7 +11800,7 @@ index d192697..0f2d1d2 100644
From bd9a29b7661c75152174959f9f269f32c13a658b Mon Sep 17 00:00:00 2001
From: FernetMenta <fernetmenta@online.de>
Date: Thu, 5 Jul 2012 12:06:25 +0200
Subject: [PATCH 26/72] X11: hook video reference clock in windowing
Subject: [PATCH 26/73] X11: hook video reference clock in windowing
---
xbmc/video/VideoReferenceClock.cpp | 71 ++++++++++++++++++++++++++----------
@ -12008,7 +12008,7 @@ index dcc4f09..7eb6317 100644
From 702f79eab647ec68030c99d6113976f3c602e87c Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Thu, 21 Jun 2012 17:26:51 +0200
Subject: [PATCH 27/72] X11: fix video calibrations
Subject: [PATCH 27/73] X11: fix video calibrations
---
xbmc/settings/Settings.cpp | 1 +
@ -12116,7 +12116,7 @@ index cc28f56..c046c86 100644
From 07920e322c9770ebb99becd104ebce0789c502fa Mon Sep 17 00:00:00 2001
From: FernetMenta <fernetmenta@online.de>
Date: Thu, 5 Jul 2012 12:00:26 +0200
Subject: [PATCH 28/72] X11: deactivate screen saver on startup
Subject: [PATCH 28/73] X11: deactivate screen saver on startup
---
xbmc/windowing/X11/WinSystemX11.cpp | 29 +++++++++++++++++++++++++++++
@ -12189,7 +12189,7 @@ index c046c86..e953d2d 100644
From 835bcc9c7fd477012492ffc4cad2bdd9ce506064 Mon Sep 17 00:00:00 2001
From: FernetMenta <fernetmenta@online.de>
Date: Thu, 5 Jul 2012 12:10:09 +0200
Subject: [PATCH 29/72] X11: change method of going full-screen
Subject: [PATCH 29/73] X11: change method of going full-screen
---
xbmc/windowing/X11/WinSystemX11.cpp | 9 ++++++++-
@ -12236,7 +12236,7 @@ index b3e7ab5..91f92c1 100644
From e2442797ff82b3ed8053f1a6422863ffce9cbe5f Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Thu, 28 Jun 2012 19:12:39 +0200
Subject: [PATCH 30/72] X11: reset key repeat and key modifier on focus lost
Subject: [PATCH 30/73] X11: reset key repeat and key modifier on focus lost
and gain
---
@ -12271,7 +12271,7 @@ index 6c22358..d86205d 100644
From 77a22163a7f611e9183b7cd0b817fc51a42d45de Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@xbmc.org>
Date: Thu, 5 Jul 2012 14:18:46 +0200
Subject: [PATCH 31/72] X11: replace custom utf8 to unicode with charset
Subject: [PATCH 31/73] X11: replace custom utf8 to unicode with charset
convertor (squash to x11 events)
---
@ -12491,7 +12491,7 @@ index 6100933..72955ad 100644
From e060b3197bbac54b79b604bbbf9a8e86257980f5 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@xbmc.org>
Date: Thu, 5 Jul 2012 14:23:54 +0200
Subject: [PATCH 32/72] X11: fixed invalid usage of sizeof() (squash into x11
Subject: [PATCH 32/73] X11: fixed invalid usage of sizeof() (squash into x11
changes)
---
@ -12558,7 +12558,7 @@ index 72955ad..102a076 100644
From c52af3ba68292f08331cbbbc940dfcea838a2f44 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sat, 9 Jun 2012 18:23:53 +0200
Subject: [PATCH 33/72] add missing keys to xbmc keytable
Subject: [PATCH 33/73] add missing keys to xbmc keytable
---
xbmc/input/XBMC_keytable.cpp | 2 ++
@ -12584,7 +12584,7 @@ index aaf65ba..9d7922f 100644
From 25587ee807eca2fc9dde4528e3fc930b337e38b0 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Fri, 16 Mar 2012 15:57:51 +0100
Subject: [PATCH 34/72] videorefclock: temp deactivate of nv settings
Subject: [PATCH 34/73] videorefclock: temp deactivate of nv settings
---
xbmc/video/VideoReferenceClock.cpp | 2 +-
@ -12610,7 +12610,7 @@ index fa8e35a..85e36c7 100644
From 4f8a95de09408321e2df3da891536c314fe3b4d2 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Mon, 20 Aug 2012 09:09:09 +0200
Subject: [PATCH 35/72] videorefclock: ask graphics context for refresh rate
Subject: [PATCH 35/73] videorefclock: ask graphics context for refresh rate
---
xbmc/video/VideoReferenceClock.cpp | 3 ++-
@ -12644,7 +12644,7 @@ index 85e36c7..8209163 100644
From 85d81f0c933cb0a75c2c21de86b4065e3db86002 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Mon, 9 Jul 2012 14:00:18 +0200
Subject: [PATCH 36/72] X11: fix icon texture after
Subject: [PATCH 36/73] X11: fix icon texture after
cc5ed3c2474084ebc0373a3046410e6f766e03f4
---
@ -12755,7 +12755,7 @@ index 91f92c1..174ccef 100644
From 111c2f8fd0f6b698fbff0fda6dc6c17ce3644626 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Tue, 10 Jul 2012 11:14:12 +0200
Subject: [PATCH 37/72] X11: check for window manager
Subject: [PATCH 37/73] X11: check for window manager
---
xbmc/windowing/X11/WinSystemX11.cpp | 74 ++++++++++++++++++++++++++++++++++-
@ -12879,7 +12879,7 @@ index e953d2d..0b7c10a 100644
From f1051e1991e5ef5d83ce428b841ac365082042ec Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Thu, 12 Jul 2012 11:11:47 +0200
Subject: [PATCH 38/72] X11: dont set window on xrandr if no mode available
Subject: [PATCH 38/73] X11: dont set window on xrandr if no mode available
---
xbmc/windowing/X11/WinSystemX11.cpp | 11 ++++++-----
@ -12919,7 +12919,7 @@ index 4f1ae26..c11ea89 100644
From 83b9c33e88077d957884ee22316c218e570dc3d5 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Thu, 26 Jul 2012 09:34:28 +0200
Subject: [PATCH 39/72] X11: fix crash after a resolution change on startup
Subject: [PATCH 39/73] X11: fix crash after a resolution change on startup
---
xbmc/windowing/X11/WinSystemX11.cpp | 3 ++-
@ -12946,7 +12946,7 @@ index c11ea89..0bd72d4 100644
From b8956ed57f1b683ae79d7306c7461a31c894e9a9 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sat, 15 Sep 2012 18:27:29 +0200
Subject: [PATCH 40/72] X11: lock graphics context in NotifyXRREvent
Subject: [PATCH 40/73] X11: lock graphics context in NotifyXRREvent
---
xbmc/windowing/X11/WinSystemX11.cpp | 2 ++
@ -12972,7 +12972,7 @@ index 0bd72d4..ef83133 100644
From aed5d244b81b1a0b171b7fea3b332decafc96c56 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de>
Date: Sat, 8 Oct 2011 16:45:13 +0200
Subject: [PATCH 41/72] ffmpeg: add xvba hwaccel
Subject: [PATCH 41/73] ffmpeg: add xvba hwaccel
---
lib/ffmpeg/configure | 8 ++
@ -13842,7 +13842,7 @@ index f0d9c01..0f8cf7b 100644
From 922cada27e255bc3f685b700c2ffa4a146f87624 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Thu, 12 Apr 2012 12:09:31 +0200
Subject: [PATCH 42/72] xvba: add decoder
Subject: [PATCH 42/73] xvba: add decoder
---
configure.in | 48 +
@ -17292,7 +17292,7 @@ index f25d10d..f6b1ea4 100644
From 517eda0bf58a6376a82839ab92e51b97c143edf1 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Thu, 23 Aug 2012 19:39:49 +0200
Subject: [PATCH 43/72] ffmpeg: add av_find_default_stream_index to interface
Subject: [PATCH 43/73] ffmpeg: add av_find_default_stream_index to interface
---
lib/DllAvFormat.h | 4 ++++
@ -17341,7 +17341,7 @@ index 9bda3f3..bf31fcb 100644
From 23be471842ae9ea7bd62c18261a5e96a11045d04 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Mon, 20 Aug 2012 16:06:39 +0200
Subject: [PATCH 44/72] dvdplayer: observe pts counter overflow
Subject: [PATCH 44/73] dvdplayer: observe pts counter overflow
---
.../cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 198 +++++++++++++++++++-
@ -17630,7 +17630,7 @@ index 2b5f2e8..e0acf29 100644
From 66382788a903f99ba317e972ba0445fc68320750 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Tue, 2 Oct 2012 13:02:10 +0200
Subject: [PATCH 45/72] dvdplayer: avoid short screen flicker caused by
Subject: [PATCH 45/73] dvdplayer: avoid short screen flicker caused by
unnecessary reconfigure of renderer
---
@ -17666,7 +17666,7 @@ index e5e71f3..8b02d81 100644
From 04f4521c1938a7ac17acd59f3bd6be59c7ba8184 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sat, 16 Jun 2012 12:46:30 +0200
Subject: [PATCH 46/72] xvba: do not use vaapi if xvba is present
Subject: [PATCH 46/73] xvba: do not use vaapi if xvba is present
---
xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp | 9 +++++++++
@ -17699,7 +17699,7 @@ index a2b9195..43a05b3 100644
From a133b7fa119e859ec50b9f05a33de984105234f3 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Thu, 11 Oct 2012 12:05:50 +0200
Subject: [PATCH 47/72] vdpau: advanced settings for auto deinterlacing
Subject: [PATCH 47/73] vdpau: advanced settings for auto deinterlacing
---
xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 8 ++++----
@ -17768,7 +17768,7 @@ index 72718e5..aaa4702 100644
From 62540aeaa356823bd34e9367ac39eef23a6e4ce4 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Thu, 11 Oct 2012 13:01:08 +0200
Subject: [PATCH 48/72] dvdplayer: correct determination if video is playing
Subject: [PATCH 48/73] dvdplayer: correct determination if video is playing
---
xbmc/cores/dvdplayer/DVDPlayer.cpp | 11 +++++++++--
@ -17804,7 +17804,7 @@ index 6fcb6b3..f76691d 100644
From 5a093bbd60d1ca47ed7c5e4639f28dafc1b565c1 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sun, 14 Oct 2012 13:46:54 +0200
Subject: [PATCH 49/72] rendermanager: fix stuttering in non full-screen mode,
Subject: [PATCH 49/73] rendermanager: fix stuttering in non full-screen mode,
squash to add buffering
---
@ -17833,7 +17833,7 @@ index 0506823..b141c80 100644
From d0597caa2c922575efdf081d719d5665c626ffec Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sun, 14 Oct 2012 17:54:02 +0200
Subject: [PATCH 50/72] rendermanager: forgot to set flip event if buffering
Subject: [PATCH 50/73] rendermanager: forgot to set flip event if buffering
is not used
---
@ -17879,7 +17879,7 @@ index b141c80..9290f80 100644
From c485392afa608bfbcf903fa53a9dd824258c96dd Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Fri, 26 Oct 2012 15:30:22 +0200
Subject: [PATCH 51/72] vdpau: fix small mem leak
Subject: [PATCH 51/73] vdpau: fix small mem leak
---
xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 2 ++
@ -17905,7 +17905,7 @@ index d95797b..fec4b88 100644
From 9d7228a84013e409149d7b05d34545d1bdf06e27 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Mon, 29 Oct 2012 18:25:56 +0100
Subject: [PATCH 52/72] xvba: do not render if there is no valid texture
Subject: [PATCH 52/73] xvba: do not render if there is no valid texture
---
xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 8 +++-----
@ -17942,7 +17942,7 @@ index ec3606a..7c3adcb 100644
From 85be082db41b27cdd3824b8360dc021e17a84c22 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Fri, 2 Nov 2012 13:20:03 +0100
Subject: [PATCH 53/72] player: fix rewind
Subject: [PATCH 53/73] player: fix rewind
---
xbmc/cores/dvdplayer/DVDMessage.h | 5 ++++-
@ -18190,7 +18190,7 @@ index 509d5f7..7cddda7 100644
From 024ecda241754f02ad985fab9116e33b06b8d174 Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger@gmail.com>
Date: Fri, 2 Nov 2012 17:56:12 +0100
Subject: [PATCH 54/72] xvba: do not create decoder for surfaces larger than
Subject: [PATCH 54/73] xvba: do not create decoder for surfaces larger than
width 2048 or height 1536
---
@ -18230,7 +18230,7 @@ index e8e376a..b73c48a 100644
From 98ebb0d0232cf4a7ea2082f9f16e210a39e983e8 Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger@gmail.com>
Date: Sun, 4 Nov 2012 16:24:10 +0100
Subject: [PATCH 55/72] xvba: add string for available decoders - we are
Subject: [PATCH 55/73] xvba: add string for available decoders - we are
important so make sure we are there
---
@ -18260,7 +18260,7 @@ index 0cea7a9..6fb74b7 100644
From 84e701f7db6603a2942611d5c74ba645c625ec0d Mon Sep 17 00:00:00 2001
From: fritsch <Peter.Fruehberger@gmail.com>
Date: Thu, 22 Nov 2012 21:32:21 +0100
Subject: [PATCH 56/72] xvba: revisit Artefacts. There are more broken video
Subject: [PATCH 56/73] xvba: revisit Artefacts. There are more broken video
files out there
---
@ -18297,7 +18297,7 @@ index a077442..87af687 100644
From afd776e3e90a1787ce4c3392266d70368de4e164 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Fri, 23 Nov 2012 09:42:02 +0100
Subject: [PATCH 57/72] xvba: reactivate accidently disabled
Subject: [PATCH 57/73] xvba: reactivate accidently disabled
IsDecodingFinished
---
@ -18324,7 +18324,7 @@ index b73c48a..47ff25f 100644
From 37576c15f9e3a0c2dce593e9d9cb5a7863845de7 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Fri, 23 Nov 2012 17:41:12 +0100
Subject: [PATCH 58/72] xrandr: fix query for multiple screens
Subject: [PATCH 58/73] xrandr: fix query for multiple screens
---
xbmc/windowing/X11/XRandR.cpp | 10 ++++++----
@ -18368,7 +18368,7 @@ index cc933b9..533e03d 100644
From bd5d572c69ee254beedb5e9339831652943ea8b4 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sun, 2 Dec 2012 15:46:55 +0100
Subject: [PATCH 59/72] X11: add debug log to print out refresh after xrr
Subject: [PATCH 59/73] X11: add debug log to print out refresh after xrr
event
---
@ -18399,7 +18399,7 @@ index ef83133..76c6362 100644
From d418ae1053a3842eb3e6a3bbd84666a5ee3defe2 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Tue, 11 Dec 2012 11:08:13 +0100
Subject: [PATCH 60/72] X11: dont call XCloseDisplay on shutdown, it crashes
Subject: [PATCH 60/73] X11: dont call XCloseDisplay on shutdown, it crashes
when powered doen by cec on ATI
---
@ -18427,7 +18427,7 @@ index 76c6362..e4e25b2 100644
From 3b700401e9aace50b5ce6c5d7ba2a2e33bb5217f Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Wed, 12 Dec 2012 09:52:17 +0100
Subject: [PATCH 61/72] vdpau: make interop gl default and remove setting,
Subject: [PATCH 61/73] vdpau: make interop gl default and remove setting,
rename and intvert interop yuv
---
@ -18585,7 +18585,7 @@ index 3c19a06..b9f18e4 100644
From a060312a4e236858bf3c9a97d663c5643796b649 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Wed, 12 Dec 2012 18:34:47 +0100
Subject: [PATCH 62/72] vdpau: drop studio level conversion
Subject: [PATCH 62/73] vdpau: drop studio level conversion
---
language/English/strings.po | 6 +-
@ -18771,7 +18771,7 @@ index a4bd524..67aeec9 100644
From 6d03704ce1cbc7d09d684da1ced478b2b59c0b35 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9gory=20Coutant?= <gregory.coutant@gmail.com>
Date: Wed, 12 Dec 2012 19:49:47 +0100
Subject: [PATCH 63/72] x11: support for multiple x screens
Subject: [PATCH 63/73] x11: support for multiple x screens
---
xbmc/windowing/X11/XRandR.cpp | 2 +-
@ -18797,7 +18797,7 @@ index 533e03d..7a16488 100644
From 597c8449084e1e5ebfebfb31db570f7826d06517 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Wed, 12 Dec 2012 20:28:49 +0100
Subject: [PATCH 64/72] vdpau: observe ffmpeg tags for color space
Subject: [PATCH 64/73] vdpau: observe ffmpeg tags for color space
---
xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 38 ++++++++++++++++--------
@ -18904,7 +18904,7 @@ index 4d1559c..471ad68 100644
From 3f9308d76025ef1e31923fa9a06587f75c00f870 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Thu, 20 Dec 2012 19:35:38 +0100
Subject: [PATCH 65/72] fix compile error after recent change
Subject: [PATCH 65/73] fix compile error after recent change
---
xbmc/settings/GUIWindowSettingsCategory.cpp | 2 +-
@ -18930,7 +18930,7 @@ index b9f18e4..cacb32a 100644
From 213792b2678760d42740d581a1ee71e186a31c4d Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Mon, 24 Dec 2012 16:02:42 +0100
Subject: [PATCH 66/72] pvr: increase changes counter of stream on stream
Subject: [PATCH 66/73] pvr: increase changes counter of stream on stream
change, cosmetics after
dd307930d39d92f145a01a16600cd00e01ec39be
@ -18968,7 +18968,7 @@ index 8c984f6..034e545 100644
From e810d3bd68e89e800fba217e88184c2df0fe4040 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Thu, 17 Jan 2013 16:03:22 +0100
Subject: [PATCH 67/72] X11: add keymapping for XF86XK_Sleep
Subject: [PATCH 67/73] X11: add keymapping for XF86XK_Sleep
---
xbmc/windowing/WinEventsX11.cpp | 1 +
@ -18993,7 +18993,7 @@ index c31877e..ed31c04 100644
From 2cb807b2f801f06723cde1bdd636550c08fc08ab Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger@gmail.com>
Date: Sat, 12 Jan 2013 13:03:50 +0100
Subject: [PATCH 68/72] dvdplayer: Allow multithread decoding for hi10p
Subject: [PATCH 68/73] dvdplayer: Allow multithread decoding for hi10p
content by default
This allows decoding of some hi10p material on e.g. AMD Fusion with
@ -19101,7 +19101,7 @@ index aaa4702..863e4f3 100644
From 5e52fa15742e1300ac394738ead4ca2792c4812c Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Mon, 21 Jan 2013 09:00:19 +0100
Subject: [PATCH 69/72] X11: remove toggle full screen after resume
Subject: [PATCH 69/73] X11: remove toggle full screen after resume
---
xbmc/powermanagement/PowerManager.cpp | 5 -----
@ -19130,7 +19130,7 @@ index a5534c9..7e2ddc6 100644
From e8f3e20dfb3bde4434e2aea69b34e22ba1859a31 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Wed, 23 Jan 2013 17:03:02 +0100
Subject: [PATCH 70/72] xrandr: set screen on mode change command
Subject: [PATCH 70/73] xrandr: set screen on mode change command
---
xbmc/windowing/X11/XRandR.cpp | 2 +-
@ -19156,7 +19156,7 @@ index 7a16488..6531ba3 100644
From f229dba603070e1f0528d395c9d5d63f9044ae6e Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Wed, 23 Jan 2013 17:03:39 +0100
Subject: [PATCH 71/72] X11: recreate glx context when output changes
Subject: [PATCH 71/73] X11: recreate glx context when output changes
---
xbmc/windowing/X11/WinSystemX11.cpp | 6 +++---
@ -19210,7 +19210,7 @@ index 0b7c10a..33b1739 100644
From ae08a23a2f4fd78139e2ebca8a4a87ab619feb0b Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sun, 27 Jan 2013 12:10:19 +0100
Subject: [PATCH 72/72] vdpau: switch off de-interlacing on ff
Subject: [PATCH 72/73] vdpau: switch off de-interlacing on ff
---
xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 5 +++--
@ -19235,3 +19235,61 @@ index 8858614..3e21d9d 100644
--
1.7.10
From 1ea917e026e8c5df15de6ce6276cba9e58d09d3d Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sat, 2 Feb 2013 13:17:09 +0100
Subject: [PATCH 73/73] vdpau: fix mp4 part2 decoding, activate by default
---
xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 8 ++------
xbmc/settings/AdvancedSettings.cpp | 2 +-
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
index 3e21d9d..524efae 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
@@ -127,10 +127,9 @@ bool CDecoder::Open(AVCodecContext* avctx, const enum PixelFormat, unsigned int
VdpDecoderProfile profile = 0;
if(avctx->codec_id == CODEC_ID_H264)
profile = VDP_DECODER_PROFILE_H264_HIGH;
-#ifdef VDP_DECODER_PROFILE_MPEG4_PART2_ASP
else if(avctx->codec_id == CODEC_ID_MPEG4)
profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP;
-#endif
+
if(profile)
{
if (!CDVDCodecUtils::IsVP3CompatibleWidth(avctx->coded_width))
@@ -530,13 +529,10 @@ void CDecoder::ReadFormatOf( PixelFormat fmt
vdp_decoder_profile = VDP_DECODER_PROFILE_VC1_ADVANCED;
vdp_chroma_type = VDP_CHROMA_TYPE_420;
break;
-#if (defined PIX_FMT_VDPAU_MPEG4_IN_AVUTIL) && \
- (defined VDP_DECODER_PROFILE_MP)
case PIX_FMT_VDPAU_MPEG4:
- vdp_decoder_profile = VDP_DECOPEG4_PART2_ASP;
+ vdp_decoder_profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP;
vdp_chroma_type = VDP_CHROMA_TYPE_420;
break;
-#endif
default:
vdp_decoder_profile = 0;
vdp_chroma_type = 0;
diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp
index 6a48309..d390ec7 100644
--- a/xbmc/settings/AdvancedSettings.cpp
+++ b/xbmc/settings/AdvancedSettings.cpp
@@ -102,7 +102,7 @@ void CAdvancedSettings::Initialize()
m_videoNonLinStretchRatio = 0.5f;
m_videoEnableHighQualityHwScalers = false;
m_videoAutoScaleMaxFps = 30.0f;
- m_videoAllowMpeg4VDPAU = false;
+ m_videoAllowMpeg4VDPAU = true;
m_videoAllowMpeg4VAAPI = false;
m_videoDisableBackgroundDeinterlace = false;
m_videoCaptureUseOcclusionQuery = -1; //-1 is auto detect
--
1.7.10

View File

@ -0,0 +1,192 @@
From d33a276284356e974dcf14e6c86b74064fb0715f Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sun, 10 Feb 2013 18:38:56 +0100
Subject: [PATCH 1/2] renderer: add buffering - get clock via IPlayer
---
xbmc/cores/IPlayer.h | 2 ++
xbmc/cores/VideoRenderers/RenderManager.cpp | 9 ++++++---
xbmc/cores/VideoRenderers/RenderManager.h | 3 +--
xbmc/cores/dvdplayer/DVDPlayer.cpp | 7 ++++++-
xbmc/cores/dvdplayer/DVDPlayer.h | 2 ++
5 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/xbmc/cores/IPlayer.h b/xbmc/cores/IPlayer.h
index 5ed88d1..f136998 100644
--- a/xbmc/cores/IPlayer.h
+++ b/xbmc/cores/IPlayer.h
@@ -229,6 +229,8 @@ class IPlayer
*/
virtual void GetSubtitleCapabilities(std::vector<int> &subCaps) { subCaps.assign(1,IPC_SUBS_ALL); };
+ virtual double GetClock(double& absolute, bool interpolated = true) {return 0; };
+
protected:
IPlayerCallback& m_callback;
};
diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp
index 9290f80..4664426 100644
--- a/xbmc/cores/VideoRenderers/RenderManager.cpp
+++ b/xbmc/cores/VideoRenderers/RenderManager.cpp
@@ -325,7 +325,7 @@ void CXBMCRenderManager::RenderUpdate(bool clear, DWORD flags, DWORD alpha)
m_presentevent.Set();
}
-unsigned int CXBMCRenderManager::PreInit(CDVDClock *pClock)
+unsigned int CXBMCRenderManager::PreInit()
{
CRetakeLock<CExclusiveLock> lock(m_sharedSection);
@@ -333,7 +333,6 @@ unsigned int CXBMCRenderManager::PreInit(CDVDClock *pClock)
m_presenterr = 0.0;
m_errorindex = 0;
memset(m_errorbuff, 0, sizeof(m_errorbuff));
- m_pClock = pClock;
m_bIsStarted = false;
m_bPauseDrawing = false;
@@ -1045,7 +1044,11 @@ void CXBMCRenderManager::PrepareNextRender()
}
double iClockSleep, iPlayingClock, iCurrentClock;
- iPlayingClock = m_pClock->GetClock(iCurrentClock, false);
+ if (g_application.m_pPlayer)
+ iPlayingClock = g_application.m_pPlayer->GetClock(iCurrentClock, false);
+ else
+ iPlayingClock = iCurrentClock = 0;
+
iClockSleep = m_renderBuffers[idx].pts - iPlayingClock;
if (m_speed)
diff --git a/xbmc/cores/VideoRenderers/RenderManager.h b/xbmc/cores/VideoRenderers/RenderManager.h
index 6746957..b931f7d 100644
--- a/xbmc/cores/VideoRenderers/RenderManager.h
+++ b/xbmc/cores/VideoRenderers/RenderManager.h
@@ -72,7 +72,7 @@ class CXBMCRenderManager
int AddVideoPicture(DVDVideoPicture& picture);
void FlipPage(volatile bool& bStop, double timestamp = 0.0, int source = -1, EFIELDSYNC sync = FS_NONE, int speed = 0);
- unsigned int PreInit(CDVDClock *pClock);
+ unsigned int PreInit();
void UnInit();
bool Flush();
@@ -225,7 +225,6 @@ class CXBMCRenderManager
int m_presentsource;
CEvent m_presentevent;
CEvent m_flushEvent;
- CDVDClock *m_pClock;
OVERLAY::CRenderer m_overlays;
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp
index 9e6e470..d0c7cd2 100644
--- a/xbmc/cores/dvdplayer/DVDPlayer.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp
@@ -463,7 +463,7 @@ bool CDVDPlayer::OpenFile(const CFileItem& file, const CPlayerOptions &options)
m_ready.Reset();
#if defined(HAS_VIDEO_PLAYBACK)
- g_renderManager.PreInit(&m_clock);
+ g_renderManager.PreInit();
#endif
Create();
@@ -4129,3 +4129,8 @@ bool CDVDPlayer::CachePVRStream(void) const
!g_PVRManager.IsPlayingRecording() &&
g_advancedSettings.m_bPVRCacheInDvdPlayer;
}
+
+double CDVDPlayer::GetClock(double& absolute, bool interpolated)
+{
+ return m_clock.GetClock(absolute, interpolated);
+}
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.h b/xbmc/cores/dvdplayer/DVDPlayer.h
index 35bf762..ab73950 100644
--- a/xbmc/cores/dvdplayer/DVDPlayer.h
+++ b/xbmc/cores/dvdplayer/DVDPlayer.h
@@ -254,6 +254,8 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer
virtual bool SwitchChannel(const PVR::CPVRChannel &channel);
virtual bool CachePVRStream(void) const;
+ virtual double GetClock(double& absolute, bool interpolated = true);
+
enum ECacheState
{ CACHESTATE_DONE = 0
, CACHESTATE_FULL // player is filling up the demux queue
--
1.7.10
From 0aff5cdc544caa87fe5e314e5624c07a160ffe61 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sun, 10 Feb 2013 18:40:30 +0100
Subject: [PATCH 2/2] OMXPlayer: adopt to buffering in renderer
---
xbmc/cores/omxplayer/OMXPlayer.cpp | 5 +++++
xbmc/cores/omxplayer/OMXPlayer.h | 2 ++
xbmc/cores/omxplayer/OMXPlayerVideo.cpp | 17 +++++++++++++----
3 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp
index 60aa9ab..1acb9e2 100644
--- a/xbmc/cores/omxplayer/OMXPlayer.cpp
+++ b/xbmc/cores/omxplayer/OMXPlayer.cpp
@@ -4210,4 +4210,9 @@ void COMXPlayer::GetSubtitleCapabilities(std::vector<int> &subCaps)
subCaps.push_back(IPC_SUBS_ALL);
}
+double COMXPlayer::GetClock(double& absolute, bool interpolated)
+{
+ return m_av_clock.GetClock(absolute, interpolated);
+}
+
#endif
diff --git a/xbmc/cores/omxplayer/OMXPlayer.h b/xbmc/cores/omxplayer/OMXPlayer.h
index ca824c2..57fc7a0 100644
--- a/xbmc/cores/omxplayer/OMXPlayer.h
+++ b/xbmc/cores/omxplayer/OMXPlayer.h
@@ -332,6 +332,8 @@ class COMXPlayer : public IPlayer, public CThread, public IDVDPlayer
virtual void GetScalingMethods(std::vector<int> &scalingMethods);
virtual void GetAudioCapabilities(std::vector<int> &audioCaps);
virtual void GetSubtitleCapabilities(std::vector<int> &subCaps);
+
+ virtual double GetClock(double& absolute, bool interpolated = true);
protected:
friend class COMXSelectionStreams;
diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
index 5f3f050..e8ff1aa 100644
--- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
+++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
@@ -452,13 +452,22 @@ void OMXPlayerVideo::Output(int iGroupId, double pts, bool bDropPacket)
m_dropbase = 0.0f;
#endif
- double pts_media = m_av_clock->OMXMediaTime(false, false);
- ProcessOverlays(iGroupId, pts_media);
-
if (!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < (iCurrentClock + iSleepTime + DVD_MSEC_TO_TIME(500)) )
return;
- g_renderManager.FlipPage(CThread::m_bStop, (iCurrentClock + iSleepTime) / DVD_TIME_BASE, -1, FS_NONE);
+ int buffer = g_renderManager.WaitForBuffer(m_bStop);
+ while (buffer < 0 && !CThread::m_bStop)
+ {
+ Sleep(1);
+ buffer = g_renderManager.WaitForBuffer(m_bStop);
+ }
+ if (buffer < 0)
+ return;
+
+ double pts_media = m_av_clock->OMXMediaTime(false, false);
+ ProcessOverlays(iGroupId, pts_media);
+
+ g_renderManager.FlipPage(CThread::m_bStop, pts, -1, FS_NONE, m_speed);
//m_av_clock->WaitAbsoluteClock((iCurrentClock + iSleepTime));
}
--
1.7.10

View File

@ -0,0 +1,75 @@
From bf4d77aeb9ff7c198914031ec0d8268dae0c5973 Mon Sep 17 00:00:00 2001
From: unknown <fernetmenta@online.de>
Date: Fri, 18 Jan 2013 15:16:38 +0100
Subject: [PATCH] multi-screen: fix compilation on windows
---
xbmc/settings/GUIWindowSettingsCategory.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/xbmc/settings/GUIWindowSettingsCategory.cpp b/xbmc/settings/GUIWindowSettingsCategory.cpp
index bb29daa..c468a73 100644
--- a/xbmc/settings/GUIWindowSettingsCategory.cpp
+++ b/xbmc/settings/GUIWindowSettingsCategory.cpp
@@ -525,12 +525,14 @@ void CGUIWindowSettingsCategory::CreateSettings()
FillInRefreshRates(strSetting, g_guiSettings.GetResolution(), false);
continue;
}
+#if defined(HAS_GLX)
else if (strSetting.Equals("videoscreen.monitor"))
{
AddSetting(pSetting, group->GetWidth(), iControlID);
FillInMonitors(strSetting);
continue;
}
+#endif
else if (strSetting.Equals("lookandfeel.skintheme"))
{
AddSetting(pSetting, group->GetWidth(), iControlID);
@@ -1463,6 +1465,7 @@ void CGUIWindowSettingsCategory::OnSettingChanged(BaseSettingControlPtr pSetting
// Cascade
FillInResolutions("videoscreen.resolution", mode, RES_DESKTOP, true);
}
+#if defined(HAS_GLX)
else if (strSetting.Equals("videoscreen.monitor"))
{
CSettingString *pSettingString = (CSettingString *)pSettingControl->GetSetting();
@@ -1477,6 +1480,7 @@ void CGUIWindowSettingsCategory::OnSettingChanged(BaseSettingControlPtr pSetting
FillInResolutions("videoscreen.resolution", mode, RES_DESKTOP, true);
}
}
+#endif
else if (strSetting.Equals("videoscreen.resolution"))
{
RESOLUTION nextRes = (RESOLUTION) g_guiSettings.GetInt("videoscreen.resolution");
@@ -2431,6 +2435,7 @@ DisplayMode CGUIWindowSettingsCategory::FillInScreens(CStdString strSetting, RES
void CGUIWindowSettingsCategory::FillInMonitors(CStdString strSetting)
{
+#if defined(HAS_GLX)
// we expect "videoscreen.monitor" but it might be hidden on some platforms,
// so check that we actually have a visable control.
BaseSettingControlPtr control = GetSetting(strSetting);
@@ -2456,6 +2461,7 @@ void CGUIWindowSettingsCategory::FillInMonitors(CStdString strSetting)
pControl->SetValue(currentMonitor);
g_guiSettings.SetString("videoscreen.monitor", g_settings.m_ResInfo[RES_DESKTOP].strOutput);
}
+#endif
}
@@ -2587,7 +2593,10 @@ void CGUIWindowSettingsCategory::OnRefreshRateChanged(RESOLUTION nextRes)
RESOLUTION lastRes = g_graphicsContext.GetVideoResolution();
bool cancelled = false;
- bool outputChanged = !g_Windowing.IsCurrentOutput(g_guiSettings.GetString("videoscreen.monitor"));
+ bool outputChanged = true;
+#if defined(HAS_GLX)
+ outputChanged = !g_Windowing.IsCurrentOutput(g_guiSettings.GetString("videoscreen.monitor"));
+#endif
g_guiSettings.SetResolution(nextRes);
g_graphicsContext.SetVideoResolution(nextRes, outputChanged);
--
1.7.10

View File

@ -1,28 +1,7 @@
From 76c77d69ad5c08ee3dd0713201d263f50d6593ca Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger@gmail.com>
Date: Fri, 1 Feb 2013 15:33:19 +0100
Subject: [PATCH 1/5] AE: introduce force flag into interface
---
xbmc/cores/AudioEngine/AESinkFactory.cpp | 10 +++++-----
xbmc/cores/AudioEngine/AESinkFactory.h | 2 +-
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 2 +-
xbmc/cores/AudioEngine/Sinks/AESinkALSA.h | 2 +-
xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp | 2 +-
xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h | 2 +-
xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp | 2 +-
xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h | 2 +-
xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp | 2 +-
xbmc/cores/AudioEngine/Sinks/AESinkOSS.h | 2 +-
xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp | 2 +-
xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h | 4 ++--
12 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/xbmc/cores/AudioEngine/AESinkFactory.cpp b/xbmc/cores/AudioEngine/AESinkFactory.cpp
index b066ecd..9917f11 100644
--- a/xbmc/cores/AudioEngine/AESinkFactory.cpp
+++ b/xbmc/cores/AudioEngine/AESinkFactory.cpp
@@ -129,15 +129,15 @@ IAESink *CAESinkFactory::Create(std::string &device, AEAudioFormat &desiredForma
diff -Naur xbmc-12.0.1/xbmc/cores/AudioEngine/AESinkFactory.cpp xbmc-12.0.1.patch/xbmc/cores/AudioEngine/AESinkFactory.cpp
--- xbmc-12.0.1/xbmc/cores/AudioEngine/AESinkFactory.cpp 2013-02-08 00:07:33.000000000 +0100
+++ xbmc-12.0.1.patch/xbmc/cores/AudioEngine/AESinkFactory.cpp 2013-02-09 22:42:48.089803355 +0100
@@ -129,15 +129,15 @@
return NULL;
}
@ -41,7 +20,7 @@ index b066ecd..9917f11 100644
{
#if defined(TARGET_WINDOWS)
ENUMERATE_SINK(DirectSound);
@@ -147,10 +147,10 @@ void CAESinkFactory::EnumerateEx(AESinkInfoList &list)
@@ -147,10 +147,10 @@
ENUMERATE_SINK(AUDIOTRACK);
#elif defined(TARGET_LINUX) || defined(TARGET_FREEBSD)
#if defined(HAS_ALSA)
@ -54,11 +33,10 @@ index b066ecd..9917f11 100644
#endif
}
diff --git a/xbmc/cores/AudioEngine/AESinkFactory.h b/xbmc/cores/AudioEngine/AESinkFactory.h
index 99c53f9..185f562 100644
--- a/xbmc/cores/AudioEngine/AESinkFactory.h
+++ b/xbmc/cores/AudioEngine/AESinkFactory.h
@@ -40,6 +40,6 @@ class CAESinkFactory
diff -Naur xbmc-12.0.1/xbmc/cores/AudioEngine/AESinkFactory.h xbmc-12.0.1.patch/xbmc/cores/AudioEngine/AESinkFactory.h
--- xbmc-12.0.1/xbmc/cores/AudioEngine/AESinkFactory.h 2013-02-08 00:07:33.000000000 +0100
+++ xbmc-12.0.1.patch/xbmc/cores/AudioEngine/AESinkFactory.h 2013-02-09 22:42:48.089803355 +0100
@@ -40,6 +40,6 @@
public:
static void ParseDevice(std::string &device, std::string &driver);
static IAESink *Create(std::string &device, AEAudioFormat &desiredFormat, bool rawPassthrough);
@ -66,234 +44,27 @@ index 99c53f9..185f562 100644
+ static void EnumerateEx(AESinkInfoList &list, bool force = false); /* The force flag can be used to indicate the rescan devices */
};
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index 91218a4..df4098e 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -676,7 +676,7 @@ bool CAESinkALSA::OpenPCMDevice(const std::string &name, const std::string &para
return false;
}
-void CAESinkALSA::EnumerateDevicesEx(AEDeviceInfoList &list)
+void CAESinkALSA::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
{
/* ensure that ALSA has been initialized */
snd_lib_error_set_handler(sndLibErrorHandler);
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h
index db1ba80..c1b1c76 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h
@@ -50,7 +50,7 @@ class CAESinkALSA : public IAESink
virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio);
virtual void Drain ();
- static void EnumerateDevicesEx(AEDeviceInfoList &list);
+ static void EnumerateDevicesEx(AEDeviceInfoList &list, bool force = false);
private:
CAEChannelInfo GetChannelLayout(AEAudioFormat format);
void GetAESParams(const AEAudioFormat format, std::string& params);
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
index e8a7876..8f23b41 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
@@ -236,7 +236,7 @@ void CAESinkAUDIOTRACK::SetVolume(float scale)
m_volume_changed = true;
}
-void CAESinkAUDIOTRACK::EnumerateDevicesEx(AEDeviceInfoList &list)
+void CAESinkAUDIOTRACK::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
{
m_info.m_channels.Reset();
m_info.m_dataFormats.clear();
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h
index 46b3551..bbb7856 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h
@@ -43,7 +43,7 @@ class CAESinkAUDIOTRACK : public CThread, public IAESink
virtual void Drain ();
virtual bool HasVolume ();
virtual void SetVolume (float volume);
- static void EnumerateDevicesEx(AEDeviceInfoList &list);
+ static void EnumerateDevicesEx(AEDeviceInfoList &list, bool force = false);
private:
virtual void Process();
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp
index 4d3d41e..c9680e7 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp
@@ -464,7 +464,7 @@ double CAESinkDirectSound::GetCacheTotal()
return (double)m_dwBufferLen / (double)m_AvgBytesPerSec;
}
-void CAESinkDirectSound::EnumerateDevicesEx(AEDeviceInfoList &deviceInfoList)
+void CAESinkDirectSound::EnumerateDevicesEx(AEDeviceInfoList &deviceInfoList, bool force)
{
CAEDeviceInfo deviceInfo;
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h b/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h
index 9f54090..2e6209b 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h
@@ -43,7 +43,7 @@ class CAESinkDirectSound : public IAESink
virtual double GetCacheTime ();
virtual double GetCacheTotal ();
virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio);
- static void EnumerateDevicesEx (AEDeviceInfoList &deviceInfoList);
+ static void EnumerateDevicesEx (AEDeviceInfoList &deviceInfoList, bool force = false);
private:
void AEChannelsFromSpeakerMask(DWORD speakers);
DWORD SpeakerMaskFromAEChannels(const CAEChannelInfo &channels);
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp
index 06b9a7f..970e236 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp
@@ -427,7 +427,7 @@ void CAESinkOSS::Drain()
// ???
}
-void CAESinkOSS::EnumerateDevicesEx(AEDeviceInfoList &list)
+void CAESinkOSS::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
{
int mixerfd;
const char * mixerdev = "/dev/mixer";
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkOSS.h b/xbmc/cores/AudioEngine/Sinks/AESinkOSS.h
index aa8a9f8..7e2db8b 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkOSS.h
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkOSS.h
@@ -43,7 +43,7 @@ class CAESinkOSS : public IAESink
virtual double GetCacheTotal () { return 0.0; } /* FIXME */
virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio);
virtual void Drain ();
- static void EnumerateDevicesEx(AEDeviceInfoList &list);
+ static void EnumerateDevicesEx(AEDeviceInfoList &list, bool force = false);
private:
int m_fd;
std::string m_device;
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp
index 8475d60..f238d75 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp
@@ -559,7 +559,7 @@ bool CAESinkWASAPI::SoftResume()
return false;
}
-void CAESinkWASAPI::EnumerateDevicesEx(AEDeviceInfoList &deviceInfoList)
+void CAESinkWASAPI::EnumerateDevicesEx(AEDeviceInfoList &deviceInfoList, bool force)
{
IMMDeviceEnumerator* pEnumerator = NULL;
IMMDeviceCollection* pEnumDevices = NULL;
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h
index a0c567a..7111ea9 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h
@@ -45,7 +45,7 @@ class CAESinkWASAPI : public IAESink
virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio);
virtual bool SoftSuspend ();
virtual bool SoftResume ();
- static void EnumerateDevicesEx (AEDeviceInfoList &deviceInfoList);
+ static void EnumerateDevicesEx (AEDeviceInfoList &deviceInfoList, bool force = false);
private:
bool InitializeExclusive(AEAudioFormat &format);
void AEChannelsFromSpeakerMask(DWORD speakers);
@@ -78,4 +78,4 @@ class CAESinkWASAPI : public IAESink
unsigned int m_uiBufferLen; /* wasapi endpoint buffer size, in frames */
double m_avgTimeWaiting; /* time between next buffer of data from SoftAE and driver call for data */
double m_sinkLatency; /* time in seconds of total duration of the two WASAPI buffers */
-};
\ No newline at end of file
+};
--
1.7.10
From 6064764b619a51d5d234d9c83023af6820277dce Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger@gmail.com>
Date: Fri, 1 Feb 2013 15:25:35 +0100
Subject: [PATCH 2/5] AE: (Alsa) Wait for at least one audio output device
when starting up for max 10 seconds
---
xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp | 10 ++++++++++
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 7 ++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
index 410e20c..30da558 100644
--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
@@ -74,7 +74,17 @@
m_outputStageFn (NULL ),
m_streamStageFn (NULL )
{
+ unsigned int c_retry = 5;
CAESinkFactory::EnumerateEx(m_sinkInfoList);
+ while(m_sinkInfoList.size() == 0 && c_retry > 0)
+ {
+ CLog::Log(LOGNOTICE, "No Devices found - retry: %d", c_retry);
+ Sleep(2000);
+ c_retry--;
+ // retry the enumeration
+ CAESinkFactory::EnumerateEx(m_sinkInfoList, true);
+ }
+ CLog::Log(LOGNOTICE, "Found %lu Lists of Devices", m_sinkInfoList.size());
for (AESinkInfoList::iterator itt = m_sinkInfoList.begin(); itt != m_sinkInfoList.end(); ++itt)
{
CLog::Log(LOGNOTICE, "Enumerated %s devices:", itt->m_sinkName.c_str());
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index df4098e..bc91096 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -680,8 +680,13 @@ void CAESinkALSA::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
{
/* ensure that ALSA has been initialized */
snd_lib_error_set_handler(sndLibErrorHandler);
- if(!snd_config)
+ if(!snd_config || force)
+ {
+ if(force)
+ snd_config_update_free_global();
+
snd_config_update();
+ }
snd_config_t *config;
snd_config_copy(&config, snd_config);
--
1.7.10
From 066769f4dd4128232bbcbeb645376ffa8886d263 Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger@gmail.com>
Date: Sat, 2 Feb 2013 11:46:22 +0100
Subject: [PATCH 3/5] AE: Fix suspend / resume with alsa - (Warning: Race
condition AddPackets still to fix)
---
xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp | 138 +++++++++++++++++-----
xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h | 5 +
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 1 -
3 files changed, 111 insertions(+), 33 deletions(-)
diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
index 30da558..36c4d57 100644
--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
diff -Naur xbmc-12.0.1/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
--- xbmc-12.0.1/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp 2013-02-08 00:07:33.000000000 +0100
+++ xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp 2013-02-09 22:42:48.101803299 +0100
@@ -59,6 +59,8 @@
m_audiophile (true ),
m_running (false ),
m_reOpen (false ),
+ m_closeSink (false ),
+ m_realSuspend (false ),
+ m_sinkIsSuspended (false ),
m_isSuspended (false ),
m_softSuspend (false ),
m_softSuspendTimer (0 ),
@@ -85,20 +87,7 @@
CAESinkFactory::EnumerateEx(m_sinkInfoList, true);
}
CLog::Log(LOGNOTICE, "Found %lu Lists of Devices", m_sinkInfoList.size());
@@ -74,21 +76,18 @@
m_outputStageFn (NULL ),
m_streamStageFn (NULL )
{
+ unsigned int c_retry = 5;
CAESinkFactory::EnumerateEx(m_sinkInfoList);
- for (AESinkInfoList::iterator itt = m_sinkInfoList.begin(); itt != m_sinkInfoList.end(); ++itt)
- {
+ while(m_sinkInfoList.size() == 0 && c_retry > 0)
{
- CLog::Log(LOGNOTICE, "Enumerated %s devices:", itt->m_sinkName.c_str());
- int count = 0;
- for (AEDeviceInfoList::iterator itt2 = itt->m_deviceInfoList.begin(); itt2 != itt->m_deviceInfoList.end(); ++itt2)
@ -305,12 +76,18 @@ index 30da558..36c4d57 100644
- while(std::getline(ss, line, '\n'))
- CLog::Log(LOGNOTICE, " %s", line.c_str());
- }
- }
+ CLog::Log(LOGNOTICE, "No Devices found - retry: %d", c_retry);
+ Sleep(2000);
+ c_retry--;
+ // retry the enumeration
+ CAESinkFactory::EnumerateEx(m_sinkInfoList, true);
}
+ CLog::Log(LOGNOTICE, "Found %lu Lists of Devices", m_sinkInfoList.size());
+ PrintSinks();
}
CSoftAE::~CSoftAE()
@@ -189,6 +178,20 @@ void CSoftAE::OpenSink()
@@ -179,6 +178,20 @@
m_wake.Set();
}
@ -331,7 +108,7 @@ index 30da558..36c4d57 100644
/* this must NEVER be called from outside the main thread or Initialization */
void CSoftAE::InternalOpenSink()
{
@@ -315,15 +318,8 @@ void CSoftAE::InternalOpenSink()
@@ -305,15 +318,8 @@
CExclusiveLock sinkLock(m_sinkLock);
reInit = true;
@ -349,7 +126,7 @@ index 30da558..36c4d57 100644
/* get the display name of the device */
GetDeviceFriendlyName(device);
@@ -877,10 +873,19 @@ IAEStream *CSoftAE::FreeStream(IAEStream *stream)
@@ -867,10 +873,17 @@
RemoveStream(m_playingStreams, (CSoftAEStream*)stream);
RemoveStream(m_streams , (CSoftAEStream*)stream);
lock.Leave();
@ -357,11 +134,9 @@ index 30da558..36c4d57 100644
- /* if it was the master stream we need to reopen before deletion */
- if (m_masterStream == stream)
- OpenSink();
+ // Close completely when we go to suspend, reopen as it was old behaviour
+ // m_realSuspend is currently only used on Linux Systems as it is needed
+ // for suspend and resume. Not opening when masterstream stops means
+ // clipping on S/PDIF.
+ if(m_realSuspend)
+ // Close completely when we go to suspend, reopen as it was old behaviour.
+ // Not opening when masterstream stops means clipping on S/PDIF.
+ if(m_isSuspended)
+ {
+ m_closeEvent.Reset();
+ m_closeSink = true;
@ -373,7 +148,7 @@ index 30da558..36c4d57 100644
delete (CSoftAEStream*)stream;
return NULL;
@@ -986,14 +991,52 @@ bool CSoftAE::Suspend()
@@ -976,14 +989,54 @@
CSoftAEStream *stream = *itt;
stream->Flush();
}
@ -388,15 +163,18 @@ index 30da558..36c4d57 100644
+ if(m_sink)
+ {
+ /* Deinitialize and delete current m_sink */
+ // we don't want that Run reopens our device.
+ // This is the only place m_realSuspend gets set true.
+ // If you find another one - please call for help.
+ // First thing when rewriting: kill this flag and make it generic again.
+ m_realSuspend = true;
+ // we don't want that Run reopens our device, so we wait.
+ m_saveSuspend.Reset();
+ // wait until we are looping in ProcessSuspend()
+ m_saveSuspend.Wait();
+ m_sink->Drain();
+ m_sink->Deinitialize();
+ delete m_sink;
+ m_sink = NULL;
+ // signal anybody, that the sink is closed now
+ // this should help us not to run into deadlocks
+ if(m_closeSink)
+ m_closeEvent.Set();
+ }
+ // The device list is now empty and must be reenumerated afterwards.
+ m_sinkInfoList.clear();
@ -409,13 +187,12 @@ index 30da558..36c4d57 100644
{
+#if defined(TARGET_LINUX)
+ // We must make sure, that we don't return empty.
+ if(m_realSuspend || m_sinkInfoList.empty())
+ if(m_isSuspended || m_sinkInfoList.empty())
+ {
+ CLog::Log(LOGDEBUG, "CSoftAE::Resume - Re Enumerating Sinks");
+ CExclusiveLock sinkLock(m_sinkLock);
+ // Forced enumeration - we are sure that we start completely fresh.
+ CAESinkFactory::EnumerateEx(m_sinkInfoList, true);
+ m_realSuspend = false;
+ sinkLock.Leave(); // we leave here explicitly to not lock while printing new sinks
+ PrintSinks();
+ }
@ -426,7 +203,24 @@ index 30da558..36c4d57 100644
m_reOpen = true;
return true;
@@ -1030,6 +1073,12 @@ void CSoftAE::Run()
@@ -1000,6 +1053,16 @@
{
bool restart = false;
+ /* Clean Up what the suspend guy might have forgotten */
+ // ProcessSuspending() cannot guarantee that we get our sink back softresumed
+ // that is a big problem as another thread could start adding packets
+ // this must be checked here, before writing anything on the sinks
+ if(m_sinkIsSuspended)
+ {
+ CLog::Log(LOGDEBUG, "CSoftAE::Run - Someone has forgotten to resume us (device resumed)");
+ m_sink->SoftResume();
+ m_sinkIsSuspended = false;
+ }
if ((this->*m_outputStageFn)(hasAudio) > 0)
hasAudio = false; /* taken some audio - reset our silence flag */
@@ -1020,6 +1083,12 @@
restart = true;
}
@ -439,15 +233,17 @@ index 30da558..36c4d57 100644
/* Handle idle or forced suspend */
ProcessSuspend();
@@ -1040,6 +1089,7 @@ void CSoftAE::Run()
@@ -1028,8 +1097,8 @@
{
CLog::Log(LOGDEBUG, "CSoftAE::Run - Sink restart flagged");
InternalOpenSink();
m_isSuspended = false; // exit Suspend state
- m_isSuspended = false; // exit Suspend state
}
+
#if defined(TARGET_ANDROID)
else if (m_playingStreams.empty()
&& m_playing_sounds.empty()
@@ -1290,6 +1340,24 @@ int CSoftAE::RunTranscodeStage(bool hasAudio)
@@ -1280,6 +1349,24 @@
return encodedFrames;
}
@ -472,113 +268,12 @@ index 30da558..36c4d57 100644
unsigned int CSoftAE::RunRawStreamStage(unsigned int channelCount, void *out, bool &restart)
{
StreamList resumeStreams;
@@ -1424,14 +1492,14 @@ inline void CSoftAE::ProcessSuspend()
/* idle while in Suspend() state until Resume() called */
/* idle if nothing to play and user hasn't enabled */
/* continuous streaming (silent stream) in as.xml */
- while ((m_isSuspended || (m_softSuspend && (curSystemClock > m_softSuspendTimer))) &&
- m_running && !m_reOpen)
+ while (m_realSuspend || ((m_isSuspended || (m_softSuspend && (curSystemClock > m_softSuspendTimer))) &&
+ m_running && !m_reOpen))
{
- if (m_sink && !sinkIsSuspended)
+ if (!m_realSuspend && m_sink && !sinkIsSuspended)
{
/* put the sink in Suspend mode */
CExclusiveLock sinkLock(m_sinkLock);
- if (!m_sink->SoftSuspend())
+ if (m_sink && !m_sink->SoftSuspend())
{
sinkIsSuspended = false; //sink cannot be suspended
m_softSuspend = false; //break suspend loop
@@ -1442,11 +1510,17 @@ inline void CSoftAE::ProcessSuspend()
sinkLock.Leave();
}
@@ -1395,10 +1482,9 @@
+ // make sure that a outer thread does not have to wait forever
+ if(m_closeSink)
+ {
+ InternalCloseSink();
+ }
+
/* idle for platform-defined time */
m_wake.WaitMSec(SOFTAE_IDLE_WAIT_MSEC);
/* check if we need to resume for stream or sound */
- if (!m_isSuspended && (!m_playingStreams.empty() || !m_playing_sounds.empty()))
+ if (!m_realSuspend && !m_isSuspended && (!m_playingStreams.empty() || !m_playing_sounds.empty()))
{
m_reOpen = !m_sink->SoftResume(); // sink returns false if it requires reinit
sinkIsSuspended = false; //sink processing data
diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h
index 56fb417..f3787c9 100644
--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h
+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h
@@ -116,6 +116,7 @@ class CSoftAE : public IThreadedAE
void OpenSink();
void InternalOpenSink();
+ void InternalCloseSink();
void ResetEncoder();
bool SetupEncoder(AEAudioFormat &format);
void Deinitialize();
@@ -136,11 +137,14 @@ class CSoftAE : public IThreadedAE
/* internal vars */
bool m_running, m_reOpen;
+ bool m_closeSink;
+ bool m_realSuspend; /* this flag is needed to unload a sink without calling OpenInternal again */
bool m_isSuspended; /* engine suspended by external function to release audio context */
bool m_softSuspend; /* latches after last stream or sound played for timer below for idle */
unsigned int m_softSuspendTimer; /* time in milliseconds to hold sink open before soft suspend for idle */
CEvent m_reOpenEvent;
CEvent m_wake;
+ CEvent m_closeEvent;
CCriticalSection m_runningLock; /* released when the thread exits */
CCriticalSection m_streamLock; /* m_streams lock */
@@ -242,5 +246,6 @@ class CSoftAE : public IThreadedAE
void RunNormalizeStage (unsigned int channelCount, void *out, unsigned int mixed);
void RemoveStream(StreamList &streams, CSoftAEStream *stream);
+ void PrintSinks();
};
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index bc91096..328593c 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -426,7 +426,6 @@ void CAESinkALSA::Deinitialize()
if (m_pcm)
{
- snd_pcm_drop (m_pcm);
snd_pcm_close(m_pcm);
m_pcm = NULL;
}
--
1.7.10
From bf5dd9592078037faf5a12e1437c8ef3e8eea1d7 Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger@gmail.com>
Date: Tue, 5 Feb 2013 21:17:10 +0100
Subject: [PATCH 4/5] AE: Enable SoftSuspend on Linux (Stop h0gg1ng the sound
device)
---
xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp | 8 +++++---
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 21 +++++++++++++++++++++
xbmc/cores/AudioEngine/Sinks/AESinkALSA.h | 2 ++
3 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
index 36c4d57..ae8a0e4 100644
--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
@@ -1475,8 +1475,7 @@ inline void CSoftAE::ProcessSuspend()
inline void CSoftAE::ProcessSuspend()
{
bool sinkIsSuspended = false;
- bool sinkIsSuspended = false;
+ m_sinkIsSuspended = false;
unsigned int curSystemClock = 0;
-
-#if defined(TARGET_WINDOWS)
@ -586,7 +281,7 @@ index 36c4d57..ae8a0e4 100644
if (!m_softSuspend && m_playingStreams.empty() && m_playing_sounds.empty() &&
!g_advancedSettings.m_streamSilence)
{
@@ -1488,7 +1487,6 @@ inline void CSoftAE::ProcessSuspend()
@@ -1410,37 +1496,54 @@
if (m_softSuspend)
curSystemClock = XbmcThreads::SystemClockMillis();
#endif
@ -594,30 +289,145 @@ index 36c4d57..ae8a0e4 100644
/* idle while in Suspend() state until Resume() called */
/* idle if nothing to play and user hasn't enabled */
/* continuous streaming (silent stream) in as.xml */
@@ -1506,7 +1504,10 @@ inline void CSoftAE::ProcessSuspend()
- while ((m_isSuspended || (m_softSuspend && (curSystemClock > m_softSuspendTimer))) &&
- m_running && !m_reOpen)
+ /* In case of Suspend stay in there until Resume is called from outer thread */
+ while (m_isSuspended || ((m_softSuspend && (curSystemClock > m_softSuspendTimer)) &&
+ m_running && !m_reOpen))
{
- if (m_sink && !sinkIsSuspended)
+ if (!m_isSuspended && m_sink && !m_sinkIsSuspended)
{
/* put the sink in Suspend mode */
CExclusiveLock sinkLock(m_sinkLock);
- if (!m_sink->SoftSuspend())
+ if (m_sink && !m_sink->SoftSuspend())
{
- sinkIsSuspended = false; //sink cannot be suspended
+ m_sinkIsSuspended = false; //sink cannot be suspended
m_softSuspend = false; //break suspend loop
break;
}
else
- sinkIsSuspended = true; //sink has suspended processing
+ {
+ CLog::Log(LOGDEBUG, "Suspended the Sink");
sinkIsSuspended = true; //sink has suspended processing
+ m_sinkIsSuspended = true; //sink has suspended processing
+ }
sinkLock.Leave();
}
+ // Signal that the Suspend can go on now.
+ // Idea: Outer thread calls Suspend() - but
+ // because of AddPackets does not care about locks, we must make
+ // sure, that our school bus (AE::Run) is currently driving through
+ // some gas station, before we move away the sink.
+ if(m_isSuspended)
+ m_saveSuspend.Set();
@@ -1525,6 +1526,7 @@ inline void CSoftAE::ProcessSuspend()
m_reOpen = !m_sink->SoftResume(); // sink returns false if it requires reinit
sinkIsSuspended = false; //sink processing data
m_softSuspend = false; //break suspend loop
/* idle for platform-defined time */
m_wake.WaitMSec(SOFTAE_IDLE_WAIT_MSEC);
- /* check if we need to resume for stream or sound */
+ /* check if we need to resume for stream or sound or somebody wants to open us
+ * the suspend checks are only there to:
+ * a) not run out of softSuspend directly when we are sleeping
+ * b) nail(!) the thread during real Suspend into this method
+ * Note: It is not enough to check the streams buffer, cause it might not be filled yet
+ * We have to check after ProcessSuspending() if the sink is still in softsleep and resume it
+ */
if (!m_isSuspended && (!m_playingStreams.empty() || !m_playing_sounds.empty()))
{
- m_reOpen = !m_sink->SoftResume(); // sink returns false if it requires reinit
- sinkIsSuspended = false; //sink processing data
- m_softSuspend = false; //break suspend loop
+ m_reOpen = m_reOpen || !m_sink->SoftResume(); // sink returns false if it requires reinit
+ m_sinkIsSuspended = false; //sink processing data
+ m_softSuspend = false; //break suspend loop (under some conditions)
+ CLog::Log(LOGDEBUG, "Resumed the Sink");
break;
}
}
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index 328593c..647be04 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -1129,6 +1129,27 @@ bool CAESinkALSA::GetELD(snd_hctl_t *hctl, int device, CAEDeviceInfo& info, bool
diff -Naur xbmc-12.0.1/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h
--- xbmc-12.0.1/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h 2013-02-08 00:07:33.000000000 +0100
+++ xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h 2013-02-09 22:42:48.101803299 +0100
@@ -116,6 +116,7 @@
void OpenSink();
void InternalOpenSink();
+ void InternalCloseSink();
void ResetEncoder();
bool SetupEncoder(AEAudioFormat &format);
void Deinitialize();
@@ -136,11 +137,15 @@
/* internal vars */
bool m_running, m_reOpen;
+ bool m_closeSink;
+ bool m_sinkIsSuspended; /* The sink is in unusable state, e.g. SoftSuspended */
bool m_isSuspended; /* engine suspended by external function to release audio context */
bool m_softSuspend; /* latches after last stream or sound played for timer below for idle */
unsigned int m_softSuspendTimer; /* time in milliseconds to hold sink open before soft suspend for idle */
CEvent m_reOpenEvent;
CEvent m_wake;
+ CEvent m_closeEvent;
+ CEvent m_saveSuspend;
CCriticalSection m_runningLock; /* released when the thread exits */
CCriticalSection m_streamLock; /* m_streams lock */
@@ -242,5 +247,6 @@
void RunNormalizeStage (unsigned int channelCount, void *out, unsigned int mixed);
void RemoveStream(StreamList &streams, CSoftAEStream *stream);
+ void PrintSinks();
};
diff -Naur xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
--- xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2013-02-08 00:07:33.000000000 +0100
+++ xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2013-02-09 22:42:48.101803299 +0100
@@ -426,7 +426,6 @@
if (m_pcm)
{
- snd_pcm_drop (m_pcm);
snd_pcm_close(m_pcm);
m_pcm = NULL;
}
@@ -487,7 +486,13 @@
unsigned int CAESinkALSA::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio)
{
if (!m_pcm)
- return 0;
+ {
+ SoftResume();
+ if(!m_pcm)
+ return 0;
+
+ CLog::Log(LOGDEBUG, "CAESinkALSA - the grAEken is hunger, feed it (I am the downmost fallback - fix your code)");
+ }
int ret;
@@ -676,12 +681,17 @@
return false;
}
-void CAESinkALSA::EnumerateDevicesEx(AEDeviceInfoList &list)
+void CAESinkALSA::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
{
/* ensure that ALSA has been initialized */
snd_lib_error_set_handler(sndLibErrorHandler);
- if(!snd_config)
+ if(!snd_config || force)
+ {
+ if(force)
+ snd_config_update_free_global();
+
snd_config_update();
+ }
snd_config_t *config;
snd_config_copy(&config, snd_config);
@@ -1125,6 +1135,27 @@
return true;
}
@ -645,122 +455,121 @@ index 328593c..647be04 100644
void CAESinkALSA::sndLibErrorHandler(const char *file, int line, const char *function, int err, const char *fmt, ...)
{
va_list arg;
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h
index c1b1c76..c60f840 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h
@@ -49,6 +49,8 @@ class CAESinkALSA : public IAESink
diff -Naur xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h
--- xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h 2013-02-08 00:07:33.000000000 +0100
+++ xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h 2013-02-09 22:42:48.099803309 +0100
@@ -49,8 +49,10 @@
virtual double GetCacheTotal ();
virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio);
virtual void Drain ();
+ virtual bool SoftSuspend();
+ virtual bool SoftResume();
static void EnumerateDevicesEx(AEDeviceInfoList &list, bool force = false);
- static void EnumerateDevicesEx(AEDeviceInfoList &list);
+ static void EnumerateDevicesEx(AEDeviceInfoList &list, bool force = false);
private:
--
1.7.10
From 03be1460010107832a63d53f8d3fd539255ec1ac Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger@gmail.com>
Date: Wed, 6 Feb 2013 09:03:34 +0100
Subject: [PATCH 5/5] AE: Wait until we are in a safe state before further
deinitializing the sink (care for deadlocks)
---
xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp | 39 +++++++++++++++++-----
xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h | 1 +
2 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
index ae8a0e4..343758c 100644
--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
@@ -1006,11 +1006,18 @@ bool CSoftAE::Suspend()
// This is the only place m_realSuspend gets set true.
// If you find another one - please call for help.
// First thing when rewriting: kill this flag and make it generic again.
+ m_saveSuspend.Reset();
m_realSuspend = true;
+ // wait until we are looping in ProcessSuspend()
+ m_saveSuspend.Wait();
m_sink->Drain();
m_sink->Deinitialize();
delete m_sink;
m_sink = NULL;
+ // signal anybody, that the sink is closed now
+ // this should help us not to run into deadlocks
+ if(m_closeSink)
+ m_closeEvent.Set();
}
// The device list is now empty and must be reenumerated afterwards.
m_sinkInfoList.clear();
@@ -1086,6 +1093,13 @@ void CSoftAE::Run()
if (m_reOpen || restart || !m_sink)
{
CLog::Log(LOGDEBUG, "CSoftAE::Run - Sink restart flagged");
+ // ProcessSuspending() cannot guarantee that we get our sink back softresumed
+ if(m_sink && m_softSuspend)
+ {
+ m_sink->SoftResume();
+ m_softSuspend = false;
+ CLog::Log(LOGDEBUG, "CSoftAE::Run - Soft resumed the sink outside");
+ }
InternalOpenSink();
m_isSuspended = false; // exit Suspend state
}
@@ -1510,22 +1524,29 @@ inline void CSoftAE::ProcessSuspend()
}
sinkLock.Leave();
}
-
- // make sure that a outer thread does not have to wait forever
- if(m_closeSink)
- {
- InternalCloseSink();
- }
+ // Signal that the realSuspend can go on now.
+ // Idea: Outer thread calls Suspend() - but
+ // because of AddPackets does not care about locks, we must make
+ // sure, that our school bus (AE::Run) is currently driving through
+ // some gas station, before we move away the sink.
+ if(m_realSuspend)
+ m_saveSuspend.Set();
CAEChannelInfo GetChannelLayout(AEAudioFormat format);
void GetAESParams(const AEAudioFormat format, std::string& params);
diff -Naur xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
--- xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp 2013-02-08 00:07:33.000000000 +0100
+++ xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp 2013-02-09 22:42:48.090803350 +0100
@@ -234,7 +234,7 @@
m_volume_changed = true;
}
/* idle for platform-defined time */
m_wake.WaitMSec(SOFTAE_IDLE_WAIT_MSEC);
-void CAESinkAUDIOTRACK::EnumerateDevicesEx(AEDeviceInfoList &list)
+void CAESinkAUDIOTRACK::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
{
m_info.m_channels.Reset();
m_info.m_dataFormats.clear();
diff -Naur xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h
--- xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h 2013-02-08 00:07:33.000000000 +0100
+++ xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h 2013-02-09 22:43:15.490676456 +0100
@@ -43,7 +43,7 @@
virtual void Drain ();
virtual bool HasVolume ();
virtual void SetVolume (float volume);
- static void EnumerateDevicesEx(AEDeviceInfoList &list);
+ static void EnumerateDevicesEx(AEDeviceInfoList &list, bool force = false);
- /* check if we need to resume for stream or sound */
+ /* check if we need to resume for stream or sound or somebody wants to open us
+ * the suspend checks are only there to:
+ * a) not run out of softSuspend directly when we are sleeping
+ * b) nail(!) the thread during real Suspend into this method
+ * Note: It is not enough to check the streams buffer, cause it might not be filled yet
+ * We have to check after ProcessSuspending() if the sink is still in softsleep and resume it
+ */
if (!m_realSuspend && !m_isSuspended && (!m_playingStreams.empty() || !m_playing_sounds.empty()))
{
- m_reOpen = !m_sink->SoftResume(); // sink returns false if it requires reinit
+ m_reOpen = m_reOpen || !m_sink->SoftResume(); // sink returns false if it requires reinit
sinkIsSuspended = false; //sink processing data
- m_softSuspend = false; //break suspend loop
+ m_softSuspend = false; //break suspend loop (under some conditions)
CLog::Log(LOGDEBUG, "Resumed the Sink");
break;
}
diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h
index f3787c9..9d6399e 100644
--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h
+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h
@@ -145,6 +145,7 @@ class CSoftAE : public IThreadedAE
CEvent m_reOpenEvent;
CEvent m_wake;
CEvent m_closeEvent;
+ CEvent m_saveSuspend;
private:
virtual void Process();
diff -Naur xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp
--- xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp 2013-02-08 00:07:33.000000000 +0100
+++ xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp 2013-02-09 22:42:48.091803346 +0100
@@ -464,7 +464,7 @@
return (double)m_dwBufferLen / (double)m_AvgBytesPerSec;
}
CCriticalSection m_runningLock; /* released when the thread exits */
CCriticalSection m_streamLock; /* m_streams lock */
--
1.7.10
-void CAESinkDirectSound::EnumerateDevicesEx(AEDeviceInfoList &deviceInfoList)
+void CAESinkDirectSound::EnumerateDevicesEx(AEDeviceInfoList &deviceInfoList, bool force)
{
CAEDeviceInfo deviceInfo;
diff -Naur xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h
--- xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h 2013-02-08 00:07:33.000000000 +0100
+++ xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h 2013-02-09 22:43:40.853559163 +0100
@@ -43,7 +43,7 @@
virtual double GetCacheTime ();
virtual double GetCacheTotal ();
virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio);
- static void EnumerateDevicesEx (AEDeviceInfoList &deviceInfoList);
+ static void EnumerateDevicesEx (AEDeviceInfoList &deviceInfoList, bool force = false);
private:
void AEChannelsFromSpeakerMask(DWORD speakers);
DWORD SpeakerMaskFromAEChannels(const CAEChannelInfo &channels);
diff -Naur xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp
--- xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp 2013-02-08 00:07:33.000000000 +0100
+++ xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp 2013-02-09 22:42:48.092803341 +0100
@@ -427,7 +427,7 @@
// ???
}
-void CAESinkOSS::EnumerateDevicesEx(AEDeviceInfoList &list)
+void CAESinkOSS::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
{
int mixerfd;
const char * mixerdev = "/dev/mixer";
diff -Naur xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkOSS.h xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkOSS.h
--- xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkOSS.h 2013-02-08 00:07:33.000000000 +0100
+++ xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkOSS.h 2013-02-09 22:42:48.093803336 +0100
@@ -43,7 +43,7 @@
virtual double GetCacheTotal () { return 0.0; } /* FIXME */
virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio);
virtual void Drain ();
- static void EnumerateDevicesEx(AEDeviceInfoList &list);
+ static void EnumerateDevicesEx(AEDeviceInfoList &list, bool force = false);
private:
int m_fd;
std::string m_device;
diff -Naur xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp
--- xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp 2013-02-08 00:07:33.000000000 +0100
+++ xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp 2013-02-09 22:42:48.093803336 +0100
@@ -559,7 +559,7 @@
return false;
}
-void CAESinkWASAPI::EnumerateDevicesEx(AEDeviceInfoList &deviceInfoList)
+void CAESinkWASAPI::EnumerateDevicesEx(AEDeviceInfoList &deviceInfoList, bool force)
{
IMMDeviceEnumerator* pEnumerator = NULL;
IMMDeviceCollection* pEnumDevices = NULL;
diff -Naur xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h
--- xbmc-12.0.1/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h 2013-02-08 00:07:33.000000000 +0100
+++ xbmc-12.0.1.patch/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h 2013-02-09 22:42:48.094803332 +0100
@@ -45,7 +45,7 @@
virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio);
virtual bool SoftSuspend ();
virtual bool SoftResume ();
- static void EnumerateDevicesEx (AEDeviceInfoList &deviceInfoList);
+ static void EnumerateDevicesEx (AEDeviceInfoList &deviceInfoList, bool force = false);
private:
bool InitializeExclusive(AEAudioFormat &format);
void AEChannelsFromSpeakerMask(DWORD speakers);
@@ -78,4 +78,4 @@
unsigned int m_uiBufferLen; /* wasapi endpoint buffer size, in frames */
double m_avgTimeWaiting; /* time between next buffer of data from SoftAE and driver call for data */
double m_sinkLatency; /* time in seconds of total duration of the two WASAPI buffers */
-};
\ Kein Zeilenumbruch am Dateiende.
+};

View File

@ -0,0 +1,332 @@
From 9abc7d0311a3adc6e83d289d54c3e2d0fffc0d28 Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger@gmail.com>
Date: Sun, 10 Feb 2013 21:49:31 +0100
Subject: [PATCH 1/3] AE: Linux AE - some fixes of yesterday merge (Enumerate
+ Resume)
---
xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
index 96a9a72..20af5a1 100644
--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
@@ -1024,7 +1024,7 @@ bool CSoftAE::Resume()
{
#if defined(TARGET_LINUX)
// We must make sure, that we don't return empty.
- if(m_isSuspended || m_sinkInfoList.empty())
+ if(m_sinkInfoList.empty())
{
CLog::Log(LOGDEBUG, "CSoftAE::Resume - Re Enumerating Sinks");
CExclusiveLock sinkLock(m_sinkLock);
@@ -1095,6 +1095,12 @@ void CSoftAE::Run()
/* if we are told to restart */
if (m_reOpen || restart || !m_sink)
{
+ if(m_sinkIsSuspended && m_sink)
+ {
+ m_reOpen = m_reOpen || m_sink->SoftResume();
+ m_sinkIsSuspended = false;
+ CLog::Log(LOGDEBUG, "CSoftAE::Run - Sink was forgotten");
+ }
CLog::Log(LOGDEBUG, "CSoftAE::Run - Sink restart flagged");
InternalOpenSink();
}
--
1.7.10
From 3dfe32ce310b7543f58572f59c3c9223c38bae20 Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger@gmail.com>
Date: Mon, 11 Feb 2013 00:08:05 +0100
Subject: [PATCH 2/3] AE: in doubt restore old suspend behaviour
---
xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp | 49 +++++++++++++++-------
1 file changed, 33 insertions(+), 16 deletions(-)
diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
index 20af5a1..0f6c6ed 100644
--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
@@ -989,32 +989,50 @@ bool CSoftAE::Suspend()
CSoftAEStream *stream = *itt;
stream->Flush();
}
+ streamLock.Leave();
#if defined(TARGET_LINUX)
/*workaround sinks not playing sound after resume */
StopAllSounds();
- CExclusiveLock sinkLock(m_sinkLock);
- for (AESinkInfoList::iterator itt = m_sinkInfoList.begin(); itt != m_sinkInfoList.end(); ++itt)
- {
- itt->m_deviceInfoList.pop_back();
- }
+ bool ret = true;
if(m_sink)
{
/* Deinitialize and delete current m_sink */
// we don't want that Run reopens our device, so we wait.
m_saveSuspend.Reset();
// wait until we are looping in ProcessSuspend()
- m_saveSuspend.Wait();
- m_sink->Drain();
- m_sink->Deinitialize();
- delete m_sink;
- m_sink = NULL;
- // signal anybody, that the sink is closed now
- // this should help us not to run into deadlocks
- if(m_closeSink)
- m_closeEvent.Set();
+ // this is more save to not come up unclean
+ // we cannot wait forever
+ ret = m_saveSuspend.WaitMSec(500);
+ if(ret)
+ {
+ CLog::Log(LOGDEBUG, "CSoftAE::Suspend - After Event");
+ CExclusiveLock sinkLock(m_sinkLock);
+ // remove all the sinks
+ for (AESinkInfoList::iterator itt = m_sinkInfoList.begin(); itt != m_sinkInfoList.end(); ++itt)
+ {
+ itt->m_deviceInfoList.pop_back();
+ }
+ m_sink->Drain();
+ m_sink->Deinitialize();
+ delete m_sink;
+ m_sink = NULL;
+ }
+ else
+ {
+ CLog::Log(LOGDEBUG, "CSoftAE::Suspend - Unload failed will continue");
+ m_saveSuspend.Reset();
+ }
}
// The device list is now empty and must be reenumerated afterwards.
- m_sinkInfoList.clear();
+ if(ret)
+ m_sinkInfoList.clear();
+
+ // signal anybody, that we are gone now (beware of deadlocks)
+ // we don't unset the fields here, to care for reinit after resume
+ if(m_closeSink)
+ m_closeEvent.Set();
+ if(m_reOpen)
+ m_reOpenEvent.Set();
#endif
return true;
@@ -1378,7 +1396,6 @@ unsigned int CSoftAE::RunRawStreamStage(unsigned int channelCount, void *out, bo
StreamList resumeStreams;
static StreamList::iterator itt;
CSingleLock streamLock(m_streamLock);
-
/* handle playing streams */
for (itt = m_playingStreams.begin(); itt != m_playingStreams.end(); ++itt)
{
--
1.7.10
From 9dfebbdd375a2447f9f0d326a40696885e637520 Mon Sep 17 00:00:00 2001
From: fritsch <peter.fruehberger@gmail.com>
Date: Mon, 11 Feb 2013 03:08:42 +0100
Subject: [PATCH 3/3] AE: Choose indirection when possible. Care for lazy
evaluation
---
xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp | 46 ++++++----------------
xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h | 2 -
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 7 ++--
3 files changed, 16 insertions(+), 39 deletions(-)
diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
index 0f6c6ed..dc01abe 100644
--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp
@@ -59,7 +59,6 @@
m_audiophile (true ),
m_running (false ),
m_reOpen (false ),
- m_closeSink (false ),
m_sinkIsSuspended (false ),
m_isSuspended (false ),
m_softSuspend (false ),
@@ -189,8 +188,6 @@ void CSoftAE::InternalCloseSink()
delete m_sink;
m_sink = NULL;
}
- m_closeSink = false;
- m_closeEvent.Set();
}
/* this must NEVER be called from outside the main thread or Initialization */
void CSoftAE::InternalOpenSink()
@@ -732,7 +729,7 @@ void CSoftAE::PauseStream(CSoftAEStream *stream)
stream->m_paused = true;
streamLock.Leave();
- OpenSink();
+ m_reOpen = true;
}
void CSoftAE::ResumeStream(CSoftAEStream *stream)
@@ -743,7 +740,7 @@ void CSoftAE::ResumeStream(CSoftAEStream *stream)
streamLock.Leave();
m_streamsPlaying = true;
- OpenSink();
+ m_reOpen = true;
}
void CSoftAE::Stop()
@@ -780,7 +777,7 @@ IAEStream *CSoftAE::MakeStream(enum AEDataFormat dataFormat, unsigned int sample
CSoftAEStream *stream = new CSoftAEStream(dataFormat, sampleRate, encodedSampleRate, channelLayout, options);
m_newStreams.push_back(stream);
streamLock.Leave();
-
+ // this is really needed here
OpenSink();
return stream;
}
@@ -873,17 +870,9 @@ IAEStream *CSoftAE::FreeStream(IAEStream *stream)
RemoveStream(m_playingStreams, (CSoftAEStream*)stream);
RemoveStream(m_streams , (CSoftAEStream*)stream);
lock.Leave();
- // Close completely when we go to suspend, reopen as it was old behaviour.
- // Not opening when masterstream stops means clipping on S/PDIF.
- if(m_isSuspended)
- {
- m_closeEvent.Reset();
- m_closeSink = true;
- m_closeEvent.Wait();
- m_wake.Set();
- }
- else if (m_masterStream == stream)
- OpenSink();
+ // Reopen is old behaviour. Not opening when masterstream stops means clipping on S/PDIF.
+ if(!m_isSuspended && (m_masterStream == stream))
+ m_reOpen = true;
delete (CSoftAEStream*)stream;
return NULL;
@@ -1012,10 +1001,7 @@ bool CSoftAE::Suspend()
{
itt->m_deviceInfoList.pop_back();
}
- m_sink->Drain();
- m_sink->Deinitialize();
- delete m_sink;
- m_sink = NULL;
+ InternalCloseSink();
}
else
{
@@ -1029,8 +1015,6 @@ bool CSoftAE::Suspend()
// signal anybody, that we are gone now (beware of deadlocks)
// we don't unset the fields here, to care for reinit after resume
- if(m_closeSink)
- m_closeEvent.Set();
if(m_reOpen)
m_reOpenEvent.Set();
#endif
@@ -1075,10 +1059,10 @@ void CSoftAE::Run()
// ProcessSuspending() cannot guarantee that we get our sink back softresumed
// that is a big problem as another thread could start adding packets
// this must be checked here, before writing anything on the sinks
- if(m_sinkIsSuspended)
+ if(m_sinkIsSuspended && m_sink)
{
CLog::Log(LOGDEBUG, "CSoftAE::Run - Someone has forgotten to resume us (device resumed)");
- m_sink->SoftResume();
+ m_reOpen = !m_sink->SoftResume() || m_reOpen;
m_sinkIsSuspended = false;
}
if ((this->*m_outputStageFn)(hasAudio) > 0)
@@ -1101,12 +1085,6 @@ void CSoftAE::Run()
restart = true;
}
- //we are told to close the sink
- if(m_closeSink)
- {
- InternalCloseSink();
- }
-
/* Handle idle or forced suspend */
ProcessSuspend();
@@ -1115,7 +1093,8 @@ void CSoftAE::Run()
{
if(m_sinkIsSuspended && m_sink)
{
- m_reOpen = m_reOpen || m_sink->SoftResume();
+ // hint for fritsch: remember lazy evaluation
+ m_reOpen = !m_sink->SoftResume() || m_reOpen;
m_sinkIsSuspended = false;
CLog::Log(LOGDEBUG, "CSoftAE::Run - Sink was forgotten");
}
@@ -1505,7 +1484,6 @@ inline void CSoftAE::RemoveStream(StreamList &streams, CSoftAEStream *stream)
inline void CSoftAE::ProcessSuspend()
{
- m_sinkIsSuspended = false;
unsigned int curSystemClock = 0;
#if defined(TARGET_WINDOWS) || defined(TARGET_LINUX)
if (!m_softSuspend && m_playingStreams.empty() && m_playing_sounds.empty() &&
@@ -1563,7 +1541,7 @@ inline void CSoftAE::ProcessSuspend()
*/
if (!m_isSuspended && (!m_playingStreams.empty() || !m_playing_sounds.empty()))
{
- m_reOpen = m_reOpen || !m_sink->SoftResume(); // sink returns false if it requires reinit
+ m_reOpen = !m_sink->SoftResume() || m_reOpen; // sink returns false if it requires reinit (worthless with current implementation)
m_sinkIsSuspended = false; //sink processing data
m_softSuspend = false; //break suspend loop (under some conditions)
CLog::Log(LOGDEBUG, "Resumed the Sink");
diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h
index 559e055..26d5e9c 100644
--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h
+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h
@@ -137,14 +137,12 @@ class CSoftAE : public IThreadedAE
/* internal vars */
bool m_running, m_reOpen;
- bool m_closeSink;
bool m_sinkIsSuspended; /* The sink is in unusable state, e.g. SoftSuspended */
bool m_isSuspended; /* engine suspended by external function to release audio context */
bool m_softSuspend; /* latches after last stream or sound played for timer below for idle */
unsigned int m_softSuspendTimer; /* time in milliseconds to hold sink open before soft suspend for idle */
CEvent m_reOpenEvent;
CEvent m_wake;
- CEvent m_closeEvent;
CEvent m_saveSuspend;
CCriticalSection m_runningLock; /* released when the thread exits */
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index b06d358..985c201 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -1145,15 +1145,16 @@ bool CAESinkALSA::SoftSuspend()
bool CAESinkALSA::SoftResume()
{
// reinit all the clibber
+ bool ret = true; // all fine
if(!m_pcm)
{
if (!snd_config)
snd_config_update();
- Initialize(m_initFormat, m_initDevice);
+ ret = Initialize(m_initFormat, m_initDevice);
}
- //we want that AE loves us again
- return false; // force reinit
+ //we want that AE loves us again - reinit when initialize failed
+ return ret; // force reinit if false
}
void CAESinkALSA::sndLibErrorHandler(const char *file, int line, const char *function, int err, const char *fmt, ...)
--
1.7.10

View File

@ -0,0 +1,68 @@
From 94ea56fc7c14ade6338e00ff67942ebd7b345e01 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Mon, 11 Feb 2013 11:38:26 +0000
Subject: [PATCH] [rbp] Fix for broken ASS subtitles.
The video fifo patch broke some types of subtitles including ASS.
This keeps closer track of when the sleep time would have ended and calls FlipPage at the appropriate time.
I've also removed the 500ms in the sleep time calculation as that makes the subs render 500ms late. Not sure what its purpose was.
---
xbmc/cores/omxplayer/OMXPlayerVideo.cpp | 19 +++++++++++++++----
xbmc/cores/omxplayer/OMXPlayerVideo.h | 1 +
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
index 4dec28a..ec7e7f6 100644
--- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
+++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
@@ -124,6 +124,7 @@ bool OMXPlayerVideo::OpenStream(CDVDStreamInfo &hints)
m_started = false;
m_stalled = m_messageQueue.GetPacketCount(CDVDMsg::DEMUXER_PACKET) == 0;
m_autosync = 1;
+ m_iSleepEndTime = DVD_NOPTS_VALUE;
m_audio_count = m_av_clock->HasAudio();
@@ -452,13 +453,23 @@ void OMXPlayerVideo::Output(int iGroupId, double pts, bool bDropPacket)
m_dropbase = 0.0f;
#endif
- double pts_media = m_av_clock->OMXMediaTime(false, false);
- ProcessOverlays(iGroupId, pts_media);
+ // DVDPlayer sleeps until m_iSleepEndTime here before calling FlipPage.
+ // Video playback in asynchronous in OMXPlayer, so we don't want to do that here, as it prevents the video fifo from being kept full.
+ // So, we keep track of when FlipPage would have been called on DVDPlayer and return early if it is not time.
+ // m_iSleepEndTime == DVD_NOPTS_VALUE means we are not waiting to call FlipPage, otherwise it is the time we want to call FlipPage
+ if (m_iSleepEndTime == DVD_NOPTS_VALUE) {
+ m_iSleepEndTime = iCurrentClock + iSleepTime;
+ }
- if (!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < (iCurrentClock + iSleepTime + DVD_MSEC_TO_TIME(500)) )
+ if (!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < m_iSleepEndTime)
return;
- g_renderManager.FlipPage(CThread::m_bStop, (iCurrentClock + iSleepTime) / DVD_TIME_BASE, -1, FS_NONE);
+ m_iSleepEndTime = DVD_NOPTS_VALUE;
+
+ double pts_media = m_av_clock->OMXMediaTime(false, false);
+ ProcessOverlays(iGroupId, pts_media);
+
+ g_renderManager.FlipPage(CThread::m_bStop, pts_media / DVD_TIME_BASE, -1, FS_NONE);
//m_av_clock->WaitAbsoluteClock((iCurrentClock + iSleepTime));
}
diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.h b/xbmc/cores/omxplayer/OMXPlayerVideo.h
index 3fd643e..cf05c1f 100644
--- a/xbmc/cores/omxplayer/OMXPlayerVideo.h
+++ b/xbmc/cores/omxplayer/OMXPlayerVideo.h
@@ -49,6 +49,7 @@ class OMXPlayerVideo : public CThread
bool m_open;
CDVDStreamInfo m_hints;
double m_iCurrentPts;
+ double m_iSleepEndTime;
OMXClock *m_av_clock;
COMXVideo m_omxVideo;
float m_fFrameRate;
--
1.7.10

View File

@ -0,0 +1,34 @@
From d1196435876904453d49b93ce5cefa6903489162 Mon Sep 17 00:00:00 2001
From: Martijn Kaijser <mcm.kaijser@gmail.com>
Date: Wed, 30 Jan 2013 19:30:47 +0100
Subject: [PATCH] [visualizations] fix crash in goom fixes #12584
---
xbmc/visualizations/Goom/goom2k4-0/src/mmx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xbmc/visualizations/Goom/goom2k4-0/src/mmx.c b/xbmc/visualizations/Goom/goom2k4-0/src/mmx.c
index fdf0649..8effa52 100644
--- a/xbmc/visualizations/Goom/goom2k4-0/src/mmx.c
+++ b/xbmc/visualizations/Goom/goom2k4-0/src/mmx.c
@@ -91,7 +91,7 @@ void zoom_filter_mmx (int prevX, int prevY,
"punpckhbw %%mm7, %%mm5 \n\t" /* 00-c4-00-c4-00-c4-00-c4 */
/* ajouter la longueur de ligne a esi */
- "addl 8(%%ebp),%1 \n\t"
+ "addl %4,%1 \n\t"
/* recuperation des 2 derniers pixels */
"movq (%3,%1,4), %%mm1 \n\t"
@@ -115,7 +115,7 @@ void zoom_filter_mmx (int prevX, int prevY,
"movd %%mm0,%0 \n\t"
:"=g"(expix2[loop])
- :"r"(pos),"r"(coeffs),"r"(expix1)
+ :"r"(pos),"r"(coeffs),"r"(expix1),"r"(prevX)
);
--
1.7.10

View File

@ -30,7 +30,7 @@ mkdir -p $INSTALL/usr/lib
rm -rf $INSTALL/usr/lib/libiptc.so*T
mkdir -p $INSTALL/usr/lib/xtables
cp -P $PKG_BUILD/extensions/*.so $INSTALL/usr/lib/xtables
cp -P $PKG_BUILD/extensions/.libs/*.so* $INSTALL/usr/lib/xtables
mkdir -p $INSTALL/usr/sbin
cp -P $PKG_BUILD/iptables/.libs/xtables-multi $INSTALL/usr/sbin

View File

@ -19,7 +19,7 @@
################################################################################
PKG_NAME="openssl"
PKG_VERSION="1.0.1c"
PKG_VERSION="1.0.1e"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="OSS"

View File

@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.21.0
# Tue Jan 22 03:01:53 2013
# Fri Feb 8 17:06:15 2013
#
CONFIG_HAVE_DOT_CONFIG=y
@ -920,7 +920,7 @@ CONFIG_PS=y
CONFIG_FEATURE_PS_TIME=y
CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y
# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
# CONFIG_RENICE is not set
CONFIG_RENICE=y
CONFIG_BB_SYSCTL=y
CONFIG_FEATURE_SHOW_THREADS=y
# CONFIG_WATCH is not set

View File

@ -25,12 +25,21 @@
(
progress "Starting Syslog daemon"
if [ -f /storage/.config/syslog.conf ]; then
syslogd -f /storage/.config/syslog.conf
else
syslogd
source /var/config/settings.conf
SYSLOGD_OPTIONS="-L"
if [ "$SYSLOG_REMOTE" == "true" -a "$SYSLOG_SERVER" ]; then
SYSLOGD_OPTIONS="$SYSLOGD_OPTIONS -R $SYSLOG_SERVER"
fi
if [ -f /storage/.config/syslog.conf ]; then
SYSLOGD_OPTIONS="$SYSLOGD_OPTIONS -f /storage/.config/syslog.conf"
fi
syslogd $SYSLOGD_OPTIONS
progress "Starting Kernellog daemon"
klogd
)&