mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge branch 'master' of github.com:OpenELEC/OpenELEC.tv into openelec-settings
This commit is contained in:
commit
3ee0d9521c
@ -20,7 +20,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="CouchPotatoServer"
|
||||
PKG_VERSION="811f35b"
|
||||
PKG_VERSION="a49a00a"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
|
2
packages/3rdparty/download/SickBeard/meta
vendored
2
packages/3rdparty/download/SickBeard/meta
vendored
@ -20,7 +20,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="SickBeard"
|
||||
PKG_VERSION="6cb5e76"
|
||||
PKG_VERSION="4e57625"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
|
@ -1,3 +1,8 @@
|
||||
3.0.4
|
||||
- update to SickBeard-4e57625
|
||||
- update to CouchPotatoServer-a49a00a
|
||||
- fix keep awake option
|
||||
|
||||
3.0.3
|
||||
- update to SABnzbd-0.7.11
|
||||
- update to CouchPotatoServer-811f35b
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
PKG_NAME="SABnzbd-Suite"
|
||||
PKG_VERSION="3.0"
|
||||
PKG_REV="3"
|
||||
PKG_REV="4"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.openelec.tv"
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp $PKG_BUILD/daemon/transmission-daemon $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp $PKG_BUILD/daemon/transmission-remote $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/web
|
||||
cp -R $PKG_BUILD/web/* $ADDON_BUILD/$PKG_ADDON_ID/web
|
||||
|
@ -134,9 +134,9 @@ mkdir -p $ADDON_HOME
|
||||
fi
|
||||
if [ "$PRELOAD_CAPMT_CA" == "true" ] ; then
|
||||
logger -t Tvheadend "### Preloading capmt_ca.so library ###"
|
||||
LD_PRELOAD=$ADDON_DIR/bin/capmt_ca.so exec $ADDON_BIN $TVHEADEND_ARG &>$LOG_FILE
|
||||
LD_PRELOAD=$ADDON_DIR/bin/capmt_ca.so $ADDON_BIN $TVHEADEND_ARG &>$LOG_FILE
|
||||
else
|
||||
exec $ADDON_BIN $TVHEADEND_ARG &>$LOG_FILE
|
||||
$ADDON_BIN $TVHEADEND_ARG &>$LOG_FILE
|
||||
fi
|
||||
done &
|
||||
fi
|
||||
|
@ -1,3 +1,6 @@
|
||||
3.0.7
|
||||
- update to oscam-8357
|
||||
|
||||
3.0.6
|
||||
- update to oscam-8334
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="oscam"
|
||||
PKG_VERSION="8334"
|
||||
PKG_REV="6"
|
||||
PKG_VERSION="8357"
|
||||
PKG_REV="7"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.streamboard.tv/oscam/wiki"
|
||||
|
@ -91,7 +91,7 @@ if [ ! "$(pidof oscam)" ]; then
|
||||
# use ". " because of variable export
|
||||
. $driver_dvb
|
||||
done
|
||||
LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" exec oscam $OSCAM_ARG > /dev/null 2>&1
|
||||
LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" oscam $OSCAM_ARG > /dev/null 2>&1
|
||||
sleep 1
|
||||
done &
|
||||
fi
|
||||
|
@ -1,12 +1,13 @@
|
||||
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)
|
||||
From 91e42790dd0a9489a94e3784d220d76ad2d98b36 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Sat, 16 Feb 2013 18:29:59 +0200
|
||||
Subject: [PATCH] Add workaround for conflicting IEC958 controls for HD-audio
|
||||
|
||||
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.
|
||||
be wrong. For avoiding this conflict, the recent kernel code (3.9 and
|
||||
3.8 stable) moves the IEC958 controls of an SPDIF with index=16 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
|
||||
@ -15,21 +16,21 @@ 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>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/conf/cards/HDA-Intel.conf | 16 ++++++++++++++++
|
||||
src/control/setup.c | 19 ++++++++++++++++---
|
||||
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
|
||||
index d4f2667..3957c12 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
|
||||
+ index 16
|
||||
+ optional true
|
||||
+ lock true
|
||||
+ preserve true
|
||||
@ -37,7 +38,7 @@ index d4f2667..55fb624 100644
|
||||
+ }
|
||||
+ {
|
||||
+ name "IEC958 Playback Switch"
|
||||
+ device 1
|
||||
+ index 16
|
||||
+ optional true
|
||||
+ value true
|
||||
+ # if this element is present, skip the rest
|
||||
@ -49,7 +50,7 @@ index d4f2667..55fb624 100644
|
||||
preserve true
|
||||
value [ $AES0 $AES1 $AES2 $AES3 ]
|
||||
diff --git a/src/control/setup.c b/src/control/setup.c
|
||||
index bd3599d..f23bf2c 100644
|
||||
index eecda45..72facb0 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,
|
||||
@ -61,7 +62,7 @@ index bd3599d..f23bf2c 100644
|
||||
{
|
||||
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
|
||||
@@ -409,6 +409,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;
|
||||
@ -69,8 +70,8 @@ index bd3599d..f23bf2c 100644
|
||||
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;
|
||||
@@ -516,6 +517,13 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da
|
||||
free(tmp);
|
||||
continue;
|
||||
}
|
||||
+ if (strcmp(id, "skip_rest") == 0) {
|
||||
@ -83,9 +84,9 @@ index bd3599d..f23bf2c 100644
|
||||
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
|
||||
@@ -564,6 +572,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));
|
||||
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)
|
||||
@ -93,7 +94,7 @@ index bd3599d..f23bf2c 100644
|
||||
}
|
||||
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
|
||||
@@ -619,7 +630,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;
|
||||
@ -102,7 +103,7 @@ index bd3599d..f23bf2c 100644
|
||||
|
||||
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
|
||||
@@ -639,11 +650,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);
|
||||
@ -118,5 +119,5 @@ index bd3599d..f23bf2c 100644
|
||||
*sctl = h;
|
||||
return 0;
|
||||
--
|
||||
1.7.12.2
|
||||
1.7.10
|
||||
|
@ -1,37 +0,0 @@
|
||||
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
|
||||
|
139
packages/linux/patches/3.7.8/linux-990.04-hda-Fix-broken-workaround-for-HDMI-SPDIF-confli.patch
vendored
Normal file
139
packages/linux/patches/3.7.8/linux-990.04-hda-Fix-broken-workaround-for-HDMI-SPDIF-confli.patch
vendored
Normal file
@ -0,0 +1,139 @@
|
||||
From ea9b43addc4d90ca5b029f47f85ca152320a1e8d Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Tue, 12 Feb 2013 17:02:41 +0100
|
||||
Subject: [PATCH] ALSA: hda - Fix broken workaround for HDMI/SPDIF conflicts
|
||||
|
||||
The commit [dcda58061: ALSA: hda - Add workaround for conflicting
|
||||
IEC958 controls] introduced a workaround for cards that have both
|
||||
SPDIF and HDMI devices for giving device=1 to SPDIF control elements.
|
||||
It turned out, however, that this workaround doesn't work well -
|
||||
|
||||
- The workaround checks only conflicts in a single codec, but SPDIF
|
||||
and HDMI are provided by multiple codecs in many cases, and
|
||||
|
||||
- ALSA mixer abstraction doesn't care about the device number in ctl
|
||||
elements, thus you'll get errors from amixer such as
|
||||
% amixer scontrols -c 0
|
||||
ALSA lib simple_none.c:1551:(simple_add1) helem (MIXER,'IEC958
|
||||
Playback Switch',0,1,0) appears twice or more
|
||||
amixer: Mixer hw:0 load error: Invalid argument
|
||||
|
||||
This patch fixes the previous broken workaround. Instead of changing
|
||||
the device number of SPDIF ctl elements, shift the element indices of
|
||||
such controls up to 16. Also, the conflict check is performed over
|
||||
all codecs found on the bus.
|
||||
|
||||
HDMI devices will be put to dev=0,index=0 as before. Only the
|
||||
conflicting SPDIF device is moved to a different place. The new place
|
||||
of SPDIF device is supposed by the updated alsa-lib HDA-Intel.conf,
|
||||
respectively.
|
||||
|
||||
Reported-by: Stephan Raue <stephan@openelec.tv>
|
||||
Reported-by: Anssi Hannula <anssi.hannula@iki.fi>
|
||||
Cc: <stable@vger.kernel.org> [v3.8]
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/pci/hda/hda_codec.c | 43 +++++++++++++++++++++----------------------
|
||||
sound/pci/hda/hda_codec.h | 3 ++-
|
||||
2 files changed, 23 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
|
||||
index e80f835..04b5738 100644
|
||||
--- a/sound/pci/hda/hda_codec.c
|
||||
+++ b/sound/pci/hda/hda_codec.c
|
||||
@@ -2332,11 +2332,12 @@ struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec,
|
||||
EXPORT_SYMBOL_HDA(snd_hda_find_mixer_ctl);
|
||||
|
||||
static int find_empty_mixer_ctl_idx(struct hda_codec *codec, const char *name,
|
||||
- int dev)
|
||||
+ int start_idx)
|
||||
{
|
||||
- int idx;
|
||||
- for (idx = 0; idx < 16; idx++) { /* 16 ctlrs should be large enough */
|
||||
- if (!find_mixer_ctl(codec, name, dev, idx))
|
||||
+ int i, idx;
|
||||
+ /* 16 ctlrs should be large enough */
|
||||
+ for (i = 0, idx = start_idx; i < 16; i++, idx++) {
|
||||
+ if (!find_mixer_ctl(codec, name, 0, idx))
|
||||
return idx;
|
||||
}
|
||||
return -EBUSY;
|
||||
@@ -3305,30 +3306,29 @@ int snd_hda_create_dig_out_ctls(struct hda_codec *codec,
|
||||
int err;
|
||||
struct snd_kcontrol *kctl;
|
||||
struct snd_kcontrol_new *dig_mix;
|
||||
- int idx, dev = 0;
|
||||
- const int spdif_pcm_dev = 1;
|
||||
+ int idx = 0;
|
||||
+ const int spdif_index = 16;
|
||||
struct hda_spdif_out *spdif;
|
||||
+ struct hda_bus *bus = codec->bus;
|
||||
|
||||
- if (codec->primary_dig_out_type == HDA_PCM_TYPE_HDMI &&
|
||||
+ if (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 &&
|
||||
+ idx = spdif_index;
|
||||
+ } else if (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;
|
||||
- }
|
||||
+ /* suppose a single SPDIF device */
|
||||
+ for (dig_mix = dig_mixes; dig_mix->name; dig_mix++) {
|
||||
+ kctl = find_mixer_ctl(codec, dig_mix->name, 0, 0);
|
||||
+ if (!kctl)
|
||||
+ break;
|
||||
+ kctl->id.index = spdif_index;
|
||||
}
|
||||
- codec->primary_dig_out_type = HDA_PCM_TYPE_HDMI;
|
||||
+ bus->primary_dig_out_type = HDA_PCM_TYPE_HDMI;
|
||||
}
|
||||
- if (!codec->primary_dig_out_type)
|
||||
- codec->primary_dig_out_type = type;
|
||||
+ if (!bus->primary_dig_out_type)
|
||||
+ bus->primary_dig_out_type = type;
|
||||
|
||||
- idx = find_empty_mixer_ctl_idx(codec, "IEC958 Playback Switch", dev);
|
||||
+ idx = find_empty_mixer_ctl_idx(codec, "IEC958 Playback Switch", idx);
|
||||
if (idx < 0) {
|
||||
printk(KERN_ERR "hda_codec: too many IEC958 outputs\n");
|
||||
return -EBUSY;
|
||||
@@ -3338,7 +3338,6 @@ int snd_hda_create_dig_out_ctls(struct hda_codec *codec,
|
||||
kctl = snd_ctl_new1(dig_mix, codec);
|
||||
if (!kctl)
|
||||
return -ENOMEM;
|
||||
- kctl->id.device = dev;
|
||||
kctl->id.index = idx;
|
||||
kctl->private_value = codec->spdif_out.used - 1;
|
||||
err = snd_hda_ctl_add(codec, associated_nid, kctl);
|
||||
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
|
||||
index e8c9442..23ca172 100644
|
||||
--- a/sound/pci/hda/hda_codec.h
|
||||
+++ b/sound/pci/hda/hda_codec.h
|
||||
@@ -679,6 +679,8 @@ 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 */
|
||||
+
|
||||
+ int primary_dig_out_type; /* primary digital out PCM type */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -846,7 +848,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
|
||||
|
@ -1,94 +0,0 @@
|
||||
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
|
||||
|
76
packages/linux/patches/3.7.8/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch
vendored
Normal file
76
packages/linux/patches/3.7.8/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
From a6024295fd3290a8c9c5519a03316081ee82378a Mon Sep 17 00:00:00 2001
|
||||
From: Anssi Hannula <anssi.hannula@iki.fi>
|
||||
Date: Sat, 16 Feb 2013 17:42:46 +0200
|
||||
Subject: [PATCH] ALSA: hda - Avoid outputting HDMI audio before prepare() and
|
||||
after close()
|
||||
|
||||
Some HDMI codecs (at least NVIDIA 0x10de000b:0x10de0101:0x100100) start
|
||||
transmitting an empty audio stream as soon as PIN_OUT and AC_DIG1_ENABLE
|
||||
are enabled.
|
||||
|
||||
Since commit 6169b673618bf0b2518ce413b54925782a603f06 ("ALSA: hda -
|
||||
Always turn on pins for HDMI/DP") this happens at first open() time, and
|
||||
will continue even after close().
|
||||
|
||||
Additionally, some codecs (at least Intel PantherPoint HDMI) currently
|
||||
continue transmitting HDMI audio even after close() in case some actual
|
||||
audio was output after open() (this happens regardless of PIN_OUT).
|
||||
|
||||
Empty HDMI audio transmission when not intended has the effect that a
|
||||
possible HDMI audio sink/receiver may prefer the empty HDMI audio stream
|
||||
over an actual audio stream on its S/PDIF inputs.
|
||||
|
||||
To avoid the issue before first prepare(), set stream format to 0 on
|
||||
codec initialization. 0 is not a valid format value for HDMI and will
|
||||
prevent the audio stream from being output.
|
||||
|
||||
Additionally, at close() time, make sure that the stream is cleaned up.
|
||||
This will ensure that the format is reset to 0 at that time, preventing
|
||||
audio from being output in that case.
|
||||
|
||||
Thanks to OpenELEC developers and users for their help in investigating
|
||||
this issue on the affected NVIDIA "ION2" hardware. Testing of the final
|
||||
version on NVIDIA ION2 was done by OpenELEC user "MrXIII". Testing on
|
||||
Intel PantherPoint was done by myself.
|
||||
|
||||
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
|
||||
Cc: stable@vger.kernel.org
|
||||
---
|
||||
sound/pci/hda/patch_hdmi.c | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
|
||||
index 807a2aa..bcb83c7 100644
|
||||
--- a/sound/pci/hda/patch_hdmi.c
|
||||
+++ b/sound/pci/hda/patch_hdmi.c
|
||||
@@ -1253,6 +1253,14 @@ static int hdmi_add_cvt(struct hda_codec *codec, hda_nid_t cvt_nid)
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
+ /*
|
||||
+ * Some HDMI codecs (at least NVIDIA 0x10de000b:0x10de0101:0x100100)
|
||||
+ * start transmitting an empty audio stream as soon as PIN_OUT and
|
||||
+ * AC_DIG1_ENABLE are enabled, which happens at open() time.
|
||||
+ * To avoid that, set format to 0, which is not valid for HDMI.
|
||||
+ */
|
||||
+ snd_hda_codec_write(codec, cvt_nid, 0, AC_VERB_SET_STREAM_FORMAT, 0);
|
||||
+
|
||||
spec->num_cvts++;
|
||||
|
||||
return 0;
|
||||
@@ -1372,6 +1380,12 @@ static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
|
||||
struct hdmi_spec_per_pin *per_pin;
|
||||
|
||||
if (hinfo->nid) {
|
||||
+ /*
|
||||
+ * Make sure no empty audio is output after this point by
|
||||
+ * setting stream format to 0, which is not valid for HDMI.
|
||||
+ */
|
||||
+ __snd_hda_codec_cleanup_stream(codec, hinfo->nid, 1);
|
||||
+
|
||||
cvt_idx = cvt_nid_to_cvt_index(spec, hinfo->nid);
|
||||
if (snd_BUG_ON(cvt_idx < 0))
|
||||
return -EINVAL;
|
||||
--
|
||||
1.7.10
|
||||
|
@ -1,93 +0,0 @@
|
||||
From 09c206b7ee18b50d81916697150bd510f198716d Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Saraev <stefan@saraev.ca>
|
||||
Date: Fri, 15 Feb 2013 20:19:48 +0200
|
||||
Subject: [PATCH] hda: fix broken audio over optical on alc662+
|
||||
|
||||
original commit:
|
||||
|
||||
> commit 2626d16bbdedcd64c6af3c519aecd5a6f2356e58
|
||||
> Author: Takashi Iwai <tiwai@suse.de>
|
||||
> Date: Fri Dec 14 10:22:35 2012 +0100
|
||||
>
|
||||
> ALSA: hda - Always turn on pins for HDMI/DP
|
||||
>
|
||||
> commit 6169b673618bf0b2518ce413b54925782a603f06 upstream.
|
||||
>
|
||||
> We've seen the broken HDMI *video* output on some machines with GM965,
|
||||
> and the debugging session pointed that the culprit is the disabled
|
||||
> audio output pins. Toggling these pins dynamically on demand caused
|
||||
> flickering of HDMI TV.
|
||||
>
|
||||
> This patch changes the behavior to keep the pin ON constantly.
|
||||
>
|
||||
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=51421
|
||||
>
|
||||
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
for now we revert the above commit, until we have a propper fix
|
||||
---
|
||||
sound/pci/hda/patch_hdmi.c | 18 ++++++++++++++----
|
||||
1 files changed, 14 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
|
||||
index 791ef80..2587119 100644
|
||||
--- a/sound/pci/hda/patch_hdmi.c
|
||||
+++ b/sound/pci/hda/patch_hdmi.c
|
||||
@@ -431,11 +431,9 @@ static void hdmi_init_pin(struct hda_codec *codec, hda_nid_t pin_nid)
|
||||
if (get_wcaps(codec, pin_nid) & AC_WCAP_OUT_AMP)
|
||||
snd_hda_codec_write(codec, pin_nid, 0,
|
||||
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
|
||||
- /* Enable pin out: some machines with GM965 gets broken output when
|
||||
- * the pin is disabled or changed while using with HDMI
|
||||
- */
|
||||
+ /* Disable pin out until stream is active*/
|
||||
snd_hda_codec_write(codec, pin_nid, 0,
|
||||
- AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
|
||||
+ AC_VERB_SET_PIN_WIDGET_CONTROL, 0);
|
||||
}
|
||||
|
||||
static int hdmi_get_channel_count(struct hda_codec *codec, hda_nid_t cvt_nid)
|
||||
@@ -1343,6 +1341,7 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
|
||||
struct hdmi_spec *spec = codec->spec;
|
||||
int pin_idx = hinfo_to_pin_index(spec, hinfo);
|
||||
hda_nid_t pin_nid = spec->pins[pin_idx].pin_nid;
|
||||
+ int pinctl;
|
||||
bool non_pcm;
|
||||
|
||||
non_pcm = check_non_pcm_per_cvt(codec, cvt_nid);
|
||||
@@ -1351,6 +1350,11 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
|
||||
|
||||
hdmi_setup_audio_infoframe(codec, pin_idx, non_pcm, substream);
|
||||
|
||||
+ pinctl = snd_hda_codec_read(codec, pin_nid, 0,
|
||||
+ AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
|
||||
+ snd_hda_codec_write(codec, pin_nid, 0,
|
||||
+ AC_VERB_SET_PIN_WIDGET_CONTROL, pinctl | PIN_OUT);
|
||||
+
|
||||
return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format);
|
||||
}
|
||||
|
||||
@@ -1370,6 +1374,7 @@ static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
|
||||
int cvt_idx, pin_idx;
|
||||
struct hdmi_spec_per_cvt *per_cvt;
|
||||
struct hdmi_spec_per_pin *per_pin;
|
||||
+ int pinctl;
|
||||
|
||||
if (hinfo->nid) {
|
||||
cvt_idx = cvt_nid_to_cvt_index(spec, hinfo->nid);
|
||||
@@ -1386,6 +1391,11 @@ static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
|
||||
return -EINVAL;
|
||||
per_pin = &spec->pins[pin_idx];
|
||||
|
||||
+ pinctl = snd_hda_codec_read(codec, per_pin->pin_nid, 0,
|
||||
+ AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
|
||||
+ snd_hda_codec_write(codec, per_pin->pin_nid, 0,
|
||||
+ AC_VERB_SET_PIN_WIDGET_CONTROL,
|
||||
+ pinctl & ~PIN_OUT);
|
||||
snd_hda_spdif_ctls_unassign(codec, pin_idx);
|
||||
per_pin->chmap_set = false;
|
||||
memset(per_pin->chmap, 0, sizeof(per_pin->chmap));
|
||||
--
|
||||
1.7.2.5
|
||||
|
@ -1,192 +0,0 @@
|
||||
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
|
||||
|
@ -0,0 +1,549 @@
|
||||
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/4] 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 113de500903cbe1933e1a50fc7809b8f6b7f2636 Mon Sep 17 00:00:00 2001
|
||||
From: xbmc <fernetmenta@online.de>
|
||||
Date: Fri, 15 Feb 2013 17:00:47 +0100
|
||||
Subject: [PATCH 2/4] buffering: some rework
|
||||
|
||||
---
|
||||
xbmc/cores/VideoRenderers/OverlayRenderer.cpp | 17 +++++++----------
|
||||
xbmc/cores/VideoRenderers/OverlayRenderer.h | 5 ++---
|
||||
xbmc/cores/VideoRenderers/RenderManager.cpp | 10 +++-------
|
||||
xbmc/cores/VideoRenderers/RenderManager.h | 4 ++--
|
||||
xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 18 +++++++++++++++++-
|
||||
5 files changed, 31 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/VideoRenderers/OverlayRenderer.cpp b/xbmc/cores/VideoRenderers/OverlayRenderer.cpp
|
||||
index 94aaaf5..f7f74ce 100644
|
||||
--- a/xbmc/cores/VideoRenderers/OverlayRenderer.cpp
|
||||
+++ b/xbmc/cores/VideoRenderers/OverlayRenderer.cpp
|
||||
@@ -93,24 +93,28 @@ long COverlayMainThread::Release()
|
||||
|
||||
CRenderer::~CRenderer()
|
||||
{
|
||||
- for(int i = 0; i < 2; i++)
|
||||
+ for(int i = 0; i < 10; i++)
|
||||
Release(m_buffers[i]);
|
||||
}
|
||||
|
||||
-void CRenderer::AddOverlay(CDVDOverlay* o, double pts)
|
||||
+void CRenderer::AddOverlay(CDVDOverlay* o, double pts, int index)
|
||||
{
|
||||
CSingleLock lock(m_section);
|
||||
|
||||
+ m_decode = index;
|
||||
+
|
||||
SElement e;
|
||||
e.pts = pts;
|
||||
e.overlay_dvd = o->Acquire();
|
||||
m_buffers[m_decode].push_back(e);
|
||||
}
|
||||
|
||||
-void CRenderer::AddOverlay(COverlay* o, double pts)
|
||||
+void CRenderer::AddOverlay(COverlay* o, double pts, int index)
|
||||
{
|
||||
CSingleLock lock(m_section);
|
||||
|
||||
+ m_decode = index;
|
||||
+
|
||||
SElement e;
|
||||
e.pts = pts;
|
||||
e.overlay = o->Acquire();
|
||||
@@ -163,13 +167,6 @@ void CRenderer::Flip()
|
||||
m_render = (m_render + 1) % m_iNumBuffers;
|
||||
}
|
||||
|
||||
-void CRenderer::SetBuffer(int idx)
|
||||
-{
|
||||
- CSingleLock lock(m_section);
|
||||
- Release(m_buffers[idx]);
|
||||
- m_decode = idx;
|
||||
-}
|
||||
-
|
||||
void CRenderer::ReleaseBuffer(int idx)
|
||||
{
|
||||
CSingleLock lock(m_section);
|
||||
diff --git a/xbmc/cores/VideoRenderers/OverlayRenderer.h b/xbmc/cores/VideoRenderers/OverlayRenderer.h
|
||||
index c6740a5..0921fc5 100644
|
||||
--- a/xbmc/cores/VideoRenderers/OverlayRenderer.h
|
||||
+++ b/xbmc/cores/VideoRenderers/OverlayRenderer.h
|
||||
@@ -92,14 +92,13 @@
|
||||
CRenderer();
|
||||
~CRenderer();
|
||||
|
||||
- void AddOverlay(CDVDOverlay* o, double pts);
|
||||
- void AddOverlay(COverlay* o, double pts);
|
||||
+ void AddOverlay(CDVDOverlay* o, double pts, int index);
|
||||
+ void AddOverlay(COverlay* o, double pts, int index);
|
||||
void AddCleanup(COverlay* o);
|
||||
void Flip();
|
||||
void Render();
|
||||
void Flush();
|
||||
void SetNumBuffers(int numBuffers) { m_iNumBuffers = numBuffers; }
|
||||
- void SetBuffer(int idx);
|
||||
void ReleaseBuffer(int idx);
|
||||
|
||||
protected:
|
||||
diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp
|
||||
index 4664426..7094913 100644
|
||||
--- a/xbmc/cores/VideoRenderers/RenderManager.cpp
|
||||
+++ b/xbmc/cores/VideoRenderers/RenderManager.cpp
|
||||
@@ -228,7 +228,7 @@ CStdString CXBMCRenderManager::GetVSyncState()
|
||||
return state;
|
||||
}
|
||||
|
||||
-bool CXBMCRenderManager::Configure(unsigned int width, unsigned int height, unsigned int d_width, unsigned int d_height, float fps, unsigned flags, ERenderFormat format, unsigned extended_format, unsigned int orientation)
|
||||
+bool CXBMCRenderManager::Configure(unsigned int width, unsigned int height, unsigned int d_width, unsigned int d_height, float fps, unsigned flags, ERenderFormat format, unsigned extended_format, unsigned int orientation, bool buffering)
|
||||
{
|
||||
/* make sure any queued frame was fully presented */
|
||||
double timeout = m_presenttime + 0.1;
|
||||
@@ -248,8 +248,8 @@ bool CXBMCRenderManager::Configure(unsigned int width, unsigned int height, unsi
|
||||
return false;
|
||||
}
|
||||
|
||||
- // check if decoder supports buffering
|
||||
- m_bCodecSupportsBuffering = false;
|
||||
+ // set buffering
|
||||
+ m_bCodecSupportsBuffering = buffering;
|
||||
if (format == RENDER_FMT_VDPAU
|
||||
|| format == RENDER_FMT_VDPAU_420
|
||||
|| format == RENDER_FMT_XVBA)
|
||||
@@ -959,10 +959,6 @@ int CXBMCRenderManager::WaitForBuffer(volatile bool& bStop)
|
||||
}
|
||||
lock.Leave();
|
||||
|
||||
- { CRetakeLock<CExclusiveLock> lock(m_sharedSection);
|
||||
- m_overlays.SetBuffer((m_iOutputRenderBuffer + 1) % m_iNumRenderBuffers);
|
||||
- }
|
||||
-
|
||||
if (bStop)
|
||||
return -1;
|
||||
|
||||
diff --git a/xbmc/cores/VideoRenderers/RenderManager.h b/xbmc/cores/VideoRenderers/RenderManager.h
|
||||
index b931f7d..27bb8a2 100644
|
||||
--- a/xbmc/cores/VideoRenderers/RenderManager.h
|
||||
+++ b/xbmc/cores/VideoRenderers/RenderManager.h
|
||||
@@ -66,7 +66,7 @@ class CXBMCRenderManager
|
||||
void SetViewMode(int iViewMode);
|
||||
|
||||
// Functions called from mplayer
|
||||
- bool Configure(unsigned int width, unsigned int height, unsigned int d_width, unsigned int d_height, float fps, unsigned flags, ERenderFormat format, unsigned extended_format, unsigned int orientation);
|
||||
+ bool Configure(unsigned int width, unsigned int height, unsigned int d_width, unsigned int d_height, float fps, unsigned flags, ERenderFormat format, unsigned extended_format, unsigned int orientation, bool buffering);
|
||||
bool IsConfigured();
|
||||
|
||||
int AddVideoPicture(DVDVideoPicture& picture);
|
||||
@@ -79,7 +79,7 @@ class CXBMCRenderManager
|
||||
void AddOverlay(CDVDOverlay* o, double pts)
|
||||
{
|
||||
CSharedLock lock(m_sharedSection);
|
||||
- m_overlays.AddOverlay(o, pts);
|
||||
+ m_overlays.AddOverlay(o, pts, (m_iOutputRenderBuffer + 1) % m_iNumRenderBuffers);
|
||||
}
|
||||
|
||||
void AddCleanup(OVERLAY::COverlay* o)
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
|
||||
index 109d75b..8a6599c 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
|
||||
+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
|
||||
@@ -1132,53 +1132,69 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts)
|
||||
}
|
||||
|
||||
CStdString formatstr;
|
||||
+ bool buffering;
|
||||
|
||||
switch(pPicture->format)
|
||||
{
|
||||
case RENDER_FMT_YUV420P:
|
||||
formatstr = "YV12";
|
||||
+ buffering = true;
|
||||
break;
|
||||
case RENDER_FMT_YUV420P16:
|
||||
formatstr = "YV12P16";
|
||||
+ buffering = true;
|
||||
break;
|
||||
case RENDER_FMT_YUV420P10:
|
||||
formatstr = "YV12P10";
|
||||
+ buffering = true;
|
||||
break;
|
||||
case RENDER_FMT_NV12:
|
||||
formatstr = "NV12";
|
||||
+ buffering = true;
|
||||
break;
|
||||
case RENDER_FMT_UYVY422:
|
||||
formatstr = "UYVY";
|
||||
+ buffering = true;
|
||||
break;
|
||||
case RENDER_FMT_YUYV422:
|
||||
formatstr = "YUY2";
|
||||
+ buffering = true;
|
||||
break;
|
||||
case RENDER_FMT_VDPAU:
|
||||
formatstr = "VDPAU";
|
||||
+ buffering = true;
|
||||
break;
|
||||
case RENDER_FMT_VDPAU_420:
|
||||
formatstr = "VDPAU_420";
|
||||
+ buffering = true;
|
||||
break;
|
||||
case RENDER_FMT_DXVA:
|
||||
formatstr = "DXVA";
|
||||
+ buffering = false;
|
||||
break;
|
||||
case RENDER_FMT_VAAPI:
|
||||
formatstr = "VAAPI";
|
||||
+ buffering = false;
|
||||
break;
|
||||
case RENDER_FMT_OMXEGL:
|
||||
formatstr = "OMXEGL";
|
||||
+ buffering = false;
|
||||
break;
|
||||
case RENDER_FMT_CVBREF:
|
||||
formatstr = "BGRA";
|
||||
+ buffering = false;
|
||||
break;
|
||||
case RENDER_FMT_BYPASS:
|
||||
formatstr = "BYPASS";
|
||||
+ buffering = false;
|
||||
break;
|
||||
case RENDER_FMT_NONE:
|
||||
formatstr = "NONE";
|
||||
+ buffering = false;
|
||||
break;
|
||||
case RENDER_FMT_XVBA:
|
||||
formatstr = "XVBA";
|
||||
+ buffering = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1189,7 +1205,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts)
|
||||
}
|
||||
|
||||
CLog::Log(LOGDEBUG,"%s - change configuration. %dx%d. framerate: %4.2f. format: %s",__FUNCTION__,pPicture->iWidth, pPicture->iHeight, config_framerate, formatstr.c_str());
|
||||
- if(!g_renderManager.Configure(pPicture->iWidth, pPicture->iHeight, pPicture->iDisplayWidth, pPicture->iDisplayHeight, config_framerate, flags, pPicture->format, pPicture->extended_format, m_hints.orientation))
|
||||
+ if(!g_renderManager.Configure(pPicture->iWidth, pPicture->iHeight, pPicture->iDisplayWidth, pPicture->iDisplayHeight, config_framerate, flags, pPicture->format, pPicture->extended_format, m_hints.orientation, buffering))
|
||||
{
|
||||
CLog::Log(LOGERROR, "%s - failed to configure renderer", __FUNCTION__);
|
||||
return EOS_ABORT;
|
||||
--
|
||||
1.7.10
|
||||
|
||||
|
||||
From 4d71be9fa0e34dccbb977199f1bde2f200f8b56e Mon Sep 17 00:00:00 2001
|
||||
From: xbmc <fernetmenta@online.de>
|
||||
Date: Sat, 16 Feb 2013 08:32:18 +0100
|
||||
Subject: [PATCH 3/4] add buffering for GLES
|
||||
|
||||
---
|
||||
xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp | 10 ----------
|
||||
xbmc/cores/VideoRenderers/LinuxRendererGLES.h | 6 ++++--
|
||||
2 files changed, 4 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
|
||||
index 2a59e2b..1bf2f3b 100644
|
||||
--- a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
|
||||
+++ b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
|
||||
@@ -135,13 +135,6 @@
|
||||
delete m_dllSwScale;
|
||||
}
|
||||
|
||||
-void CLinuxRendererGLES::ManageTextures()
|
||||
-{
|
||||
- m_NumYV12Buffers = 2;
|
||||
- //m_iYV12RenderBuffer = 0;
|
||||
- return;
|
||||
-}
|
||||
-
|
||||
bool CLinuxRendererGLES::ValidateRenderTarget()
|
||||
{
|
||||
if (!m_bValidated)
|
||||
@@ -395,7 +388,6 @@ void CLinuxRendererGLES::Update(bool bPauseDrawing)
|
||||
{
|
||||
if (!m_bConfigured) return;
|
||||
ManageDisplay();
|
||||
- ManageTextures();
|
||||
}
|
||||
|
||||
void CLinuxRendererGLES::RenderUpdate(bool clear, DWORD flags, DWORD alpha)
|
||||
@@ -409,7 +401,6 @@ void CLinuxRendererGLES::RenderUpdate(bool clear, DWORD flags, DWORD alpha)
|
||||
if (m_renderMethod & RENDER_BYPASS)
|
||||
{
|
||||
ManageDisplay();
|
||||
- ManageTextures();
|
||||
// if running bypass, then the player might need the src/dst rects
|
||||
// for sizing video playback on a layer other than the gles layer.
|
||||
if (m_RenderUpdateCallBackFn)
|
||||
@@ -449,7 +440,6 @@ void CLinuxRendererGLES::RenderUpdate(bool clear, DWORD flags, DWORD alpha)
|
||||
return;
|
||||
|
||||
ManageDisplay();
|
||||
- ManageTextures();
|
||||
|
||||
g_graphicsContext.BeginPaint();
|
||||
|
||||
diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGLES.h b/xbmc/cores/VideoRenderers/LinuxRendererGLES.h
|
||||
index c6b69db..7bdc3bc 100644
|
||||
--- a/xbmc/cores/VideoRenderers/LinuxRendererGLES.h
|
||||
+++ b/xbmc/cores/VideoRenderers/LinuxRendererGLES.h
|
||||
@@ -41,7 +41,7 @@
|
||||
class COpenMaxVideo;
|
||||
typedef std::vector<int> Features;
|
||||
|
||||
-#define NUM_BUFFERS 3
|
||||
+#define NUM_BUFFERS 10
|
||||
|
||||
|
||||
#undef ALIGN
|
||||
@@ -138,6 +138,9 @@ class CLinuxRendererGLES : public CBaseRenderer
|
||||
virtual void UnInit();
|
||||
virtual void Reset(); /* resets renderer after seek for example */
|
||||
virtual void ReorderDrawPoints();
|
||||
+ virtual void SetProcessorSize(int numBuffers) { m_NumYV12Buffers = numBuffers; }
|
||||
+ virtual unsigned int GetMaxProcessorSize() { return NUM_BUFFERS; }
|
||||
+ virtual unsigned int GetProcessorSize() { return m_NumYV12Buffers; }
|
||||
|
||||
virtual void RenderUpdate(bool clear, DWORD flags = 0, DWORD alpha = 255);
|
||||
|
||||
@@ -162,7 +165,6 @@ class CLinuxRendererGLES : public CBaseRenderer
|
||||
protected:
|
||||
virtual void Render(DWORD flags, int index);
|
||||
|
||||
- virtual void ManageTextures();
|
||||
int NextYV12Texture();
|
||||
virtual bool ValidateRenderTarget();
|
||||
virtual void LoadShaders(int field=FIELD_FULL);
|
||||
--
|
||||
1.7.10
|
||||
|
||||
|
||||
From 81496e1f405980d3be6b05c883bdbfb65d617e3e Mon Sep 17 00:00:00 2001
|
||||
From: xbmc <fernetmenta@online.de>
|
||||
Date: Sun, 10 Feb 2013 18:40:30 +0100
|
||||
Subject: [PATCH 4/4] OMXPlayer: adopt to buffering in renderer
|
||||
|
||||
---
|
||||
xbmc/cores/omxplayer/OMXPlayer.cpp | 5 +++++
|
||||
xbmc/cores/omxplayer/OMXPlayer.h | 2 ++
|
||||
xbmc/cores/omxplayer/OMXPlayerVideo.cpp | 24 +++++++++++++++++++-----
|
||||
3 files changed, 26 insertions(+), 5 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..88c75db 100644
|
||||
--- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
|
||||
+++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
|
||||
@@ -158,6 +158,8 @@ bool OMXPlayerVideo::OpenStream(CDVDStreamInfo &hints)
|
||||
m_open = true;
|
||||
m_send_eos = false;
|
||||
|
||||
+ g_renderManager.EnableBuffering(false);
|
||||
+
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -358,7 +360,7 @@ void OMXPlayerVideo::Output(int iGroupId, double pts, bool bDropPacket)
|
||||
|
||||
if(!g_renderManager.Configure(m_hints.width, m_hints.height,
|
||||
iDisplayWidth, iDisplayHeight, m_fps, flags, format, 0,
|
||||
- m_hints.orientation))
|
||||
+ m_hints.orientation, true))
|
||||
{
|
||||
CLog::Log(LOGERROR, "%s - failed to configure renderer", __FUNCTION__);
|
||||
return;
|
||||
@@ -452,13 +454,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));
|
||||
}
|
||||
@@ -569,6 +580,7 @@ void OMXPlayerVideo::Process()
|
||||
m_av_clock->OMXReset(false);
|
||||
m_av_clock->UnLock();
|
||||
m_started = false;
|
||||
+ g_renderManager.EnableBuffering(false);
|
||||
}
|
||||
else if (pMsg->IsType(CDVDMsg::GENERAL_FLUSH)) // private message sent by (COMXPlayerVideo::Flush())
|
||||
{
|
||||
@@ -580,6 +592,7 @@ void OMXPlayerVideo::Process()
|
||||
m_omxVideo.Reset();
|
||||
m_av_clock->OMXReset(false);
|
||||
m_av_clock->UnLock();
|
||||
+ g_renderManager.EnableBuffering(false);
|
||||
}
|
||||
else if (pMsg->IsType(CDVDMsg::PLAYER_SETSPEED))
|
||||
{
|
||||
@@ -664,6 +677,7 @@ void OMXPlayerVideo::Process()
|
||||
m_codecname = m_omxVideo.GetDecoderName();
|
||||
m_started = true;
|
||||
m_messageParent.Put(new CDVDMsgInt(CDVDMsg::PLAYER_STARTED, DVDPLAYER_VIDEO));
|
||||
+ g_renderManager.EnableBuffering(true);
|
||||
}
|
||||
|
||||
// guess next frame pts. iDuration is always valid
|
||||
--
|
||||
1.7.10
|
||||
|
53
packages/mediacenter/xbmc/patches/xbmc-990.15-PR2245.patch
Normal file
53
packages/mediacenter/xbmc/patches/xbmc-990.15-PR2245.patch
Normal file
@ -0,0 +1,53 @@
|
||||
From 8b6032793bcc05a6ec06773c95463a22d2c9881b Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Fri, 15 Feb 2013 17:58:41 +0000
|
||||
Subject: [PATCH] [rbp] Fix for hang after seeking introduced by ASS fix
|
||||
|
||||
#2206 introduced a regression when seeking in some types of SD files where the video stutters and/or stalls.
|
||||
This is caused by using the wrong clock in FlipPage
|
||||
---
|
||||
xbmc/cores/omxplayer/OMXPlayerVideo.cpp | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
|
||||
index ec7e7f6..5a6e31e 100644
|
||||
--- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
|
||||
+++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
|
||||
@@ -461,15 +461,15 @@ void OMXPlayerVideo::Output(int iGroupId, double pts, bool bDropPacket)
|
||||
m_iSleepEndTime = iCurrentClock + iSleepTime;
|
||||
}
|
||||
|
||||
- if (!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < m_iSleepEndTime)
|
||||
+ if (!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < m_iSleepEndTime + DVD_MSEC_TO_TIME(500))
|
||||
return;
|
||||
|
||||
- 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);
|
||||
+ g_renderManager.FlipPage(CThread::m_bStop, m_iSleepEndTime / DVD_TIME_BASE, -1, FS_NONE);
|
||||
+
|
||||
+ m_iSleepEndTime = DVD_NOPTS_VALUE;
|
||||
|
||||
//m_av_clock->WaitAbsoluteClock((iCurrentClock + iSleepTime));
|
||||
}
|
||||
@@ -580,12 +580,14 @@ void OMXPlayerVideo::Process()
|
||||
m_av_clock->OMXReset(false);
|
||||
m_av_clock->UnLock();
|
||||
m_started = false;
|
||||
+ m_iSleepEndTime = DVD_NOPTS_VALUE;
|
||||
}
|
||||
else if (pMsg->IsType(CDVDMsg::GENERAL_FLUSH)) // private message sent by (COMXPlayerVideo::Flush())
|
||||
{
|
||||
CLog::Log(LOGDEBUG, "COMXPlayerVideo - CDVDMsg::GENERAL_FLUSH");
|
||||
m_stalled = true;
|
||||
m_started = false;
|
||||
+ m_iSleepEndTime = DVD_NOPTS_VALUE;
|
||||
m_av_clock->Lock();
|
||||
m_av_clock->OMXStop(false);
|
||||
m_omxVideo.Reset();
|
||||
--
|
||||
1.7.10
|
||||
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libnl"
|
||||
PKG_VERSION="3.2.16"
|
||||
PKG_VERSION="3.2.21"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="LGPL"
|
||||
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="xf86-video-intel"
|
||||
PKG_VERSION="2.21.0"
|
||||
PKG_VERSION="2.21.2"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="i386 x86_64"
|
||||
PKG_LICENSE="OSS"
|
||||
|
Loading…
x
Reference in New Issue
Block a user