From c371bb378b4f86fc004b299309d2522881d62ad3 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Fri, 18 Oct 2013 13:52:32 +0300 Subject: [PATCH 01/17] vboxguest: update to vboxguest-4.3.0 --- packages/linux-drivers/vboxguest/meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/linux-drivers/vboxguest/meta b/packages/linux-drivers/vboxguest/meta index 8704911e9c..414d7c3490 100644 --- a/packages/linux-drivers/vboxguest/meta +++ b/packages/linux-drivers/vboxguest/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="vboxguest" -PKG_VERSION="4.2.16" +PKG_VERSION="4.3.0" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" From 0e773c9f1b94d373418a53b391d58148dd19a3b9 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Fri, 18 Oct 2013 13:52:44 +0300 Subject: [PATCH 02/17] xf86-video-virtualbox: update to xf86-video-virtualbox-4.3.0 --- packages/x11/driver/xf86-video-virtualbox/meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/x11/driver/xf86-video-virtualbox/meta b/packages/x11/driver/xf86-video-virtualbox/meta index 3c00483686..5cd13dbdad 100644 --- a/packages/x11/driver/xf86-video-virtualbox/meta +++ b/packages/x11/driver/xf86-video-virtualbox/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xf86-video-virtualbox" -PKG_VERSION="4.2.16" +PKG_VERSION="4.3.0" PKG_REV="1" PKG_ARCH="i386 x86_64" PKG_LICENSE="OSS" From 466c3eb651017f746cb481b595b4f06b6b98a3ce Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Fri, 18 Oct 2013 19:13:31 +0300 Subject: [PATCH 03/17] zip: strip binary --- packages/compress/zip/package.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/compress/zip/package.mk b/packages/compress/zip/package.mk index c0b1e0c7f3..3ae284cfbe 100644 --- a/packages/compress/zip/package.mk +++ b/packages/compress/zip/package.mk @@ -48,4 +48,5 @@ make_target() { makeinstall_target() { mkdir -p $INSTALL/usr/bin cp zip $INSTALL/usr/bin + $STRIP $INSTALL/usr/bin/zip } From 495cab0543edd30007e7d07cadc0ff4611505106 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Fri, 18 Oct 2013 19:13:49 +0300 Subject: [PATCH 04/17] openssl: strip binary --- packages/security/openssl/build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/security/openssl/build b/packages/security/openssl/build index 1d20b23a62..9d735b9248 100755 --- a/packages/security/openssl/build +++ b/packages/security/openssl/build @@ -71,3 +71,5 @@ make CC="$CC" \ RANLIB="$RANLIB" \ MAKEDEPPROG="$CC" \ depend all build-shared install + +$STRIP apps/openssl From f4fd322f9570408aea48830bc5ef4040ec4dc7b1 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Fri, 18 Oct 2013 19:14:02 +0300 Subject: [PATCH 05/17] rtmpdump: do not install binaries --- packages/multimedia/rtmpdump/install | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/multimedia/rtmpdump/install b/packages/multimedia/rtmpdump/install index f9c9ab04e8..c9a3ea51c3 100755 --- a/packages/multimedia/rtmpdump/install +++ b/packages/multimedia/rtmpdump/install @@ -22,12 +22,6 @@ . config/options $1 -mkdir -p $INSTALL/usr/bin - cp -P $PKG_BUILD/rtmpdump $INSTALL/usr/bin - cp -P $PKG_BUILD/rtmpgw $INSTALL/usr/bin - cp -P $PKG_BUILD/rtmpsrv $INSTALL/usr/bin - cp -P $PKG_BUILD/rtmpsuck $INSTALL/usr/bin - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/librtmp/*.so* $INSTALL/usr/lib From a5d3c10ad0f1a70c8c7bcd57c6a6ac25c3a6bc73 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Fri, 18 Oct 2013 19:15:02 +0300 Subject: [PATCH 06/17] fontconfig: do not install binaries --- packages/x11/other/fontconfig/package.mk | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/x11/other/fontconfig/package.mk b/packages/x11/other/fontconfig/package.mk index 5d47cdaa89..0116dd9979 100644 --- a/packages/x11/other/fontconfig/package.mk +++ b/packages/x11/other/fontconfig/package.mk @@ -51,11 +51,5 @@ pre_configure_target() { } post_makeinstall_target() { - rm -rf $INSTALL/usr/bin/fc-cat - rm -rf $INSTALL/usr/bin/fc-list - rm -rf $INSTALL/usr/bin/fc-match - rm -rf $INSTALL/usr/bin/fc-pattern - rm -rf $INSTALL/usr/bin/fc-query - rm -rf $INSTALL/usr/bin/fc-scan - rm -rf $INSTALL/usr/bin/fc-validate + rm -rf $INSTALL/usr/bin } From 7252991e44b8785128d60e62986e45ccb91c1823 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Fri, 18 Oct 2013 19:15:21 +0300 Subject: [PATCH 07/17] windowmanager: do not enable 'windowmanager.service' by default this is useless with xbmc in fullscreen/standalone mode, as xbmc window won't even appear in managed clients list. also it could cause issues like xbmc losing focus. 3rdparty addons that need windowmanager for fullscreen/alt-tab/etc can start it via 'systemctl start windowmanager.service' closes #2675 --- packages/x11/other/dwm/package.mk | 4 ---- packages/x11/other/ratpoison/package.mk | 4 ---- 2 files changed, 8 deletions(-) diff --git a/packages/x11/other/dwm/package.mk b/packages/x11/other/dwm/package.mk index 532d3d2d81..68b6434bae 100644 --- a/packages/x11/other/dwm/package.mk +++ b/packages/x11/other/dwm/package.mk @@ -42,7 +42,3 @@ make_target() { configure_target() { : } - -post_install() { - enable_service windowmanager.service -} diff --git a/packages/x11/other/ratpoison/package.mk b/packages/x11/other/ratpoison/package.mk index c4c9f19927..06224e35b4 100644 --- a/packages/x11/other/ratpoison/package.mk +++ b/packages/x11/other/ratpoison/package.mk @@ -54,7 +54,3 @@ post_makeinstall_target() { mkdir -p $INSTALL/etc cp $PKG_DIR/config/ratpoisonrc $INSTALL/etc } - -post_install() { - enable_service windowmanager.service -} From 58b80606f696868a119fddbfdab748afca6086cb Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Fri, 18 Oct 2013 19:43:12 +0300 Subject: [PATCH 08/17] dp not enable swap when /storage is on net (nfs/iscsi/cifs) closes #1916 --- .../initramfs/sysutils/busybox-initramfs/scripts/init | 9 +++++++++ packages/sysutils/util-linux/scripts/mount-swap | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/packages/initramfs/sysutils/busybox-initramfs/scripts/init b/packages/initramfs/sysutils/busybox-initramfs/scripts/init index b3748da48e..4b66716e0d 100755 --- a/packages/initramfs/sysutils/busybox-initramfs/scripts/init +++ b/packages/initramfs/sysutils/busybox-initramfs/scripts/init @@ -80,6 +80,11 @@ ;; disk=*) disk="${arg#*=}" + case $disk in + CIFS=*|SMB=*|ISCSI=*|NBD=*|NFS=*) + STORAGE_NETBOOT=yes + ;; + esac ;; textmode) INIT_ARGS="$INIT_ARGS --unit=textmode.target" @@ -615,6 +620,10 @@ if [ "$UPDATE_DISABLED" = "yes" ] ; then echo "" > /sysroot/dev/.update_disabled fi +# swap can not be used over nfs.(see scripts/mount-swap) + if [ "$STORAGE_NETBOOT" = "yes" ] ; then + echo "" > /sysroot/dev/.storage_netboot + fi # switch to new sysroot and start real init exec /bin/busybox switch_root /sysroot /lib/systemd/systemd $INIT_ARGS diff --git a/packages/sysutils/util-linux/scripts/mount-swap b/packages/sysutils/util-linux/scripts/mount-swap index 16c2996553..a603e8a086 100755 --- a/packages/sysutils/util-linux/scripts/mount-swap +++ b/packages/sysutils/util-linux/scripts/mount-swap @@ -20,11 +20,17 @@ ################################################################################ . /etc/swap.conf +. /etc/profile if [ -f /storage/.config/swap.conf ]; then . /storage/.config/swap.conf fi +if [ -e /dev/.storage_netboot ] ; then + logger -t Boot "### netbooting... swap disabled ###" + exit 0 +fi + SWAP=`blkid -t TYPE="swap" -o device` case $1 in From 39630a0b65cb48af8dd6dc5fa4bead99c1a31972 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Fri, 18 Oct 2013 20:40:40 +0300 Subject: [PATCH 09/17] createlog: adapt for systemd. include even more info --- packages/sysutils/busybox/scripts/createlog | 32 ++++++++++++--------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/packages/sysutils/busybox/scripts/createlog b/packages/sysutils/busybox/scripts/createlog index 8e0befa7ab..54277eb978 100755 --- a/packages/sysutils/busybox/scripts/createlog +++ b/packages/sysutils/busybox/scripts/createlog @@ -41,25 +41,23 @@ getlog_cmd() { rm -rf $BASEDIR/$LOGDIR mkdir -p $BASEDIR/$LOGDIR -# OS Info -# LOGFILE="00_OS.log" -# getlog_cmd cat /etc/issue - # XBMC.log LOGFILE="01_XBMC.log" for i in `find /storage/.xbmc/temp/ -type f -name "*.log"`; do getlog_cmd cat $i done -# Kernel.log - LOGFILE="02_Kernel.log" - getlog_cmd lsmod +# System.log + LOGFILE="02_System.log" getlog_cmd dmesg + getlog_cmd lsmod + getlog_cmd ps xa # Hardware.log LOGFILE="03_Hardware.log" - getlog_cmd lspci -vvv + getlog_cmd lspci -vvvvnn getlog_cmd lsusb -vvv + getlog_cmd lsusb -t getlog_cmd cat /proc/cpuinfo # Audio.log @@ -70,7 +68,11 @@ mkdir -p $BASEDIR/$LOGDIR # Network.log LOGFILE="05_Network.log" - getlog_cmd ifconfig + getlog_cmd ifconfig -a + getlog_cmd netstat -rn + getlog_cmd netstat -nalp + getlog_cmd connmanctl services + getlog_cmd cat /etc/resolv.conf # varlog.log LOGFILE="06_varlog.log" @@ -88,13 +90,17 @@ mkdir -p $BASEDIR/$LOGDIR getlog_cmd cat /proc/mounts getlog_cmd df -h -# DMI.log -# LOGFILE="08_dmi.log" -# getlog_cmd dmidecode +# Journal (current) + LOGFILE="09_Journal-cur.log" + getlog_cmd journalctl --no-pager -b -0 + +# Journal (prev) + LOGFILE="10_Journal-prev.log" + getlog_cmd journalctl --no-pager -b -1 # pack logfiles mkdir -p /storage/logfiles -# tar cvjf /storage/logfiles/log-$DATE.tar.bz2 $LOGDIR -C $BASEDIR zip -jq /storage/logfiles/log-$DATE.zip $BASEDIR/$LOGDIR/* + # remove logdir rm -rf $BASEDIR/$LOGDIR From 0bccbb3240f2e97e692d017e0e82cdeaabe185b7 Mon Sep 17 00:00:00 2001 From: Prashant Somashekar Date: Fri, 18 Oct 2013 21:06:12 -0400 Subject: [PATCH 10/17] linux: update to linux-3.11.6 --- packages/linux/meta | 2 +- .../patches/{3.11.5 => 3.11.6}/linux-003-no_dev_console.patch | 0 .../{3.11.5 => 3.11.6}/linux-052-XBOX_remote_support.patch | 0 .../{3.11.5 => 3.11.6}/linux-053-spinelplus-remote-0.2.patch | 0 ...ton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch | 0 .../linux-055-add_Formosa_eHome_Infrared_Receiver.patch | 0 .../linux-056-add_Adaptec_eHome_Infrared_Receiver.patch | 0 ...57-Removed-MCE-customer-code-restriction-in-rc6-decode.patch | 0 .../linux-057-add_SMK_Manufacturing_Inc_Infrared_Receiver.patch | 0 .../linux-058.01-HID-Sony-upstream_patches.patch.todo-or-remove | 0 .../linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch | 0 .../{3.11.5 => 3.11.6}/linux-058.06-hid_sony-add_SMK_link.patch | 0 .../linux-059-remove_some_xpad_pids-0.2.patch | 0 .../{3.11.5 => 3.11.6}/linux-060-add_AUGUST_DVB-T205.patch | 0 .../linux-203-stb0899_enable_low_symbol_rate.patch | 0 .../linux/patches/{3.11.5 => 3.11.6}/linux-210-dvbsky.patch | 0 .../{3.11.5 => 3.11.6}/linux-210.01-dvbsky-auto-off.patch | 0 .../linux-212-mantis_stb0899_faster_lock.patch | 0 .../patches/{3.11.5 => 3.11.6}/linux-221-ngene-octopus.patch | 0 .../{3.11.5 => 3.11.6}/linux-222-stb0899_signal_quality.patch | 0 .../linux-223-Fix-video-artifacts-with-tt-3600-s2-usb.patch | 0 .../linux-700-jmicron_1_0_8_5.patch.todo-or-remove | 0 .../{3.11.5 => 3.11.6}/linux-701-linksys_aes2500_brcmfmac.patch | 0 .../linux-702-Support-for-cheap-Ralink-3070-WiFi-plug.patch | 0 .../{3.11.5 => 3.11.6}/linux-703-macmini2012-ethernet.patch | 0 .../linux-704-Support-for-Ubiquiti-WifiStation.patch | 0 .../linux-705-Support-for-Buffalo-WLI-UC-G300HP-V1.patch | 0 .../patches/{3.11.5 => 3.11.6}/linux-706-Sitecom-N300.patch | 0 .../patches/{3.11.5 => 3.11.6}/linux-900-hide_tsc_error.patch | 0 .../linux-950-saa716x_PCIe_interface_chipset.patch | 0 ...990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch | 0 .../{3.11.5 => 3.11.6}/linux-990.11-ALSA-AMD-HD-Audio.patch | 0 .../linux-990.12-RADEON-upstream-fix-01.patch | 0 .../linux-990.12-RADEON-upstream-fix-02.patch | 0 .../linux-990.12-RADEON-upstream-fix-03.patch | 0 .../patches/{3.11.5 => 3.11.6}/linux-991.01-ptrace_fix.patch | 0 .../linux-992.01.i915_pass_mode_to_write_eld.patch | 0 .../linux-992.02-i915_set_hdmi_audio_clock.patch | 0 .../{3.11.5 => 3.11.6}/linux-995-CX24120-13Z_frontend.patch | 0 ...pufreq-revert-9d3ce4af3be0235d4cf41ea9fd774205a32e58a2.patch | 0 ...2-A-split-for-ds3000-ts2020-code-forgot-to-change-the-.patch | 0 41 files changed, 1 insertion(+), 1 deletion(-) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-003-no_dev_console.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-052-XBOX_remote_support.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-053-spinelplus-remote-0.2.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-054-nuvoton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-055-add_Formosa_eHome_Infrared_Receiver.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-056-add_Adaptec_eHome_Infrared_Receiver.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-057-add_SMK_Manufacturing_Inc_Infrared_Receiver.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-058.01-HID-Sony-upstream_patches.patch.todo-or-remove (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-058.06-hid_sony-add_SMK_link.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-059-remove_some_xpad_pids-0.2.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-060-add_AUGUST_DVB-T205.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-203-stb0899_enable_low_symbol_rate.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-210-dvbsky.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-210.01-dvbsky-auto-off.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-212-mantis_stb0899_faster_lock.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-221-ngene-octopus.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-222-stb0899_signal_quality.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-223-Fix-video-artifacts-with-tt-3600-s2-usb.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-700-jmicron_1_0_8_5.patch.todo-or-remove (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-701-linksys_aes2500_brcmfmac.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-702-Support-for-cheap-Ralink-3070-WiFi-plug.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-703-macmini2012-ethernet.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-704-Support-for-Ubiquiti-WifiStation.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-705-Support-for-Buffalo-WLI-UC-G300HP-V1.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-706-Sitecom-N300.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-900-hide_tsc_error.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-950-saa716x_PCIe_interface_chipset.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-990.11-ALSA-AMD-HD-Audio.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-990.12-RADEON-upstream-fix-01.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-990.12-RADEON-upstream-fix-02.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-990.12-RADEON-upstream-fix-03.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-991.01-ptrace_fix.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-992.01.i915_pass_mode_to_write_eld.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-992.02-i915_set_hdmi_audio_clock.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-995-CX24120-13Z_frontend.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-998.01-cpufreq-revert-9d3ce4af3be0235d4cf41ea9fd774205a32e58a2.patch (100%) rename packages/linux/patches/{3.11.5 => 3.11.6}/linux-999.02-A-split-for-ds3000-ts2020-code-forgot-to-change-the-.patch (100%) diff --git a/packages/linux/meta b/packages/linux/meta index 7bf7599101..c91f1d7f35 100644 --- a/packages/linux/meta +++ b/packages/linux/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="linux" -PKG_VERSION="3.11.5" +PKG_VERSION="3.11.6" PKG_URL="http://www.kernel.org/pub/linux/kernel/v3.x/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_REV="1" PKG_ARCH="any" diff --git a/packages/linux/patches/3.11.5/linux-003-no_dev_console.patch b/packages/linux/patches/3.11.6/linux-003-no_dev_console.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-003-no_dev_console.patch rename to packages/linux/patches/3.11.6/linux-003-no_dev_console.patch diff --git a/packages/linux/patches/3.11.5/linux-052-XBOX_remote_support.patch b/packages/linux/patches/3.11.6/linux-052-XBOX_remote_support.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-052-XBOX_remote_support.patch rename to packages/linux/patches/3.11.6/linux-052-XBOX_remote_support.patch diff --git a/packages/linux/patches/3.11.5/linux-053-spinelplus-remote-0.2.patch b/packages/linux/patches/3.11.6/linux-053-spinelplus-remote-0.2.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-053-spinelplus-remote-0.2.patch rename to packages/linux/patches/3.11.6/linux-053-spinelplus-remote-0.2.patch diff --git a/packages/linux/patches/3.11.5/linux-054-nuvoton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch b/packages/linux/patches/3.11.6/linux-054-nuvoton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-054-nuvoton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch rename to packages/linux/patches/3.11.6/linux-054-nuvoton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch diff --git a/packages/linux/patches/3.11.5/linux-055-add_Formosa_eHome_Infrared_Receiver.patch b/packages/linux/patches/3.11.6/linux-055-add_Formosa_eHome_Infrared_Receiver.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-055-add_Formosa_eHome_Infrared_Receiver.patch rename to packages/linux/patches/3.11.6/linux-055-add_Formosa_eHome_Infrared_Receiver.patch diff --git a/packages/linux/patches/3.11.5/linux-056-add_Adaptec_eHome_Infrared_Receiver.patch b/packages/linux/patches/3.11.6/linux-056-add_Adaptec_eHome_Infrared_Receiver.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-056-add_Adaptec_eHome_Infrared_Receiver.patch rename to packages/linux/patches/3.11.6/linux-056-add_Adaptec_eHome_Infrared_Receiver.patch diff --git a/packages/linux/patches/3.11.5/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch b/packages/linux/patches/3.11.6/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch rename to packages/linux/patches/3.11.6/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch diff --git a/packages/linux/patches/3.11.5/linux-057-add_SMK_Manufacturing_Inc_Infrared_Receiver.patch b/packages/linux/patches/3.11.6/linux-057-add_SMK_Manufacturing_Inc_Infrared_Receiver.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-057-add_SMK_Manufacturing_Inc_Infrared_Receiver.patch rename to packages/linux/patches/3.11.6/linux-057-add_SMK_Manufacturing_Inc_Infrared_Receiver.patch diff --git a/packages/linux/patches/3.11.5/linux-058.01-HID-Sony-upstream_patches.patch.todo-or-remove b/packages/linux/patches/3.11.6/linux-058.01-HID-Sony-upstream_patches.patch.todo-or-remove similarity index 100% rename from packages/linux/patches/3.11.5/linux-058.01-HID-Sony-upstream_patches.patch.todo-or-remove rename to packages/linux/patches/3.11.6/linux-058.01-HID-Sony-upstream_patches.patch.todo-or-remove diff --git a/packages/linux/patches/3.11.5/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch b/packages/linux/patches/3.11.6/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch rename to packages/linux/patches/3.11.6/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch diff --git a/packages/linux/patches/3.11.5/linux-058.06-hid_sony-add_SMK_link.patch b/packages/linux/patches/3.11.6/linux-058.06-hid_sony-add_SMK_link.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-058.06-hid_sony-add_SMK_link.patch rename to packages/linux/patches/3.11.6/linux-058.06-hid_sony-add_SMK_link.patch diff --git a/packages/linux/patches/3.11.5/linux-059-remove_some_xpad_pids-0.2.patch b/packages/linux/patches/3.11.6/linux-059-remove_some_xpad_pids-0.2.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-059-remove_some_xpad_pids-0.2.patch rename to packages/linux/patches/3.11.6/linux-059-remove_some_xpad_pids-0.2.patch diff --git a/packages/linux/patches/3.11.5/linux-060-add_AUGUST_DVB-T205.patch b/packages/linux/patches/3.11.6/linux-060-add_AUGUST_DVB-T205.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-060-add_AUGUST_DVB-T205.patch rename to packages/linux/patches/3.11.6/linux-060-add_AUGUST_DVB-T205.patch diff --git a/packages/linux/patches/3.11.5/linux-203-stb0899_enable_low_symbol_rate.patch b/packages/linux/patches/3.11.6/linux-203-stb0899_enable_low_symbol_rate.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-203-stb0899_enable_low_symbol_rate.patch rename to packages/linux/patches/3.11.6/linux-203-stb0899_enable_low_symbol_rate.patch diff --git a/packages/linux/patches/3.11.5/linux-210-dvbsky.patch b/packages/linux/patches/3.11.6/linux-210-dvbsky.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-210-dvbsky.patch rename to packages/linux/patches/3.11.6/linux-210-dvbsky.patch diff --git a/packages/linux/patches/3.11.5/linux-210.01-dvbsky-auto-off.patch b/packages/linux/patches/3.11.6/linux-210.01-dvbsky-auto-off.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-210.01-dvbsky-auto-off.patch rename to packages/linux/patches/3.11.6/linux-210.01-dvbsky-auto-off.patch diff --git a/packages/linux/patches/3.11.5/linux-212-mantis_stb0899_faster_lock.patch b/packages/linux/patches/3.11.6/linux-212-mantis_stb0899_faster_lock.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-212-mantis_stb0899_faster_lock.patch rename to packages/linux/patches/3.11.6/linux-212-mantis_stb0899_faster_lock.patch diff --git a/packages/linux/patches/3.11.5/linux-221-ngene-octopus.patch b/packages/linux/patches/3.11.6/linux-221-ngene-octopus.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-221-ngene-octopus.patch rename to packages/linux/patches/3.11.6/linux-221-ngene-octopus.patch diff --git a/packages/linux/patches/3.11.5/linux-222-stb0899_signal_quality.patch b/packages/linux/patches/3.11.6/linux-222-stb0899_signal_quality.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-222-stb0899_signal_quality.patch rename to packages/linux/patches/3.11.6/linux-222-stb0899_signal_quality.patch diff --git a/packages/linux/patches/3.11.5/linux-223-Fix-video-artifacts-with-tt-3600-s2-usb.patch b/packages/linux/patches/3.11.6/linux-223-Fix-video-artifacts-with-tt-3600-s2-usb.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-223-Fix-video-artifacts-with-tt-3600-s2-usb.patch rename to packages/linux/patches/3.11.6/linux-223-Fix-video-artifacts-with-tt-3600-s2-usb.patch diff --git a/packages/linux/patches/3.11.5/linux-700-jmicron_1_0_8_5.patch.todo-or-remove b/packages/linux/patches/3.11.6/linux-700-jmicron_1_0_8_5.patch.todo-or-remove similarity index 100% rename from packages/linux/patches/3.11.5/linux-700-jmicron_1_0_8_5.patch.todo-or-remove rename to packages/linux/patches/3.11.6/linux-700-jmicron_1_0_8_5.patch.todo-or-remove diff --git a/packages/linux/patches/3.11.5/linux-701-linksys_aes2500_brcmfmac.patch b/packages/linux/patches/3.11.6/linux-701-linksys_aes2500_brcmfmac.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-701-linksys_aes2500_brcmfmac.patch rename to packages/linux/patches/3.11.6/linux-701-linksys_aes2500_brcmfmac.patch diff --git a/packages/linux/patches/3.11.5/linux-702-Support-for-cheap-Ralink-3070-WiFi-plug.patch b/packages/linux/patches/3.11.6/linux-702-Support-for-cheap-Ralink-3070-WiFi-plug.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-702-Support-for-cheap-Ralink-3070-WiFi-plug.patch rename to packages/linux/patches/3.11.6/linux-702-Support-for-cheap-Ralink-3070-WiFi-plug.patch diff --git a/packages/linux/patches/3.11.5/linux-703-macmini2012-ethernet.patch b/packages/linux/patches/3.11.6/linux-703-macmini2012-ethernet.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-703-macmini2012-ethernet.patch rename to packages/linux/patches/3.11.6/linux-703-macmini2012-ethernet.patch diff --git a/packages/linux/patches/3.11.5/linux-704-Support-for-Ubiquiti-WifiStation.patch b/packages/linux/patches/3.11.6/linux-704-Support-for-Ubiquiti-WifiStation.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-704-Support-for-Ubiquiti-WifiStation.patch rename to packages/linux/patches/3.11.6/linux-704-Support-for-Ubiquiti-WifiStation.patch diff --git a/packages/linux/patches/3.11.5/linux-705-Support-for-Buffalo-WLI-UC-G300HP-V1.patch b/packages/linux/patches/3.11.6/linux-705-Support-for-Buffalo-WLI-UC-G300HP-V1.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-705-Support-for-Buffalo-WLI-UC-G300HP-V1.patch rename to packages/linux/patches/3.11.6/linux-705-Support-for-Buffalo-WLI-UC-G300HP-V1.patch diff --git a/packages/linux/patches/3.11.5/linux-706-Sitecom-N300.patch b/packages/linux/patches/3.11.6/linux-706-Sitecom-N300.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-706-Sitecom-N300.patch rename to packages/linux/patches/3.11.6/linux-706-Sitecom-N300.patch diff --git a/packages/linux/patches/3.11.5/linux-900-hide_tsc_error.patch b/packages/linux/patches/3.11.6/linux-900-hide_tsc_error.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-900-hide_tsc_error.patch rename to packages/linux/patches/3.11.6/linux-900-hide_tsc_error.patch diff --git a/packages/linux/patches/3.11.5/linux-950-saa716x_PCIe_interface_chipset.patch b/packages/linux/patches/3.11.6/linux-950-saa716x_PCIe_interface_chipset.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-950-saa716x_PCIe_interface_chipset.patch rename to packages/linux/patches/3.11.6/linux-950-saa716x_PCIe_interface_chipset.patch diff --git a/packages/linux/patches/3.11.5/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch b/packages/linux/patches/3.11.6/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch rename to packages/linux/patches/3.11.6/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch diff --git a/packages/linux/patches/3.11.5/linux-990.11-ALSA-AMD-HD-Audio.patch b/packages/linux/patches/3.11.6/linux-990.11-ALSA-AMD-HD-Audio.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-990.11-ALSA-AMD-HD-Audio.patch rename to packages/linux/patches/3.11.6/linux-990.11-ALSA-AMD-HD-Audio.patch diff --git a/packages/linux/patches/3.11.5/linux-990.12-RADEON-upstream-fix-01.patch b/packages/linux/patches/3.11.6/linux-990.12-RADEON-upstream-fix-01.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-990.12-RADEON-upstream-fix-01.patch rename to packages/linux/patches/3.11.6/linux-990.12-RADEON-upstream-fix-01.patch diff --git a/packages/linux/patches/3.11.5/linux-990.12-RADEON-upstream-fix-02.patch b/packages/linux/patches/3.11.6/linux-990.12-RADEON-upstream-fix-02.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-990.12-RADEON-upstream-fix-02.patch rename to packages/linux/patches/3.11.6/linux-990.12-RADEON-upstream-fix-02.patch diff --git a/packages/linux/patches/3.11.5/linux-990.12-RADEON-upstream-fix-03.patch b/packages/linux/patches/3.11.6/linux-990.12-RADEON-upstream-fix-03.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-990.12-RADEON-upstream-fix-03.patch rename to packages/linux/patches/3.11.6/linux-990.12-RADEON-upstream-fix-03.patch diff --git a/packages/linux/patches/3.11.5/linux-991.01-ptrace_fix.patch b/packages/linux/patches/3.11.6/linux-991.01-ptrace_fix.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-991.01-ptrace_fix.patch rename to packages/linux/patches/3.11.6/linux-991.01-ptrace_fix.patch diff --git a/packages/linux/patches/3.11.5/linux-992.01.i915_pass_mode_to_write_eld.patch b/packages/linux/patches/3.11.6/linux-992.01.i915_pass_mode_to_write_eld.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-992.01.i915_pass_mode_to_write_eld.patch rename to packages/linux/patches/3.11.6/linux-992.01.i915_pass_mode_to_write_eld.patch diff --git a/packages/linux/patches/3.11.5/linux-992.02-i915_set_hdmi_audio_clock.patch b/packages/linux/patches/3.11.6/linux-992.02-i915_set_hdmi_audio_clock.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-992.02-i915_set_hdmi_audio_clock.patch rename to packages/linux/patches/3.11.6/linux-992.02-i915_set_hdmi_audio_clock.patch diff --git a/packages/linux/patches/3.11.5/linux-995-CX24120-13Z_frontend.patch b/packages/linux/patches/3.11.6/linux-995-CX24120-13Z_frontend.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-995-CX24120-13Z_frontend.patch rename to packages/linux/patches/3.11.6/linux-995-CX24120-13Z_frontend.patch diff --git a/packages/linux/patches/3.11.5/linux-998.01-cpufreq-revert-9d3ce4af3be0235d4cf41ea9fd774205a32e58a2.patch b/packages/linux/patches/3.11.6/linux-998.01-cpufreq-revert-9d3ce4af3be0235d4cf41ea9fd774205a32e58a2.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-998.01-cpufreq-revert-9d3ce4af3be0235d4cf41ea9fd774205a32e58a2.patch rename to packages/linux/patches/3.11.6/linux-998.01-cpufreq-revert-9d3ce4af3be0235d4cf41ea9fd774205a32e58a2.patch diff --git a/packages/linux/patches/3.11.5/linux-999.02-A-split-for-ds3000-ts2020-code-forgot-to-change-the-.patch b/packages/linux/patches/3.11.6/linux-999.02-A-split-for-ds3000-ts2020-code-forgot-to-change-the-.patch similarity index 100% rename from packages/linux/patches/3.11.5/linux-999.02-A-split-for-ds3000-ts2020-code-forgot-to-change-the-.patch rename to packages/linux/patches/3.11.6/linux-999.02-A-split-for-ds3000-ts2020-code-forgot-to-change-the-.patch From bad26d6da09cb4edd76bdec196b85affec93638d Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Sat, 19 Oct 2013 17:30:12 +0300 Subject: [PATCH 11/17] connman: stop by SIGKILL or connman may clear current ip configuration on shutdown before nfs-mounted /storage is umounted --- packages/network/connman/system.d/connman.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/network/connman/system.d/connman.service b/packages/network/connman/system.d/connman.service index d9c382d0bc..4eab9d4508 100644 --- a/packages/network/connman/system.d/connman.service +++ b/packages/network/connman/system.d/connman.service @@ -11,6 +11,8 @@ Restart=on-failure EnvironmentFile=-/run/openelec/debug/connman.conf ExecStartPre=/usr/lib/connman/connman-setup ExecStart=/usr/sbin/connmand -nr $CONNMAN_DEBUG +# send SIGKILL on stop to keep ip configuration +KillSignal=SIGKILL StandardOutput=null [Install] From c14a852e51b96842864026eaf4371be4ded19dee Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Sat, 19 Oct 2013 22:21:37 +0300 Subject: [PATCH 12/17] vdr-plugin-vnsiserver: remove unused patch --- ...dr-plugin-vnsiserver-02_makefile-largefile.patch | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 packages/3rdparty/multimedia/vdr-plugin-vnsiserver/patches/e3cd383/vdr-plugin-vnsiserver-02_makefile-largefile.patch diff --git a/packages/3rdparty/multimedia/vdr-plugin-vnsiserver/patches/e3cd383/vdr-plugin-vnsiserver-02_makefile-largefile.patch b/packages/3rdparty/multimedia/vdr-plugin-vnsiserver/patches/e3cd383/vdr-plugin-vnsiserver-02_makefile-largefile.patch deleted file mode 100644 index d6d6614177..0000000000 --- a/packages/3rdparty/multimedia/vdr-plugin-vnsiserver/patches/e3cd383/vdr-plugin-vnsiserver-02_makefile-largefile.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Makefile b/Makefile -index 92fc90d..4196724 100644 ---- a/Makefile -+++ b/Makefile -@@ -45,7 +45,7 @@ PACKAGE = vdr-$(ARCHIVE) - - INCLUDES += -I$(VDRDIR)/include -I$(VDRDIR) - --DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DVNSI_SERVER_VERSION='"$(VERSION)"' -+DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DVNSI_SERVER_VERSION='"$(VERSION)"' -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE - - ifeq ($(DEBUG),1) - DEFINES += -DDEBUG From bf40da980ee2e484454bda701d9c322dc0e6b548 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Sat, 19 Oct 2013 22:22:54 +0300 Subject: [PATCH 13/17] vdr-plugin-streamdev: update to vdr-plugin-streamdev-a9c2adb --- packages/3rdparty/multimedia/vdr-plugin-streamdev/package.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/3rdparty/multimedia/vdr-plugin-streamdev/package.mk b/packages/3rdparty/multimedia/vdr-plugin-streamdev/package.mk index 2cbf748ac3..5e986d1c05 100644 --- a/packages/3rdparty/multimedia/vdr-plugin-streamdev/package.mk +++ b/packages/3rdparty/multimedia/vdr-plugin-streamdev/package.mk @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="vdr-plugin-streamdev" -PKG_VERSION="329129d" +PKG_VERSION="a9c2adb" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" From da1dbfef9ab02d72d32f4649efcd834c1d249944 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Sat, 19 Oct 2013 22:30:54 +0300 Subject: [PATCH 14/17] vdr: update to vdr-2.1.2 --- .../vdr-epgsearch-02_vdr-2.1.2-buildfix.patch | 19 +++++ ...vdr-live-0.3.0-05_vdr-2.1.2-buildfix.patch | 76 +++++++++++++++++++ ...ugin-streamdev-03_vdr-2.1.2-buildfix.patch | 25 ++++++ ...gin-vnsiserver-02_vdr-2.1.2-buildfix.patch | 45 +++++++++++ ...ugin-xmltv2vdr-01_vdr-2.1.2-buildfix.patch | 19 +++++ .../vdr-plugin-xvdr-vdr-2.1.2-buildfix.patch | 32 ++++++++ packages/3rdparty/multimedia/vdr/package.mk | 2 +- 7 files changed, 217 insertions(+), 1 deletion(-) create mode 100644 packages/3rdparty/multimedia/vdr-epgsearch/patches/vdr-epgsearch-02_vdr-2.1.2-buildfix.patch create mode 100644 packages/3rdparty/multimedia/vdr-live/patches/vdr-live-0.3.0-05_vdr-2.1.2-buildfix.patch create mode 100644 packages/3rdparty/multimedia/vdr-plugin-streamdev/patches/vdr-plugin-streamdev-03_vdr-2.1.2-buildfix.patch create mode 100644 packages/3rdparty/multimedia/vdr-plugin-vnsiserver/patches/cd5023b/vdr-plugin-vnsiserver-02_vdr-2.1.2-buildfix.patch create mode 100644 packages/3rdparty/multimedia/vdr-plugin-xmltv2vdr/patches/vdr-plugin-xmltv2vdr-01_vdr-2.1.2-buildfix.patch create mode 100644 packages/3rdparty/multimedia/vdr-plugin-xvdr/patches/vdr-plugin-xvdr-vdr-2.1.2-buildfix.patch diff --git a/packages/3rdparty/multimedia/vdr-epgsearch/patches/vdr-epgsearch-02_vdr-2.1.2-buildfix.patch b/packages/3rdparty/multimedia/vdr-epgsearch/patches/vdr-epgsearch-02_vdr-2.1.2-buildfix.patch new file mode 100644 index 0000000000..4a1a5f1f23 --- /dev/null +++ b/packages/3rdparty/multimedia/vdr-epgsearch/patches/vdr-epgsearch-02_vdr-2.1.2-buildfix.patch @@ -0,0 +1,19 @@ +commit e8bb2e8e0ef3602fc8cb252cee541bed5d45fc5c +Author: Stefan Saraev +Date: Sat Oct 19 22:19:10 2013 +0300 + + vdr 2.1.2 buildfix + +diff --git a/uservars.h b/uservars.h +index f098750..a0e047c 100644 +--- a/uservars.h ++++ b/uservars.h +@@ -538,7 +538,7 @@ class cVideodirVar : public cInternalVar { + cVideodirVar() : cInternalVar("videodir") {} + string Evaluate(const cEvent*, bool escapeStrings = false) + { +- return VideoDirectory; ++ return cVideoDirectory::Name(); + } + }; + diff --git a/packages/3rdparty/multimedia/vdr-live/patches/vdr-live-0.3.0-05_vdr-2.1.2-buildfix.patch b/packages/3rdparty/multimedia/vdr-live/patches/vdr-live-0.3.0-05_vdr-2.1.2-buildfix.patch new file mode 100644 index 0000000000..dd576b9e10 --- /dev/null +++ b/packages/3rdparty/multimedia/vdr-live/patches/vdr-live-0.3.0-05_vdr-2.1.2-buildfix.patch @@ -0,0 +1,76 @@ +commit 0f8a281027f852ed5968361bcb7420ed242d0476 +Author: Stefan Saraev +Date: Sat Oct 19 22:15:14 2013 +0300 + + vdr 2.1.2 buildfix + +diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp +index 80f145b..6da5285 100644 +--- a/pages/recordings.ecpp ++++ b/pages/recordings.ecpp +@@ -79,7 +79,7 @@ for (deletions_type::const_iterator it = deletions.begin(); it != deletions.end( + deletions.clear(); + + int FreeMB, UsedMB; +-int Percent = VideoDiskSpace(&FreeMB, &UsedMB); ++int Percent = cVideoDirectory::VideoDiskSpace(&FreeMB, &UsedMB); + int Minutes = int(double(FreeMB) / MB_PER_MINUTE); + int Hours = Minutes / 60; + Minutes %= 60; +diff --git a/recman.cpp b/recman.cpp +index 6a2fc00..9ed88f0 100644 +--- a/recman.cpp ++++ b/recman.cpp +@@ -112,7 +112,7 @@ namespace vdrlive { + if (found == string::npos) + return false; + +- string newname = string(VideoDirectory) + "/" + name + oldname.substr(found); ++ string newname = string(cVideoDirectory::Name()) + "/" + name + oldname.substr(found); + + if (!MoveDirectory(oldname.c_str(), newname.c_str(), copy)) { + esyslog("[LIVE]: renaming failed from '%s' to '%s'", oldname.c_str(), newname.c_str()); +diff --git a/tntconfig.cpp b/tntconfig.cpp +index 3325776..161fdc4 100644 +--- a/tntconfig.cpp ++++ b/tntconfig.cpp +@@ -279,7 +279,7 @@ namespace vdrlive { + // inserted by 'tadi' -- not verified, not counterchecked yet! + //app.mapUrl("^/vlc/(.+)", "static@tntnet") + // .setPathInfo("/$1") +- // .pushArg(string("DocumentRoot=") + VideoDirectory); ++ // .pushArg(string("DocumentRoot=") + cVideoDirectory::Name()); + + // the following selects the theme specific 'theme.css' file + // inserted by 'tadi' -- verified with above, but not counterchecked yet! +diff --git a/tools.cpp b/tools.cpp +index c744d06..cb3529e 100644 +--- a/tools.cpp ++++ b/tools.cpp +@@ -365,7 +365,7 @@ namespace vdrlive { + stat(source.c_str(), &st1); + stat(target.c_str(),&st2); + if (!copy && (st1.st_dev == st2.st_dev)) { +- if (!RenameVideoFile(source.c_str(), target.c_str())) { ++ if (!cVideoDirectory::RenameVideoFile(source.c_str(), target.c_str())) { + esyslog("[LIVE]: rename failed from %s to %s", source.c_str(), target.c_str()); + return false; + } +@@ -461,7 +461,7 @@ namespace vdrlive { + size_t found = source.find_last_of(delim); + if (found != std::string::npos) { + source = source.substr(0, found); +- while (source != VideoDirectory) { ++ while (source != cVideoDirectory::Name()) { + found = source.find_last_of(delim); + if (found == std::string::npos) + break; +@@ -478,7 +478,7 @@ namespace vdrlive { + size_t found = target.find_last_of(delim); + if (found != std::string::npos) { + target = target.substr(0, found); +- while (target != VideoDirectory) { ++ while (target != cVideoDirectory::Name()) { + found = target.find_last_of(delim); + if (found == std::string::npos) + break; diff --git a/packages/3rdparty/multimedia/vdr-plugin-streamdev/patches/vdr-plugin-streamdev-03_vdr-2.1.2-buildfix.patch b/packages/3rdparty/multimedia/vdr-plugin-streamdev/patches/vdr-plugin-streamdev-03_vdr-2.1.2-buildfix.patch new file mode 100644 index 0000000000..99fba05523 --- /dev/null +++ b/packages/3rdparty/multimedia/vdr-plugin-streamdev/patches/vdr-plugin-streamdev-03_vdr-2.1.2-buildfix.patch @@ -0,0 +1,25 @@ +From 18f51127373375ce189be498a64cc286114f142f Mon Sep 17 00:00:00 2001 +From: Stefan Saraev +Date: Sat, 19 Oct 2013 21:40:14 +0300 +Subject: [PATCH] vdr 2.1.2 buildfix + +--- + server/connectionVTP.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/server/connectionVTP.c b/server/connectionVTP.c +index 55c92de..57bb64b 100644 +--- a/server/connectionVTP.c ++++ b/server/connectionVTP.c +@@ -1377,7 +1377,7 @@ bool cConnectionVTP::CmdSTAT(const char *Option) + if (*Option) { + if (strcasecmp(Option, "DISK") == 0) { + int FreeMB, UsedMB; +- int Percent = VideoDiskSpace(&FreeMB, &UsedMB); ++ int Percent = cVideoDirectory::VideoDiskSpace(&FreeMB, &UsedMB); + Reply(250, "%dMB %dMB %d%%", FreeMB + UsedMB, FreeMB, Percent); + } + else if (strcasecmp(Option, "NAME") == 0) { +-- +1.7.2.5 + diff --git a/packages/3rdparty/multimedia/vdr-plugin-vnsiserver/patches/cd5023b/vdr-plugin-vnsiserver-02_vdr-2.1.2-buildfix.patch b/packages/3rdparty/multimedia/vdr-plugin-vnsiserver/patches/cd5023b/vdr-plugin-vnsiserver-02_vdr-2.1.2-buildfix.patch new file mode 100644 index 0000000000..686ce54cad --- /dev/null +++ b/packages/3rdparty/multimedia/vdr-plugin-vnsiserver/patches/cd5023b/vdr-plugin-vnsiserver-02_vdr-2.1.2-buildfix.patch @@ -0,0 +1,45 @@ +commit 23a2343b962777ae0dc206934abf1202c271f1e6 +Author: Stefan Saraev +Date: Sat Oct 19 21:56:23 2013 +0300 + + vdr 2.1.2 buildfix + +diff --git a/videobuffer.c b/videobuffer.c +index 0c26807..c393827 100644 +--- a/videobuffer.c ++++ b/videobuffer.c +@@ -386,7 +386,7 @@ bool cVideoBufferFile::Init() + m_Filename = cString::sprintf("%s/Timeshift-%d.vnsi", TimeshiftBufferDir, m_ClientID); + } + else +- m_Filename = cString::sprintf("%s/Timeshift-%d.vnsi", VideoDirectory, m_ClientID); ++ m_Filename = cString::sprintf("%s/Timeshift-%d.vnsi", cVideoDirectory::Name(), m_ClientID); + + m_Fd = open(m_Filename, O_RDWR | O_CREAT | O_TRUNC, S_IRWXU); + if (m_Fd == -1) +diff --git a/vnsiclient.c b/vnsiclient.c +index b724ce7..ecbcd7f 100644 +--- a/vnsiclient.c ++++ b/vnsiclient.c +@@ -1403,7 +1403,7 @@ bool cVNSIClient::processTIMER_Update() /* OPCODE 85 */ + bool cVNSIClient::processRECORDINGS_GetDiskSpace() /* OPCODE 100 */ + { + int FreeMB; +- int Percent = VideoDiskSpace(&FreeMB); ++ int Percent = cVideoDirectory::VideoDiskSpace(&FreeMB); + int Total = (FreeMB / (100 - Percent)) * 100; + + m_resp->add_U32(Total); +diff --git a/vnsiserver.c b/vnsiserver.c +index 5748da8..568d481 100644 +--- a/vnsiserver.c ++++ b/vnsiserver.c +@@ -213,7 +213,7 @@ void cVNSIServer::Action(void) + } + else + { +- cmd = cString::sprintf("rm -f %s/*.vnsi", VideoDirectory); ++ cmd = cString::sprintf("rm -f %s/*.vnsi", cVideoDirectory::Name()); + } + int ret = system(cmd); + diff --git a/packages/3rdparty/multimedia/vdr-plugin-xmltv2vdr/patches/vdr-plugin-xmltv2vdr-01_vdr-2.1.2-buildfix.patch b/packages/3rdparty/multimedia/vdr-plugin-xmltv2vdr/patches/vdr-plugin-xmltv2vdr-01_vdr-2.1.2-buildfix.patch new file mode 100644 index 0000000000..463382e35d --- /dev/null +++ b/packages/3rdparty/multimedia/vdr-plugin-xmltv2vdr/patches/vdr-plugin-xmltv2vdr-01_vdr-2.1.2-buildfix.patch @@ -0,0 +1,19 @@ +commit 6d5c30323f49c7960c873a423ec948834bbe8737 +Author: Stefan Saraev +Date: Sat Oct 19 22:24:10 2013 +0300 + + vdr 2.1.2 buildfix + +diff --git a/xmltv2vdr.cpp b/xmltv2vdr.cpp +index b367508..7b61c61 100644 +--- a/xmltv2vdr.cpp ++++ b/xmltv2vdr.cpp +@@ -274,7 +274,7 @@ cGlobals::cGlobals() + imgdelafter=30; + soundex=false; + +- if (asprintf(&epgfile_store,"%s/epg.db",VideoDirectory)==-1) {}; ++ if (asprintf(&epgfile_store,"%s/epg.db",cVideoDirectory::Name())==-1) {}; + + if (!CheckEPGDir("/var/run/vdr")) + { diff --git a/packages/3rdparty/multimedia/vdr-plugin-xvdr/patches/vdr-plugin-xvdr-vdr-2.1.2-buildfix.patch b/packages/3rdparty/multimedia/vdr-plugin-xvdr/patches/vdr-plugin-xvdr-vdr-2.1.2-buildfix.patch new file mode 100644 index 0000000000..2a82b25b9b --- /dev/null +++ b/packages/3rdparty/multimedia/vdr-plugin-xvdr/patches/vdr-plugin-xvdr-vdr-2.1.2-buildfix.patch @@ -0,0 +1,32 @@ +commit 45b2e4ce57e345a9b9344d5b8d8f46155b872a27 +Author: Stefan Saraev +Date: Sat Oct 19 21:48:49 2013 +0300 + + vdr 2.1.2 buildfix + +diff --git a/src/config/config.c b/src/config/config.c +index e058e96..1aaf9b8 100644 +--- a/src/config/config.c ++++ b/src/config/config.c +@@ -45,7 +45,7 @@ cXVDRServerConfig::cXVDRServerConfig() + } + + void cXVDRServerConfig::Load() { +- cLiveQueue::SetTimeShiftDir(VideoDirectory); ++ cLiveQueue::SetTimeShiftDir(cVideoDirectory::Name()); + cRecordingsCache::GetInstance().LoadResumeData(); + + if(!cConfig::Load(AddDirectory(ConfigDirectory, GENERAL_CONFIG_FILE), true, false)) +diff --git a/src/xvdr/xvdrclient.c b/src/xvdr/xvdrclient.c +index a1a9460..e15dd8f 100644 +--- a/src/xvdr/xvdrclient.c ++++ b/src/xvdr/xvdrclient.c +@@ -1385,7 +1385,7 @@ bool cXVDRClient::processTIMER_Update() /* OPCODE 85 */ + bool cXVDRClient::processRECORDINGS_GetDiskSpace() /* OPCODE 100 */ + { + int FreeMB; +- int Percent = VideoDiskSpace(&FreeMB); ++ int Percent = cVideoDirectory::VideoDiskSpace(&FreeMB); + int Total = (FreeMB / (100 - Percent)) * 100; + + m_resp->put_U32(Total); diff --git a/packages/3rdparty/multimedia/vdr/package.mk b/packages/3rdparty/multimedia/vdr/package.mk index e475592141..9be5511504 100644 --- a/packages/3rdparty/multimedia/vdr/package.mk +++ b/packages/3rdparty/multimedia/vdr/package.mk @@ -20,7 +20,7 @@ ################################################################################ PKG_NAME="vdr" -PKG_VERSION="2.1.1" +PKG_VERSION="2.1.2" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" From e84840a3782f6c14b72b82341aa85a241871b68b Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Sat, 19 Oct 2013 23:21:54 +0300 Subject: [PATCH 15/17] rtmpdump: install rtmpdump binary this reverts part of f4fd322f --- packages/multimedia/rtmpdump/install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/multimedia/rtmpdump/install b/packages/multimedia/rtmpdump/install index c9a3ea51c3..a4412219da 100755 --- a/packages/multimedia/rtmpdump/install +++ b/packages/multimedia/rtmpdump/install @@ -22,6 +22,9 @@ . config/options $1 +mkdir -p $INSTALL/usr/bin + cp -P $PKG_BUILD/rtmpdump $INSTALL/usr/bin + mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/librtmp/*.so* $INSTALL/usr/lib From 0602e65dc8e888a8a0ea596818946a863f1d26f2 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Sun, 20 Oct 2013 13:44:02 +0300 Subject: [PATCH 16/17] xbmc: remove unused patches --- ...bmc-theme-Confluence-990.07-PR2449-2.patch | 35 ------- ...ix_incorrect_usage_of_flag_talled.patch.bk | 99 ------------------- ...Player-some_caching_fixes_for_pvr.patch.bk | 69 ------------- ...HONOPTIMIZE_with_external_Python-0.1.patch | 19 ---- .../xbmc-452-change_lcd_content-0.1.patch | 12 --- ...bmc-453-add_openelec.tv_RSS_news-0.1.patch | 11 --- ...-990.00-remove-windowed-display-mode.patch | 13 --- ...eep-old-repo-content-if-update-fails.patch | 24 ----- .../xbmc-990.29-alsa-LOGDEBUG.patch | 12 --- ...nd-wait-for-the-first-NIC-to-come-up.patch | 74 -------------- ...context-menu-remove-safely-selection.patch | 66 ------------- ...e-udevil-to-umount.-escape-mountpath.patch | 39 -------- 12 files changed, 473 deletions(-) delete mode 100644 packages/mediacenter/xbmc-theme-Confluence/patches/12.2.0/xbmc-theme-Confluence-990.07-PR2449-2.patch delete mode 100644 packages/mediacenter/xbmc/patches/12.2-9714e7e/todo/xbmc-995.03-OMXPlayer-Audio-fix_incorrect_usage_of_flag_talled.patch.bk delete mode 100644 packages/mediacenter/xbmc/patches/12.2-9714e7e/todo/xbmc-995.04-OMXPlayer-some_caching_fixes_for_pvr.patch.bk delete mode 100644 packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch delete mode 100644 packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-452-change_lcd_content-0.1.patch delete mode 100644 packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-453-add_openelec.tv_RSS_news-0.1.patch delete mode 100644 packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.00-remove-windowed-display-mode.patch delete mode 100644 packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.26-keep-old-repo-content-if-update-fails.patch delete mode 100644 packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.29-alsa-LOGDEBUG.patch delete mode 100644 packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.30-After-suspend-wait-for-the-first-NIC-to-come-up.patch delete mode 100644 packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-AML-XB9295c3f-04-fixed-context-menu-remove-safely-selection.patch delete mode 100644 packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-AML-XB9295c3f-05-use-udevil-to-umount.-escape-mountpath.patch diff --git a/packages/mediacenter/xbmc-theme-Confluence/patches/12.2.0/xbmc-theme-Confluence-990.07-PR2449-2.patch b/packages/mediacenter/xbmc-theme-Confluence/patches/12.2.0/xbmc-theme-Confluence-990.07-PR2449-2.patch deleted file mode 100644 index 8183ed4e4a..0000000000 --- a/packages/mediacenter/xbmc-theme-Confluence/patches/12.2.0/xbmc-theme-Confluence-990.07-PR2449-2.patch +++ /dev/null @@ -1,35 +0,0 @@ -From efbf84893cb0d5d41232a29cd1f51f7d5cf53cb4 Mon Sep 17 00:00:00 2001 -From: xbmc -Date: Sat, 16 Mar 2013 15:54:04 +0100 -Subject: [PATCH] skin.confluence: adjust row label 2 in VideoFullScreen to - line break in codec info - ---- - addons/skin.confluence/720p/VideoFullScreen.xml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/720p/VideoFullScreen.xml b/720p/VideoFullScreen.xml -index 43cf714..8bdc8c8 100644 ---- a/720p/VideoFullScreen.xml -+++ b/720p/VideoFullScreen.xml -@@ -339,7 +339,7 @@ - - row 2 label - 50 -- 40 -+ 55 - 1180 - 30 - left -@@ -350,7 +350,7 @@ - - row 3 label - 50 -- 85 -+ 100 - 1180 - 30 - left --- -1.8.1.5 - diff --git a/packages/mediacenter/xbmc/patches/12.2-9714e7e/todo/xbmc-995.03-OMXPlayer-Audio-fix_incorrect_usage_of_flag_talled.patch.bk b/packages/mediacenter/xbmc/patches/12.2-9714e7e/todo/xbmc-995.03-OMXPlayer-Audio-fix_incorrect_usage_of_flag_talled.patch.bk deleted file mode 100644 index 8c7b2195be..0000000000 --- a/packages/mediacenter/xbmc/patches/12.2-9714e7e/todo/xbmc-995.03-OMXPlayer-Audio-fix_incorrect_usage_of_flag_talled.patch.bk +++ /dev/null @@ -1,99 +0,0 @@ -diff -Naur xbmc-12.1/xbmc/cores/omxplayer/OMXPlayerAudio.cpp xbmc-12.1.patch/xbmc/cores/omxplayer/OMXPlayerAudio.cpp ---- xbmc-12.1/xbmc/cores/omxplayer/OMXPlayerAudio.cpp 2013-04-07 22:10:57.264461705 +0200 -+++ xbmc-12.1.patch/xbmc/cores/omxplayer/OMXPlayerAudio.cpp 2013-04-07 22:18:08.064718783 +0200 -@@ -80,6 +80,7 @@ - m_send_eos = false; - m_bad_state = false; - m_hints_current.Clear(); -+ m_output_stalled = false; - - m_av_clock->SetMasterClock(false); - -@@ -154,6 +155,7 @@ - m_stalled = m_messageQueue.GetPacketCount(CDVDMsg::DEMUXER_PACKET) == 0; - m_use_passthrough = (g_guiSettings.GetInt("audiooutput.mode") == AUDIO_HDMI) ? true : false ; - m_use_hw_decode = g_advancedSettings.m_omxHWAudioDecode; -+ m_output_stalled = m_stalled; - } - - bool OMXPlayerAudio::CloseStream(bool bWaitForBuffers) -@@ -442,11 +444,11 @@ - } - - if(bDropPacket) -- m_stalled = false; -+ m_stalled = m_output_stalled = false; - - if(m_omxAudio.GetCacheTime() < 0.1 /*&& min(99,m_messageQueue.GetLevel() + MathUtils::round_int(100.0/8.0*GetCacheTime())) > 10*/) - { -- m_stalled = true; -+ m_stalled = m_output_stalled = true; - if(!m_av_clock->OMXAudioBuffer() && m_av_clock->HasVideo() && m_speed == DVD_PLAYSPEED_NORMAL) - { - clock_gettime(CLOCK_REALTIME, &m_starttime); -@@ -454,6 +456,9 @@ - } - } - -+ if (m_stalled && m_omxAudio.GetCacheTime() > 0.0) -+ m_stalled = false; -+ - // signal to our parent that we have initialized - if(m_started == false) - { -@@ -478,6 +483,7 @@ - - if (ret == MSGQ_TIMEOUT) - { -+ m_stalled = true; - Sleep(10); - continue; - } -@@ -497,12 +503,14 @@ - CLog::Log(LOGINFO, "Audio: dts:%.0f pts:%.0f size:%d (s:%d f:%d d:%d l:%d) s:%d %d/%d late:%d,%d", pPacket->dts, pPacket->pts, - (int)pPacket->iSize, m_started, m_flush, bPacketDrop, m_stalled, m_speed, 0, 0, (int)m_omxAudio.GetAudioRenderingLatency(), (int)m_hints_current.samplerate); - #endif -+ -+ m_stalled = false; - if(Decode(pPacket, m_speed > DVD_PLAYSPEED_NORMAL || m_speed < 0 || bPacketDrop)) - { -- if (m_stalled && (m_omxAudio.GetCacheTime() > (AUDIO_BUFFER_SECONDS * 0.75f))) -+ if (m_output_stalled && (m_omxAudio.GetCacheTime() > (AUDIO_BUFFER_SECONDS * 0.75f))) - { - CLog::Log(LOGINFO, "COMXPlayerAudio - Switching to normal playback"); -- m_stalled = false; -+ m_stalled = m_output_stalled = false; - if(m_av_clock->HasVideo() && m_av_clock->OMXAudioBuffer()) - m_av_clock->OMXAudioBufferStop(); - } -@@ -510,9 +518,9 @@ - // hard unlock audio out buffering - clock_gettime(CLOCK_REALTIME, &m_endtime); - //int iLevel = min(99,m_messageQueue.GetLevel() + MathUtils::round_int(100.0/8.0*GetCacheTime())); -- if(/*iLevel < 10 &&*/ m_stalled && m_av_clock->OMXAudioBuffer() && (m_endtime.tv_sec - m_starttime.tv_sec) > 1) -+ if(/*iLevel < 10 &&*/ m_output_stalled && m_av_clock->OMXAudioBuffer() && (m_endtime.tv_sec - m_starttime.tv_sec) > 1) - { -- m_stalled = false; -+ m_stalled = m_output_stalled = false; - if(m_av_clock->HasVideo() && m_av_clock->OMXAudioBuffer()) - m_av_clock->OMXAudioBufferStop(); - } -@@ -563,6 +571,7 @@ - m_av_clock->UnLock(); - m_syncclock = true; - m_stalled = true; -+ m_output_stalled = true; - m_started = false; - - if (m_pAudioCodec) -diff -Naur xbmc-12.1/xbmc/cores/omxplayer/OMXPlayerAudio.h xbmc-12.1.patch/xbmc/cores/omxplayer/OMXPlayerAudio.h ---- xbmc-12.1/xbmc/cores/omxplayer/OMXPlayerAudio.h 2013-04-07 22:10:57.262461708 +0200 -+++ xbmc-12.1.patch/xbmc/cores/omxplayer/OMXPlayerAudio.h 2013-04-07 22:13:15.931280700 +0200 -@@ -76,6 +76,7 @@ - - bool m_stalled; - bool m_started; -+ bool m_output_stalled; - - BitstreamStats m_audioStats; - diff --git a/packages/mediacenter/xbmc/patches/12.2-9714e7e/todo/xbmc-995.04-OMXPlayer-some_caching_fixes_for_pvr.patch.bk b/packages/mediacenter/xbmc/patches/12.2-9714e7e/todo/xbmc-995.04-OMXPlayer-some_caching_fixes_for_pvr.patch.bk deleted file mode 100644 index 1428bfdf8b..0000000000 --- a/packages/mediacenter/xbmc/patches/12.2-9714e7e/todo/xbmc-995.04-OMXPlayer-some_caching_fixes_for_pvr.patch.bk +++ /dev/null @@ -1,69 +0,0 @@ -From eacf9a512d118e50a9777ae05460a2a344a408e6 Mon Sep 17 00:00:00 2001 -From: xbmc -Date: Thu, 28 Mar 2013 15:18:53 +0100 -Subject: [PATCH] OMXPlayer: some caching fixes for pvr - ---- - xbmc/cores/omxplayer/OMXPlayer.cpp | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp -index 28addd3..34f3acb 100644 ---- a/xbmc/cores/omxplayer/OMXPlayer.cpp -+++ b/xbmc/cores/omxplayer/OMXPlayer.cpp -@@ -1243,13 +1243,13 @@ void COMXPlayer::Process() - if (!IsValidStream(m_CurrentAudio) && m_player_audio.IsStalled()) CloseAudioStream(true); - if (!IsValidStream(m_CurrentVideo) && m_player_video.IsStalled()) CloseVideoStream(true); - if (!IsValidStream(m_CurrentSubtitle) && m_player_subtitle.IsStalled()) CloseSubtitleStream(true); -- if (!IsValidStream(m_CurrentTeletext)) CloseTeletextStream(true); -+// if (!IsValidStream(m_CurrentTeletext)) CloseTeletextStream(true); - - // see if we can find something better to play - if (IsBetterStream(m_CurrentAudio, pStream)) OpenAudioStream (pStream->iId, pStream->source); - if (IsBetterStream(m_CurrentVideo, pStream)) OpenVideoStream (pStream->iId, pStream->source); - if (IsBetterStream(m_CurrentSubtitle, pStream)) OpenSubtitleStream(pStream->iId, pStream->source); -- if (IsBetterStream(m_CurrentTeletext, pStream)) OpenTeletextStream(pStream->iId, pStream->source); -+// if (IsBetterStream(m_CurrentTeletext, pStream)) OpenTeletextStream(pStream->iId, pStream->source); - - if(m_change_volume) - { -@@ -2233,7 +2233,8 @@ void COMXPlayer::HandleMessages() - // 1. disable audio - // 2. skip frames and adjust their pts or the clock - m_playSpeed = speed; -- m_caching = CACHESTATE_DONE; -+ if (m_caching != CACHESTATE_PVR && m_playSpeed != DVD_PLAYSPEED_NORMAL) -+ SetCaching(CACHESTATE_DONE); - m_av_clock.SetSpeed(speed); - m_av_clock.OMXSetSpeed(speed); - m_player_audio.SetSpeed(speed); -@@ -3106,7 +3107,7 @@ bool COMXPlayer::CloseAudioStream(bool bWaitForBuffers) - - CLog::Log(LOGNOTICE, "Closing audio stream"); - -- if(bWaitForBuffers) -+ if(bWaitForBuffers && m_caching != CACHESTATE_PVR) - SetCaching(CACHESTATE_DONE); - - m_player_audio.CloseStream(bWaitForBuffers); -@@ -3122,7 +3123,7 @@ bool COMXPlayer::CloseVideoStream(bool bWaitForBuffers) - - CLog::Log(LOGNOTICE, "Closing video stream"); - -- if(bWaitForBuffers) -+ if(bWaitForBuffers && m_caching != CACHESTATE_PVR) - SetCaching(CACHESTATE_DONE); - - m_player_video.CloseStream(bWaitForBuffers); -@@ -3151,7 +3152,7 @@ bool COMXPlayer::CloseTeletextStream(bool bWaitForBuffers) - - CLog::Log(LOGNOTICE, "Closing teletext stream"); - -- if(bWaitForBuffers) -+ if(bWaitForBuffers && m_caching != CACHESTATE_PVR) - SetCaching(CACHESTATE_DONE); - - m_player_teletext.CloseStream(bWaitForBuffers); --- -1.8.1.5 - diff --git a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch b/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch deleted file mode 100644 index c320f3cacc..0000000000 --- a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -Naur xbmc-frodo-5ea1d22/xbmc/interfaces/python/XBPython.cpp xbmc-frodo-5ea1d22.patch/xbmc/interfaces/python/XBPython.cpp ---- xbmc-frodo-5ea1d22/xbmc/interfaces/python/XBPython.cpp 2012-09-05 13:28:20.000000000 +0200 -+++ xbmc-frodo-5ea1d22.patch/xbmc/interfaces/python/XBPython.cpp 2012-09-05 15:50:42.642317031 +0200 -@@ -525,11 +525,10 @@ - // at http://docs.python.org/using/cmdline.html#environment-variables - - #if !defined(_WIN32) && !defined(TARGET_ANDROID) -- /* PYTHONOPTIMIZE is set off intentionally when using external Python. -- Reason for this is because we cannot be sure what version of Python -- was used to compile the various Python object files (i.e. .pyo, -- .pyc, etc.). */ -- // check if we are running as real xbmc.app or just binary -+ // Required for python to find optimized code (pyo) files -+ setenv("PYTHONOPTIMIZE", "1", 1); -+ -+ // check if we are running as real xbmc.app or just binary - if (!CUtil::GetFrameworksPath(true).IsEmpty()) - { - // using external python, it's build looking for xxx/lib/python2.6 diff --git a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-452-change_lcd_content-0.1.patch b/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-452-change_lcd_content-0.1.patch deleted file mode 100644 index 0427b534f9..0000000000 --- a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-452-change_lcd_content-0.1.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur xbmc-pvr-3513480/userdata/LCD.xml xbmc-pvr-3513480.patch/userdata/LCD.xml ---- xbmc-pvr-3513480/userdata/LCD.xml 2011-04-25 02:36:33.000000000 +0200 -+++ xbmc-pvr-3513480.patch/userdata/LCD.xml 2011-04-25 05:27:34.956125133 +0200 -@@ -21,7 +21,7 @@ - Freemem: $INFO[System.FreeMemory] - - -- XBMC running... -+ *** OpenELEC *** - $INFO[System.Time] $INFO[System.Date] - Freemem: $INFO[System.FreeMemory] - $INFO[System.ScreenWidth]x$INFO[System.ScreenHeight] $INFO[System.ScreenMode] diff --git a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-453-add_openelec.tv_RSS_news-0.1.patch b/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-453-add_openelec.tv_RSS_news-0.1.patch deleted file mode 100644 index f0b08b5e8d..0000000000 --- a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-453-add_openelec.tv_RSS_news-0.1.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur xbmc-12.0.7/userdata/RssFeeds.xml xbmc-12.0.7.patch/userdata/RssFeeds.xml ---- xbmc-12.0.7/userdata/RssFeeds.xml 2013-03-15 14:25:26.000000000 +0100 -+++ xbmc-12.0.7.patch/userdata/RssFeeds.xml 2013-03-15 14:40:54.695338102 +0100 -@@ -3,6 +3,7 @@ - - - -+ http://feeds.openelec.tv/news - http://feeds.xbmc.org/xbmc - - diff --git a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.00-remove-windowed-display-mode.patch b/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.00-remove-windowed-display-mode.patch deleted file mode 100644 index 88d8ac4a2b..0000000000 --- a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.00-remove-windowed-display-mode.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/xbmc/settings/GUIWindowSettingsCategory.cpp b/xbmc/settings/GUIWindowSettingsCategory.cpp -index cbf0acb..f789e18 100644 ---- a/xbmc/settings/GUIWindowSettingsCategory.cpp -+++ b/xbmc/settings/GUIWindowSettingsCategory.cpp -@@ -2434,7 +2434,7 @@ DisplayMode CGUIWindowSettingsCategory::FillInScreens(CStdString strSetting, RES - pControl->Clear(); - - CStdString strScreen; -- if (g_advancedSettings.m_canWindowed) -+ if (g_advancedSettings.m_canWindowed && !g_application.IsStandAlone()) - pControl->AddLabel(g_localizeStrings.Get(242), -1); - - #if !defined(HAS_GLX) diff --git a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.26-keep-old-repo-content-if-update-fails.patch b/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.26-keep-old-repo-content-if-update-fails.patch deleted file mode 100644 index b7c5b4ad63..0000000000 --- a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.26-keep-old-repo-content-if-update-fails.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 6a4d9b842a29fa9b0c233517826baffe5caec0cb Mon Sep 17 00:00:00 2001 -From: Stefan Saraev -Date: Wed, 11 Sep 2013 22:52:10 +0300 -Subject: [PATCH] keep old repo content if update fails - ---- - xbmc/addons/Repository.cpp | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/xbmc/addons/Repository.cpp b/xbmc/addons/Repository.cpp -index 0958d47..77b1d9a 100644 ---- a/xbmc/addons/Repository.cpp -+++ b/xbmc/addons/Repository.cpp -@@ -273,6 +273,7 @@ VECADDONS CRepositoryUpdateJob::GrabAddons(RepositoryPtr& repo) - { - CLog::Log(LOGERROR,"Repository %s returned no add-ons, listing may have failed",repo->Name().c_str()); - reposum = checksum; // don't update the checksum -+ database.GetRepository(repo->ID(),addons); // keep old addons - } - database.AddRepository(repo->ID(),addons,reposum); - } --- -1.7.2.5 - diff --git a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.29-alsa-LOGDEBUG.patch b/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.29-alsa-LOGDEBUG.patch deleted file mode 100644 index 52fdd3eb90..0000000000 --- a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.29-alsa-LOGDEBUG.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur xbmc-12.2-68a881d/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp xbmc-12.2-68a881d.patch/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp ---- xbmc-12.2-68a881d/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2013-09-12 19:41:16.000000000 +0200 -+++ xbmc-12.2-68a881d.patch/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2013-09-13 00:12:05.538128585 +0200 -@@ -1180,7 +1180,7 @@ - char *errorStr; - if (vasprintf(&errorStr, fmt, arg) >= 0) - { -- CLog::Log(LOGINFO, "CAESinkALSA - ALSA: %s:%d:(%s) %s%s%s", -+ CLog::Log(LOGDEBUG, "CAESinkALSA - ALSA: %s:%d:(%s) %s%s%s", - file, line, function, errorStr, err ? ": " : "", err ? snd_strerror(err) : ""); - free(errorStr); - } diff --git a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.30-After-suspend-wait-for-the-first-NIC-to-come-up.patch b/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.30-After-suspend-wait-for-the-first-NIC-to-come-up.patch deleted file mode 100644 index 8cf2528f23..0000000000 --- a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-990.30-After-suspend-wait-for-the-first-NIC-to-come-up.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 7cd450bb2b8ea18277efff955202bf3b36573898 Mon Sep 17 00:00:00 2001 -From: verybadsoldier -Date: Sun, 1 Sep 2013 17:10:19 +0200 -Subject: [PATCH] After suspend wait for the first NIC to come up before - continuing - ---- - xbmc/powermanagement/PowerManager.cpp | 24 ++++++++++++++++++++++++ - xbmc/powermanagement/PowerManager.h | 2 ++ - 2 files changed, 26 insertions(+) - -diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp -index a68910b..8e93492 100644 ---- a/xbmc/powermanagement/PowerManager.cpp -+++ b/xbmc/powermanagement/PowerManager.cpp -@@ -23,6 +23,7 @@ - #include "Application.h" - #include "cores/AudioEngine/AEFactory.h" - #include "input/KeyboardStat.h" -+#include "network/Network.h" - #include "settings/GUISettings.h" - #include "windowing/WindowingFactory.h" - #include "utils/log.h" -@@ -207,6 +207,8 @@ void CPowerManager::OnWake() - { - CLog::Log(LOGNOTICE, "%s: Running resume jobs", __FUNCTION__); - -+ WaitForNic(); -+ - // reset out timers - g_application.ResetShutdownTimers(); - -@@ -254,3 +256,25 @@ void CPowerManager::OnLowBattery() - - CAnnouncementManager::Announce(System, "xbmc", "OnLowBattery"); - } -+ -+void CPowerManager::WaitForNic() -+{ -+ CLog::Log(LOGDEBUG, "%s: Waithing for first NIC to come up", __FUNCTION__); -+ -+ const unsigned maxLoopCount = 50u; -+ const unsigned sleepTimeMs = 200u; -+ -+ for(unsigned i=0; i < maxLoopCount; ++i) -+ { -+ CNetworkInterface* pIface = g_application.getNetwork().GetFirstConnectedInterface(); -+ if (pIface && pIface->IsEnabled() && pIface->IsConnected()) -+ { -+ CLog::Log(LOGDEBUG, "%s: NIC is up after waiting %d ms", __FUNCTION__, i * sleepTimeMs); -+ return; -+ } -+ -+ Sleep(sleepTimeMs); -+ } -+ -+ CLog::Log(LOGDEBUG, "%s: NIC did not come up within %d ms... Lets give up...", __FUNCTION__, maxLoopCount * sleepTimeMs); -+} -diff --git a/xbmc/powermanagement/PowerManager.h b/xbmc/powermanagement/PowerManager.h -index deb4b66..476cdc1 100644 ---- a/xbmc/powermanagement/PowerManager.h -+++ b/xbmc/powermanagement/PowerManager.h -@@ -73,6 +73,8 @@ class CPowerManager : public IPowerEventsCallback - - void OnLowBattery(); - -+ void WaitForNic(); -+ - IPowerSyscall *m_instance; - }; - --- -1.8.4 - diff --git a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-AML-XB9295c3f-04-fixed-context-menu-remove-safely-selection.patch b/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-AML-XB9295c3f-04-fixed-context-menu-remove-safely-selection.patch deleted file mode 100644 index bdb266bbd0..0000000000 --- a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-AML-XB9295c3f-04-fixed-context-menu-remove-safely-selection.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 35400b9a93e5c2c9aa6dc389736af293fc623a5b Mon Sep 17 00:00:00 2001 -From: davilla -Date: Thu, 3 Jan 2013 11:20:22 -0500 -Subject: [PATCH] [aml] fixed context menu 'remove safely' selection - ---- - xbmc/linux/PosixMountProvider.cpp | 10 ++++++++++ - xbmc/linux/PosixMountProvider.h | 2 +- - xbmc/storage/linux/UDevProvider.cpp | 7 ++++++- - 3 files changed, 17 insertions(+), 2 deletions(-) - -diff --git a/xbmc/linux/PosixMountProvider.cpp b/xbmc/linux/PosixMountProvider.cpp -index 2420491..27d639e 100644 ---- a/xbmc/linux/PosixMountProvider.cpp -+++ b/xbmc/linux/PosixMountProvider.cpp -@@ -127,6 +127,16 @@ void CPosixMountProvider::GetDrives(VECSOURCES &drives) - return result; - } - -+bool CPosixMountProvider::Eject(CStdString mountpath) -+{ -+ // just go ahead and try to umount the disk -+ // if it does umount, life is good, if not, no loss. -+ std::string cmd = "umount " + mountpath; -+ system(cmd.c_str()); -+ -+ return true; -+} -+ - bool CPosixMountProvider::PumpDriveChangeEvents(IStorageEventsCallback *callback) - { - VECSOURCES drives; -diff --git a/xbmc/linux/PosixMountProvider.h b/xbmc/linux/PosixMountProvider.h -index da0506c..02ff302 100644 ---- a/xbmc/linux/PosixMountProvider.h -+++ b/xbmc/linux/PosixMountProvider.h -@@ -34,7 +34,7 @@ class CPosixMountProvider : public IStorageProvider - - virtual std::vector GetDiskUsage(); - -- virtual bool Eject(CStdString mountpath) { return false; } -+ virtual bool Eject(CStdString mountpath); - - virtual bool PumpDriveChangeEvents(IStorageEventsCallback *callback); - private: -diff --git a/xbmc/storage/linux/UDevProvider.cpp b/xbmc/storage/linux/UDevProvider.cpp -index 21b6b50..d9e6a4f 100644 ---- a/xbmc/storage/linux/UDevProvider.cpp -+++ b/xbmc/storage/linux/UDevProvider.cpp -@@ -179,7 +179,12 @@ void CUDevProvider::GetRemovableDrives(VECSOURCES &removableDrives) - - bool CUDevProvider::Eject(CStdString mountpath) - { -- return false; -+ // just go ahead and try to umount the disk -+ // if it does umount, life is good, if not, no loss. -+ std::string cmd = "umount " + mountpath; -+ system(cmd.c_str()); -+ -+ return true; - } - - std::vector CUDevProvider::GetDiskUsage() --- -1.8.4 - diff --git a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-AML-XB9295c3f-05-use-udevil-to-umount.-escape-mountpath.patch b/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-AML-XB9295c3f-05-use-udevil-to-umount.-escape-mountpath.patch deleted file mode 100644 index 6da61a6608..0000000000 --- a/packages/mediacenter/xbmc/patches/12.2-9714e7e/xbmc-AML-XB9295c3f-05-use-udevil-to-umount.-escape-mountpath.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 023acdbbe7b3766e3e1bf509e92d967903aee680 Mon Sep 17 00:00:00 2001 -From: Stefan Saraev -Date: Sat, 31 Aug 2013 18:19:43 +0300 -Subject: [PATCH] use udevil to umount. escape mountpath - ---- - xbmc/linux/PosixMountProvider.cpp | 2 +- - xbmc/storage/linux/UDevProvider.cpp | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/xbmc/linux/PosixMountProvider.cpp b/xbmc/linux/PosixMountProvider.cpp -index bbf47fa..2004b44 100644 ---- a/xbmc/linux/PosixMountProvider.cpp -+++ b/xbmc/linux/PosixMountProvider.cpp -@@ -130,7 +130,7 @@ bool CPosixMountProvider::Eject(CStdString mountpath) - { - // just go ahead and try to umount the disk - // if it does umount, life is good, if not, no loss. -- std::string cmd = "umount " + mountpath; -+ std::string cmd = "udevil umount \"" + mountpath + "\""; - system(cmd.c_str()); - - return true; -diff --git a/xbmc/storage/linux/UDevProvider.cpp b/xbmc/storage/linux/UDevProvider.cpp -index e9c86ab..2f3a5ea 100644 ---- a/xbmc/storage/linux/UDevProvider.cpp -+++ b/xbmc/storage/linux/UDevProvider.cpp -@@ -183,7 +183,7 @@ bool CUDevProvider::Eject(CStdString mountpath) - { - // just go ahead and try to umount the disk - // if it does umount, life is good, if not, no loss. -- std::string cmd = "umount " + mountpath; -+ std::string cmd = "udevil umount \"" + mountpath + "\""; - system(cmd.c_str()); - - return true; --- -1.7.2.5 - From 9b9994b037184a82dc145b9137a8f131cdcb32a5 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Sun, 20 Oct 2013 14:04:36 +0300 Subject: [PATCH 17/17] xbmc: update to xbmc-13.alpha-ed1d9c7 --- .../mediacenter/xbmc-theme-Confluence/meta | 2 +- packages/mediacenter/xbmc/package.mk | 2 +- ...HONOPTIMIZE_with_external_Python-0.1.patch | 0 ...bmc-453-add_openelec.tv_RSS_news-0.1.patch | 0 ...add_as.xml_busy_dialog_delay_control.patch | 0 ...s-mark_our_wrapped_functions_as_used.patch | 0 ...mc-995.01-fernetmenta-fixes-b17818b.patch} | 5385 ++++++++++++++++- .../xbmc-995.10-disable-minimize.patch | 0 ...context-menu-remove-safely-selection.patch | 0 ...e-udevil-to-umount.-escape-mountpath.patch | 0 10 files changed, 5178 insertions(+), 211 deletions(-) rename packages/mediacenter/xbmc/patches/{13.alpha-923f1c8 => 13.alpha-ed1d9c7}/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch (100%) rename packages/mediacenter/xbmc/patches/{13.alpha-923f1c8 => 13.alpha-ed1d9c7}/xbmc-453-add_openelec.tv_RSS_news-0.1.patch (100%) rename packages/mediacenter/xbmc/patches/{13.alpha-923f1c8 => 13.alpha-ed1d9c7}/xbmc-602-add_as.xml_busy_dialog_delay_control.patch (100%) rename packages/mediacenter/xbmc/patches/{13.alpha-923f1c8 => 13.alpha-ed1d9c7}/xbmc-990.15-depends-mark_our_wrapped_functions_as_used.patch (100%) rename packages/mediacenter/xbmc/patches/{13.alpha-923f1c8/xbmc-995.01-vdpau-fixes-e7eb33d.patch => 13.alpha-ed1d9c7/xbmc-995.01-fernetmenta-fixes-b17818b.patch} (59%) rename packages/mediacenter/xbmc/patches/{13.alpha-923f1c8 => 13.alpha-ed1d9c7}/xbmc-995.10-disable-minimize.patch (100%) rename packages/mediacenter/xbmc/patches/{13.alpha-923f1c8 => 13.alpha-ed1d9c7}/xbmc-AML-XB9295c3f-04-fixed-context-menu-remove-safely-selection.patch (100%) rename packages/mediacenter/xbmc/patches/{13.alpha-923f1c8 => 13.alpha-ed1d9c7}/xbmc-AML-XB9295c3f-05-use-udevil-to-umount.-escape-mountpath.patch (100%) diff --git a/packages/mediacenter/xbmc-theme-Confluence/meta b/packages/mediacenter/xbmc-theme-Confluence/meta index 21d2583f6e..da92bc8171 100644 --- a/packages/mediacenter/xbmc-theme-Confluence/meta +++ b/packages/mediacenter/xbmc-theme-Confluence/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xbmc-theme-Confluence" -PKG_VERSION="13.alpha-923f1c8" +PKG_VERSION="13.alpha-ed1d9c7" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/mediacenter/xbmc/package.mk b/packages/mediacenter/xbmc/package.mk index 6d52bc74fb..ba0bdf8e48 100644 --- a/packages/mediacenter/xbmc/package.mk +++ b/packages/mediacenter/xbmc/package.mk @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xbmc" -PKG_VERSION="13.alpha-923f1c8" +PKG_VERSION="13.alpha-ed1d9c7" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch b/packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch rename to packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-453-add_openelec.tv_RSS_news-0.1.patch b/packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-453-add_openelec.tv_RSS_news-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-453-add_openelec.tv_RSS_news-0.1.patch rename to packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-453-add_openelec.tv_RSS_news-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-602-add_as.xml_busy_dialog_delay_control.patch b/packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-602-add_as.xml_busy_dialog_delay_control.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-602-add_as.xml_busy_dialog_delay_control.patch rename to packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-602-add_as.xml_busy_dialog_delay_control.patch diff --git a/packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-990.15-depends-mark_our_wrapped_functions_as_used.patch b/packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-990.15-depends-mark_our_wrapped_functions_as_used.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-990.15-depends-mark_our_wrapped_functions_as_used.patch rename to packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-990.15-depends-mark_our_wrapped_functions_as_used.patch diff --git a/packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-995.01-vdpau-fixes-e7eb33d.patch b/packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-995.01-fernetmenta-fixes-b17818b.patch similarity index 59% rename from packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-995.01-vdpau-fixes-e7eb33d.patch rename to packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-995.01-fernetmenta-fixes-b17818b.patch index 6027dba085..b09b181f8c 100644 --- a/packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-995.01-vdpau-fixes-e7eb33d.patch +++ b/packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-995.01-fernetmenta-fixes-b17818b.patch @@ -1,7 +1,4959 @@ -From 6a303d01d00c4ec793b2fde8597ac0fcf3293358 Mon Sep 17 00:00:00 2001 +From 0fd9f31848fb8408f1948c1a62b4b82486b99fce Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Fri, 18 Oct 2013 12:59:07 +0200 +Subject: [PATCH 01/86] refactor audio settings page + +--- + language/English/strings.po | 66 +++++++--- + system/settings/settings.xml | 230 +++++++++++++++++++-------------- + system/settings/win32.xml | 20 +-- + xbmc/cores/AudioEngine/AEFactory.cpp | 42 ++++-- + xbmc/cores/AudioEngine/AEFactory.h | 4 +- + xbmc/cores/AudioEngine/Interfaces/AE.h | 13 +- + xbmc/cores/AudioEngine/Utils/AEUtil.h | 9 -- + xbmc/settings/Settings.cpp | 7 +- + 8 files changed, 246 insertions(+), 145 deletions(-) + +diff --git a/language/English/strings.po b/language/English/strings.po +index 9e186f0..3218bdd 100755 +--- a/language/English/strings.po ++++ b/language/English/strings.po +@@ -1393,17 +1393,17 @@ msgstr "" + + #: system/settings/settings.xml + msgctxt "#337" +-msgid "Audio output" ++msgid "Output configuration" + msgstr "" + + #: system/settings/settings.xml + msgctxt "#338" +-msgid "Analogue" ++msgid "Fixed" + msgstr "" + + #: system/settings/settings.xml + msgctxt "#339" +-msgid "Optical/Coax" ++msgid "Optimized" + msgstr "" + + msgctxt "#340" +@@ -1447,7 +1447,7 @@ msgstr "" + + #: system/settings/settings.xml + msgctxt "#348" +-msgid "Multichannel LPCM capable receiver" ++msgid "Enable passthrough" + msgstr "" + + #: system/settings/settings.xml +@@ -1780,12 +1780,12 @@ msgstr "" + + #: system/settings/settings.xml + msgctxt "#420" +-msgid "HDMI" ++msgid "Best Match" + msgstr "" + + #: system/settings/settings.xml + msgctxt "#421" +-msgid "Stream silence when idle" ++msgid "Keep audio device alive" + msgstr "" + + msgctxt "#422" +@@ -1937,7 +1937,10 @@ msgctxt "#457" + msgid "Switch view" + msgstr "" + +-#empty string with id 458 ++#: system/settings/settings.xml ++msgctxt "#458" ++msgid "Limit sampling rate (kHz)" ++msgstr "" + + msgctxt "#459" + msgid "Subs" +@@ -12442,7 +12445,7 @@ msgstr "" + + #: system/settings/settings.xml + msgctxt "#34111" +-msgid "When activated silence is output in order to keep alive receiver, otherwise sink is drained in idle state" ++msgid "Stream very quiet noise while nothing is played to keep the output device alive at all times. This might block concurrent applications from outputting sound." + msgstr "" + + #empty strings from id 34112 to 34119 +@@ -12471,8 +12474,38 @@ msgctxt "#34123" + msgid "Never" + msgstr "" + +-#empty strings from id 34124 to 34200 +-#34124-34200 reserved for future use ++#. SPDIF max sampling rate ++#: system/settings/settings.xml ++msgctxt "#34124" ++msgid "44.1" ++msgstr "" ++ ++#. SPDIF max sampling rate ++#: system/settings/settings.xml ++msgctxt "#34125" ++msgid "48" ++msgstr "" ++ ++#. SPDIF max sampling rate ++#: system/settings/settings.xml ++msgctxt "#34126" ++msgid "88.2" ++msgstr "" ++ ++#. SPDIF max sampling rate ++#: system/settings/settings.xml ++msgctxt "#34127" ++msgid "96" ++msgstr "" ++ ++#. SPDIF max sampling rate ++#: system/settings/settings.xml ++msgctxt "#34128" ++msgid "192" ++msgstr "" ++ ++#empty strings from id 34129 to 34200 ++#34129-34200 reserved for future use + + #: xbmc\PlayListPlayer.cpp + msgctxt "#34201" +@@ -14175,12 +14208,12 @@ msgstr "" + + #: system/settings/settings.xml + msgctxt "#36361" +-msgid "Type of connection to the audio equipment." ++msgid "Configuration regarding PCM channels and sample rate. Fixed will never change the configuration, Best match will always try to find best configuration for content, Optimized avoids changing it during playback." + msgstr "" + + #: system/settings/settings.xml + msgctxt "#36362" +-msgid "Select your physical speaker layout." ++msgid "PCM channel configuration (does not apply for passthrough)." + msgstr "" + + #: system/settings/settings.xml +@@ -14210,7 +14243,7 @@ msgstr "" + + #: system/settings/settings.xml + msgctxt "#36368" +-msgid "Select this option if your receiver is capable of decoding LPCM streams." ++msgid "Enable passthrough audio options." + msgstr "" + + #: system/settings/settings.xml +@@ -14230,7 +14263,7 @@ msgstr "" + + #: system/settings/settings.xml + msgctxt "#36372" +-msgid "Select the device you use to play encoded formats, these are any of the formats checked above in the 'capable receiver' options." ++msgid "Select the device you use to play encoded formats, these are any of the formats below in the 'capable receiver' options." + msgstr "" + + #: system/settings/settings.xml +@@ -14556,7 +14589,10 @@ msgctxt "#36522" + msgid "Use preferred mode" + msgstr "" + +-#empty string with id 36523 ++#: system/settings/settings.xml ++msgctxt "#36523" ++msgid "Maximum sampling rate for spdif or sampling rate for fixed output configuration" ++msgstr "" + + #: system/settings/settings.xml + msgctxt "#36524" +diff --git a/system/settings/settings.xml b/system/settings/settings.xml +index a381862..6abab54 100644 +--- a/system/settings/settings.xml ++++ b/system/settings/settings.xml +@@ -1967,17 +1967,20 @@ + + + +- +- 1 +- 0 ++ ++ 0 ++ Default + +- audiooutputmodes ++ audiodevices + +- ++ + + + 0 + 1 ++ ++ audiooutput.channels ++ + + + +@@ -1992,14 +1995,48 @@ + + + +- +- audiooutput.channellayout +- + + +- ++ + 2 +- true ++ 2 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ 2 ++ 48000 ++ ++ ++ ++ audiooutput.samplerate ++ audiooutput.samplerate ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ 2 ++ false ++ ++ 1 ++ + + + HAS_AE_QUALITY_LEVELS +@@ -2010,128 +2047,133 @@ + + + +- +- 2 +- false ++ ++ 1 ++ audiosupportsdrain ++ true + +- ++ ++ ++ ++ 0 ++ 1 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + 2 +- true ++ false + +- +- +- 1 +- 2 +- ++ ++ ++ audiooutput.passthrough ++ audiooutput.passthrough ++ + + + +- ++ + 2 +- true ++ Default + +- +- +- 1 +- 2 +- ++ ++ ++ true ++ audiooutput.passthrough ++ audiooutput.passthrough ++ + + +- +- ++ ++ audiodevicespassthrough ++ ++ ++ ++ + 2 + true + +- +- +- 1 +- 2 +- ++ ++ ++ true ++ audiooutput.passthrough ++ audiooutput.passthrough ++ + + + +- ++ + 2 +- false ++ true + +- +- +- 1 +- 2 +- ++ ++ ++ true ++ audiooutput.passthrough ++ audiooutput.passthrough ++ + +- ++ + +- ++ + 2 + true + +- 2 +- ++ ++ ++ true ++ audiooutput.passthrough ++ audiooutput.passthrough ++ ++ ++ + +- ++ + 2 +- true ++ false + +- 2 +- ++ ++ ++ true ++ audiooutput.passthrough ++ audiooutput.passthrough ++ ++ ++ + +- ++ + 2 + true + +- ++ + +- true +- 2 ++ true ++ audiooutput.passthrough ++ audiooutput.passthrough + + +- ++ + +- ++ + 2 +- audiosupportsdrain + true +- +- +- +- +- 2 +- Default +- +- audiodevices +- +- +- +- +- 2 +- Default +- +- audiodevicespassthrough +- + +- +- +- 1 +- 2 +- ++ ++ ++ true ++ audiooutput.passthrough ++ audiooutput.passthrough ++ + +- +- +- +- +- +- +- 0 +- 1 +- +- +- +- +- +- +- +- ++ + + + +diff --git a/system/settings/win32.xml b/system/settings/win32.xml +index bb716a2..acf63d1 100644 +--- a/system/settings/win32.xml ++++ b/system/settings/win32.xml +@@ -40,15 +40,17 @@ + + + +- ++ + +- 2 ++ 1 + DirectSound:default + + audiodevices + +- ++ + ++ ++ + + 2 + DirectSound:default +@@ -56,14 +58,14 @@ + audiodevicespassthrough + + +- +- +- 1 +- 2 +- ++ ++ ++ audiooutput.passthrough ++ audiooutput.passthrough ++ + + +- ++ + + + +diff --git a/xbmc/cores/AudioEngine/AEFactory.cpp b/xbmc/cores/AudioEngine/AEFactory.cpp +index 16fc708..ea4d5a5 100644 +--- a/xbmc/cores/AudioEngine/AEFactory.cpp ++++ b/xbmc/cores/AudioEngine/AEFactory.cpp +@@ -40,6 +40,7 @@ + + #include "guilib/LocalizeStrings.h" + #include "settings/Setting.h" ++#include "settings/Settings.h" + #include "utils/StringUtils.h" + + IAE* CAEFactory::AE = NULL; +@@ -238,10 +239,30 @@ void CAEFactory::VerifyOutputDevice(std::string &device, bool passthrough) + return "default"; + } + +-bool CAEFactory::SupportsRaw() ++bool CAEFactory::SupportsRaw(AEDataFormat format) + { ++ // check if passthrough is enabled ++ if (!CSettings::Get().GetBool("audiooutput.passthrough")) ++ return false; ++ ++ // fixed config disabled passthrough ++ if (CSettings::Get().GetInt("audiooutput.config") == AE_CONFIG_FIXED) ++ return false; ++ ++ // check if the format is enabled in settings ++ if (format == AE_FMT_AC3 && !CSettings::Get().GetBool("audiooutput.ac3passthrough")) ++ return false; ++ if (format == AE_FMT_EAC3 && !CSettings::Get().GetBool("audiooutput.eac3passthrough")) ++ return false; ++ if (format == AE_FMT_AAC && !CSettings::Get().GetBool("audiooutput.passthroughaac")) ++ return false; ++ if (format == AE_FMT_TRUEHD && !CSettings::Get().GetBool("audiooutput.truehdpassthrough")) ++ return false; ++ if (format == AE_FMT_DTSHD && !CSettings::Get().GetBool("audiooutput.dtshdpassthrough")) ++ return false; ++ + if(AE) +- return AE->SupportsRaw(); ++ return AE->SupportsRaw(format); + + return false; + } +@@ -339,15 +360,6 @@ void CAEFactory::SettingOptionsAudioDevicesPassthroughFiller(const CSetting *set + SettingOptionsAudioDevicesFillerGeneral(setting, list, current, true); + } + +-void CAEFactory::SettingOptionsAudioOutputModesFiller(const CSetting *setting, std::vector< std::pair > &list, int ¤t) +-{ +- list.push_back(std::make_pair(g_localizeStrings.Get(338), AUDIO_ANALOG)); +-#if !defined(TARGET_RASPBERRY_PI) +- list.push_back(std::make_pair(g_localizeStrings.Get(339), AUDIO_IEC958)); +-#endif +- list.push_back(std::make_pair(g_localizeStrings.Get(420), AUDIO_HDMI)); +-} +- + void CAEFactory::SettingOptionsAudioQualityLevelsFiller(const CSetting *setting, std::vector< std::pair > &list, int ¤t) + { + if (!AE) +@@ -410,3 +422,11 @@ void CAEFactory::UnregisterAudioCallback() + if (AE) + AE->UnregisterAudioCallback(); + } ++ ++bool CAEFactory::IsSettingVisible(const std::string &condition, const std::string &value, const std::string &settingId) ++{ ++ if (settingId.empty() || value.empty() || !AE) ++ return false; ++ ++ return AE->IsSettingVisible(value); ++} +diff --git a/xbmc/cores/AudioEngine/AEFactory.h b/xbmc/cores/AudioEngine/AEFactory.h +index e3e8a3a..b007627 100644 +--- a/xbmc/cores/AudioEngine/AEFactory.h ++++ b/xbmc/cores/AudioEngine/AEFactory.h +@@ -54,7 +54,7 @@ class CAEFactory + static void EnumerateOutputDevices(AEDeviceList &devices, bool passthrough); + static void VerifyOutputDevice(std::string &device, bool passthrough); + static std::string GetDefaultDevice(bool passthrough); +- static bool SupportsRaw(); ++ static bool SupportsRaw(AEDataFormat format); + static bool SupportsDrain(); + + /** +@@ -74,8 +74,8 @@ class CAEFactory + + static void SettingOptionsAudioDevicesFiller(const CSetting *setting, std::vector< std::pair > &list, std::string ¤t); + static void SettingOptionsAudioDevicesPassthroughFiller(const CSetting *setting, std::vector< std::pair > &list, std::string ¤t); +- static void SettingOptionsAudioOutputModesFiller(const CSetting *setting, std::vector< std::pair > &list, int ¤t); + static void SettingOptionsAudioQualityLevelsFiller(const CSetting *setting, std::vector< std::pair > &list, int ¤t); ++ static bool IsSettingVisible(const std::string &condition, const std::string &value, const std::string &settingId); + + static void RegisterAudioCallback(IAudioCallback* pCallback); + static void UnregisterAudioCallback(); +diff --git a/xbmc/cores/AudioEngine/Interfaces/AE.h b/xbmc/cores/AudioEngine/Interfaces/AE.h +index b1f3008..e60aa66 100644 +--- a/xbmc/cores/AudioEngine/Interfaces/AE.h ++++ b/xbmc/cores/AudioEngine/Interfaces/AE.h +@@ -41,6 +41,11 @@ + #define AE_SOUND_IDLE 1 /* only play sounds while no streams are running */ + #define AE_SOUND_ALWAYS 2 /* always play sounds */ + ++/* config options */ ++#define AE_CONFIG_FIXED 1 ++#define AE_CONFIG_AUTO 2 ++#define AE_CONFIG_MATCH 3 ++ + enum AEQuality + { + AE_QUALITY_UNKNOWN = -1, /* Unset, unknown or incorrect quality level */ +@@ -198,7 +203,7 @@ class IAE + * @see CAEPackIEC61937::CAEPackIEC61937() + * @returns true if the AudioEngine is capable of RAW output + */ +- virtual bool SupportsRaw() { return false; } ++ virtual bool SupportsRaw(AEDataFormat format) { return false; } + + /** + * Returns true if the AudioEngine supports drain mode which is not streaming silence when idle +@@ -215,5 +220,11 @@ class IAE + * @return true if specified quality level is supported, otherwise false + */ + virtual bool SupportsQualityLevel(enum AEQuality level) { return false; } ++ ++ /** ++ * AE decides whether this settings should be displayed ++ * @return true if AudioEngine wants to display this setting ++ */ ++ virtual bool IsSettingVisible(const std::string &settingId) {return false; } + }; + +diff --git a/xbmc/cores/AudioEngine/Utils/AEUtil.h b/xbmc/cores/AudioEngine/Utils/AEUtil.h +index ef67b34..c6a3184 100644 +--- a/xbmc/cores/AudioEngine/Utils/AEUtil.h ++++ b/xbmc/cores/AudioEngine/Utils/AEUtil.h +@@ -49,15 +49,6 @@ + #define MEMALIGN(b, x) __declspec(align(b)) x + #endif + +-#define AUDIO_IS_BITSTREAM(x) ((x) == AUDIO_IEC958 || (x) == AUDIO_HDMI) +- +-enum AudioOutputs +-{ +- AUDIO_ANALOG = 0, +- AUDIO_IEC958, +- AUDIO_HDMI +-}; +- + // AV sync options + enum AVSync + { +diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp +index a8d82af..ca5131a 100644 +--- a/xbmc/settings/Settings.cpp ++++ b/xbmc/settings/Settings.cpp +@@ -372,7 +372,6 @@ void CSettings::Uninitialize() + m_settingsManager->UnregisterSettingOptionsFiller("aequalitylevels"); + m_settingsManager->UnregisterSettingOptionsFiller("audiodevices"); + m_settingsManager->UnregisterSettingOptionsFiller("audiodevicespassthrough"); +- m_settingsManager->UnregisterSettingOptionsFiller("audiooutputmodes"); + m_settingsManager->UnregisterSettingOptionsFiller("charsets"); + m_settingsManager->UnregisterSettingOptionsFiller("epgguideviews"); + m_settingsManager->UnregisterSettingOptionsFiller("fontheights"); +@@ -687,7 +686,6 @@ void CSettings::InitializeOptionFillers() + m_settingsManager->RegisterSettingOptionsFiller("aequalitylevels", CAEFactory::SettingOptionsAudioQualityLevelsFiller); + m_settingsManager->RegisterSettingOptionsFiller("audiodevices", CAEFactory::SettingOptionsAudioDevicesFiller); + m_settingsManager->RegisterSettingOptionsFiller("audiodevicespassthrough", CAEFactory::SettingOptionsAudioDevicesPassthroughFiller); +- m_settingsManager->RegisterSettingOptionsFiller("audiooutputmodes", CAEFactory::SettingOptionsAudioOutputModesFiller); + m_settingsManager->RegisterSettingOptionsFiller("charsets", CCharsetConverter::SettingOptionsCharsetsFiller); + m_settingsManager->RegisterSettingOptionsFiller("epgguideviews", PVR::CGUIWindowPVRGuide::SettingOptionsEpgGuideViewFiller); + m_settingsManager->RegisterSettingOptionsFiller("fonts", GUIFontManager::SettingOptionsFontsFiller); +@@ -824,6 +822,7 @@ void CSettings::InitializeConditions() + m_settingsManager->AddCondition("profilehassettingslocked", ProfileHasSettingsLocked); + m_settingsManager->AddCondition("profilehasvideoslocked", ProfileHasVideosLocked); + m_settingsManager->AddCondition("profilelockmode", ProfileLockMode); ++ m_settingsManager->AddCondition("aesettingvisible", CAEFactory::IsSettingVisible); + } + + void CSettings::InitializeISettingsHandlers() +@@ -887,7 +886,8 @@ void CSettings::InitializeISettingCallbacks() + m_settingsManager->RegisterCallback(&CStereoscopicsManager::Get(), settingSet); + + settingSet.clear(); +- settingSet.insert("audiooutput.mode"); ++ settingSet.insert("audiooutput.config"); ++ settingSet.insert("audiooutput.samplerate"); + settingSet.insert("audiooutput.channels"); + settingSet.insert("audiooutput.processquality"); + settingSet.insert("audiooutput.guisoundmode"); +@@ -898,7 +898,6 @@ void CSettings::InitializeISettingCallbacks() + settingSet.insert("audiooutput.passthroughaac"); + settingSet.insert("audiooutput.truehdpassthrough"); + settingSet.insert("audiooutput.dtshdpassthrough"); +- settingSet.insert("audiooutput.multichannellpcm"); + settingSet.insert("audiooutput.audiodevice"); + settingSet.insert("audiooutput.passthroughdevice"); + settingSet.insert("audiooutput.streamsilence"); +-- +1.8.4 + + +From b4f8e7fbdc27b3df17db2d948e5ef494239d7c6d Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Fri, 18 Oct 2013 13:01:14 +0200 +Subject: [PATCH 02/86] dvdplayer: adapt to changes in audio settings + +--- + .../DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp | 28 ++++---------------- + .../Audio/DVDAudioCodecPassthroughFFmpeg.cpp | 17 ++++++------ + xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp | 30 ++++++++++------------ + xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.h | 2 +- + xbmc/cores/dvdplayer/DVDPlayerAudio.cpp | 10 ++------ + 5 files changed, 31 insertions(+), 56 deletions(-) + +diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp +index ebb8138..5338c71 100644 +--- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp +@@ -40,29 +40,11 @@ + + bool CDVDAudioCodecPassthrough::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options) + { +- /* dont open if AE doesnt support RAW */ +- if (!CAEFactory::SupportsRaw()) +- return false; +- +- bool bSupportsAC3Out = false; +- bool bSupportsEAC3Out = false; +- bool bSupportsDTSOut = false; +- bool bSupportsTrueHDOut = false; +- bool bSupportsDTSHDOut = false; +- +- int audioMode = CSettings::Get().GetInt("audiooutput.mode"); +- if (AUDIO_IS_BITSTREAM(audioMode)) +- { +- bSupportsAC3Out = CSettings::Get().GetBool("audiooutput.ac3passthrough"); +- bSupportsEAC3Out = CSettings::Get().GetBool("audiooutput.eac3passthrough"); +- bSupportsDTSOut = CSettings::Get().GetBool("audiooutput.dtspassthrough"); +- } +- +- if (audioMode == AUDIO_HDMI) +- { +- bSupportsTrueHDOut = CSettings::Get().GetBool("audiooutput.truehdpassthrough"); +- bSupportsDTSHDOut = CSettings::Get().GetBool("audiooutput.dtshdpassthrough" ) && bSupportsDTSOut; +- } ++ bool bSupportsAC3Out = CAEFactory::SupportsRaw(AE_FMT_AC3); ++ bool bSupportsEAC3Out = CAEFactory::SupportsRaw(AE_FMT_EAC3); ++ bool bSupportsDTSOut = CAEFactory::SupportsRaw(AE_FMT_DTS); ++ bool bSupportsTrueHDOut = CAEFactory::SupportsRaw(AE_FMT_TRUEHD); ++ bool bSupportsDTSHDOut = CAEFactory::SupportsRaw(AE_FMT_DTSHD); + + /* only get the dts core from the parser if we don't support dtsHD */ + m_info.SetCoreOnly(!bSupportsDTSHDOut); +diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp +index a9f3d40..f49b5b5 100644 +--- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp +@@ -25,6 +25,7 @@ + #include "settings/MediaSettings.h" + #include "settings/Settings.h" + #include "utils/log.h" ++#include "cores/AudioEngine/AEFactory.h" + + //These values are forced to allow spdif out + #define OUT_SAMPLESIZE 16 +@@ -293,17 +294,17 @@ bool CDVDAudioCodecPassthroughFFmpeg::SupportsFormat(CDVDStreamInfo &hints) + + bool CDVDAudioCodecPassthroughFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options) + { +- int audioMode = CSettings::Get().GetInt("audiooutput.mode"); +- + // TODO - move this stuff somewhere else +- if (AUDIO_IS_BITSTREAM(audioMode)) ++ bool m_bSupportsAC3Out = CAEFactory::SupportsRaw(AE_FMT_AC3); ++ bool m_bSupportsEAC3Out = CAEFactory::SupportsRaw(AE_FMT_EAC3); ++ bool m_bSupportsDTSOut = CAEFactory::SupportsRaw(AE_FMT_DTS); ++ ++ if ((hints.codec == AV_CODEC_ID_AC3 && !m_bSupportsAC3Out) || ++ (hints.codec == AV_CODEC_ID_EAC3 && !m_bSupportsEAC3Out) || ++ (hints.codec == AV_CODEC_ID_DTS && !m_bSupportsDTSOut)) + { +- m_bSupportsAC3Out = CSettings::Get().GetBool("audiooutput.ac3passthrough"); +- m_bSupportsDTSOut = CSettings::Get().GetBool("audiooutput.dtspassthrough"); +- m_bSupportsAACOut = CSettings::Get().GetBool("audiooutput.passthroughaac"); +- } +- else + return false; ++ } + + // TODO - this is only valid for video files, and should be moved somewhere else + if( hints.channels == 2 && CMediaSettings::Get().GetCurrentVideoSettings().m_OutputToAllSpeakers ) +diff --git a/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp +index 183e2c5..4864e47 100644 +--- a/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp ++++ b/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp +@@ -325,28 +325,26 @@ CDVDVideoCodec* CDVDFactoryCodec::CreateVideoCodec(CDVDStreamInfo &hint, unsigne + return NULL; + } + +-CDVDAudioCodec* CDVDFactoryCodec::CreateAudioCodec( CDVDStreamInfo &hint, bool passthrough /* = true */) ++CDVDAudioCodec* CDVDFactoryCodec::CreateAudioCodec( CDVDStreamInfo &hint) + { + CDVDAudioCodec* pCodec = NULL; + CDVDCodecOptions options; + +- if (passthrough) +- { ++ // try passthrough first + #if defined(TARGET_DARWIN_OSX) || defined(TARGET_DARWIN_IOS) +- switch(hint.codec) +- { +- case AV_CODEC_ID_AC3: +- case AV_CODEC_ID_DTS: +- pCodec = OpenCodec( new CDVDAudioCodecPassthroughFFmpeg(), hint, options ); +- if( pCodec ) return pCodec; +- break; +- default: +- break; +- } +-#endif +- pCodec = OpenCodec( new CDVDAudioCodecPassthrough(), hint, options ); +- if( pCodec ) return pCodec; ++ switch(hint.codec) ++ { ++ case AV_CODEC_ID_AC3: ++ case AV_CODEC_ID_DTS: ++ pCodec = OpenCodec( new CDVDAudioCodecPassthroughFFmpeg(), hint, options ); ++ if( pCodec ) return pCodec; ++ break; ++ default: ++ break; + } ++#endif ++ pCodec = OpenCodec( new CDVDAudioCodecPassthrough(), hint, options ); ++ if( pCodec ) return pCodec; + + switch (hint.codec) + { +diff --git a/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.h +index f7c03da..f7ce44c 100644 +--- a/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.h ++++ b/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.h +@@ -36,7 +36,7 @@ class CDVDFactoryCodec + { + public: + static CDVDVideoCodec* CreateVideoCodec(CDVDStreamInfo &hint, unsigned int surfaces = 0, const std::vector& formats = std::vector()); +- static CDVDAudioCodec* CreateAudioCodec(CDVDStreamInfo &hint, bool passthrough = true ); ++ static CDVDAudioCodec* CreateAudioCodec(CDVDStreamInfo &hint ); + static CDVDOverlayCodec* CreateOverlayCodec(CDVDStreamInfo &hint ); + + static CDVDAudioCodec* OpenCodec(CDVDAudioCodec* pCodec, CDVDStreamInfo &hint, CDVDCodecOptions &options ); +diff --git a/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp b/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp +index 38a53e7..df3df14 100644 +--- a/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp ++++ b/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp +@@ -145,10 +145,8 @@ class CDVDMsgAudioCodecChange : public CDVDMsg + + bool CDVDPlayerAudio::OpenStream( CDVDStreamInfo &hints ) + { +- bool passthrough = AUDIO_IS_BITSTREAM(CSettings::Get().GetInt("audiooutput.mode")); +- + CLog::Log(LOGNOTICE, "Finding audio codec for: %i", hints.codec); +- CDVDAudioCodec* codec = CDVDFactoryCodec::CreateAudioCodec(hints, passthrough); ++ CDVDAudioCodec* codec = CDVDFactoryCodec::CreateAudioCodec(hints); + if( !codec ) + { + CLog::Log(LOGERROR, "Unsupported audio codec"); +@@ -868,12 +866,8 @@ void CDVDPlayerAudio::WaitForBuffers() + + bool CDVDPlayerAudio::SwitchCodecIfNeeded() + { +- // check if passthrough is disabled +- if (!AUDIO_IS_BITSTREAM(CSettings::Get().GetInt("audiooutput.mode"))) +- return false; +- + CLog::Log(LOGDEBUG, "CDVDPlayerAudio: Sample rate changed, checking for passthrough"); +- CDVDAudioCodec *codec = CDVDFactoryCodec::CreateAudioCodec(m_streaminfo, true); ++ CDVDAudioCodec *codec = CDVDFactoryCodec::CreateAudioCodec(m_streaminfo); + if (!codec || codec->NeedPassthrough() == m_pAudioCodec->NeedPassthrough()) { + // passthrough state has not changed + delete codec; +-- +1.8.4 + + +From bf05df7ac6ec1a81e89c4e9a05216d9c1abcc88c Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Fri, 18 Oct 2013 13:02:24 +0200 +Subject: [PATCH 03/86] paplayer: adapt to changes in audio settings + +--- + xbmc/cores/paplayer/DVDPlayerCodec.cpp | 3 +-- + xbmc/cores/playercorefactory/PlayerCoreFactory.cpp | 10 +++------- + 2 files changed, 4 insertions(+), 9 deletions(-) + +diff --git a/xbmc/cores/paplayer/DVDPlayerCodec.cpp b/xbmc/cores/paplayer/DVDPlayerCodec.cpp +index 355589f..5bd7ec1 100644 +--- a/xbmc/cores/paplayer/DVDPlayerCodec.cpp ++++ b/xbmc/cores/paplayer/DVDPlayerCodec.cpp +@@ -145,8 +145,7 @@ bool DVDPlayerCodec::Init(const CStdString &strFile, unsigned int filecache) + + CDVDStreamInfo hint(*pStream, true); + +- bool passthrough = AUDIO_IS_BITSTREAM(CSettings::Get().GetInt("audiooutput.mode")); +- m_pAudioCodec = CDVDFactoryCodec::CreateAudioCodec(hint, passthrough); ++ m_pAudioCodec = CDVDFactoryCodec::CreateAudioCodec(hint); + if (!m_pAudioCodec) + { + CLog::Log(LOGERROR, "%s: Could not create audio codec", __FUNCTION__); +diff --git a/xbmc/cores/playercorefactory/PlayerCoreFactory.cpp b/xbmc/cores/playercorefactory/PlayerCoreFactory.cpp +index 6b0294a..11a6519 100644 +--- a/xbmc/cores/playercorefactory/PlayerCoreFactory.cpp ++++ b/xbmc/cores/playercorefactory/PlayerCoreFactory.cpp +@@ -37,6 +37,7 @@ + #include "PlayerCoreConfig.h" + #include "PlayerSelectionRule.h" + #include "guilib/LocalizeStrings.h" ++#include "cores/AudioEngine/AEFactory.h" + + #define PLAYERCOREFACTORY_XML "playercorefactory.xml" + +@@ -189,13 +190,8 @@ void CPlayerCoreFactory::GetPlayers( const CFileItem& item, VECPLAYERCORES &vecC + + if (bAdd) + { +- if( CSettings::Get().GetInt("audiooutput.mode") == AUDIO_ANALOG ) +- { +- CLog::Log(LOGDEBUG, "CPlayerCoreFactory::GetPlayers: adding PAPlayer (%d)", EPC_PAPLAYER); +- vecCores.push_back(EPC_PAPLAYER); +- } +- else if (url.GetFileType().Equals("ac3") +- || url.GetFileType().Equals("dts")) ++ if ((url.GetFileType().Equals("ac3") && !CAEFactory::SupportsRaw(AE_FMT_AC3)) ++ || (url.GetFileType().Equals("dts") && !CAEFactory::SupportsRaw(AE_FMT_DTS))) + { + CLog::Log(LOGDEBUG, "CPlayerCoreFactory::GetPlayers: adding DVDPlayer (%d)", EPC_DVDPLAYER); + vecCores.push_back(EPC_DVDPLAYER); +-- +1.8.4 + + +From 38235df493e42490d6e8b19762a216c6ed8431ab Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Fri, 18 Oct 2013 13:03:27 +0200 +Subject: [PATCH 04/86] GUIDialogAudioSettings: adapt to changes in audio + settings + +--- + .../video/dialogs/GUIDialogAudioSubtitleSettings.cpp | 20 ++++++-------------- + xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.h | 2 +- + 2 files changed, 7 insertions(+), 15 deletions(-) + +diff --git a/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp b/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp +index 0dd0075..5d0f2ef 100644 +--- a/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp ++++ b/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp +@@ -96,14 +96,13 @@ void CGUIDialogAudioSubtitleSettings::CreateSettings() + if (SupportsAudioFeature(IPC_AUD_SELECT_STREAM)) + AddAudioStreams(AUDIO_SETTINGS_STREAM); + +- // only show stuff available in digital mode if we have digital output ++ // TODO: remove this setting + if (SupportsAudioFeature(IPC_AUD_OUTPUT_STEREO)) +- AddBool(AUDIO_SETTINGS_OUTPUT_TO_ALL_SPEAKERS, 252, &CMediaSettings::Get().GetCurrentVideoSettings().m_OutputToAllSpeakers, AUDIO_IS_BITSTREAM(CSettings::Get().GetInt("audiooutput.mode"))); ++ AddBool(AUDIO_SETTINGS_OUTPUT_TO_ALL_SPEAKERS, 252, &CMediaSettings::Get().GetCurrentVideoSettings().m_OutputToAllSpeakers, true); + +- int settings[3] = { 338, 339, 420 }; //ANALOG, IEC958, HDMI +- m_outputmode = CSettings::Get().GetInt("audiooutput.mode"); ++ m_outputmode = CSettings::Get().GetBool("audiooutput.passthrough"); + if (SupportsAudioFeature(IPC_AUD_SELECT_OUTPUT)) +- AddSpin(AUDIO_SETTINGS_DIGITAL_ANALOG, 337, &m_outputmode, 3, settings); ++ AddBool(AUDIO_SETTINGS_DIGITAL_ANALOG, 348, &m_outputmode); + + AddSeparator(7); + m_subtitleVisible = g_application.m_pPlayer->GetSubtitleVisible(); +@@ -275,16 +274,9 @@ void CGUIDialogAudioSubtitleSettings::OnSettingChanged(SettingInfo &setting) + } + else if (setting.id == AUDIO_SETTINGS_DIGITAL_ANALOG) + { +- bool bitstream = false; ++ CSettings::Get().SetBool("audiooutput.passthrough", !m_outputmode); + +- switch(m_outputmode) +- { +- case 0: CSettings::Get().SetInt("audiooutput.mode", AUDIO_ANALOG ); break; +- case 1: CSettings::Get().SetInt("audiooutput.mode", AUDIO_IEC958 ); bitstream = true; break; +- case 2: CSettings::Get().SetInt("audiooutput.mode", AUDIO_HDMI ); bitstream = true; break; +- } +- +- EnableSettings(AUDIO_SETTINGS_OUTPUT_TO_ALL_SPEAKERS, bitstream); ++ EnableSettings(AUDIO_SETTINGS_OUTPUT_TO_ALL_SPEAKERS, true); + EnableSettings(AUDIO_SETTINGS_VOLUME, !g_application.m_pPlayer->IsPassthrough()); + } + else if (setting.id == SUBTITLE_SETTINGS_ENABLE) +diff --git a/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.h b/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.h +index ad5f3f1..f8c578e 100644 +--- a/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.h ++++ b/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.h +@@ -47,7 +47,7 @@ class CGUIDialogAudioSubtitleSettings : + float m_volume; + int m_audioStream; + int m_subtitleStream; +- int m_outputmode; ++ bool m_outputmode; + bool m_subtitleVisible; + Features m_audioCaps; + Features m_subCaps; +-- +1.8.4 + + +From 7660533a1a9fe24339cc51ed2219b9172969b533 Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Fri, 18 Oct 2013 13:05:07 +0200 +Subject: [PATCH 05/86] ActiveAE: adapt to changes in audio settings + +--- + .../AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 75 +++++++++++++++------- + xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h | 8 ++- + .../AudioEngine/Engines/ActiveAE/ActiveAESink.cpp | 31 +++++++++ + .../AudioEngine/Engines/ActiveAE/ActiveAESink.h | 2 + + 4 files changed, 89 insertions(+), 27 deletions(-) + +diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +index d4beded..f54f14e 100644 +--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp ++++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +@@ -411,7 +411,7 @@ void CActiveAE::StateMachine(int signal, Protocol *port, Message *msg) + m_extDeferData = true; + return; + case CActiveAEControlProtocol::DISPLAYLOST: +- if (m_settings.mode == AUDIO_HDMI) ++ if (m_sink.GetDeviceType(m_mode == MODE_PCM ? m_settings.device : m_settings.passthoughdevice) == AE_DEVTYPE_HDMI) + { + UnconfigureSink(); + m_stats.SetSuspended(true); +@@ -1242,7 +1242,7 @@ void CActiveAE::ApplySettingsToFormat(AEAudioFormat &format, AudioSettings &sett + *mode = MODE_PCM; + + // raw pass through +- if (m_settings.mode != AUDIO_ANALOG && AE_IS_RAW(format.m_dataFormat)) ++ if (AE_IS_RAW(format.m_dataFormat)) + { + if ((format.m_dataFormat == AE_FMT_AC3 && !settings.ac3passthrough) || + (format.m_dataFormat == AE_FMT_EAC3 && !settings.eac3passthrough) || +@@ -1256,9 +1256,8 @@ void CActiveAE::ApplySettingsToFormat(AEAudioFormat &format, AudioSettings &sett + *mode = MODE_RAW; + } + // transcode +- else if (m_settings.mode != AUDIO_ANALOG && ++ else if (settings.passthrough && + settings.ac3passthrough && +- (!settings.multichannellpcm || (m_settings.mode != AUDIO_HDMI)) && + !m_streams.empty() && + (format.m_channelLayout.Count() > 2 || settings.stereoupmix)) + { +@@ -1279,7 +1278,8 @@ void CActiveAE::ApplySettingsToFormat(AEAudioFormat &format, AudioSettings &sett + // which would cause a short audio drop-out if we changed the sink + if ((format.m_channelLayout.Count() > 2) || + settings.stereoupmix || +- (m_stats.GetWaterLevel() > 0 && m_internalFormat.m_channelLayout.Count() > 2 && !g_advancedSettings.m_audioAudiophile)) ++ (settings.config == AE_CONFIG_FIXED) || ++ (m_stats.GetWaterLevel() > 0 && m_internalFormat.m_channelLayout.Count() > 2 && (settings.config != AE_CONFIG_MATCH))) + { + CAEChannelInfo stdLayout; + switch (settings.channels) +@@ -1298,30 +1298,28 @@ void CActiveAE::ApplySettingsToFormat(AEAudioFormat &format, AudioSettings &sett + case 10: stdLayout = AE_CH_LAYOUT_7_1; break; + } + +- if (g_advancedSettings.m_audioAudiophile) ++ if (m_settings.config == AE_CONFIG_MATCH) + format.m_channelLayout.ResolveChannels(stdLayout); + else + format.m_channelLayout = stdLayout; + } + +- if (m_settings.mode == AUDIO_IEC958 && format.m_sampleRate > 48000) ++ if (m_sink.GetDeviceType(m_settings.device) == AE_DEVTYPE_IEC958) + { +- format.m_sampleRate = 48000; +- CLog::Log(LOGINFO, "CActiveAE::ApplySettings - limit samplerate for SPDIF to %d", format.m_sampleRate); ++ if (format.m_sampleRate > m_settings.samplerate) ++ { ++ format.m_sampleRate = m_settings.samplerate; ++ CLog::Log(LOGINFO, "CActiveAE::ApplySettings - limit samplerate for SPDIF to %d", format.m_sampleRate); ++ } ++ format.m_channelLayout = AE_CH_LAYOUT_2_0; + } + +- if (g_advancedSettings.m_audioResample) ++ if (m_settings.config == AE_CONFIG_FIXED) + { +- format.m_sampleRate = g_advancedSettings.m_audioResample; ++ format.m_sampleRate = m_settings.samplerate; + CLog::Log(LOGINFO, "CActiveAE::ApplySettings - Forcing samplerate to %d", format.m_sampleRate); + } + +- // for IEC958 limit to 2 channels +- if (m_settings.mode == AUDIO_IEC958) +- { +- format.m_channelLayout = AE_CH_LAYOUT_2_0; +- } +- + // sinks may not support mono + if (format.m_channelLayout.Count() == 1) + { +@@ -1540,7 +1538,7 @@ bool CActiveAE::RunStages() + + // TODO: find better solution for this + // gapless bites audiophile +- if (g_advancedSettings.m_audioAudiophile) ++ if (m_settings.config == AE_CONFIG_MATCH) + Configure(&slave->m_format); + + (*it)->m_streamSlave = NULL; +@@ -1968,17 +1966,19 @@ void CActiveAE::LoadSettings() + m_settings.device = CSettings::Get().GetString("audiooutput.audiodevice"); + m_settings.passthoughdevice = CSettings::Get().GetString("audiooutput.passthroughdevice"); + +- m_settings.mode = CSettings::Get().GetInt("audiooutput.mode"); ++ m_settings.config = CSettings::Get().GetInt("audiooutput.config"); + m_settings.channels = CSettings::Get().GetInt("audiooutput.channels"); ++ m_settings.samplerate = CSettings::Get().GetInt("audiooutput.samplerate"); + + m_settings.stereoupmix = CSettings::Get().GetBool("audiooutput.stereoupmix"); ++ ++ m_settings.passthrough = CSettings::Get().GetBool("audiooutput.passthrough"); + m_settings.ac3passthrough = CSettings::Get().GetBool("audiooutput.ac3passthrough"); + m_settings.eac3passthrough = CSettings::Get().GetBool("audiooutput.eac3passthrough"); + m_settings.truehdpassthrough = CSettings::Get().GetBool("audiooutput.truehdpassthrough"); + m_settings.dtspassthrough = CSettings::Get().GetBool("audiooutput.dtspassthrough"); + m_settings.dtshdpassthrough = CSettings::Get().GetBool("audiooutput.dtshdpassthrough"); + m_settings.aacpassthrough = CSettings::Get().GetBool("audiooutput.passthroughaac"); +- m_settings.multichannellpcm = CSettings::Get().GetBool("audiooutput.multichannellpcm"); + + m_settings.resampleQuality = static_cast(CSettings::Get().GetInt("audiooutput.processquality")); + } +@@ -2037,7 +2037,7 @@ void CActiveAE::OnSettingsChange(const std::string& setting) + { + if (setting == "audiooutput.passthroughdevice" || + setting == "audiooutput.audiodevice" || +- setting == "audiooutput.mode" || ++ setting == "audiooutput.config" || + setting == "audiooutput.ac3passthrough" || + setting == "audiooutput.eac3passthrough" || + setting == "audiooutput.dtspassthrough" || +@@ -2045,17 +2045,22 @@ void CActiveAE::OnSettingsChange(const std::string& setting) + setting == "audiooutput.truehdpassthrough" || + setting == "audiooutput.dtshdpassthrough" || + setting == "audiooutput.channels" || +- setting == "audiooutput.multichannellpcm" || + setting == "audiooutput.stereoupmix" || + setting == "audiooutput.streamsilence" || +- setting == "audiooutput.processquality") ++ setting == "audiooutput.processquality" || ++ setting == "audiooutput.passthrough" || ++ setting == "audiooutput.samplerate") + { + m_controlPort.SendOutMessage(CActiveAEControlProtocol::RECONFIGURE); + } + } + +-bool CActiveAE::SupportsRaw() ++bool CActiveAE::SupportsRaw(AEDataFormat format) + { ++ if (!m_sink.HasPassthroughDevice()) ++ return false; ++ ++ // TODO: check ELD? + return true; + } + +@@ -2072,6 +2077,28 @@ bool CActiveAE::SupportsQualityLevel(enum AEQuality level) + return false; + } + ++bool CActiveAE::IsSettingVisible(const std::string &settingId) ++{ ++ if (settingId == "audiooutput.samplerate") ++ { ++ if (m_sink.GetDeviceType(CSettings::Get().GetString("audiooutput.audiodevice")) == AE_DEVTYPE_IEC958) ++ return true; ++ if (CSettings::Get().GetInt("audiooutput.config") == AE_CONFIG_FIXED) ++ return true; ++ } ++ else if (settingId == "audiooutput.channels") ++ { ++ if (m_sink.GetDeviceType(CSettings::Get().GetString("audiooutput.audiodevice")) != AE_DEVTYPE_IEC958) ++ return true; ++ } ++ else if (settingId == "audiooutput.passthrough") ++ { ++ if (m_sink.HasPassthroughDevice() && CSettings::Get().GetInt("audiooutput.config") != AE_CONFIG_FIXED) ++ return true; ++ } ++ return false; ++} ++ + void CActiveAE::Shutdown() + { + Dispose(); +diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h +index d684a44..2ae0476 100644 +--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h ++++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h +@@ -48,7 +48,6 @@ struct AudioSettings + std::string device; + std::string driver; + std::string passthoughdevice; +- int mode; + int channels; + bool ac3passthrough; + bool eac3passthrough; +@@ -56,8 +55,10 @@ struct AudioSettings + bool aacpassthrough; + bool truehdpassthrough; + bool dtshdpassthrough; +- bool multichannellpcm; + bool stereoupmix; ++ bool passthrough; ++ int config; ++ unsigned int samplerate; + AEQuality resampleQuality; + }; + +@@ -214,9 +215,10 @@ class CActiveAE : public IAE, private CThread + + virtual void EnumerateOutputDevices(AEDeviceList &devices, bool passthrough); + virtual std::string GetDefaultDevice(bool passthrough); +- virtual bool SupportsRaw(); ++ virtual bool SupportsRaw(AEDataFormat format); + virtual bool SupportsDrain(); + virtual bool SupportsQualityLevel(enum AEQuality level); ++ virtual bool IsSettingVisible(const std::string &settingId); + + virtual void RegisterAudioCallback(IAudioCallback* pCallback); + virtual void UnregisterAudioCallback(); +diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp +index 1dec4f5..966b446 100644 +--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp ++++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp +@@ -90,6 +90,37 @@ bool CActiveAESink::HasVolume() + return m_sink->HasVolume(); + } + ++AEDeviceType CActiveAESink::GetDeviceType(const std::string &device) ++{ ++ std::string dev = device; ++ std::string dri; ++ CAESinkFactory::ParseDevice(dev, dri); ++ for (AESinkInfoList::iterator itt = m_sinkInfoList.begin(); itt != m_sinkInfoList.end(); ++itt) ++ { ++ for (AEDeviceInfoList::iterator itt2 = itt->m_deviceInfoList.begin(); itt2 != itt->m_deviceInfoList.end(); ++itt2) ++ { ++ CAEDeviceInfo& info = *itt2; ++ if (info.m_deviceName == dev) ++ return info.m_deviceType; ++ } ++ } ++ return AE_DEVTYPE_PCM; ++} ++ ++bool CActiveAESink::HasPassthroughDevice() ++{ ++ for (AESinkInfoList::iterator itt = m_sinkInfoList.begin(); itt != m_sinkInfoList.end(); ++itt) ++ { ++ for (AEDeviceInfoList::iterator itt2 = itt->m_deviceInfoList.begin(); itt2 != itt->m_deviceInfoList.end(); ++itt2) ++ { ++ CAEDeviceInfo& info = *itt2; ++ if (info.m_deviceType != AE_DEVTYPE_PCM) ++ return true; ++ } ++ } ++ return false; ++} ++ + enum SINK_STATES + { + S_TOP = 0, // 0 +diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.h +index 59bad57..2aebbf6 100644 +--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.h ++++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.h +@@ -89,6 +89,8 @@ class CActiveAESink : private CThread + void Start(); + void Dispose(); + bool HasVolume(); ++ AEDeviceType GetDeviceType(const std::string &device); ++ bool HasPassthroughDevice(); + CSinkControlProtocol m_controlPort; + CSinkDataProtocol m_dataPort; + +-- +1.8.4 + + +From 7a5e5c5388363a386f35093f295aef64cf57a88f Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Fri, 18 Oct 2013 13:12:01 +0200 +Subject: [PATCH 06/86] SoftAE: farewell! + +--- + xbmc/cores/AudioEngine/AEFactory.cpp | 5 - + xbmc/cores/AudioEngine/AEFactory.h | 1 - + xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp | 1548 -------------------- + xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h | 253 ---- + .../AudioEngine/Engines/SoftAE/SoftAESound.cpp | 114 -- + .../cores/AudioEngine/Engines/SoftAE/SoftAESound.h | 57 - + .../AudioEngine/Engines/SoftAE/SoftAEStream.cpp | 687 --------- + .../AudioEngine/Engines/SoftAE/SoftAEStream.h | 161 -- + xbmc/cores/AudioEngine/Makefile.in | 4 - + 9 files changed, 2830 deletions(-) + delete mode 100644 xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp + delete mode 100644 xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h + delete mode 100644 xbmc/cores/AudioEngine/Engines/SoftAE/SoftAESound.cpp + delete mode 100644 xbmc/cores/AudioEngine/Engines/SoftAE/SoftAESound.h + delete mode 100644 xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp + delete mode 100644 xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.h + +diff --git a/xbmc/cores/AudioEngine/AEFactory.cpp b/xbmc/cores/AudioEngine/AEFactory.cpp +index ea4d5a5..3d7771b 100644 +--- a/xbmc/cores/AudioEngine/AEFactory.cpp ++++ b/xbmc/cores/AudioEngine/AEFactory.cpp +@@ -26,7 +26,6 @@ + #include "Engines/CoreAudio/CoreAudioAE.h" + #include "settings/SettingsManager.h" + #else +- #include "Engines/SoftAE/SoftAE.h" + #include "Engines/ActiveAE/ActiveAE.h" + #endif + +@@ -73,9 +72,6 @@ bool CAEFactory::LoadEngine() + loaded = CAEFactory::LoadEngine(AE_ENGINE_PULSE); + #endif + +- if (!loaded && engine == "SOFT" ) +- loaded = CAEFactory::LoadEngine(AE_ENGINE_SOFT); +- + if (!loaded && engine == "ACTIVE") + loaded = CAEFactory::LoadEngine(AE_ENGINE_ACTIVE); + } +@@ -103,7 +99,6 @@ bool CAEFactory::LoadEngine(enum AEEngine engine) + #if defined(TARGET_DARWIN) + case AE_ENGINE_COREAUDIO: AE = new CCoreAudioAE(); break; + #else +- case AE_ENGINE_SOFT : AE = new CSoftAE(); break; + case AE_ENGINE_ACTIVE : AE = new ActiveAE::CActiveAE(); break; + #endif + #if defined(HAS_PULSEAUDIO) +diff --git a/xbmc/cores/AudioEngine/AEFactory.h b/xbmc/cores/AudioEngine/AEFactory.h +index b007627..20e67a3 100644 +--- a/xbmc/cores/AudioEngine/AEFactory.h ++++ b/xbmc/cores/AudioEngine/AEFactory.h +@@ -29,7 +29,6 @@ + enum AEEngine + { + AE_ENGINE_NULL, +- AE_ENGINE_SOFT, + AE_ENGINE_COREAUDIO, + AE_ENGINE_PULSE, + AE_ENGINE_ACTIVE, +diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp +deleted file mode 100644 +index 555ba2d..0000000 +--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.cpp ++++ /dev/null +@@ -1,1548 +0,0 @@ +-/* +- * Copyright (C) 2010-2013 Team XBMC +- * http://xbmc.org +- * +- * This Program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2, or (at your option) +- * any later version. +- * +- * This Program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with XBMC; see the file COPYING. If not, see +- * . +- * +- */ +- +-#include +-#include +-#include +- +-#include "system.h" +-#include "utils/log.h" +-#include "utils/TimeUtils.h" +-#include "utils/MathUtils.h" +-#include "utils/EndianSwap.h" +-#include "threads/SingleLock.h" +-#include "settings/AdvancedSettings.h" +-#include "settings/Settings.h" +- +-#include "SoftAE.h" +-#include "SoftAESound.h" +-#include "SoftAEStream.h" +-#include "AESinkFactory.h" +-#include "Interfaces/AESink.h" +-#include "Utils/AEUtil.h" +-#include "Encoders/AEEncoderFFmpeg.h" +- +-using namespace std; +- +-/* Define idle wait time based on platform in milliseconds */ +-/* Higher wait times reduce thread CPU overhead when in */ +-/* idle or Suspend() modes */ +-#if defined (TARGET_WINDOWS) || defined (TARGET_LINUX) || \ +- defined (TARGET_DARWIN_OSX) || defined (TARGET_FREEBSD) +-#define SOFTAE_IDLE_WAIT_MSEC 50 // shorter sleep for HTPC's +-#elif defined (TARGET_RASPBERRY_PI) || defined (TARGET_ANDROID) +-#define SOFTAE_IDLE_WAIT_MSEC 100 // longer for R_PI and Android +-#else +-#define SOFTAE_IDLE_WAIT_MSEC 100 // catchall for undefined platforms +-#endif +- +-CSoftAE::CSoftAE(): +- m_thread (NULL ), +- m_audiophile (true ), +- m_running (false ), +- m_reOpen (false ), +- m_sinkIsSuspended (false ), +- m_isSuspended (false ), +- m_softSuspend (false ), +- m_softSuspendTimeout (XbmcThreads::EndTime::InfiniteValue), +- m_volume (1.0 ), +- m_sink (NULL ), +- m_sinkBlockTime (0 ), +- m_transcode (false ), +- m_rawPassthrough (false ), +- m_soundMode (AE_SOUND_OFF), +- m_streamsPlaying (false ), +- m_encoder (NULL ), +- m_converted (NULL ), +- m_convertedSize (0 ), +- m_masterStream (NULL ), +- 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()); +- PrintSinks(); +-} +- +-CSoftAE::~CSoftAE() +-{ +- Deinitialize(); +- +- /* free the streams */ +- CSingleLock streamLock(m_streamLock); +- while (!m_streams.empty()) +- { +- CSoftAEStream *s = m_streams.front(); +- delete s; +- } +- +- /* free the sounds */ +- CSingleLock soundLock(m_soundLock); +- while (!m_sounds.empty()) +- { +- CSoftAESound *s = m_sounds.front(); +- m_sounds.pop_front(); +- delete s; +- } +-} +- +-IAESink *CSoftAE::GetSink(AEAudioFormat &newFormat, bool passthrough, std::string &device) +-{ +- device = passthrough ? m_passthroughDevice : m_device; +- +- /* if we are raw, force the sample rate */ +- if (AE_IS_RAW(newFormat.m_dataFormat)) +- { +- switch (newFormat.m_dataFormat) +- { +- case AE_FMT_AC3: +- case AE_FMT_DTS: +- break; +- +- case AE_FMT_EAC3: +- newFormat.m_sampleRate = 192000; +- break; +- +- case AE_FMT_TRUEHD: +- case AE_FMT_DTSHD: +- newFormat.m_sampleRate = 192000; +- break; +- +- default: +- break; +- } +- } +- +- IAESink *sink = CAESinkFactory::Create(device, newFormat, passthrough); +- return sink; +-} +- +-/* this method MUST be called while holding m_streamLock */ +-inline CSoftAEStream *CSoftAE::GetMasterStream() +-{ +- /* remove any destroyed streams first */ +- for (StreamList::iterator itt = m_streams.begin(); itt != m_streams.end();) +- { +- CSoftAEStream *stream = *itt; +- if (stream->IsDestroyed()) +- { +- RemoveStream(m_playingStreams, stream); +- RemoveStream(m_streams , stream); +- delete stream; +- continue; +- } +- ++itt; +- } +- +- if (!m_newStreams.empty()) +- return m_newStreams.back(); +- +- if (!m_streams.empty()) +- return m_streams.back(); +- +- return NULL; +-} +- +-/* save method to call outside of the main thread, use this one */ +-void CSoftAE::OpenSink() +-{ +- m_reOpenEvent.Reset(); +- m_reOpen = true; +- m_reOpenEvent.Wait(); +- m_wake.Set(); +-} +- +-void CSoftAE::InternalCloseSink() +-{ +- /* close the old sink if it was open */ +- if (m_sink) +- { +- CExclusiveLock sinkLock(m_sinkLock); +- m_sink->Drain(); +- m_sink->Deinitialize(); +- delete m_sink; +- m_sink = NULL; +- } +-} +-/* this must NEVER be called from outside the main thread or Initialization */ +-void CSoftAE::InternalOpenSink() +-{ +- /* save off our raw/passthrough mode for checking */ +- bool wasTranscode = m_transcode; +- bool wasRawPassthrough = m_rawPassthrough; +- bool reInit = false; +- +- LoadSettings(); +- +- /* initialize for analog output */ +- m_rawPassthrough = false; +- m_streamStageFn = &CSoftAE::RunStreamStage; +- m_outputStageFn = &CSoftAE::RunOutputStage; +- +- /* initialize the new format for basic 2.0 output */ +- AEAudioFormat newFormat; +- newFormat.m_dataFormat = AE_FMT_FLOAT; +- newFormat.m_sampleRate = 44100; +- newFormat.m_encodedRate = 0; +- newFormat.m_channelLayout = m_stereoUpmix ? m_stdChLayout : AE_CH_LAYOUT_2_0; +- newFormat.m_frames = 0; +- newFormat.m_frameSamples = 0; +- newFormat.m_frameSize = 0; +- +- CSingleLock streamLock(m_streamLock); +- +- m_masterStream = GetMasterStream(); +- if (m_masterStream) +- { +- /* choose the sample rate & channel layout based on the master stream */ +- newFormat.m_sampleRate = m_masterStream->GetSampleRate(); +- if (!m_stereoUpmix) +- newFormat.m_channelLayout = m_masterStream->m_initChannelLayout; +- +- if (m_masterStream->IsRaw()) +- { +- newFormat.m_sampleRate = m_masterStream->GetSampleRate(); +- newFormat.m_encodedRate = m_masterStream->GetEncodedSampleRate(); +- newFormat.m_dataFormat = m_masterStream->GetDataFormat(); +- newFormat.m_channelLayout = m_masterStream->m_initChannelLayout; +- m_rawPassthrough = true; +- m_streamStageFn = &CSoftAE::RunRawStreamStage; +- m_outputStageFn = &CSoftAE::RunRawOutputStage; +- } +- else +- { +- if (!m_transcode) +- newFormat.m_channelLayout.ResolveChannels(m_stdChLayout); +- else +- { +- if (m_masterStream->m_initChannelLayout == AE_CH_LAYOUT_2_0) +- m_transcode = false; +- m_encoderInitSampleRateMul = 1.0 / newFormat.m_sampleRate; +- } +- } +- +- /* if the stream is paused we cant use it for anything else */ +- if (m_masterStream->m_paused) +- m_masterStream = NULL; +- } +- else +- m_transcode = false; +- +- if (!m_rawPassthrough && m_transcode) +- newFormat.m_dataFormat = AE_FMT_AC3; +- +- streamLock.Leave(); +- +- std::string device, driver; +- if (m_transcode || m_rawPassthrough) +- device = m_passthroughDevice; +- else +- device = m_device; +- +- CAESinkFactory::ParseDevice(device, driver); +- if (driver.empty() && m_sink) +- driver = m_sink->GetName(); +- +- if (m_rawPassthrough) +- CLog::Log(LOGINFO, "CSoftAE::InternalOpenSink - RAW passthrough enabled"); +- else if (m_transcode) +- CLog::Log(LOGINFO, "CSoftAE::InternalOpenSink - Transcode passthrough enabled"); +- +- /* +- try to use 48000hz if we are going to transcode, this prevents the sink +- from being re-opened repeatedly when switching sources, which locks up +- some receivers & crappy integrated sound drivers. Check for as.xml override +- */ +- if (m_transcode && !m_rawPassthrough) +- { +- enum AEChannel ac3Layout[3] = {AE_CH_RAW, AE_CH_RAW, AE_CH_NULL}; +- newFormat.m_channelLayout = ac3Layout; +- m_outputStageFn = &CSoftAE::RunTranscodeStage; +- if (!g_advancedSettings.m_allowTranscode44100) +- newFormat.m_sampleRate = 48000; +- } +- +- /* +- if there is an audio resample rate set, use it, this MAY NOT be honoured as +- the audio sink may not support the requested format, and may change it. +- */ +- if (g_advancedSettings.m_audioResample) +- { +- newFormat.m_sampleRate = g_advancedSettings.m_audioResample; +- CLog::Log(LOGINFO, "CSoftAE::InternalOpenSink - Forcing samplerate to %d", newFormat.m_sampleRate); +- } +- +- /* only re-open the sink if its not compatible with what we need */ +- std::string sinkName; +- if (m_sink) +- { +- sinkName = m_sink->GetName(); +- std::transform(sinkName.begin(), sinkName.end(), sinkName.begin(), ::toupper); +- } +- +- if (!m_sink || sinkName != driver || !m_sink->IsCompatible(newFormat, device)) +- { +- CLog::Log(LOGINFO, "CSoftAE::InternalOpenSink - sink incompatible, re-starting"); +- +- /* take the sink lock */ +- CExclusiveLock sinkLock(m_sinkLock); +- +- reInit = true; +- //close the sink cause it gets reinited +- InternalCloseSink(); +- +- /* get the display name of the device */ +- GetDeviceFriendlyName(device); +- +- /* if we already have a driver, prepend it to the device string */ +- if (!driver.empty()) +- device = driver + ":" + device; +- +- /* create the new sink */ +- m_sink = GetSink(newFormat, m_transcode || m_rawPassthrough, device); +- +- /* perform basic sanity checks on the format returned by the sink */ +- ASSERT(newFormat.m_channelLayout.Count() > 0); +- ASSERT(newFormat.m_dataFormat <= AE_FMT_FLOAT); +- ASSERT(newFormat.m_frames > 0); +- ASSERT(newFormat.m_frameSamples > 0); +- ASSERT(newFormat.m_frameSize == (CAEUtil::DataFormatToBits(newFormat.m_dataFormat) >> 3) * newFormat.m_channelLayout.Count()); +- ASSERT(newFormat.m_sampleRate > 0); +- +- CLog::Log(LOGDEBUG, "CSoftAE::InternalOpenSink - %s Initialized:", m_sink->GetName()); +- CLog::Log(LOGDEBUG, " Output Device : %s", m_deviceFriendlyName.c_str()); +- CLog::Log(LOGDEBUG, " Sample Rate : %d", newFormat.m_sampleRate); +- CLog::Log(LOGDEBUG, " Sample Format : %s", CAEUtil::DataFormatToStr(newFormat.m_dataFormat)); +- CLog::Log(LOGDEBUG, " Channel Count : %d", newFormat.m_channelLayout.Count()); +- CLog::Log(LOGDEBUG, " Channel Layout: %s", ((std::string)newFormat.m_channelLayout).c_str()); +- CLog::Log(LOGDEBUG, " Frames : %d", newFormat.m_frames); +- CLog::Log(LOGDEBUG, " Frame Samples : %d", newFormat.m_frameSamples); +- CLog::Log(LOGDEBUG, " Frame Size : %d", newFormat.m_frameSize); +- +- m_sinkFormat = newFormat; +- m_sinkFormatSampleRateMul = 1.0 / (double)newFormat.m_sampleRate; +- m_sinkBlockSize = newFormat.m_frames * newFormat.m_frameSize; +- m_sinkBlockTime = 1000 * newFormat.m_frames / newFormat.m_sampleRate; +- // check if sink controls volume, if so, init the volume. +- m_sinkHandlesVolume = m_sink->HasVolume(); +- if (m_sinkHandlesVolume) +- m_sink->SetVolume(m_volume); +- +- /* invalidate the buffer */ +- m_buffer.Empty(); +- } +- else +- CLog::Log(LOGINFO, "CSoftAE::InternalOpenSink - keeping old sink with : %s, %s, %dhz", +- CAEUtil::DataFormatToStr(newFormat.m_dataFormat), +- ((std::string)newFormat.m_channelLayout).c_str(), +- newFormat.m_sampleRate); +- +- reInit = (reInit || m_chLayout != m_sinkFormat.m_channelLayout); +- m_chLayout = m_sinkFormat.m_channelLayout; +- +- size_t neededBufferSize = 0; +- if (m_rawPassthrough) +- { +- if (!wasRawPassthrough) +- m_buffer.Empty(); +- +- m_convertFn = NULL; +- m_bytesPerSample = CAEUtil::DataFormatToBits(m_sinkFormat.m_dataFormat) >> 3; +- m_frameSize = m_sinkFormat.m_frameSize; +- m_frameSizeMul = 1.0 / (double)m_frameSize; +- neededBufferSize = m_sinkFormat.m_frames * m_sinkFormat.m_frameSize; +- } +- else +- { +- /* if we are transcoding */ +- if (m_transcode) +- { +- if (!wasTranscode || wasRawPassthrough) +- { +- /* invalidate the buffer */ +- m_buffer.Empty(); +- if (m_encoder) +- m_encoder->Reset(); +- } +- +- /* configure the encoder */ +- AEAudioFormat encoderFormat; +- encoderFormat.m_dataFormat = AE_FMT_FLOAT; +- encoderFormat.m_sampleRate = m_sinkFormat.m_sampleRate; +- encoderFormat.m_encodedRate = 0; +- encoderFormat.m_channelLayout = m_chLayout; +- encoderFormat.m_frames = 0; +- encoderFormat.m_frameSamples = 0; +- encoderFormat.m_frameSize = 0; +- +- if (!m_encoder || !m_encoder->IsCompatible(encoderFormat)) +- { +- m_buffer.Empty(); +- SetupEncoder(encoderFormat); +- m_encoderFormat = encoderFormat; +- if (encoderFormat.m_frameSize > 0) +- m_encoderFrameSizeMul = 1.0 / (double)m_sinkFormat.m_frameSize; +- else +- m_encoderFrameSizeMul = 1.0; +- } +- +- /* remap directly to the format we need for encode */ +- reInit = (reInit || m_chLayout != m_encoderFormat.m_channelLayout); +- m_chLayout = m_encoderFormat.m_channelLayout; +- m_convertFn = CAEConvert::FrFloat(m_encoderFormat.m_dataFormat); +- neededBufferSize = m_encoderFormat.m_frames * sizeof(float) * m_chLayout.Count(); +- CLog::Log(LOGDEBUG, "CSoftAE::InternalOpenSink - Encoding using layout: %s", ((std::string)m_chLayout).c_str()); +- } +- else +- { +- m_convertFn = CAEConvert::FrFloat(m_sinkFormat.m_dataFormat); +- neededBufferSize = m_sinkFormat.m_frames * sizeof(float) * m_chLayout.Count(); +- CLog::Log(LOGDEBUG, "CSoftAE::InternalOpenSink - Using speaker layout: %s", CAEUtil::GetStdChLayoutName(m_stdChLayout)); +- } +- +- m_bytesPerSample = CAEUtil::DataFormatToBits(AE_FMT_FLOAT) >> 3; +- m_frameSize = m_bytesPerSample * m_chLayout.Count(); +- m_frameSizeMul = 1.0 / (double)m_frameSize; +- } +- +- CLog::Log(LOGDEBUG, "CSoftAE::InternalOpenSink - Internal Buffer Size: %d", (int)neededBufferSize); +- if (m_buffer.Size() < neededBufferSize) +- m_buffer.Alloc(neededBufferSize); +- +- if (reInit) +- { +- if (!m_rawPassthrough) +- { +- /* re-init incompatible sounds */ +- CSingleLock soundLock(m_soundLock); +- for (SoundList::iterator itt = m_sounds.begin(); itt != m_sounds.end(); ++itt) +- { +- CSoftAESound *sound = *itt; +- if (!sound->IsCompatible()) +- { +- StopSound(sound); +- sound->Initialize(); +- } +- } +- } +- +- /* re-init streams */ +- streamLock.Enter(); +- for (StreamList::iterator itt = m_streams.begin(); itt != m_streams.end(); ++itt) +- (*itt)->Initialize(); +- streamLock.Leave(); +- } +- +- /* any new streams need to be initialized */ +- for (StreamList::iterator itt = m_newStreams.begin(); itt != m_newStreams.end(); ++itt) +- { +- (*itt)->Initialize(); +- m_streams.push_back(*itt); +- if (!(*itt)->m_paused) +- m_playingStreams.push_back(*itt); +- } +- m_newStreams.clear(); +- m_streamsPlaying = !m_playingStreams.empty(); +- +- m_softSuspend = false; +- +- /* notify any event listeners that we are done */ +- m_reOpen = false; +- m_reOpenEvent.Set(); +- m_wake.Set(); +-} +- +-void CSoftAE::ResetEncoder() +-{ +- if (m_encoder) +- m_encoder->Reset(); +- m_encodedBuffer.Empty(); +-} +- +-bool CSoftAE::SetupEncoder(AEAudioFormat &format) +-{ +- ResetEncoder(); +- delete m_encoder; +- m_encoder = NULL; +- +- if (!m_transcode) +- return false; +- +- m_encoder = new CAEEncoderFFmpeg(); +- if (m_encoder->Initialize(format)) +- return true; +- +- delete m_encoder; +- m_encoder = NULL; +- return false; +-} +- +-void CSoftAE::Shutdown() +-{ +- Deinitialize(); +-} +- +-bool CSoftAE::Initialize() +-{ +- CSingleLock lock(m_threadLock); +- InternalOpenSink(); +- m_running = true; +- m_thread = new CThread(this, "SoftAE"); +- m_thread->Create(); +- m_thread->SetPriority(THREAD_PRIORITY_ABOVE_NORMAL); +- return true; +-} +- +-void CSoftAE::OnSettingsChange(const std::string& setting) +-{ +- if (setting == "audiooutput.passthroughdevice" || +- setting == "audiooutput.audiodevice" || +- setting == "audiooutput.mode" || +- setting == "audiooutput.ac3passthrough" || +- setting == "audiooutput.dtspassthrough" || +- setting == "audiooutput.passthroughaac" || +- setting == "audiooutput.truehdpassthrough" || +- setting == "audiooutput.dtshdpassthrough" || +- setting == "audiooutput.channels" || +- setting == "audiooutput.multichannellpcm" || +- setting == "audiooutput.stereoupmix") +- { +- OpenSink(); +- } +- +- if (setting == "audiooutput.normalizelevels" || setting == "audiooutput.stereoupmix") +- { +- /* re-init stream reamppers */ +- CSingleLock streamLock(m_streamLock); +- for (StreamList::iterator itt = m_streams.begin(); itt != m_streams.end(); ++itt) +- (*itt)->InitializeRemap(); +- } +-} +- +-void CSoftAE::LoadSettings() +-{ +- m_audiophile = g_advancedSettings.m_audioAudiophile; +- if (m_audiophile) +- CLog::Log(LOGINFO, "CSoftAE::LoadSettings - Audiophile switch enabled"); +- +- m_stereoUpmix = CSettings::Get().GetBool("audiooutput.stereoupmix"); +- if (m_stereoUpmix) +- CLog::Log(LOGINFO, "CSoftAE::LoadSettings - Stereo upmix is enabled"); +- +- /* load the configuration */ +- m_stdChLayout = AE_CH_LAYOUT_2_0; +- switch (CSettings::Get().GetInt("audiooutput.channels")) +- { +- default: +- case 0: m_stdChLayout = AE_CH_LAYOUT_2_0; break; /* dont alow 1_0 output */ +- case 1: m_stdChLayout = AE_CH_LAYOUT_2_0; break; +- case 2: m_stdChLayout = AE_CH_LAYOUT_2_1; break; +- case 3: m_stdChLayout = AE_CH_LAYOUT_3_0; break; +- case 4: m_stdChLayout = AE_CH_LAYOUT_3_1; break; +- case 5: m_stdChLayout = AE_CH_LAYOUT_4_0; break; +- case 6: m_stdChLayout = AE_CH_LAYOUT_4_1; break; +- case 7: m_stdChLayout = AE_CH_LAYOUT_5_0; break; +- case 8: m_stdChLayout = AE_CH_LAYOUT_5_1; break; +- case 9: m_stdChLayout = AE_CH_LAYOUT_7_0; break; +- case 10: m_stdChLayout = AE_CH_LAYOUT_7_1; break; +- } +- +- // force optical/coax to 2.0 output channels +- if (!m_rawPassthrough && CSettings::Get().GetInt("audiooutput.mode") == AUDIO_IEC958) +- m_stdChLayout = AE_CH_LAYOUT_2_0; +- +- /* get the output devices and ensure they exist */ +- m_device = CSettings::Get().GetString("audiooutput.audiodevice"); +- m_passthroughDevice = CSettings::Get().GetString("audiooutput.passthroughdevice"); +- VerifySoundDevice(m_device , false); +- VerifySoundDevice(m_passthroughDevice, true ); +- +- m_transcode = ( +- CSettings::Get().GetBool("audiooutput.ac3passthrough") /*|| +- CSettings::Get().GetBool("audiooutput.dtspassthrough") */ +- ) && ( +- (CSettings::Get().GetInt("audiooutput.mode") == AUDIO_IEC958) || +- (CSettings::Get().GetInt("audiooutput.mode") == AUDIO_HDMI && !CSettings::Get().GetBool("audiooutput.multichannellpcm")) +- ); +-} +- +-void CSoftAE::VerifySoundDevice(std::string& device, bool passthrough) +-{ +- /* check that the specified device exists */ +- std::string firstDevice; +- for (AESinkInfoList::iterator itt = m_sinkInfoList.begin(); itt != m_sinkInfoList.end(); ++itt) +- { +- AESinkInfo sinkInfo = *itt; +- for (AEDeviceInfoList::iterator itt2 = sinkInfo.m_deviceInfoList.begin(); itt2 != sinkInfo.m_deviceInfoList.end(); ++itt2) +- { +- CAEDeviceInfo& devInfo = *itt2; +- if (passthrough && devInfo.m_deviceType == AE_DEVTYPE_PCM) +- continue; +- std::string deviceName = sinkInfo.m_sinkName + ":" + devInfo.m_deviceName; +- +- /* remember the first device so we can default to it if required */ +- if (firstDevice.empty()) +- firstDevice = deviceName; +- +- if (device == deviceName) +- return; +- } +- } +- +- /* if the device wasnt found, set it to the first viable output */ +- device = firstDevice; +-} +- +-inline void CSoftAE::GetDeviceFriendlyName(std::string &device) +-{ +- m_deviceFriendlyName = "Device not found"; +- /* Match the device and find its friendly name */ +- for (AESinkInfoList::iterator itt = m_sinkInfoList.begin(); itt != m_sinkInfoList.end(); ++itt) +- { +- AESinkInfo sinkInfo = *itt; +- for (AEDeviceInfoList::iterator itt2 = sinkInfo.m_deviceInfoList.begin(); itt2 != sinkInfo.m_deviceInfoList.end(); ++itt2) +- { +- CAEDeviceInfo& devInfo = *itt2; +- if (devInfo.m_deviceName == device) +- { +- m_deviceFriendlyName = devInfo.m_displayName; +- break; +- } +- } +- } +- return; +-} +- +-void CSoftAE::Deinitialize() +-{ +- CSingleLock lock(m_threadLock); +- if (m_thread) +- { +- Stop(); +- m_thread->StopThread(true); +- delete m_thread; +- m_thread = NULL; +- } +- lock.Leave(); +- +- CExclusiveLock sinkLock(m_sinkLock); +- if (m_sink) +- { +- /* shutdown the sink */ +- m_sink->Deinitialize(); +- delete m_sink; +- m_sink = NULL; +- } +- +- delete m_encoder; +- m_encoder = NULL; +- ResetEncoder(); +- m_buffer.DeAlloc(); +- +- _aligned_free(m_converted); +- m_converted = NULL; +- m_convertedSize = 0; +- +- m_sinkInfoList.clear(); +-} +- +-void CSoftAE::EnumerateOutputDevices(AEDeviceList &devices, bool passthrough) +-{ +- for (AESinkInfoList::iterator itt = m_sinkInfoList.begin(); itt != m_sinkInfoList.end(); ++itt) +- { +- AESinkInfo sinkInfo = *itt; +- for (AEDeviceInfoList::iterator itt2 = sinkInfo.m_deviceInfoList.begin(); itt2 != sinkInfo.m_deviceInfoList.end(); ++itt2) +- { +- CAEDeviceInfo devInfo = *itt2; +- if (passthrough && devInfo.m_deviceType == AE_DEVTYPE_PCM) +- continue; +- +- std::string device = sinkInfo.m_sinkName + ":" + devInfo.m_deviceName; +- +- std::stringstream ss; +- +- /* add the sink name if we have more then one sink type */ +- if (m_sinkInfoList.size() > 1) +- ss << sinkInfo.m_sinkName << ": "; +- +- ss << devInfo.m_displayName; +- if (!devInfo.m_displayNameExtra.empty()) +- ss << ", " << devInfo.m_displayNameExtra; +- +- devices.push_back(AEDevice(ss.str(), device)); +- } +- } +-} +- +-std::string CSoftAE::GetDefaultDevice(bool passthrough) +-{ +- for (AESinkInfoList::iterator itt = m_sinkInfoList.begin(); itt != m_sinkInfoList.end(); ++itt) +- { +- AESinkInfo sinkInfo = *itt; +- for (AEDeviceInfoList::iterator itt2 = sinkInfo.m_deviceInfoList.begin(); itt2 != sinkInfo.m_deviceInfoList.end(); ++itt2) +- { +- CAEDeviceInfo devInfo = *itt2; +- if (passthrough && devInfo.m_deviceType == AE_DEVTYPE_PCM) +- continue; +- +- std::string device = sinkInfo.m_sinkName + ":" + devInfo.m_deviceName; +- return device; +- } +- } +- return "default"; +-} +- +-bool CSoftAE::SupportsRaw() +-{ +- /* CSoftAE supports raw formats */ +- return true; +-} +- +-void CSoftAE::PauseStream(CSoftAEStream *stream) +-{ +- CSingleLock streamLock(m_streamLock); +- RemoveStream(m_playingStreams, stream); +- stream->m_paused = true; +- +- m_reOpen = true; +- m_wake.Set(); +-} +- +-void CSoftAE::ResumeStream(CSoftAEStream *stream) +-{ +- CSingleLock streamLock(m_streamLock); +- m_playingStreams.push_back(stream); +- stream->m_paused = false; +- streamLock.Leave(); +- +- m_streamsPlaying = true; +- m_reOpen = true; +- m_wake.Set(); +-} +- +-void CSoftAE::Stop() +-{ +- m_running = false; +- m_isSuspended = false; +- m_wake.Set(); +- +- /* wait for the thread to stop */ +- CSingleLock lock(m_runningLock); +-} +- +-void CSoftAE::SetSoundMode(const int mode) +-{ +- m_soundMode = mode; +- +- /* stop all currently playing sounds if they are being turned off */ +- if (mode == AE_SOUND_OFF || (mode == AE_SOUND_IDLE && m_streamsPlaying)) +- StopAllSounds(); +-} +- +-IAEStream *CSoftAE::MakeStream(enum AEDataFormat dataFormat, unsigned int sampleRate, unsigned int encodedSampleRate, CAEChannelInfo channelLayout, unsigned int options/* = 0 */) +-{ +- CAEChannelInfo channelInfo(channelLayout); +- CLog::Log(LOGINFO, "CSoftAE::MakeStream - %s, %u, %s", +- CAEUtil::DataFormatToStr(dataFormat), +- sampleRate, ((std::string)channelInfo).c_str()); +- +- /* ensure we have the encoded sample rate if the format is RAW */ +- if (AE_IS_RAW(dataFormat)) +- ASSERT(encodedSampleRate); +- +- CSingleLock streamLock(m_streamLock); +- CSoftAEStream *stream = new CSoftAEStream(dataFormat, sampleRate, encodedSampleRate, channelLayout, options, m_streamLock); +- m_newStreams.push_back(stream); +- streamLock.Leave(); +- // this is really needed here +- OpenSink(); +- return stream; +-} +- +-IAESound *CSoftAE::MakeSound(const std::string& file) +-{ +- CSingleLock soundLock(m_soundLock); +- +- CSoftAESound *sound = new CSoftAESound(file); +- if (!sound->Initialize()) +- { +- delete sound; +- return NULL; +- } +- +- m_sounds.push_back(sound); +- return sound; +-} +- +-void CSoftAE::PlaySound(IAESound *sound) +-{ +- if (m_soundMode == AE_SOUND_OFF || (m_soundMode == AE_SOUND_IDLE && m_streamsPlaying)) +- return; +- +- float *samples = ((CSoftAESound*)sound)->GetSamples(); +- if (!samples) +- return; +- +- /* add the sound to the play list */ +- CSingleLock soundSampleLock(m_soundSampleLock); +- SoundState ss = { +- ((CSoftAESound*)sound), +- samples, +- ((CSoftAESound*)sound)->GetSampleCount() +- }; +- m_playing_sounds.push_back(ss); +- +- /* wake to play the sound */ +- m_softSuspend = false; +- m_wake.Set(); +-} +- +-void CSoftAE::FreeSound(IAESound *sound) +-{ +- if (!sound) +- return; +- +- sound->Stop(); +- CSingleLock soundLock(m_soundLock); +- for (SoundList::iterator itt = m_sounds.begin(); itt != m_sounds.end(); ++itt) +- if (*itt == sound) +- { +- m_sounds.erase(itt); +- break; +- } +- +- delete (CSoftAESound*)sound; +-} +- +-void CSoftAE::GarbageCollect() +-{ +-} +- +-unsigned int CSoftAE::GetSampleRate() +-{ +- if (m_transcode && m_encoder && !m_rawPassthrough) +- return m_encoderFormat.m_sampleRate; +- +- return m_sinkFormat.m_sampleRate; +-} +- +-void CSoftAE::StopSound(IAESound *sound) +-{ +- CSingleLock lock(m_soundSampleLock); +- for (SoundStateList::iterator itt = m_playing_sounds.begin(); itt != m_playing_sounds.end(); ) +- { +- if ((*itt).owner == sound) +- { +- (*itt).owner->ReleaseSamples(); +- itt = m_playing_sounds.erase(itt); +- } +- else +- ++itt; +- } +-} +- +-IAEStream *CSoftAE::FreeStream(IAEStream *stream) +-{ +- CSingleLock lock(m_streamLock); +- RemoveStream(m_playingStreams, (CSoftAEStream*)stream); +- RemoveStream(m_streams , (CSoftAEStream*)stream); +- // Reopen is old behaviour. Not opening when masterstream stops means clipping on S/PDIF. +- if(!m_isSuspended && (m_masterStream == stream)) +- { +- m_reOpen = true; +- m_masterStream = NULL; +- } +- +- delete (CSoftAEStream*)stream; +- return NULL; +-} +- +-double CSoftAE::GetDelay() +-{ +- double delayBuffer = 0.0, delaySink = 0.0, delayTranscoder = 0.0; +- +- CSharedLock sinkLock(m_sinkLock); +- if (m_sink) +- delaySink = m_sink->GetDelay(); +- +- if (m_transcode && m_encoder && !m_rawPassthrough) +- { +- delayBuffer = (double)m_buffer.Used() * m_frameSizeMul * m_encoderInitSampleRateMul; +- delayTranscoder = m_encoder->GetDelay((double)m_encodedBuffer.Used() * m_encoderFrameSizeMul); +- } +- else +- delayBuffer = (double)m_buffer.Used() * m_frameSizeMul *m_sinkFormatSampleRateMul; +- +- return delayBuffer + delaySink + delayTranscoder; +-} +- +-double CSoftAE::GetCacheTime() +-{ +- double timeBuffer = 0.0, timeSink = 0.0, timeTranscoder = 0.0; +- +- CSharedLock sinkLock(m_sinkLock); +- if (m_sink) +- timeSink = m_sink->GetCacheTime(); +- +- if (m_transcode && m_encoder && !m_rawPassthrough) +- { +- timeBuffer = (double)m_buffer.Used() * m_frameSizeMul * m_encoderInitSampleRateMul; +- timeTranscoder = m_encoder->GetDelay((double)m_encodedBuffer.Used() * m_encoderFrameSizeMul); +- } +- else +- timeBuffer = (double)m_buffer.Used() * m_frameSizeMul *m_sinkFormatSampleRateMul; +- +- return timeBuffer + timeSink + timeTranscoder; +-} +- +-double CSoftAE::GetCacheTotal() +-{ +- double timeBuffer = 0.0, timeSink = 0.0, timeTranscoder = 0.0; +- +- CSharedLock sinkLock(m_sinkLock); +- if (m_sink) +- timeSink = m_sink->GetCacheTotal(); +- +- if (m_transcode && m_encoder && !m_rawPassthrough) +- { +- timeBuffer = (double)m_buffer.Size() * m_frameSizeMul * m_encoderInitSampleRateMul; +- timeTranscoder = m_encoder->GetDelay((double)m_encodedBuffer.Size() * m_encoderFrameSizeMul); +- } +- else +- timeBuffer = (double)m_buffer.Size() * m_frameSizeMul *m_sinkFormatSampleRateMul; +- +- return timeBuffer + timeSink + timeTranscoder; +-} +- +-bool CSoftAE::IsSuspended() +-{ +- return m_isSuspended; +-} +- +-float CSoftAE::GetVolume() +-{ +- return m_volume; +-} +- +-void CSoftAE::SetVolume(float volume) +-{ +- m_volume = volume; +- if (!m_sinkHandlesVolume) +- return; +- +- CSharedLock sinkLock(m_sinkLock); +- if (m_sink) +- m_sink->SetVolume(m_volume); +-} +- +-void CSoftAE::StopAllSounds() +-{ +- CSingleLock lock(m_soundSampleLock); +- while (!m_playing_sounds.empty()) +- { +- SoundState *ss = &(*m_playing_sounds.begin()); +- ss->owner->ReleaseSamples(); +- m_playing_sounds.pop_front(); +- } +-} +- +-bool CSoftAE::Suspend() +-{ +- CLog::Log(LOGDEBUG, "CSoftAE::Suspend - Suspending AE processing"); +- m_isSuspended = true; +- +- StopAllSounds(); +- +- CSingleLock streamLock(m_streamLock); +- for (StreamList::iterator itt = m_playingStreams.begin(); itt != m_playingStreams.end(); ++itt) +- { +- CSoftAEStream *stream = *itt; +- stream->Flush(); +- } +- streamLock.Leave(); +- #if defined(TARGET_LINUX) +- /*workaround sinks not playing sound after resume */ +- 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() +- // 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(); +- } +- InternalCloseSink(); +- } +- else +- { +- CLog::Log(LOGDEBUG, "CSoftAE::Suspend - Unload failed will continue"); +- m_saveSuspend.Reset(); +- } +- } +- // The device list is now empty and must be reenumerated afterwards. +- 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_reOpen) +- m_reOpenEvent.Set(); +- #endif +- +- return true; +-} +- +-bool CSoftAE::Resume() +-{ +-#if defined(TARGET_LINUX) +- // We must make sure, that we don't return empty. +- if(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); +- sinkLock.Leave(); // we leave here explicitly to not lock while printing new sinks +- PrintSinks(); +- } +-#endif +- CLog::Log(LOGDEBUG, "CSoftAE::Resume - Resuming AE processing"); +- m_isSuspended = false; +- // we flag reopen +- m_reOpen = true; +- +- return true; +-} +- +-void CSoftAE::Run() +-{ +- /* we release this when we exit the thread unblocking anyone waiting on "Stop" */ +- CSingleLock runningLock(m_runningLock); +- CLog::Log(LOGINFO, "CSoftAE::Run - Thread Started"); +- +- bool hasAudio = false; +- while (m_running) +- { +- bool restart = false; +- +- /* with the new non blocking implementation - we just reOpen here, when it tells reOpen */ +- if ((this->*m_outputStageFn)(hasAudio) > 0) +- hasAudio = false; /* taken some audio - reset our silence flag */ +- +- /* if we have enough room in the buffer */ +- if (m_buffer.Free() >= m_frameSize) +- { +- /* take some data for our use from the buffer */ +- uint8_t *out = (uint8_t*)m_buffer.Take(m_frameSize); +- memset(out, 0, m_frameSize); +- +- /* run the stream stage */ +- CSoftAEStream *oldMaster = m_masterStream; +- if ((this->*m_streamStageFn)(m_chLayout.Count(), out, restart) > 0) +- hasAudio = true; /* have some audio */ +- +- /* if in audiophile mode and the master stream has changed, flag for restart */ +- if (m_audiophile && oldMaster != m_masterStream) +- restart = true; +- } +- +- /* Handle idle or forced suspend */ +- ProcessSuspend(); +- +- /* if we are told to restart */ +- if (m_reOpen || restart || !m_sink) +- { +- if(m_sinkIsSuspended && m_sink) +- { +- // hint for fritsch: remember lazy evaluation +- m_reOpen = !m_sink->SoftResume() || m_reOpen; +- m_sinkIsSuspended = false; +- CLog::Log(LOGDEBUG, "CSoftAE::Run - Sink was forgotten"); +- } +- CLog::Log(LOGDEBUG, "CSoftAE::Run - Sink restart flagged"); +- InternalOpenSink(); +- } +- +-#if defined(TARGET_ANDROID) +- else if (m_playingStreams.empty() +- && m_playing_sounds.empty() +- && !g_advancedSettings.m_streamSilence) +- { +- // if we have nothing to do, take a dirt nap. +- // we do not have to take a lock just to check empty. +- // this keeps AE from sucking CPU if nothing is going on. +- m_wake.WaitMSec(SOFTAE_IDLE_WAIT_MSEC); +- } +-#endif +- } +-} +- +-void CSoftAE::AllocateConvIfNeeded(size_t convertedSize, bool prezero) +-{ +- if (m_convertedSize < convertedSize) +- { +- _aligned_free(m_converted); +- m_converted = (uint8_t *)_aligned_malloc(convertedSize, 16); +- m_convertedSize = convertedSize; +- } +- if (prezero) +- memset(m_converted, 0x00, convertedSize); +-} +- +-unsigned int CSoftAE::MixSounds(float *buffer, unsigned int samples) +-{ +- // no point doing anything if we have no sounds, +- // we do not have to take a lock just to check empty +- if (m_playing_sounds.empty()) +- return 0; +- +- SoundStateList::iterator itt; +- unsigned int mixed = 0; +- CSingleLock lock(m_soundSampleLock); +- for (itt = m_playing_sounds.begin(); itt != m_playing_sounds.end(); ) +- { +- SoundState *ss = &(*itt); +- float *out = buffer; +- +- /* no more frames, so remove it from the list */ +- if (ss->sampleCount == 0) +- { +- ss->owner->ReleaseSamples(); +- itt = m_playing_sounds.erase(itt); +- continue; +- } +- +- float volume = ss->owner->GetVolume(); +- unsigned int mixSamples = std::min(ss->sampleCount, samples); +- #ifdef __SSE__ +- CAEUtil::SSEMulAddArray(out, ss->samples, volume, mixSamples); +- #else +- float *sample_buffer = ss->samples; +- for (unsigned int i = 0; i < mixSamples; ++i) +- *out++ += *sample_buffer++ * volume; +- #endif +- +- ss->sampleCount -= mixSamples; +- ss->samples += mixSamples; +- +- ++itt; +- ++mixed; +- } +- return mixed; +-} +- +-bool CSoftAE::FinalizeSamples(float *buffer, unsigned int samples, bool hasAudio) +-{ +- if (m_soundMode != AE_SOUND_OFF) +- hasAudio |= (MixSounds(buffer, samples) > 0); +- +- /* no need to process if we don't have audio (buffer is memset to 0) */ +- if (!hasAudio) +- return false; +- +- if (m_muted) +- { +- memset(buffer, 0, samples * sizeof(float)); +- return false; +- } +- +- /* deamplify */ +- if (!m_sinkHandlesVolume && m_volume < 1.0) +- { +- #ifdef __SSE__ +- CAEUtil::SSEMulArray(buffer, m_volume, samples); +- #else +- float *fbuffer = buffer; +- for (unsigned int i = 0; i < samples; i++) +- *fbuffer++ *= m_volume; +- #endif +- } +- +- /* check if we need to clamp */ +- bool clamp = false; +- float *fbuffer = buffer; +- for (unsigned int i = 0; i < samples; i++, fbuffer++) +- { +- if (*fbuffer < -1.0f || *fbuffer > 1.0f) +- { +- clamp = true; +- break; +- } +- } +- +- /* if there were no samples outside of the range, dont clamp the buffer */ +- if (!clamp) +- return true; +- +- CLog::Log(LOGDEBUG, "CSoftAE::FinalizeSamples - Clamping buffer of %d samples", samples); +- CAEUtil::ClampArray(buffer, samples); +- return true; +-} +- +-unsigned int CSoftAE::WriteSink(CAEBuffer& src, unsigned int src_len, uint8_t *data, bool hasAudio) +-{ +- CExclusiveLock lock(m_sinkLock); /* lock to maintain delay consistency */ +- +- XbmcThreads::EndTime timeout(m_sinkBlockTime * 2); +- while(m_sink && src.Used() >= src_len) +- { +- int frames = m_sink->AddPackets(data, m_sinkFormat.m_frames, hasAudio); +- +- /* Return value of INT_MAX signals error in sink - restart */ +- if (frames == INT_MAX) +- { +- CLog::Log(LOGERROR, "CSoftAE::WriteSink - sink error - reinit flagged"); +- m_reOpen = true; +- break; +- } +- +- if (frames) +- { +- src.Shift(NULL, src_len); +- return frames; +- } +- +- if(timeout.IsTimePast()) +- { +- CLog::Log(LOGERROR, "CSoftAE::WriteSink - sink blocked- reinit flagged"); +- m_reOpen = true; +- break; +- } +- +- lock.Leave(); +- Sleep(m_sinkBlockTime / 4); +- lock.Enter(); +- } +- return 0; +-} +- +-int CSoftAE::RunOutputStage(bool hasAudio) +-{ +- const unsigned int needSamples = m_sinkFormat.m_frames * m_sinkFormat.m_channelLayout.Count(); +- const size_t needBytes = needSamples * sizeof(float); +- if (m_buffer.Used() < needBytes) +- return 0; +- +- void *data = m_buffer.Raw(needBytes); +- hasAudio = FinalizeSamples((float*)data, needSamples, hasAudio); +- +- if (m_convertFn) +- { +- const unsigned int convertedBytes = m_sinkFormat.m_frames * m_sinkFormat.m_frameSize; +- AllocateConvIfNeeded(convertedBytes, !hasAudio); +- if (hasAudio) +- m_convertFn((float*)data, needSamples, m_converted); +- data = m_converted; +- } +- +- return WriteSink(m_buffer, needBytes, (uint8_t*)data, hasAudio); +-} +- +-int CSoftAE::RunRawOutputStage(bool hasAudio) +-{ +- if(m_buffer.Used() < m_sinkBlockSize) +- return 0; +- +- void *data = m_buffer.Raw(m_sinkBlockSize); +- +- if (CAEUtil::S16NeedsByteSwap(AE_FMT_S16NE, m_sinkFormat.m_dataFormat)) +- { +- /* +- * It would really be preferable to handle this at packing stage, so that +- * it could byteswap the data efficiently without wasting CPU time on +- * swapping the huge IEC 61937 zero padding between frames (or not +- * byteswap at all, if there are two byteswaps). +- * +- * Unfortunately packing is done on a higher level and we can't easily +- * tell it the needed format from here, so do it here for now (better than +- * nothing)... +- */ +- AllocateConvIfNeeded(m_sinkBlockSize, !hasAudio); +- if (hasAudio) +- Endian_Swap16_buf((uint16_t *)m_converted, (uint16_t *)data, m_sinkBlockSize / 2); +- data = m_converted; +- } +- +- return WriteSink(m_buffer, m_sinkBlockSize, (uint8_t*)data, hasAudio); +-} +- +-int CSoftAE::RunTranscodeStage(bool hasAudio) +-{ +- if (!m_encoder) return 0; +- +- /* if we dont have enough samples to encode yet, return */ +- unsigned int block = m_encoderFormat.m_frames * m_encoderFormat.m_frameSize; +- unsigned int sinkBlock = m_sinkFormat.m_frames * m_sinkFormat.m_frameSize; +- +- int encodedFrames = 0; +- if (m_buffer.Used() >= block && m_encodedBuffer.Used() < sinkBlock * 2) +- { +- hasAudio = FinalizeSamples((float*)m_buffer.Raw(block), m_encoderFormat.m_frameSamples, hasAudio); +- +- void *buffer; +- if (m_convertFn) +- { +- unsigned int newsize = m_encoderFormat.m_frames * m_encoderFormat.m_frameSize; +- AllocateConvIfNeeded(newsize, !hasAudio); +- if (hasAudio) +- m_convertFn((float*)m_buffer.Raw(block), +- m_encoderFormat.m_frames * m_encoderFormat.m_channelLayout.Count(), m_converted); +- buffer = m_converted; +- } +- else +- buffer = m_buffer.Raw(block); +- +- encodedFrames = m_encoder->Encode((float*)buffer, m_encoderFormat.m_frames); +- +- uint8_t *packet; +- unsigned int size = m_encoder->GetData(&packet); +- +- CExclusiveLock sinkLock(m_sinkLock); /* lock to maintain delay consistency */ +- +- /* if there is not enough space for another encoded packet enlarge the buffer */ +- if (m_encodedBuffer.Free() < size) +- m_encodedBuffer.ReAlloc(m_encodedBuffer.Used() + size); +- +- m_buffer.Shift(NULL, encodedFrames * m_encoderFormat.m_frameSize); +- m_encodedBuffer.Push(packet, size); +- } +- +- /* if we have enough data to write */ +- if (m_encodedBuffer.Used() >= sinkBlock) +- WriteSink(m_encodedBuffer, sinkBlock, (uint8_t*)m_encodedBuffer.Raw(sinkBlock), hasAudio); +- +- return encodedFrames; +-} +- +-void CSoftAE::PrintSinks() +-{ +- for (AESinkInfoList::iterator itt = m_sinkInfoList.begin(); itt != m_sinkInfoList.end(); ++itt) +- { +- 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) +- { +- CLog::Log(LOGNOTICE, " Device %d", ++count); +- CAEDeviceInfo& info = *itt2; +- std::stringstream ss((std::string)info); +- std::string line; +- while(std::getline(ss, line, '\n')) +- CLog::Log(LOGNOTICE, " %s", line.c_str()); +- } +- } +-} +- +-unsigned int CSoftAE::RunRawStreamStage(unsigned int channelCount, void *out, bool &restart) +-{ +- StreamList resumeStreams; +- static StreamList::iterator itt; +- CSingleLock streamLock(m_streamLock); +- /* handle playing streams */ +- for (itt = m_playingStreams.begin(); itt != m_playingStreams.end(); ++itt) +- { +- CSoftAEStream *sitt = *itt; +- if (sitt == m_masterStream) +- continue; +- +- /* consume data from streams even though we cant use it */ +- uint8_t *frame = sitt->GetFrame(); +- +- /* flag the stream's slave to be resumed if it has drained */ +- if (!frame && sitt->IsDrained() && sitt->m_slave && sitt->m_slave->IsPaused()) +- resumeStreams.push_back(sitt); +- } +- +- /* nothing to do if we dont have a master stream */ +- if (!m_masterStream) +- return 0; +- +- /* get the frame and append it to the output */ +- uint8_t *frame = m_masterStream->GetFrame(); +- unsigned int mixed; +- if (frame) +- { +- mixed = 1; +- memcpy(out, frame, m_sinkFormat.m_frameSize); +- } +- else +- { +- mixed = 0; +- if (m_masterStream->IsDrained() && m_masterStream->m_slave && m_masterStream->m_slave->IsPaused()) +- resumeStreams.push_back(m_masterStream); +- } +- +- ResumeSlaveStreams(resumeStreams); +- return mixed; +-} +- +-unsigned int CSoftAE::RunStreamStage(unsigned int channelCount, void *out, bool &restart) +-{ +- // no point doing anything if we have no streams, +- // we do not have to take a lock just to check empty +- if (m_playingStreams.empty()) +- return 0; +- +- float *dst = (float*)out; +- unsigned int mixed = 0; +- +- /* identify the master stream */ +- CSingleLock streamLock(m_streamLock); +- +- /* mix in any running streams */ +- StreamList resumeStreams; +- for (StreamList::iterator itt = m_playingStreams.begin(); itt != m_playingStreams.end(); ++itt) +- { +- CSoftAEStream *stream = *itt; +- +- float *frame = (float*)stream->GetFrame(); +- if (!frame && stream->IsDrained() && stream->m_slave && stream->m_slave->IsPaused()) +- resumeStreams.push_back(stream); +- +- if (!frame) +- continue; +- +- float volume = stream->GetVolume() * stream->GetReplayGain() * stream->RunLimiter(frame, channelCount); +- #ifdef __SSE__ +- if (channelCount > 1) +- CAEUtil::SSEMulAddArray(dst, frame, volume, channelCount); +- else +- #endif +- { +- for (unsigned int i = 0; i < channelCount; ++i) +- *dst++ += *frame++ * volume; +- } +- +- ++mixed; +- } +- +- ResumeSlaveStreams(resumeStreams); +- return mixed; +-} +- +-inline void CSoftAE::ResumeSlaveStreams(const StreamList &streams) +-{ +- if (streams.empty()) +- return; +- +- /* resume any streams that need to be */ +- for (StreamList::const_iterator itt = streams.begin(); itt != streams.end(); ++itt) +- { +- CSoftAEStream *stream = *itt; +- m_playingStreams.push_back(stream->m_slave); +- stream->m_slave->m_paused = false; +- stream->m_slave = NULL; +- } +-} +- +-inline void CSoftAE::RemoveStream(StreamList &streams, CSoftAEStream *stream) +-{ +- StreamList::iterator f = std::find(streams.begin(), streams.end(), stream); +- if (f != streams.end()) +- streams.erase(f); +- +- if (streams == m_playingStreams) +- m_streamsPlaying = !m_playingStreams.empty(); +-} +- +-inline void CSoftAE::ProcessSuspend() +-{ +-#if defined(TARGET_WINDOWS) || defined(TARGET_LINUX) +- if (!m_softSuspend && m_playingStreams.empty() && m_playing_sounds.empty() && +- !g_advancedSettings.m_streamSilence) +- { +- m_softSuspend = true; +- m_softSuspendTimeout.Set(10000); //10.0 second delay for softSuspend +- Sleep(10); +- } +- +-#endif +- /* 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 */ +- /* In case of Suspend stay in there until Resume is called from outer thread */ +- while (m_isSuspended || ((m_softSuspend && m_softSuspendTimeout.IsTimePast()) && +- m_running && !m_reOpen)) +- { +- if (!m_isSuspended && m_sink && !m_sinkIsSuspended) +- { +- /* put the sink in Suspend mode */ +- CExclusiveLock sinkLock(m_sinkLock); +- if (m_sink && !m_sink->SoftSuspend()) +- { +- m_sinkIsSuspended = false; //sink cannot be suspended +- m_softSuspend = false; //break suspend loop +- break; +- } +- else +- { +- CLog::Log(LOGDEBUG, "Suspended the Sink"); +- 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(); +- +- /* idle for platform-defined time */ +- m_wake.WaitMSec(SOFTAE_IDLE_WAIT_MSEC); +- +- /* 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())) +- { +- // the sink might still be not initialized after Resume of real suspend +- m_reOpen = m_sink && (!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"); +- break; +- } +- } +-} +- +diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h +deleted file mode 100644 +index 4415f76..0000000 +--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAE.h ++++ /dev/null +@@ -1,253 +0,0 @@ +-#pragma once +-/* +- * Copyright (C) 2010-2013 Team XBMC +- * http://xbmc.org +- * +- * This Program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2, or (at your option) +- * any later version. +- * +- * This Program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with XBMC; see the file COPYING. If not, see +- * . +- * +- */ +- +-#include +-#include +-#include +- +-#include "system.h" +-#include "threads/Thread.h" +-#include "threads/CriticalSection.h" +-#include "threads/SharedSection.h" +-#include "threads/SystemClock.h" +- +-#include "Interfaces/ThreadedAE.h" +-#include "Utils/AEBuffer.h" +-#include "Utils/AEAudioFormat.h" +-#include "AESinkFactory.h" +- +-#include "SoftAEStream.h" +-#include "SoftAESound.h" +- +-#include "cores/IAudioCallback.h" +- +-/* forward declarations */ +-class IAESink; +-class IAEEncoder; +- +-class CSoftAE : public IThreadedAE +-{ +-protected: +- friend class CAEFactory; +- CSoftAE(); +- virtual ~CSoftAE(); +- +-public: +- virtual void Shutdown(); +- virtual bool Initialize(); +- virtual void OnSettingsChange(const std::string& setting); +- +- virtual void Run(); +- virtual void Stop(); +- virtual bool Suspend(); +- virtual bool Resume(); +- virtual bool IsSuspended(); +- virtual double GetDelay(); +- +- virtual float GetVolume(); +- virtual void SetVolume(const float volume); +- virtual void SetMute(const bool enabled) { m_muted = enabled; } +- virtual bool IsMuted() { return m_muted; } +- virtual void SetSoundMode(const int mode); +- +- /* returns a new stream for data in the specified format */ +- virtual IAEStream *MakeStream(enum AEDataFormat dataFormat, unsigned int sampleRate, unsigned int encodedSampleRate, CAEChannelInfo channelLayout, unsigned int options = 0); +- virtual IAEStream *FreeStream(IAEStream *stream); +- +- /* returns a new sound object */ +- virtual IAESound *MakeSound(const std::string& file); +- virtual void FreeSound(IAESound *sound); +- void PlaySound(IAESound *sound); +- void StopSound(IAESound *sound); +- +- /* free's sounds that have expired */ +- virtual void GarbageCollect(); +- +- /* these are for the streams so they can provide compatible data */ +- unsigned int GetSampleRate (); +- unsigned int GetChannelCount () {return m_chLayout.Count() ;} +- CAEChannelInfo& GetChannelLayout() {return m_chLayout ;} +- enum AEStdChLayout GetStdChLayout () {return m_stdChLayout ;} +- unsigned int GetFrames () {return m_sinkFormat.m_frames ;} +- unsigned int GetFrameSize () {return m_frameSize ;} +- +- /* these are for streams that are in RAW mode */ +- const AEAudioFormat* GetSinkAudioFormat() {return &m_sinkFormat ;} +- enum AEDataFormat GetSinkDataFormat () {return m_sinkFormat.m_dataFormat ;} +- CAEChannelInfo& GetSinkChLayout () {return m_sinkFormat.m_channelLayout;} +- unsigned int GetSinkFrameSize () {return m_sinkFormat.m_frameSize ;} +- +- /* for streams so they can calc cachetimes correct */ +- double GetCacheTime(); +- double GetCacheTotal(); +- +- virtual void EnumerateOutputDevices(AEDeviceList &devices, bool passthrough); +- virtual std::string GetDefaultDevice(bool passthrough); +- virtual bool SupportsRaw(); +- +- /* internal stream methods */ +- void PauseStream (CSoftAEStream *stream); +- void ResumeStream(CSoftAEStream *stream); +- +-private: +- CThread *m_thread; +- +- CSoftAEStream *GetMasterStream(); +- +- void LoadSettings(); +- void VerifySoundDevice(std::string &device, bool passthrough); +- void OpenSink(); +- +- void InternalOpenSink(); +- void InternalCloseSink(); +- void ResetEncoder(); +- bool SetupEncoder(AEAudioFormat &format); +- void Deinitialize(); +- +- inline void ProcessSuspend(); /* enter suspend state if nothing to play and sink allows */ +- +- inline void GetDeviceFriendlyName(std::string &device); +- +- IAESink *GetSink(AEAudioFormat &desiredFormat, bool passthrough, std::string &device); +- void StopAllSounds(); +- +- enum AEStdChLayout m_stdChLayout; +- std::string m_device; +- std::string m_passthroughDevice; +- std::string m_deviceFriendlyName; +- bool m_audiophile; +- bool m_stereoUpmix; +- +- /* internal vars */ +- bool m_running, m_reOpen; +- 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 */ +- XbmcThreads::EndTime m_softSuspendTimeout; /* timer to hold sink open before soft suspend for idle */ +- CEvent m_reOpenEvent; +- CEvent m_wake; +- CEvent m_saveSuspend; +- +- CCriticalSection m_runningLock; /* released when the thread exits */ +- CCriticalSection m_streamLock; /* m_streams lock */ +- CCriticalSection m_soundLock; /* m_sounds lock */ +- CCriticalSection m_soundSampleLock; /* m_playing_sounds lock */ +- CSharedSection m_sinkLock; /* lock for m_sink on re-open */ +- CCriticalSection m_threadLock; /* locked while starting/stopping the thread */ +- +- /* the current configuration */ +- float m_volume; +- bool m_muted; +- CAEChannelInfo m_chLayout; +- unsigned int m_frameSize; +- double m_frameSizeMul; +- +- /* the sink, its format information, and conversion function */ +- AESinkInfoList m_sinkInfoList; +- IAESink *m_sink; +- AEAudioFormat m_sinkFormat; +- double m_sinkFormatSampleRateMul; +- unsigned int m_sinkBlockSize; +- unsigned int m_sinkBlockTime; +- bool m_sinkHandlesVolume; +- AEAudioFormat m_encoderFormat; +- double m_encoderFrameSizeMul; +- double m_encoderInitSampleRateMul; +- unsigned int m_bytesPerSample; +- CAEConvert::AEConvertFrFn m_convertFn; +- +- /* currently playing sounds */ +- typedef struct { +- CSoftAESound *owner; +- float *samples; +- unsigned int sampleCount; +- } SoundState; +- +- typedef std::vector StreamList; +- typedef std::list SoundList; +- typedef std::list SoundStateList; +- +- /* the streams, sounds, output buffer and output buffer fill size */ +- bool m_transcode; +- bool m_rawPassthrough; +- StreamList m_newStreams, m_streams, m_playingStreams; +- SoundList m_sounds; +- SoundStateList m_playing_sounds; +- int m_soundMode; +- bool m_streamsPlaying; +- +- /* this will contain either float, or uint8_t depending on if we are in raw mode or not */ +- CAEBuffer m_buffer; +- +- /* the encoder */ +- IAEEncoder *m_encoder; +- CAEBuffer m_encodedBuffer; +- +- /* the output conversion buffer */ +- uint8_t *m_converted; +- size_t m_convertedSize; +- +- void AllocateConvIfNeeded(size_t convertedSize, bool prezero = false); +- +- /* thread run stages */ +- +- /*! \brief Mix UI sounds into the current stream. +- \param buffer the buffer to mix into. +- \param samples the number of samples in the buffer. +- \return the number of sounds mixed into the buffer. +- */ +- unsigned int MixSounds (float *buffer, unsigned int samples); +- +- /*! \brief Finalize samples ready for sending to the output device. +- Mixes in any UI sounds, applies volume adjustment, and clamps to [-1,1]. +- \param buffer the audio data. +- \param samples the number of samples in the buffer. +- \param hasAudio whether we have audio from a stream (true) or silence (false) +- \return true if we have audio to output, false if we have only silence. +- */ +- bool FinalizeSamples (float *buffer, unsigned int samples, bool hasAudio); +- +- CSoftAEStream *m_masterStream; +- +- /*! \brief Run the output stage on the audio. +- Prepares streamed data, mixes in any UI sounds, converts to a format suitable +- for the sink, then outputs to the sink. +- \param hasAudio whether or not we have audio (true) or silence (false). +- \return the number of samples sent to the sink. +- */ +- int (CSoftAE::*m_outputStageFn)(bool); +- int RunOutputStage (bool hasAudio); +- int RunRawOutputStage(bool hasAudio); +- int RunTranscodeStage(bool hasAudio); +- +- unsigned int (CSoftAE::*m_streamStageFn)(unsigned int channelCount, void *out, bool &restart); +- unsigned int RunRawStreamStage (unsigned int channelCount, void *out, bool &restart); +- unsigned int RunStreamStage (unsigned int channelCount, void *out, bool &restart); +- +- void ResumeSlaveStreams(const StreamList &streams); +- void RunNormalizeStage (unsigned int channelCount, void *out, unsigned int mixed); +- +- void RemoveStream(StreamList &streams, CSoftAEStream *stream); +- void PrintSinks(); +- +- unsigned int WriteSink(CAEBuffer& src, unsigned int src_len, uint8_t *data, bool hasAudio); +-}; +- +diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAESound.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAESound.cpp +deleted file mode 100644 +index 5fcaccf..0000000 +--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAESound.cpp ++++ /dev/null +@@ -1,114 +0,0 @@ +-/* +- * Copyright (C) 2010-2013 Team XBMC +- * http://xbmc.org +- * +- * This Program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2, or (at your option) +- * any later version. +- * +- * This Program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with XBMC; see the file COPYING. If not, see +- * . +- * +- */ +- +-#include "Interfaces/AESound.h" +- +-#include +-#include "threads/SingleLock.h" +-#include "utils/log.h" +-#include "utils/EndianSwap.h" +- +-#include "AEFactory.h" +-#include "Utils/AEAudioFormat.h" +- +-#include "SoftAE.h" +-#include "SoftAESound.h" +- +-/* typecast AE to CSoftAE */ +-#define AE (*((CSoftAE*)CAEFactory::GetEngine())) +- +-CSoftAESound::CSoftAESound(const std::string &filename) : +- IAESound (filename), +- m_filename (filename), +- m_volume (1.0f ), +- m_inUse (0 ) +-{ +- m_wavLoader.Load(filename); +-} +- +-CSoftAESound::~CSoftAESound() +-{ +-} +- +-void CSoftAESound::DeInitialize() +-{ +-} +- +-bool CSoftAESound::IsCompatible() +-{ +- if (!m_wavLoader.IsValid()) +- return false; +- +- return m_wavLoader.IsCompatible(AE.GetSampleRate(), AE.GetChannelLayout()); +-} +- +-bool CSoftAESound::Initialize() +-{ +- if (!m_wavLoader.IsValid()) +- return false; +- +- return m_wavLoader.Initialize( +- AE.GetSampleRate (), +- AE.GetChannelLayout(), +- AE.GetStdChLayout () +- ); +-} +- +-unsigned int CSoftAESound::GetSampleCount() +-{ +- CSingleLock cs(m_critSection); +- if (m_wavLoader.IsValid()) +- return m_wavLoader.GetSampleCount(); +- return 0; +-} +- +-float* CSoftAESound::GetSamples() +-{ +- CSingleLock cs(m_critSection); +- if (!m_wavLoader.IsValid()) +- return NULL; +- +- ++m_inUse; +- return m_wavLoader.GetSamples(); +-} +- +-void CSoftAESound::ReleaseSamples() +-{ +- CSingleLock cs(m_critSection); +- ASSERT(m_inUse > 0); +- --m_inUse; +-} +- +-bool CSoftAESound::IsPlaying() +-{ +- CSingleLock cs(m_critSection); +- return (m_inUse > 0); +-} +- +-void CSoftAESound::Play() +-{ +- AE.PlaySound(this); +-} +- +-void CSoftAESound::Stop() +-{ +- AE.StopSound(this); +-} +- +diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAESound.h b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAESound.h +deleted file mode 100644 +index cd50c0b..0000000 +--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAESound.h ++++ /dev/null +@@ -1,57 +0,0 @@ +-#pragma once +-/* +- * Copyright (C) 2010-2013 Team XBMC +- * http://xbmc.org +- * +- * This Program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2, or (at your option) +- * any later version. +- * +- * This Program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with XBMC; see the file COPYING. If not, see +- * . +- * +- */ +- +-#include "utils/StdString.h" +-#include "threads/CriticalSection.h" +-#include "threads/SharedSection.h" +-#include "Interfaces/AESound.h" +-#include "Utils/AEWAVLoader.h" +- +-class CSoftAESound : public IAESound +-{ +-public: +- CSoftAESound (const std::string &filename); +- virtual ~CSoftAESound(); +- +- virtual void DeInitialize(); +- virtual bool Initialize(); +- +- virtual void Play(); +- virtual void Stop(); +- virtual bool IsPlaying(); +- +- virtual void SetVolume(float volume) { m_volume = std::max(0.0f, std::min(1.0f, volume)); } +- virtual float GetVolume() { return m_volume ; } +- +- bool IsCompatible(); +- unsigned int GetSampleCount(); +- +- /* ReleaseSamples must be called for each time GetSamples has been called */ +- virtual float* GetSamples (); +- void ReleaseSamples(); +-private: +- CCriticalSection m_critSection; +- std::string m_filename; +- CAEWAVLoader m_wavLoader; +- float m_volume; +- int m_inUse; +-}; +- +diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp +deleted file mode 100644 +index b5c2da3..0000000 +--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp ++++ /dev/null +@@ -1,687 +0,0 @@ +-/* +- * Copyright (C) 2010-2013 Team XBMC +- * http://xbmc.org +- * +- * This Program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2, or (at your option) +- * any later version. +- * +- * This Program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with XBMC; see the file COPYING. If not, see +- * . +- * +- */ +- +-#include "system.h" +-#include "threads/SingleLock.h" +-#include "utils/log.h" +-#include "utils/MathUtils.h" +- +-#include "AEFactory.h" +-#include "Utils/AEUtil.h" +- +-#include "SoftAE.h" +-#include "SoftAEStream.h" +- +-#ifdef TARGET_WINDOWS +-#pragma comment(lib, "libsamplerate-0.lib") +-#endif +- +-/* typecast AE to CSoftAE */ +-#define AE (*((CSoftAE*)CAEFactory::GetEngine())) +- +-using namespace std; +- +-CSoftAEStream::CSoftAEStream(enum AEDataFormat dataFormat, unsigned int sampleRate, unsigned int encodedSampleRate, CAEChannelInfo channelLayout, unsigned int options, CCriticalSection& lock) : +- m_lock (lock ), +- m_resampleRatio (1.0 ), +- m_internalRatio (1.0 ), +- m_convertBuffer (NULL ), +- m_valid (false), +- m_delete (false), +- m_volume (1.0f ), +- m_rgain (1.0f ), +- m_refillBuffer (0 ), +- m_convertFn (NULL ), +- m_ssrc (NULL ), +- m_framesBuffered (0 ), +- m_newPacket (NULL ), +- m_packet (NULL ), +- m_vizPacketPos (NULL ), +- m_draining (false), +- m_vizBufferSamples(0 ), +- m_audioCallback (NULL ), +- m_fadeRunning (false), +- m_slave (NULL ) +-{ +- m_ssrcData.data_out = NULL; +- +- m_initDataFormat = dataFormat; +- m_initSampleRate = sampleRate; +- m_initEncodedSampleRate = encodedSampleRate; +- m_initChannelLayout = channelLayout; +- m_chLayoutCount = channelLayout.Count(); +- m_forceResample = (options & AESTREAM_FORCE_RESAMPLE) != 0; +- m_paused = (options & AESTREAM_PAUSED) != 0; +- m_autoStart = (options & AESTREAM_AUTOSTART) != 0; +- +- if (m_autoStart) +- m_paused = true; +- +- ASSERT(m_initChannelLayout.Count()); +-} +- +-void CSoftAEStream::InitializeRemap() +-{ +- CSingleLock lock(m_lock); +- +- if (!AE_IS_RAW(m_initDataFormat)) +- { +- /* re-init the remappers */ +- m_remap .Initialize(m_initChannelLayout, AE.GetChannelLayout() , false, false, AE.GetStdChLayout()); +- m_vizRemap.Initialize(m_initChannelLayout, CAEChannelInfo(AE_CH_LAYOUT_2_0), false, true); +- +- /* +- if the layout has changed we need to drop data that was already remapped +- */ +- if (AE.GetChannelLayout() != m_aeChannelLayout) +- { +- InternalFlush(); +- m_aeChannelLayout = AE.GetChannelLayout(); +- m_samplesPerFrame = AE.GetChannelLayout().Count(); +- m_aeBytesPerFrame = AE_IS_RAW(m_initDataFormat) ? m_bytesPerFrame : (m_samplesPerFrame * sizeof(float)); +- } +- } +-} +- +-void CSoftAEStream::Initialize() +-{ +- CSingleLock lock(m_lock); +- +- if (m_valid) +- { +- InternalFlush(); +- delete m_newPacket; +- +- if (m_convert) +- _aligned_free(m_convertBuffer); +- +- if (m_resample) +- { +- _aligned_free(m_ssrcData.data_out); +- m_ssrcData.data_out = NULL; +- } +- } +- +- enum AEDataFormat useDataFormat = m_initDataFormat; +- if (AE_IS_RAW(m_initDataFormat)) +- { +- /* we are raw, which means we need to work in the output format */ +- useDataFormat = AE.GetSinkDataFormat(); +- m_initChannelLayout = AE.GetSinkChLayout (); +- m_samplesPerFrame = m_initChannelLayout.Count(); +- } +- else +- { +- if (!m_initChannelLayout.Count()) +- { +- m_valid = false; +- return; +- } +- m_samplesPerFrame = AE.GetChannelLayout().Count(); +- } +- +- m_bytesPerSample = (CAEUtil::DataFormatToBits(useDataFormat) >> 3); +- m_bytesPerFrame = m_bytesPerSample * m_initChannelLayout.Count(); +- +- m_aeChannelLayout = AE.GetChannelLayout(); +- m_aeBytesPerFrame = AE_IS_RAW(m_initDataFormat) ? m_bytesPerFrame : (m_samplesPerFrame * sizeof(float)); +- // set the waterlevel to 75 percent of the number of frames per second. +- // this lets us drain the main buffer down futher before flagging an underrun. +- m_waterLevel = AE.GetSampleRate() - (AE.GetSampleRate() / 4); +- m_refillBuffer = m_waterLevel; +- +- m_format.m_dataFormat = useDataFormat; +- m_format.m_sampleRate = m_initSampleRate; +- m_format.m_encodedRate = m_initEncodedSampleRate; +- m_format.m_channelLayout = m_initChannelLayout; +- m_format.m_frames = m_initSampleRate / 8; +- m_format.m_frameSamples = m_format.m_frames * m_initChannelLayout.Count(); +- m_format.m_frameSize = m_bytesPerFrame; +- +- m_newPacket = new PPacket(); +- if (AE_IS_RAW(m_initDataFormat)) +- m_newPacket->data.Alloc(m_format.m_frames * m_format.m_frameSize); +- else +- { +- if ( +- !m_remap .Initialize(m_initChannelLayout, m_aeChannelLayout , false, false, AE.GetStdChLayout()) || +- !m_vizRemap.Initialize(m_initChannelLayout, CAEChannelInfo(AE_CH_LAYOUT_2_0), false, true)) +- { +- m_valid = false; +- return; +- } +- +- m_newPacket->data.Alloc(m_format.m_frameSamples * sizeof(float)); +- } +- +- m_packet = NULL; +- +- m_inputBuffer.Alloc(m_format.m_frames * m_format.m_frameSize); +- +- m_resample = (m_forceResample || m_initSampleRate != AE.GetSampleRate()) && !AE_IS_RAW(m_initDataFormat); +- m_convert = m_initDataFormat != AE_FMT_FLOAT && !AE_IS_RAW(m_initDataFormat); +- +- /* if we need to convert, set it up */ +- if (m_convert) +- { +- /* get the conversion function and allocate a buffer for the data */ +- CLog::Log(LOGDEBUG, "CSoftAEStream::CSoftAEStream - Converting from %s to AE_FMT_FLOAT", CAEUtil::DataFormatToStr(m_initDataFormat)); +- m_convertFn = CAEConvert::ToFloat(m_initDataFormat); +- if (m_convertFn) +- m_convertBuffer = (float*)_aligned_malloc(m_format.m_frameSamples * sizeof(float), 16); +- else +- m_valid = false; +- } +- else +- m_convertBuffer = (float*)m_inputBuffer.Raw(m_format.m_frames * m_format.m_frameSize); +- +- /* if we need to resample, set it up */ +- if (m_resample) +- { +- int err; +- m_ssrc = src_new(SRC_SINC_MEDIUM_QUALITY, m_initChannelLayout.Count(), &err); +- m_ssrcData.data_in = m_convertBuffer; +- m_internalRatio = (double)AE.GetSampleRate() / (double)m_initSampleRate; +- m_ssrcData.src_ratio = m_internalRatio; +- m_ssrcData.data_out = (float*)_aligned_malloc(m_format.m_frameSamples * (int)std::ceil(m_ssrcData.src_ratio) * sizeof(float), 16); +- m_ssrcData.output_frames = m_format.m_frames * (long)std::ceil(m_ssrcData.src_ratio); +- m_ssrcData.end_of_input = 0; +- // we must buffer the same amount as before but taking the source sample rate into account +- // there is no reason to decrease the buffer for upsampling +- if (m_internalRatio < 1) +- { +- m_waterLevel *= (1.0 / m_internalRatio); +- m_refillBuffer = m_waterLevel; +- } +- } +- +- m_limiter.SetSamplerate(AE.GetSampleRate()); +- +- m_chLayoutCount = m_format.m_channelLayout.Count(); +- m_valid = true; +-} +- +-void CSoftAEStream::Destroy() +-{ +- CSingleLock lock(m_lock); +- +- m_valid = false; +- m_delete = true; +-} +- +-CSoftAEStream::~CSoftAEStream() +-{ +- CSingleLock lock(m_lock); +- +- InternalFlush(); +- if (m_convert) +- _aligned_free(m_convertBuffer); +- +- if (m_resample) +- { +- _aligned_free(m_ssrcData.data_out); +- src_delete(m_ssrc); +- m_ssrc = NULL; +- } +- +- delete m_newPacket; +- delete m_packet; +- +- CLog::Log(LOGDEBUG, "CSoftAEStream::~CSoftAEStream - Destructed"); +-} +- +-unsigned int CSoftAEStream::GetSpace() +-{ +- CSingleLock lock(m_lock); +- +- if (!m_valid || m_draining) +- return 0; +- +- if (m_framesBuffered >= m_waterLevel) +- return 0; +- +- return m_inputBuffer.Free() + (std::max(0U, (m_waterLevel - m_framesBuffered)) * m_format.m_frameSize); +-} +- +-unsigned int CSoftAEStream::AddData(void *data, unsigned int size) +-{ +- CSingleLock lock(m_lock); +- +- if (!m_valid || size == 0 || data == NULL) +- return 0; +- +- /* if the stream is draining */ +- if (m_draining) +- { +- /* if the stream has finished draining, cork it */ +- if (m_packet && !m_packet->data.Used() && m_outBuffer.empty()) +- m_draining = false; +- else +- return 0; +- } +- +- /* dont ever take more then GetSpace advertises */ +- size = std::min(size, GetSpace()); +- if (size == 0) +- return 0; +- +- unsigned int taken = 0; +- while(size) +- { +- unsigned int copy = std::min((unsigned int)m_inputBuffer.Free(), size); +- if (copy > 0) +- { +- m_inputBuffer.Push(data, copy); +- size -= copy; +- taken += copy; +- data = (uint8_t*)data + copy; +- } +- +- if (m_inputBuffer.Free() == 0) +- { +- unsigned int consumed = ProcessFrameBuffer(); +- m_inputBuffer.Shift(NULL, consumed); +- } +- } +- +- lock.Leave(); +- +- /* if the stream is flagged to autoStart when the buffer is full, then do it */ +- if (m_autoStart && m_framesBuffered >= m_waterLevel) +- Resume(); +- +- return taken; +-} +- +-unsigned int CSoftAEStream::ProcessFrameBuffer() +-{ +- uint8_t *data; +- unsigned int frames, consumed, sampleSize; +- +- /* convert the data if we need to */ +- unsigned int samples; +- if (m_convert) +- { +- data = (uint8_t*)m_convertBuffer; +- samples = m_convertFn( +- (uint8_t*)m_inputBuffer.Raw(m_inputBuffer.Used()), +- m_inputBuffer.Used() / m_bytesPerSample, +- m_convertBuffer +- ); +- sampleSize = sizeof(float); +- } +- else +- { +- data = (uint8_t*)m_inputBuffer.Raw(m_inputBuffer.Used()); +- samples = m_inputBuffer.Used() / m_bytesPerSample; +- sampleSize = m_bytesPerSample; +- } +- +- if (samples == 0) +- return 0; +- +- /* resample it if we need to */ +- if (m_resample) +- { +- m_ssrcData.input_frames = samples / m_chLayoutCount; +- if (src_process(m_ssrc, &m_ssrcData) != 0) +- return 0; +- data = (uint8_t*)m_ssrcData.data_out; +- frames = m_ssrcData.output_frames_gen; +- consumed = m_ssrcData.input_frames_used * m_bytesPerFrame; +- if (!frames) +- return consumed; +- +- samples = frames * m_chLayoutCount; +- } +- else +- { +- data = (uint8_t*)m_convertBuffer; +- frames = samples / m_chLayoutCount; +- consumed = frames * m_bytesPerFrame; +- } +- +- if (m_refillBuffer) +- { +- if (frames > m_refillBuffer) +- m_refillBuffer = 0; +- else +- m_refillBuffer -= frames; +- } +- +- /* buffer the data */ +- m_framesBuffered += frames; +- const unsigned int inputBlockSize = m_format.m_frames * m_format.m_channelLayout.Count() * sampleSize; +- +- size_t remaining = samples * sampleSize; +- while (remaining) +- { +- size_t copy = std::min(m_newPacket->data.Free(), remaining); +- m_newPacket->data.Push(data, copy); +- data += copy; +- remaining -= copy; +- +- /* wait till we have a full packet, or no more data before processing the packet */ +- if ((!m_draining || remaining) && m_newPacket->data.Free() > 0) +- continue; +- +- /* if we have a full block of data */ +- if (AE_IS_RAW(m_initDataFormat)) +- { +- m_outBuffer.push_back(m_newPacket); +- m_newPacket = new PPacket(); +- m_newPacket->data.Alloc(inputBlockSize); +- continue; +- } +- +- /* make a new packet for downmix/remap */ +- PPacket *pkt = new PPacket(); +- +- /* downmix/remap the data */ +- size_t frames = m_newPacket->data.Used() / m_format.m_channelLayout.Count() / sizeof(float); +- size_t used = frames * m_aeChannelLayout.Count() * sizeof(float); +- pkt->data.Alloc(used); +- m_remap.Remap( +- (float*)m_newPacket->data.Raw (m_newPacket->data.Used()), +- (float*)pkt ->data.Take(used), +- frames +- ); +- +- /* downmix for the viz if we have one */ +- if (m_audioCallback) +- { +- size_t vizUsed = frames * 2 * sizeof(float); +- pkt->vizData.Alloc(vizUsed); +- m_vizRemap.Remap( +- (float*)m_newPacket->data .Raw (m_newPacket->data.Used()), +- (float*)pkt ->vizData.Take(vizUsed), +- frames +- ); +- } +- +- /* add the packet to the output */ +- m_outBuffer.push_back(pkt); +- m_newPacket->data.Empty(); +- } +- +- return consumed; +-} +- +-uint8_t* CSoftAEStream::GetFrame() +-{ +- CSingleLock lock(m_lock); +- +- /* if we are fading, this runs even if we have underrun as it is time based */ +- if (m_fadeRunning) +- { +- m_volume += m_fadeStep; +- m_volume = std::min(1.0f, std::max(0.0f, m_volume)); +- if (m_fadeDirUp) +- { +- if (m_volume >= m_fadeTarget) +- m_fadeRunning = false; +- } +- else +- { +- if (m_volume <= m_fadeTarget) +- m_fadeRunning = false; +- } +- } +- +- /* if we have been deleted or are refilling but not draining */ +- if (!m_valid || m_delete || (m_refillBuffer && !m_draining)) +- return NULL; +- +- /* if the packet is empty, advance to the next one */ +- if (!m_packet || m_packet->data.CursorEnd()) +- { +- delete m_packet; +- m_packet = NULL; +- +- /* no more packets, return null */ +- if (m_outBuffer.empty()) +- { +- if (m_draining) +- return NULL; +- else +- { +- /* underrun, we need to refill our buffers */ +- CLog::Log(LOGDEBUG, "CSoftAEStream::GetFrame - Underrun"); +- ASSERT(m_waterLevel > m_framesBuffered); +- m_refillBuffer = m_waterLevel - m_framesBuffered; +- return NULL; +- } +- } +- +- /* get the next packet */ +- m_packet = m_outBuffer.front(); +- m_outBuffer.pop_front(); +- } +- +- /* fetch one frame of data */ +- uint8_t *ret = (uint8_t*)m_packet->data.CursorRead(m_aeBytesPerFrame); +- +- /* we have a frame, if we have a viz we need to hand the data to it */ +- if (m_audioCallback && !m_packet->vizData.CursorEnd()) +- { +- float *vizData = (float*)m_packet->vizData.CursorRead(2 * sizeof(float)); +- memcpy(m_vizBuffer + m_vizBufferSamples, vizData, 2 * sizeof(float)); +- m_vizBufferSamples += 2; +- if (m_vizBufferSamples == 512) +- { +- m_audioCallback->OnAudioData(m_vizBuffer, 512); +- m_vizBufferSamples = 0; +- } +- } +- +- --m_framesBuffered; +- return ret; +-} +- +-double CSoftAEStream::GetDelay() +-{ +- CSingleLock lock(m_lock); +- +- if (m_delete) +- return 0.0; +- +- double delay = AE.GetDelay(); +- delay += (double)(m_inputBuffer.Used() / m_format.m_frameSize) / (double)m_format.m_sampleRate; +- delay += (double)m_framesBuffered / (double)AE.GetSampleRate(); +- return delay; +-} +- +-double CSoftAEStream::GetCacheTime() +-{ +- CSingleLock lock(m_lock); +- +- if (m_delete) +- return 0.0; +- +- double time = AE.GetCacheTime(); +- time += (double)(m_inputBuffer.Used() / m_format.m_frameSize) / (double)m_format.m_sampleRate; +- time += (double)m_framesBuffered / (double)AE.GetSampleRate(); +- return time; +-} +- +-double CSoftAEStream::GetCacheTotal() +-{ +- CSingleLock lock(m_lock); +- +- if (m_delete) +- return 0.0; +- +- double total = AE.GetCacheTotal(); +- total += (double)(m_inputBuffer.Size() / m_format.m_frameSize) / (double)m_format.m_sampleRate; +- total += (double)m_waterLevel / (double)AE.GetSampleRate(); +- return total; +-} +- +-void CSoftAEStream::Pause() +-{ +- CSingleLock lock(m_lock); +- +- if (m_paused) +- return; +- m_paused = true; +- AE.PauseStream(this); +-} +- +-void CSoftAEStream::Resume() +-{ +- CSingleLock lock(m_lock); +- +- if (!m_paused) +- return; +- m_paused = false; +- m_autoStart = false; +- AE.ResumeStream(this); +-} +- +-void CSoftAEStream::Drain(bool wait) +-{ +- CSingleLock lock(m_lock); +- m_draining = true; +-} +- +-bool CSoftAEStream::IsDrained() +-{ +- CSingleLock lock(m_lock); +- return (m_draining && !m_packet && m_outBuffer.empty()); +-} +- +-void CSoftAEStream::Flush() +-{ +- CLog::Log(LOGDEBUG, "CSoftAEStream::Flush"); +- CSingleLock lock(m_lock); +- InternalFlush(); +- +- /* internal flush does not do this as these samples are still valid if we are re-initializing */ +- m_inputBuffer.Empty(); +-} +- +-void CSoftAEStream::InternalFlush() +-{ +- /* reset the resampler */ +- if (m_resample) +- { +- m_ssrcData.end_of_input = 0; +- src_reset(m_ssrc); +- } +- +- /* invalidate any incoming samples */ +- m_newPacket->data.Empty(); +- +- /* +- clear the current buffered packet, we cant delete the data as it may be +- in use by the AE thread, so we just seek to the end of the buffer +- */ +- if (m_packet) +- m_packet->data.CursorSeek(m_packet->data.Size()); +- +- /* clear any other buffered packets */ +- while (!m_outBuffer.empty()) +- { +- PPacket *p = m_outBuffer.front(); +- m_outBuffer.pop_front(); +- delete p; +- } +- +- /* reset our counts */ +- m_framesBuffered = 0; +- m_refillBuffer = m_waterLevel; +- m_draining = false; +-} +- +-double CSoftAEStream::GetResampleRatio() +-{ +- CSingleLock lock(m_lock); +- if (!m_resample) +- return 1.0f; +- +- return m_ssrcData.src_ratio; +-} +- +-bool CSoftAEStream::SetResampleRatio(double ratio) +-{ +- if (!m_resample) +- return false; +- +- CSingleLock lock(m_lock); +- +- int oldRatioInt = (int)std::ceil(m_ssrcData.src_ratio); +- +- m_resampleRatio = ratio; +- +- src_set_ratio(m_ssrc, m_resampleRatio * m_internalRatio); +- m_ssrcData.src_ratio = m_resampleRatio * m_internalRatio; +- +- //Check the resample buffer size and resize if necessary. +- if (oldRatioInt < std::ceil(m_ssrcData.src_ratio)) +- { +- _aligned_free(m_ssrcData.data_out); +- m_ssrcData.data_out = (float*)_aligned_malloc(m_format.m_frameSamples * (int)std::ceil(m_ssrcData.src_ratio) * sizeof(float), 16); +- m_ssrcData.output_frames = m_format.m_frames * (long)std::ceil(m_ssrcData.src_ratio); +- } +- return true; +-} +- +-void CSoftAEStream::RegisterAudioCallback(IAudioCallback* pCallback) +-{ +- CSingleLock lock(m_lock); +- m_vizBufferSamples = 0; +- m_audioCallback = pCallback; +- if (m_audioCallback) +- m_audioCallback->OnInitialize(2, m_initSampleRate, 32); +-} +- +-void CSoftAEStream::UnRegisterAudioCallback() +-{ +- CSingleLock lock(m_lock); +- m_audioCallback = NULL; +- m_vizBufferSamples = 0; +-} +- +-void CSoftAEStream::FadeVolume(float from, float target, unsigned int time) +-{ +- /* can't fade a RAW stream */ +- if (AE_IS_RAW(m_initDataFormat)) +- return; +- +- CSingleLock lock(m_lock); +- float delta = target - from; +- m_fadeDirUp = target > from; +- m_fadeTarget = target; +- m_fadeStep = delta / (((float)AE.GetSampleRate() / 1000.0f) * (float)time); +- m_fadeRunning = true; +-} +- +-bool CSoftAEStream::IsFading() +-{ +- CSingleLock lock(m_lock); +- return m_fadeRunning; +-} +- +-void CSoftAEStream::RegisterSlave(IAEStream *slave) +-{ +- CSingleLock lock(m_lock); +- m_slave = (CSoftAEStream*)slave; +-} +- +diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.h b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.h +deleted file mode 100644 +index 9ee607c..0000000 +--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.h ++++ /dev/null +@@ -1,161 +0,0 @@ +-#pragma once +-/* +- * Copyright (C) 2010-2013 Team XBMC +- * http://xbmc.org +- * +- * This Program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2, or (at your option) +- * any later version. +- * +- * This Program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with XBMC; see the file COPYING. If not, see +- * . +- * +- */ +- +-#include +-#include +- +-#include "threads/SharedSection.h" +- +-#include "Utils/AEAudioFormat.h" +-#include "Interfaces/AEStream.h" +-#include "Utils/AEConvert.h" +-#include "Utils/AERemap.h" +-#include "Utils/AEBuffer.h" +-#include "Utils/AELimiter.h" +- +-class IAEPostProc; +-class CSoftAEStream : public IAEStream +-{ +-protected: +- friend class CSoftAE; +- CSoftAEStream(enum AEDataFormat format, unsigned int sampleRate, unsigned int encodedSamplerate, CAEChannelInfo channelLayout, unsigned int options, CCriticalSection& lock); +- virtual ~CSoftAEStream(); +- +- void Initialize(); +- void InitializeRemap(); +- void Destroy(); +- uint8_t* GetFrame(); +- +- bool IsPaused () { return m_paused; } +- bool IsDestroyed() { return m_delete; } +- bool IsValid () { return m_valid; } +- const bool IsRaw() const { return AE_IS_RAW(m_initDataFormat); } +- +-public: +- virtual unsigned int GetSpace (); +- virtual unsigned int AddData (void *data, unsigned int size); +- virtual double GetDelay (); +- virtual bool IsBuffering () { return m_refillBuffer > 0; } +- virtual double GetCacheTime (); +- virtual double GetCacheTotal (); +- +- virtual void Pause (); +- virtual void Resume (); +- virtual void Drain (bool wait); +- virtual bool IsDraining () { return m_draining; } +- virtual bool IsDrained (); +- virtual void Flush (); +- +- virtual float GetVolume () { return m_volume; } +- virtual float GetReplayGain () { return m_rgain ; } +- virtual float GetAmplification() { return m_limiter.GetAmplification(); } +- virtual void SetVolume (float volume) { m_volume = std::max( 0.0f, std::min(1.0f, volume)); } +- virtual void SetReplayGain (float factor) { m_rgain = std::max( 0.0f, factor); } +- virtual void SetAmplification(float amplify){ m_limiter.SetAmplification(amplify); } +- +- virtual float RunLimiter(float* frame, int channels) { return m_limiter.Run(&frame, channels); } +- +- virtual const unsigned int GetFrameSize () const { return m_format.m_frameSize; } +- virtual const unsigned int GetChannelCount() const { return m_initChannelLayout.Count(); } +- +- virtual const unsigned int GetSampleRate () const { return m_initSampleRate; } +- virtual const unsigned int GetEncodedSampleRate() const { return m_initEncodedSampleRate; } +- virtual const enum AEDataFormat GetDataFormat () const { return m_initDataFormat; } +- +- virtual double GetResampleRatio(); +- virtual bool SetResampleRatio(double ratio); +- virtual void RegisterAudioCallback(IAudioCallback* pCallback); +- virtual void UnRegisterAudioCallback(); +- virtual void FadeVolume(float from, float to, unsigned int time); +- virtual bool IsFading(); +- virtual void RegisterSlave(IAEStream *stream); +-private: +- void InternalFlush(); +- void CheckResampleBuffers(); +- +- CCriticalSection& m_lock; +- enum AEDataFormat m_initDataFormat; +- unsigned int m_initSampleRate; +- unsigned int m_initEncodedSampleRate; +- CAEChannelInfo m_initChannelLayout; +- unsigned int m_chLayoutCount; +- +- typedef struct +- { +- CAEBuffer data; +- CAEBuffer vizData; +- } PPacket; +- +- AEAudioFormat m_format; +- +- bool m_forceResample; /* true if we are to force resample even when the rates match */ +- bool m_resample; /* true if the audio needs to be resampled */ +- double m_resampleRatio; /* user specified resample ratio */ +- double m_internalRatio; /* internal resample ratio */ +- bool m_convert; /* true if the bitspersample needs converting */ +- float *m_convertBuffer; /* buffer for converted data */ +- bool m_valid; /* true if the stream is valid */ +- bool m_delete; /* true if CSoftAE is to free this object */ +- CAERemap m_remap; /* the remapper */ +- float m_volume; /* the volume level */ +- float m_rgain; /* replay gain level */ +- unsigned int m_waterLevel; /* the fill level to fall below before calling the data callback */ +- unsigned int m_refillBuffer; /* how many frames that need to be buffered before we return any frames */ +- +- CAEConvert::AEConvertToFn m_convertFn; +- +- CAEBuffer m_inputBuffer; +- unsigned int m_bytesPerSample; +- unsigned int m_bytesPerFrame; +- unsigned int m_samplesPerFrame; +- CAEChannelInfo m_aeChannelLayout; +- unsigned int m_aeBytesPerFrame; +- SRC_STATE *m_ssrc; +- SRC_DATA m_ssrcData; +- unsigned int m_framesBuffered; +- std::list m_outBuffer; +- unsigned int ProcessFrameBuffer(); +- PPacket *m_newPacket; +- PPacket *m_packet; +- uint8_t *m_packetPos; +- float *m_vizPacketPos; +- bool m_paused; +- bool m_autoStart; +- bool m_draining; +- CAELimiter m_limiter; +- +- /* vizualization internals */ +- CAERemap m_vizRemap; +- float m_vizBuffer[512]; +- unsigned int m_vizBufferSamples; +- IAudioCallback *m_audioCallback; +- +- /* fade values */ +- bool m_fadeRunning; +- bool m_fadeDirUp; +- float m_fadeStep; +- float m_fadeTarget; +- unsigned int m_fadeTime; +- +- /* slave stream */ +- CSoftAEStream *m_slave; +-}; +- +diff --git a/xbmc/cores/AudioEngine/Makefile.in b/xbmc/cores/AudioEngine/Makefile.in +index c2d7ffa..c1d53f5 100644 +--- a/xbmc/cores/AudioEngine/Makefile.in ++++ b/xbmc/cores/AudioEngine/Makefile.in +@@ -39,10 +39,6 @@ SRCS += AESinkFactory.cpp + SRCS += Sinks/AESinkNULL.cpp + SRCS += Sinks/AESinkProfiler.cpp + +-SRCS += Engines/SoftAE/SoftAE.cpp +-SRCS += Engines/SoftAE/SoftAEStream.cpp +-SRCS += Engines/SoftAE/SoftAESound.cpp +- + SRCS += Engines/ActiveAE/ActiveAE.cpp + SRCS += Engines/ActiveAE/ActiveAESink.cpp + SRCS += Engines/ActiveAE/ActiveAEStream.cpp +-- +1.8.4 + + +From e428540125df499e522c4feb506b932b2864fdce Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Fri, 18 Oct 2013 13:25:23 +0200 +Subject: [PATCH 07/86] adapt toggle passthrough to change in audio settings + +--- + xbmc/Application.cpp | 11 +++-------- + 1 file changed, 3 insertions(+), 8 deletions(-) + +diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp +index 6a3fbdb..f2d7ed4 100644 +--- a/xbmc/Application.cpp ++++ b/xbmc/Application.cpp +@@ -1609,7 +1609,7 @@ void CApplication::OnSettingChanged(const CSetting *setting) + } + // this tells player whether to open an audio stream passthrough or PCM + // if this is changed, audio stream has to be reopened +- else if (settingId == "audiooutput.mode") ++ else if (settingId == "audiooutput.passthrough") + { + CApplicationMessenger::Get().MediaRestart(false); + return; +@@ -2763,13 +2763,8 @@ bool CApplication::OnAction(const CAction &action) + + if (action.GetID() == ACTION_TOGGLE_DIGITAL_ANALOG) + { +- // TODO +- // revisit after new audio settings page have been implemented +- // makes no sense toggling a mode when you have three different settings +- int mode = CSettings::Get().GetInt("audiooutput.mode"); +- if (++mode == 3) +- mode = 0; +- CSettings::Get().SetInt("audiooutput.mode", mode); ++ bool passthrough = CSettings::Get().GetInt("audiooutput.passthrough"); ++ CSettings::Get().SetInt("audiooutput.passthrough", !passthrough); + + if (g_windowManager.GetActiveWindow() == WINDOW_SETTINGS_SYSTEM) + { +-- +1.8.4 + + +From 17dff7a768dcfac1146e87e1519e84e4d2c46dfb Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Fri, 18 Oct 2013 14:21:39 +0200 +Subject: [PATCH 08/86] update VS project after removal of SoftAE + +--- + project/VS2010Express/XBMC.vcxproj | 8 +------- + project/VS2010Express/XBMC.vcxproj.filters | 18 ------------------ + 2 files changed, 1 insertion(+), 25 deletions(-) + +diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj +index 65ec4a0..07d723e 100644 +--- a/project/VS2010Express/XBMC.vcxproj ++++ b/project/VS2010Express/XBMC.vcxproj +@@ -393,9 +393,6 @@ + + + +- +- +- + + + +@@ -1055,9 +1052,6 @@ + + + +- +- +- + + + +@@ -2985,4 +2979,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters +index 570fb6f..74e82c4 100644 +--- a/project/VS2010Express/XBMC.vcxproj.filters ++++ b/project/VS2010Express/XBMC.vcxproj.filters +@@ -2316,15 +2316,6 @@ + + cores\AudioEngine + +- +- cores\AudioEngine\Engines +- +- +- cores\AudioEngine\Engines +- +- +- cores\AudioEngine\Engines +- + + cores\AudioEngine\Sinks + +@@ -5377,15 +5368,6 @@ + + cores\AudioEngine + +- +- cores\AudioEngine\Engines +- +- +- cores\AudioEngine\Engines +- +- +- cores\AudioEngine\Engines +- + + cores\AudioEngine\Interfaces + +-- +1.8.4 + + +From 2282b27613c504fa0f002259a0873f51fc545411 Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Fri, 18 Oct 2013 14:23:19 +0200 +Subject: [PATCH 09/86] fix linker error on Windows after removal of SoftAE + +--- + xbmc/cores/AudioEngine/Utils/AEWAVLoader.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/xbmc/cores/AudioEngine/Utils/AEWAVLoader.cpp b/xbmc/cores/AudioEngine/Utils/AEWAVLoader.cpp +index c8a521c..de9029b 100644 +--- a/xbmc/cores/AudioEngine/Utils/AEWAVLoader.cpp ++++ b/xbmc/cores/AudioEngine/Utils/AEWAVLoader.cpp +@@ -32,6 +32,10 @@ + #include "AEUtil.h" + #include "AERemap.h" + ++#ifdef TARGET_WINDOWS ++#pragma comment(lib, "libsamplerate-0.lib") ++#endif ++ + typedef struct + { + char chunk_id[4]; +-- +1.8.4 + + +From 9785ee640cc48217e27c71d47fccd0e3ca66193b Mon Sep 17 00:00:00 2001 +From: fritsch +Date: Fri, 18 Oct 2013 17:06:18 +0200 +Subject: [PATCH 10/86] AudioSettings: Remove AAC Setting for passthrough + +--- + language/English/strings.po | 10 ++-------- + system/settings/darwin.xml | 3 --- + system/settings/rbp.xml | 3 --- + system/settings/settings.xml | 13 ------------- + xbmc/cores/AudioEngine/AEFactory.cpp | 2 -- + xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 2 -- + xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h | 1 - + xbmc/settings/Settings.cpp | 1 - + 8 files changed, 2 insertions(+), 33 deletions(-) + +diff --git a/language/English/strings.po b/language/English/strings.po +index 3218bdd..256e47e 100755 +--- a/language/English/strings.po ++++ b/language/English/strings.po +@@ -1242,10 +1242,7 @@ msgctxt "#298" + msgid "Bookmarks" + msgstr "" + +-#: system/settings/settings.xml +-msgctxt "#299" +-msgid "AAC capable receiver" +-msgstr "" ++#empty string with id 299 + + msgctxt "#300" + msgid "MP1 capable receiver" +@@ -14236,10 +14233,7 @@ msgctxt "#36366" + msgid "Select this option if your receiver is capable of decoding DTS streams." + msgstr "" + +-#: system/settings/settings.xml +-msgctxt "#36367" +-msgid "Select this option if your receiver is capable of decoding AAC streams." +-msgstr "" ++#empty string with id 36367 + + #: system/settings/settings.xml + msgctxt "#36368" +diff --git a/system/settings/darwin.xml b/system/settings/darwin.xml +index 817a990..2cf4df6 100644 +--- a/system/settings/darwin.xml ++++ b/system/settings/darwin.xml +@@ -8,9 +8,6 @@ + + + +- +- false +- + + false + +diff --git a/system/settings/rbp.xml b/system/settings/rbp.xml +index ddd6635..b890555 100644 +--- a/system/settings/rbp.xml ++++ b/system/settings/rbp.xml +@@ -41,9 +41,6 @@ + + false + +- +- false +- + + false + +diff --git a/system/settings/settings.xml b/system/settings/settings.xml +index 6abab54..ed87126 100644 +--- a/system/settings/settings.xml ++++ b/system/settings/settings.xml +@@ -2136,19 +2136,6 @@ + + + +- +- 2 +- false +- +- +- +- true +- audiooutput.passthrough +- audiooutput.passthrough +- +- +- +- + + 2 + true +diff --git a/xbmc/cores/AudioEngine/AEFactory.cpp b/xbmc/cores/AudioEngine/AEFactory.cpp +index 3d7771b..b63466c 100644 +--- a/xbmc/cores/AudioEngine/AEFactory.cpp ++++ b/xbmc/cores/AudioEngine/AEFactory.cpp +@@ -249,8 +249,6 @@ bool CAEFactory::SupportsRaw(AEDataFormat format) + return false; + if (format == AE_FMT_EAC3 && !CSettings::Get().GetBool("audiooutput.eac3passthrough")) + return false; +- if (format == AE_FMT_AAC && !CSettings::Get().GetBool("audiooutput.passthroughaac")) +- return false; + if (format == AE_FMT_TRUEHD && !CSettings::Get().GetBool("audiooutput.truehdpassthrough")) + return false; + if (format == AE_FMT_DTSHD && !CSettings::Get().GetBool("audiooutput.dtshdpassthrough")) +diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +index f54f14e..6a3f700 100644 +--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp ++++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +@@ -1978,7 +1978,6 @@ void CActiveAE::LoadSettings() + m_settings.truehdpassthrough = CSettings::Get().GetBool("audiooutput.truehdpassthrough"); + m_settings.dtspassthrough = CSettings::Get().GetBool("audiooutput.dtspassthrough"); + m_settings.dtshdpassthrough = CSettings::Get().GetBool("audiooutput.dtshdpassthrough"); +- m_settings.aacpassthrough = CSettings::Get().GetBool("audiooutput.passthroughaac"); + + m_settings.resampleQuality = static_cast(CSettings::Get().GetInt("audiooutput.processquality")); + } +@@ -2041,7 +2040,6 @@ void CActiveAE::OnSettingsChange(const std::string& setting) + setting == "audiooutput.ac3passthrough" || + setting == "audiooutput.eac3passthrough" || + setting == "audiooutput.dtspassthrough" || +- setting == "audiooutput.passthroughaac" || + setting == "audiooutput.truehdpassthrough" || + setting == "audiooutput.dtshdpassthrough" || + setting == "audiooutput.channels" || +diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h +index 2ae0476..1ac7031 100644 +--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h ++++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h +@@ -52,7 +52,6 @@ struct AudioSettings + bool ac3passthrough; + bool eac3passthrough; + bool dtspassthrough; +- bool aacpassthrough; + bool truehdpassthrough; + bool dtshdpassthrough; + bool stereoupmix; +diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp +index ca5131a..e998caa 100644 +--- a/xbmc/settings/Settings.cpp ++++ b/xbmc/settings/Settings.cpp +@@ -895,7 +895,6 @@ void CSettings::InitializeISettingCallbacks() + settingSet.insert("audiooutput.ac3passthrough"); + settingSet.insert("audiooutput.eac3passthrough"); + settingSet.insert("audiooutput.dtspassthrough"); +- settingSet.insert("audiooutput.passthroughaac"); + settingSet.insert("audiooutput.truehdpassthrough"); + settingSet.insert("audiooutput.dtshdpassthrough"); + settingSet.insert("audiooutput.audiodevice"); +-- +1.8.4 + + +From 78f3245a46b8f44c84ebcbc80577a8c82773b472 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sat, 19 Oct 2013 19:20:40 +0100 +Subject: [PATCH 11/86] [rbp] Update to work with new audio settings + +--- + system/settings/rbp.xml | 94 +++++++++++++--------- + .../AudioEngine/Engines/PiAudio/PiAudioAE.cpp | 59 +++++++++++++- + xbmc/cores/AudioEngine/Engines/PiAudio/PiAudioAE.h | 4 +- + xbmc/cores/omxplayer/OMXAudio.cpp | 6 +- + xbmc/cores/omxplayer/OMXPlayerAudio.cpp | 35 +++----- + xbmc/cores/omxplayer/OMXPlayerAudio.h | 2 - + 6 files changed, 126 insertions(+), 74 deletions(-) + +diff --git a/system/settings/rbp.xml b/system/settings/rbp.xml +index b890555..866aed4 100644 +--- a/system/settings/rbp.xml ++++ b/system/settings/rbp.xml +@@ -30,18 +30,64 @@ + + + +- ++ ++ + +- +- 2 ++ ++ 1 ++ HDMI ++ ++ audiodevices ++ ++ + +- ++ ++ 2 ++ false ++ ++ ++ audiooutput.passthrough ++ ++ ++ ++ ++ 2 ++ false ++ ++ + false + + + false + +- ++ ++ false ++ ++ ++ 2 ++ audiosupportsdrain ++ false ++ ++ ++ audiooutput.streamsilence ++ ++ ++ ++ ++ ++ false ++ ++ ++ ++ 2 ++ false ++ ++ ++ audiooutput.passthrough ++ ++ ++ ++ + false + + +@@ -54,49 +100,19 @@ + false + + +- true + +- +- +- +- 1 +- 2 +- +- false +- ++ ++ audiooutput.ac3passthrough + + + + +- true + +- +- +- +- 1 +- 2 +- +- false +- ++ ++ audiooutput.dtspassthrough + + + +- +- 2 +- false +- +- +- 2 +- false +- +- +- +- false +- +- +- +- false +- + + + +diff --git a/xbmc/cores/AudioEngine/Engines/PiAudio/PiAudioAE.cpp b/xbmc/cores/AudioEngine/Engines/PiAudio/PiAudioAE.cpp +index 6bcd69d..5daa1ff 100644 +--- a/xbmc/cores/AudioEngine/Engines/PiAudio/PiAudioAE.cpp ++++ b/xbmc/cores/AudioEngine/Engines/PiAudio/PiAudioAE.cpp +@@ -48,7 +48,8 @@ bool CPiAudioAE::Initialize() + void CPiAudioAE::UpdateStreamSilence() + { + #if defined(TARGET_RASPBERRY_PI) +- bool enable = CSettings::Get().GetBool("audiooutput.streamsilence"); ++ bool enable = CSettings::Get().GetString("audiooutput.audiodevice") == "HDMI" && ++ CSettings::Get().GetBool("audiooutput.streamsilence"); + char response[80] = ""; + char command[80] = ""; + sprintf(command, "force_audio hdmi %d", enable); +@@ -105,9 +106,27 @@ void CPiAudioAE::FreeSound(IAESound *sound) + { + } + +-bool CPiAudioAE::SupportsRaw() ++bool CPiAudioAE::SupportsRaw(AEDataFormat format) + { +- return true; ++ bool supported = false; ++#if defined(TARGET_RASPBERRY_PI) ++ if (CSettings::Get().GetString("audiooutput.audiodevice") == "HDMI") ++ { ++ if (!CSettings::Get().GetBool("audiooutput.dualaudio")) ++ { ++ DllBcmHost m_DllBcmHost; ++ m_DllBcmHost.Load(); ++ if (format == AE_FMT_AC3 && CSettings::Get().GetBool("audiooutput.ac3passthrough") && ++ m_DllBcmHost.vc_tv_hdmi_audio_supported(EDID_AudioFormat_eAC3, 2, EDID_AudioSampleRate_e44KHz, EDID_AudioSampleSize_16bit ) == 0) ++ supported = true; ++ if (format == AE_FMT_DTS && CSettings::Get().GetBool("audiooutput.dtspassthrough") && ++ m_DllBcmHost.vc_tv_hdmi_audio_supported(EDID_AudioFormat_eDTS, 2, EDID_AudioSampleRate_e44KHz, EDID_AudioSampleSize_16bit ) == 0) ++ supported = true; ++ m_DllBcmHost.Unload(); ++ } ++ } ++#endif ++ return supported; + } + + bool CPiAudioAE::SupportsDrain() +@@ -117,11 +136,43 @@ bool CPiAudioAE::SupportsDrain() + + void CPiAudioAE::OnSettingsChange(const std::string& setting) + { +- if (setting == "audiooutput.streamsilence") ++ if (setting == "audiooutput.streamsilence" || setting == "audiooutput.audiodevice") + UpdateStreamSilence(); + } + + void CPiAudioAE::EnumerateOutputDevices(AEDeviceList &devices, bool passthrough) + { ++ if (!passthrough) ++ { ++ devices.push_back(AEDevice("Analogue", "Analogue")); ++ devices.push_back(AEDevice("HDMI", "HDMI")); ++ } + } + ++std::string CPiAudioAE::GetDefaultDevice(bool passthrough) ++{ ++ return "HDMI"; ++} ++ ++bool CPiAudioAE::IsSettingVisible(const std::string &settingId) ++{ ++ if (settingId == "audiooutput.samplerate") ++ return true; ++ ++ if (CSettings::Get().GetString("audiooutput.audiodevice") == "HDMI") ++ { ++ if (settingId == "audiooutput.passthrough") ++ return true; ++ if (settingId == "audiooutput.dtspassthrough") ++ return true; ++ if (settingId == "audiooutput.ac3passthrough") ++ return true; ++ if (settingId == "audiooutput.channels") ++ return true; ++ if (settingId == "audiooutput.dualaudio") ++ return true; ++ if (settingId == "audiooutput.streamsilence") ++ return true; ++ } ++ return false; ++} +diff --git a/xbmc/cores/AudioEngine/Engines/PiAudio/PiAudioAE.h b/xbmc/cores/AudioEngine/Engines/PiAudio/PiAudioAE.h +index 419241b..5eefdd8 100644 +--- a/xbmc/cores/AudioEngine/Engines/PiAudio/PiAudioAE.h ++++ b/xbmc/cores/AudioEngine/Engines/PiAudio/PiAudioAE.h +@@ -58,8 +58,10 @@ class CPiAudioAE : public IAE + + virtual void GarbageCollect() {}; + virtual void EnumerateOutputDevices(AEDeviceList &devices, bool passthrough); ++ virtual std::string GetDefaultDevice(bool passthrough); ++ virtual bool IsSettingVisible(const std::string &settingId); + +- virtual bool SupportsRaw(); ++ virtual bool SupportsRaw(AEDataFormat format); + virtual bool SupportsDrain(); + + virtual void OnLostDevice() {} +diff --git a/xbmc/cores/omxplayer/OMXAudio.cpp b/xbmc/cores/omxplayer/OMXAudio.cpp +index c6ab3b9..74ac027 100644 +--- a/xbmc/cores/omxplayer/OMXAudio.cpp ++++ b/xbmc/cores/omxplayer/OMXAudio.cpp +@@ -205,12 +205,12 @@ bool COMXAudio::PortSettingsChanged() + if(!m_omx_splitter.Initialize("OMX.broadcom.audio_splitter", OMX_IndexParamAudioInit)) + return false; + } +- if (CSettings::Get().GetBool("audiooutput.dualaudio") || CSettings::Get().GetInt("audiooutput.mode") == AUDIO_ANALOG) ++ if (CSettings::Get().GetBool("audiooutput.dualaudio") || CSettings::Get().GetString("audiooutput.audiodevice") == "Analogue") + { + if(!m_omx_render_analog.Initialize("OMX.broadcom.audio_render", OMX_IndexParamAudioInit)) + return false; + } +- if (CSettings::Get().GetBool("audiooutput.dualaudio") || CSettings::Get().GetInt("audiooutput.mode") == AUDIO_HDMI) ++ if (CSettings::Get().GetBool("audiooutput.dualaudio") || CSettings::Get().GetString("audiooutput.audiodevice") == "HDMI") + { + if(!m_omx_render_hdmi.Initialize("OMX.broadcom.audio_render", OMX_IndexParamAudioInit)) + return false; +@@ -235,6 +235,8 @@ bool COMXAudio::PortSettingsChanged() + m_pcm_output.eChannelMapping[0] = OMX_AUDIO_ChannelLF; + m_pcm_output.eChannelMapping[1] = OMX_AUDIO_ChannelRF; + m_pcm_output.nChannels = 2; ++ /* limit samplerate (through resampling) if requested */ ++ m_pcm_output.nSamplingRate = std::min((int)m_pcm_output.nSamplingRate, CSettings::Get().GetInt("audiooutput.samplerate")); + + m_pcm_output.nPortIndex = m_omx_mixer.GetOutputPort(); + omx_err = m_omx_mixer.SetParameter(OMX_IndexParamAudioPcm, &m_pcm_output); +diff --git a/xbmc/cores/omxplayer/OMXPlayerAudio.cpp b/xbmc/cores/omxplayer/OMXPlayerAudio.cpp +index 08b432f..999ce40 100644 +--- a/xbmc/cores/omxplayer/OMXPlayerAudio.cpp ++++ b/xbmc/cores/omxplayer/OMXPlayerAudio.cpp +@@ -42,6 +42,7 @@ + + #include "OMXPlayer.h" + #include "linux/RBP.h" ++#include "cores/AudioEngine/AEFactory.h" + + #include + #include +@@ -83,7 +84,6 @@ class COMXMsgAudioCodecChange : public CDVDMsg + m_messageQueue.SetMaxDataSize((small_mem ? 3:6) * 1024 * 1024); + + m_messageQueue.SetMaxTimeSize(8.0); +- m_use_passthrough = false; + m_passthrough = false; + m_use_hw_decode = false; + m_hw_decode = false; +@@ -95,15 +95,10 @@ class COMXMsgAudioCodecChange : public CDVDMsg + OMXPlayerAudio::~OMXPlayerAudio() + { + CloseStream(false); +- +- m_DllBcmHost.Unload(); + } + + bool OMXPlayerAudio::OpenStream(CDVDStreamInfo &hints) + { +- if(!m_DllBcmHost.Load()) +- return false; +- + m_bad_state = false; + + COMXAudioCodecOMX *codec = new COMXAudioCodecOMX(); +@@ -146,8 +141,6 @@ void OMXPlayerAudio::OpenStream(CDVDStreamInfo &hints, COMXAudioCodecOMX *codec) + m_flush = false; + m_nChannels = 0; + m_stalled = m_messageQueue.GetPacketCount(CDVDMsg::DEMUXER_PACKET) == 0; +- m_use_passthrough = (CSettings::Get().GetInt("audiooutput.mode") == AUDIO_HDMI && +- !CSettings::Get().GetBool("audiooutput.dualaudio")) ? true : false ; + m_use_hw_decode = g_advancedSettings.m_omxHWAudioDecode; + m_format.m_dataFormat = GetDataFormat(m_hints); + m_format.m_sampleRate = 0; +@@ -511,13 +504,6 @@ bool OMXPlayerAudio::Passthrough() const + AEDataFormat OMXPlayerAudio::GetDataFormat(CDVDStreamInfo hints) + { + AEDataFormat dataFormat = AE_FMT_S16NE; +- bool hdmi_passthrough_dts = false; +- bool hdmi_passthrough_ac3 = false; +- +- if (m_DllBcmHost.vc_tv_hdmi_audio_supported(EDID_AudioFormat_eAC3, 2, EDID_AudioSampleRate_e44KHz, EDID_AudioSampleSize_16bit ) == 0) +- hdmi_passthrough_ac3 = true; +- if (m_DllBcmHost.vc_tv_hdmi_audio_supported(EDID_AudioFormat_eDTS, 2, EDID_AudioSampleRate_e44KHz, EDID_AudioSampleSize_16bit ) == 0) +- hdmi_passthrough_dts = true; + + m_passthrough = false; + m_hw_decode = false; +@@ -525,18 +511,15 @@ AEDataFormat OMXPlayerAudio::GetDataFormat(CDVDStreamInfo hints) + /* check our audio capabilties */ + + /* pathrought is overriding hw decode*/ +- if(AUDIO_IS_BITSTREAM(CSettings::Get().GetInt("audiooutput.mode")) && m_use_passthrough) ++ if(hints.codec == AV_CODEC_ID_AC3 && CAEFactory::SupportsRaw(AE_FMT_AC3)) + { +- if(hints.codec == AV_CODEC_ID_AC3 && CSettings::Get().GetBool("audiooutput.ac3passthrough") && hdmi_passthrough_ac3) +- { +- dataFormat = AE_FMT_AC3; +- m_passthrough = true; +- } +- if(hints.codec == AV_CODEC_ID_DTS && CSettings::Get().GetBool("audiooutput.dtspassthrough") && hdmi_passthrough_dts) +- { +- dataFormat = AE_FMT_DTS; +- m_passthrough = true; +- } ++ dataFormat = AE_FMT_AC3; ++ m_passthrough = true; ++ } ++ if(hints.codec == AV_CODEC_ID_DTS && CAEFactory::SupportsRaw(AE_FMT_DTS)) ++ { ++ dataFormat = AE_FMT_DTS; ++ m_passthrough = true; + } + + /* hw decode */ +diff --git a/xbmc/cores/omxplayer/OMXPlayerAudio.h b/xbmc/cores/omxplayer/OMXPlayerAudio.h +index 394f309..685a686 100644 +--- a/xbmc/cores/omxplayer/OMXPlayerAudio.h ++++ b/xbmc/cores/omxplayer/OMXPlayerAudio.h +@@ -50,7 +50,6 @@ class OMXPlayerAudio : public CThread + OMXClock *m_av_clock; + COMXAudio m_omxAudio; + std::string m_codec_name; +- bool m_use_passthrough; + bool m_passthrough; + bool m_use_hw_decode; + bool m_hw_decode; +@@ -70,7 +69,6 @@ class OMXPlayerAudio : public CThread + int m_nChannels; + bool m_DecoderOpen; + +- DllBcmHost m_DllBcmHost; + bool m_bad_state; + + virtual void OnStartup(); +-- +1.8.4 + + +From 4dc697377555fb46ea556f9db467b7542264f9fa Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:34:39 +0200 -Subject: [PATCH 01/74] videoplayer: adapt lateness detection and dropping to +Subject: [PATCH 12/86] videoplayer: adapt lateness detection and dropping to buffering --- @@ -582,10 +5534,10 @@ index f8ad541..186e271 100644 1.8.4 -From 816e8b541866007c3c5aa9f4ae83652a29410f90 Mon Sep 17 00:00:00 2001 +From ab2e9f465fea35f371e8b834f8454df109c02832 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 2 Sep 2012 16:05:21 +0200 -Subject: [PATCH 02/74] video player: present correct pts to user for a/v sync +Subject: [PATCH 13/86] video player: present correct pts to user for a/v sync (after buffering in renderer) --- @@ -653,10 +5605,10 @@ index 186e271..59c7f09 100644 1.8.4 -From 58a147d179b2d20010555853e34361ed599d5211 Mon Sep 17 00:00:00 2001 +From 7b6eafa7d352c321f9f15bac2b597089ccbc7fc3 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 16 Feb 2013 18:25:53 +0100 -Subject: [PATCH 03/74] videoplayer: some rework and documentation +Subject: [PATCH 14/86] videoplayer: some rework and documentation --- .../dvdplayer/DVDCodecs/Video/DVDVideoCodec.h | 29 ++++++++++++++++++++-- @@ -767,10 +5719,10 @@ index 752a291..0aef5ee 100644 1.8.4 -From 9fad71c6b3696d8006e3044ece43b7119fa8b0c1 Mon Sep 17 00:00:00 2001 +From 9224a4ca23f741701a1d1f51f869693678a8f24c Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sat, 1 Jun 2013 11:21:19 +0200 -Subject: [PATCH 04/74] renderer: bump buffers to 5 +Subject: [PATCH 15/86] renderer: bump buffers to 5 --- xbmc/cores/VideoRenderers/BaseRenderer.h | 2 +- @@ -793,10 +5745,10 @@ index a61d3cf..df5fe0e 100644 1.8.4 -From 058702655b73aa2e34ba960a572203c339859336 Mon Sep 17 00:00:00 2001 +From 068b764611416d03286f92f1d52e32b28d3be7da Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:41:31 +0200 -Subject: [PATCH 05/74] videoplayer: update frametime, it might change due to +Subject: [PATCH 16/86] videoplayer: update frametime, it might change due to fps detection --- @@ -820,10 +5772,10 @@ index 0aef5ee..e7e5097 100644 1.8.4 -From 25b1e5baa7a774cdc3473d1dac0a2fbe86b04dbc Mon Sep 17 00:00:00 2001 +From b0620530d3716a2b620faae7865e326a3e7df3a5 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:43:06 +0200 -Subject: [PATCH 06/74] videoplayer: give streams with invalid fps a chance for +Subject: [PATCH 17/86] videoplayer: give streams with invalid fps a chance for fps detection --- @@ -847,10 +5799,10 @@ index e7e5097..c40d193 100644 1.8.4 -From d752196c352cc7e0c95ffcf2faf9939269cb76e5 Mon Sep 17 00:00:00 2001 +From 468dffa9f2f243250db48d62a3f32df10cd42e60 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:49:05 +0200 -Subject: [PATCH 07/74] dvdplayer: allow rewinding at end of stream, do a seek +Subject: [PATCH 18/86] dvdplayer: allow rewinding at end of stream, do a seek after rewind --- @@ -858,10 +5810,10 @@ Subject: [PATCH 07/74] dvdplayer: allow rewinding at end of stream, do a seek 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp -index 7881f98..d8847f2 100644 +index c412b9f..437276b 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp -@@ -1549,7 +1549,7 @@ void CDVDPlayer::HandlePlaySpeed() +@@ -1548,7 +1548,7 @@ void CDVDPlayer::HandlePlaySpeed() } else if (m_CurrentVideo.id >= 0 @@ -870,7 +5822,7 @@ index 7881f98..d8847f2 100644 && m_SpeedState.lastpts != m_dvdPlayerVideo.GetCurrentPts() && m_SpeedState.lasttime != GetTime()) { -@@ -2215,6 +2215,12 @@ void CDVDPlayer::HandleMessages() +@@ -2214,6 +2214,12 @@ void CDVDPlayer::HandleMessages() pvrinputstream->Pause( speed == 0 ); } @@ -887,31 +5839,29 @@ index 7881f98..d8847f2 100644 1.8.4 -From 0033a33b55a090e56e344c2804e479f78ddb2616 Mon Sep 17 00:00:00 2001 +From d477de437d15a860928f1a6bcd2dba4d3444038b Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 15:22:05 +0200 -Subject: [PATCH 08/74] X11: ditch SDL for video and window events +Subject: [PATCH 19/86] X11: ditch SDL for video and window events --- xbmc/Application.cpp | 2 +- xbmc/system.h | 5 + - xbmc/windowing/Makefile | 10 + xbmc/windowing/Makefile.in | 1 + xbmc/windowing/WinEvents.cpp | 4 + xbmc/windowing/WinEventsX11.cpp | 784 ++++++++++++++++++++++++++++++++++++ xbmc/windowing/WinEventsX11.h | 65 +++ xbmc/windowing/X11/WinSystemX11.cpp | 387 ++++++++++++------ xbmc/windowing/X11/WinSystemX11.h | 10 +- - 9 files changed, 1140 insertions(+), 128 deletions(-) - create mode 100644 xbmc/windowing/Makefile + 8 files changed, 1130 insertions(+), 128 deletions(-) create mode 100644 xbmc/windowing/WinEventsX11.cpp create mode 100644 xbmc/windowing/WinEventsX11.h diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp -index 7b5b2bf..990125b 100644 +index f2d7ed4..8278740 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp -@@ -858,7 +858,7 @@ bool CApplication::CreateGUI() +@@ -856,7 +856,7 @@ bool CApplication::CreateGUI() uint32_t sdlFlags = 0; @@ -946,22 +5896,6 @@ index 1f4e15f..075e44a 100644 #define HAS_LINUX_NETWORK #define HAS_LIRC #ifdef HAVE_LIBPULSE -diff --git a/xbmc/windowing/Makefile b/xbmc/windowing/Makefile -new file mode 100644 -index 0000000..07100d8 ---- /dev/null -+++ b/xbmc/windowing/Makefile -@@ -0,0 +1,10 @@ -+SRCS=WinEventsSDL.cpp \ -+ WinEventsLinux.cpp \ -+ WinSystem.cpp \ -+ WinEvents.cpp \ -+ WinEventsX11.cpp -+ -+LIB=windowing.a -+ -+include ../../Makefile.include -+-include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(SRCS))) diff --git a/xbmc/windowing/Makefile.in b/xbmc/windowing/Makefile.in index 6704967..4b41723 100644 --- a/xbmc/windowing/Makefile.in @@ -2446,10 +7380,10 @@ index 2454fb1..f5e5731 100644 1.8.4 -From 20430a4636eb8c086796eb467c227e393f94fe4a Mon Sep 17 00:00:00 2001 +From 5405f0e5a408f1aeb296a21a414f6eecfa42ad9b Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 15:24:22 +0200 -Subject: [PATCH 09/74] X11: Add xbmc icon +Subject: [PATCH 20/86] X11: Add xbmc icon --- xbmc/windowing/X11/WinSystemX11.cpp | 126 +++++++++++++++++++++++++++++++++++- @@ -2639,10 +7573,10 @@ index f5e5731..6953b68 100644 1.8.4 -From a90cff74237782f11b7e3122502bbc79cc82cc1c Mon Sep 17 00:00:00 2001 +From 98500ce6fb0fab1f09218d5f5e9bb11daaeae856 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 20 May 2012 14:11:26 +0200 -Subject: [PATCH 10/74] X11: add SDL joystick until we have a better solution +Subject: [PATCH 21/86] X11: add SDL joystick until we have a better solution --- xbmc/windowing/WinEventsX11.cpp | 26 ++++++++++++++++++++++++++ @@ -2696,10 +7630,10 @@ index ad58aad..6f57a87 100644 1.8.4 -From 5d8e99ccf73080cce8038a82dd449cf4e0c2ed74 Mon Sep 17 00:00:00 2001 +From de90bbc6ea9da674a463b1ef912222998212a9cd Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 5 Jul 2012 12:35:55 +0200 -Subject: [PATCH 11/74] X11: factor out code handling device reset notification +Subject: [PATCH 22/86] X11: factor out code handling device reset notification --- xbmc/windowing/X11/WinSystemX11.cpp | 22 ++++++++++++++-------- @@ -2762,10 +7696,10 @@ index 6953b68..d60d04a 100644 1.8.4 -From c221bbb2cedeb9cd9075f1239abb39e774035d1d Mon Sep 17 00:00:00 2001 +From 3a7a5591590bc38032b72ffa7a3d01e98ea40d59 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 15:02:00 +0200 -Subject: [PATCH 12/74] X11: move xrandr events to WinEventsX11 +Subject: [PATCH 23/86] X11: move xrandr events to WinEventsX11 --- xbmc/windowing/WinEventsX11.cpp | 42 +++++++++++++++++++++++++++++++++++++ @@ -2909,10 +7843,10 @@ index b3be9fc..7259674 100644 1.8.4 -From 08f9e5637e4211bc83e3b155e5f6bbed9c7cddbf Mon Sep 17 00:00:00 2001 +From 3e910cba64fd65f0031fb38f73d3dda018a27406 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 12 Apr 2012 15:43:56 +0200 -Subject: [PATCH 13/74] xrandr: remove method RestoreState +Subject: [PATCH 24/86] xrandr: remove method RestoreState --- xbmc/windowing/X11/WinSystemX11.cpp | 13 +++++++++++-- @@ -2991,10 +7925,10 @@ index 0aec487..00b49dc 100644 1.8.4 -From eaec158e24c2d4756aeed4b4667c8eea59ea3ce4 Mon Sep 17 00:00:00 2001 +From e619d9ad81a86813704e921e006dd4a892c1e84a Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 20 May 2012 13:17:10 +0200 -Subject: [PATCH 14/74] xrandr: observe orientation +Subject: [PATCH 25/86] xrandr: observe orientation --- xbmc/windowing/X11/WinSystemX11.cpp | 89 ++++++++++++++++++++++++++++++------- @@ -3209,10 +8143,10 @@ index 00b49dc..508604d 100644 1.8.4 -From 52e261146d8f6decb25bd9fe1192a258a009c0b1 Mon Sep 17 00:00:00 2001 +From 43cc7230623cbd20d064d3bd78fb9c676ad9e1c1 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:54:15 +0200 -Subject: [PATCH 15/74] xrandr: allow getting info for multiple screen's +Subject: [PATCH 26/86] xrandr: allow getting info for multiple screen's Refactored by: Joakim Plate --- @@ -3387,10 +8321,10 @@ index 508604d..d37838a 100644 1.8.4 -From 37becdc99eb2ed1a0ec54f078c1bac24e8837e93 Mon Sep 17 00:00:00 2001 +From 3e55835eb65d307dfe8518108f13787fb51e1393 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:44:00 +0200 -Subject: [PATCH 16/74] X11: fix multi-head setups +Subject: [PATCH 27/86] X11: fix multi-head setups --- language/English/strings.po | 4 +- @@ -3405,10 +8339,10 @@ Subject: [PATCH 16/74] X11: fix multi-head setups 9 files changed, 229 insertions(+), 116 deletions(-) diff --git a/language/English/strings.po b/language/English/strings.po -index faee37d..c6b2b44 100755 +index 256e47e..a48da84 100755 --- a/language/English/strings.po +++ b/language/English/strings.po -@@ -1003,7 +1003,9 @@ msgctxt "#245" +@@ -1019,7 +1019,9 @@ msgctxt "#245" msgid "Sizing: (%i,%i)->(%i,%i) (Zoom x%2.2f) AR:%2.2f:1 (Pixels: %2.2f:1) (VShift: %2.2f)" msgstr "" @@ -3420,10 +8354,10 @@ index faee37d..c6b2b44 100755 msgctxt "#247" msgid "Scripts" diff --git a/system/settings/settings.xml b/system/settings/settings.xml -index c035774..5490bcb 100644 +index ed87126..1c7d158 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml -@@ -1862,6 +1862,15 @@ +@@ -1860,6 +1860,15 @@
@@ -3439,7 +8373,7 @@ index c035774..5490bcb 100644 0 0 -@@ -1883,6 +1892,7 @@ +@@ -1881,6 +1890,7 @@ -1 @@ -3447,7 +8381,7 @@ index c035774..5490bcb 100644 -@@ -1900,6 +1910,7 @@ +@@ -1898,6 +1908,7 @@ -1 @@ -3574,10 +8508,10 @@ index cc4002b..d80f1dc 100644 protected: CDisplaySettings(); diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp -index fb0a98f..8cb7c5c 100644 +index e998caa..975e03c 100644 --- a/xbmc/settings/Settings.cpp +++ b/xbmc/settings/Settings.cpp -@@ -387,6 +387,7 @@ void CSettings::Uninitialize() +@@ -386,6 +386,7 @@ void CSettings::Uninitialize() m_settingsManager->UnregisterSettingOptionsFiller("screens"); m_settingsManager->UnregisterSettingOptionsFiller("stereoscopicmodes"); m_settingsManager->UnregisterSettingOptionsFiller("preferedstereoscopicviewmodes"); @@ -3585,7 +8519,7 @@ index fb0a98f..8cb7c5c 100644 m_settingsManager->UnregisterSettingOptionsFiller("shutdownstates"); m_settingsManager->UnregisterSettingOptionsFiller("startupwindows"); m_settingsManager->UnregisterSettingOptionsFiller("streamlanguages"); -@@ -697,6 +698,7 @@ void CSettings::InitializeOptionFillers() +@@ -699,6 +700,7 @@ void CSettings::InitializeOptionFillers() m_settingsManager->RegisterSettingOptionsFiller("screens", CDisplaySettings::SettingOptionsScreensFiller); m_settingsManager->RegisterSettingOptionsFiller("stereoscopicmodes", CDisplaySettings::SettingOptionsStereoscopicModesFiller); m_settingsManager->RegisterSettingOptionsFiller("preferedstereoscopicviewmodes", CDisplaySettings::SettingOptionsPreferredStereoscopicViewModesFiller); @@ -3593,7 +8527,7 @@ index fb0a98f..8cb7c5c 100644 m_settingsManager->RegisterSettingOptionsFiller("shutdownstates", CPowerManager::SettingOptionsShutdownStatesFiller); m_settingsManager->RegisterSettingOptionsFiller("startupwindows", ADDON::CSkinInfo::SettingOptionsStartupWindowsFiller); m_settingsManager->RegisterSettingOptionsFiller("streamlanguages", CLangInfo::SettingOptionsStreamLanguagesFiller); -@@ -727,6 +729,9 @@ void CSettings::InitializeConditions() +@@ -729,6 +731,9 @@ void CSettings::InitializeConditions() #ifdef HAS_GL m_settingsManager->AddCondition("has_gl"); #endif @@ -3603,7 +8537,7 @@ index fb0a98f..8cb7c5c 100644 #ifdef HAS_GLES m_settingsManager->AddCondition("has_gles"); #endif -@@ -876,6 +881,7 @@ void CSettings::InitializeISettingCallbacks() +@@ -879,6 +884,7 @@ void CSettings::InitializeISettingCallbacks() settingSet.insert("videoscreen.screen"); settingSet.insert("videoscreen.resolution"); settingSet.insert("videoscreen.screenmode"); @@ -4159,10 +9093,10 @@ index eb8005e..7d53d36 100644 1.8.4 -From 6e50205cb3487a072f40bc5f0d36737a2f0c07e2 Mon Sep 17 00:00:00 2001 +From 8053f0eb44d1b3ec7b7ad11f1b92315143830aca Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:36:32 +0200 -Subject: [PATCH 17/74] X11: remove all DefaultScreen and RootWindow macros +Subject: [PATCH 28/86] X11: remove all DefaultScreen and RootWindow macros --- xbmc/windowing/X11/WinSystemX11.cpp | 6 +++--- @@ -4230,10 +9164,10 @@ index 81c6800..8a8ff83 100644 1.8.4 -From 06e112d3a253c94a88c122e566e7722a1d12695d Mon Sep 17 00:00:00 2001 +From daecb38d82a4a54a69b8f85958bb2d24d228f67e Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:45:22 +0200 -Subject: [PATCH 18/74] X11: remove all DefaultScreen and RootWindow macros +Subject: [PATCH 29/86] X11: remove all DefaultScreen and RootWindow macros (VideoRefClock) Note this is on a separate display connection. @@ -4305,10 +9239,10 @@ index 3ba991a..7eecd40 100644 1.8.4 -From 6a2f737f027f121322a60067da511567f355541d Mon Sep 17 00:00:00 2001 +From acc074d616761d0379fc66bd878f8b556c294430 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 20 Jun 2012 17:37:11 +0200 -Subject: [PATCH 19/74] X11: recreate gl context after output has changed +Subject: [PATCH 30/86] X11: recreate gl context after output has changed --- xbmc/windowing/X11/WinSystemX11.cpp | 24 ++++++++++++++---------- @@ -4459,10 +9393,10 @@ index 8a8ff83..8707467 100644 1.8.4 -From e2e1788c61cdc86af2034b249477cfff3d148ac9 Mon Sep 17 00:00:00 2001 +From 0362ab69bb7e0ea6337a79d1a6412e748d06cf9d Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 12:06:25 +0200 -Subject: [PATCH 20/74] X11: hook video reference clock in windowing +Subject: [PATCH 31/86] X11: hook video reference clock in windowing --- xbmc/video/VideoReferenceClock.cpp | 71 +++++++++++++++++++++++++++----------- @@ -4667,10 +9601,10 @@ index dd65a1b..afd71fc 100644 1.8.4 -From 978e87c7cdc03808ebe0113410bee07dc8ccb83b Mon Sep 17 00:00:00 2001 +From 04437d6006001ee7ccae53962651c2120789cf00 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 21 Jun 2012 17:26:51 +0200 -Subject: [PATCH 21/74] X11: fix video calibrations +Subject: [PATCH 32/86] X11: fix video calibrations --- xbmc/windowing/WinSystem.h | 1 + @@ -4762,10 +9696,10 @@ index 2868707..282bb9a 100644 1.8.4 -From 08e2db84ae436833dfc5c5ae5ca9b7283c54c00f Mon Sep 17 00:00:00 2001 +From dee668a6e23b34d350cec93c63187193c3396e88 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 12:00:26 +0200 -Subject: [PATCH 22/74] X11: deactivate screen saver on startup +Subject: [PATCH 33/86] X11: deactivate screen saver on startup --- xbmc/windowing/X11/WinSystemX11.cpp | 29 +++++++++++++++++++++++++++++ @@ -4835,10 +9769,10 @@ index 282bb9a..32f90da 100644 1.8.4 -From f1d032bec51eea6dbff79b0c865d4d2e75a22e2c Mon Sep 17 00:00:00 2001 +From add8a89ae771bb24bb6043d655a15bef857e14f4 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 12:10:09 +0200 -Subject: [PATCH 23/74] X11: change method of going full-screen +Subject: [PATCH 34/86] X11: change method of going full-screen --- xbmc/windowing/X11/WinSystemX11.cpp | 9 ++++++++- @@ -4882,10 +9816,10 @@ index e1fd4e5..acd6497 100644 1.8.4 -From 341d504c3bd71c24e4c57ad023d828bab1e62bef Mon Sep 17 00:00:00 2001 +From ec3caf7c98a238b3fdf94a2a5c0f9c620a3ad132 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 28 Jun 2012 19:12:39 +0200 -Subject: [PATCH 24/74] X11: reset key repeat and key modifier on focus lost +Subject: [PATCH 35/86] X11: reset key repeat and key modifier on focus lost and gain --- @@ -4917,10 +9851,10 @@ index d98f12f..743aca9 100644 1.8.4 -From 2fa2f7c29ddaab354f8675a5a383514f4796536b Mon Sep 17 00:00:00 2001 +From 1fadabedc48838da8bff83ca774f79c29394419d Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 5 Jul 2012 14:18:46 +0200 -Subject: [PATCH 25/74] X11: replace custom utf8 to unicode with charset +Subject: [PATCH 36/86] X11: replace custom utf8 to unicode with charset convertor (squash to x11 events) --- @@ -5137,10 +10071,10 @@ index a412f32..9a8a912 100644 1.8.4 -From cabacc21613bb86163ad5e426f6b7cb4edbd562f Mon Sep 17 00:00:00 2001 +From 99cb30413a1f334e7e0cd45966ab7e6bb5367c55 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 5 Jul 2012 14:23:54 +0200 -Subject: [PATCH 26/74] X11: fixed invalid usage of sizeof() (squash into x11 +Subject: [PATCH 37/86] X11: fixed invalid usage of sizeof() (squash into x11 changes) --- @@ -5204,10 +10138,10 @@ index 9a8a912..c69169c 100644 1.8.4 -From 69059ac2ff5e5afbcce81c6fee381564b9aaa254 Mon Sep 17 00:00:00 2001 +From d88156bdc4e702f67e6ceead481238cfd5c32e3a Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 9 Jun 2012 18:23:53 +0200 -Subject: [PATCH 27/74] add missing keys to xbmc keytable +Subject: [PATCH 38/86] add missing keys to xbmc keytable --- xbmc/input/XBMC_keytable.cpp | 2 ++ @@ -5230,10 +10164,10 @@ index b430f55..246164b 100644 1.8.4 -From 2f47f767a7bd899d04ecc525f7bc4e30aeefd98d Mon Sep 17 00:00:00 2001 +From fe448fa0ab6ca6537a086f6549688ff179b88f46 Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 16 Mar 2012 15:57:51 +0100 -Subject: [PATCH 28/74] videorefclock: temp deactivate of nv settings +Subject: [PATCH 39/86] videorefclock: temp deactivate of nv settings --- xbmc/video/VideoReferenceClock.cpp | 2 +- @@ -5256,10 +10190,10 @@ index 4071ff0..b9afc09 100644 1.8.4 -From 3e0d9bf31215ac96f34c784f1b89ce2a1f1c45c4 Mon Sep 17 00:00:00 2001 +From b64bb92f0308e35b259be7454046d4792ce0a8c2 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 20 Aug 2012 09:09:09 +0200 -Subject: [PATCH 29/74] videorefclock: ask graphics context for refresh rate +Subject: [PATCH 40/86] videorefclock: ask graphics context for refresh rate --- xbmc/video/VideoReferenceClock.cpp | 3 ++- @@ -5290,10 +10224,10 @@ index b9afc09..2f6c7de 100644 1.8.4 -From 32734f03bbb8b1265babf6fa90aae1c6dfdc6cf9 Mon Sep 17 00:00:00 2001 +From ccd93e30d7b62e6096389d1fd487c799c3e25bd8 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 9 Jul 2012 14:00:18 +0200 -Subject: [PATCH 30/74] X11: fix icon texture after +Subject: [PATCH 41/86] X11: fix icon texture after cc5ed3c2474084ebc0373a3046410e6f766e03f4 --- @@ -5401,10 +10335,10 @@ index acd6497..805eed7 100644 1.8.4 -From 73c80decd59591eb5439c228bdca5a59fa8b3fc1 Mon Sep 17 00:00:00 2001 +From 8d5d2b237856e7e8e2ba280b82a9afc8d8a43641 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 10 Jul 2012 11:14:12 +0200 -Subject: [PATCH 31/74] X11: check for window manager +Subject: [PATCH 42/86] X11: check for window manager --- xbmc/windowing/X11/WinSystemX11.cpp | 74 ++++++++++++++++++++++++++++++++++++- @@ -5525,10 +10459,10 @@ index 32f90da..28d9d03 100644 1.8.4 -From 7767f901811a5ccf1f453e2ec8e42854f91b4e6a Mon Sep 17 00:00:00 2001 +From ddf034e7ba06aea092cd9701714a23b75f4def61 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 12 Jul 2012 11:11:47 +0200 -Subject: [PATCH 32/74] X11: dont set window on xrandr if no mode available +Subject: [PATCH 43/86] X11: dont set window on xrandr if no mode available --- xbmc/windowing/X11/WinSystemX11.cpp | 11 ++++++----- @@ -5565,10 +10499,10 @@ index b103248..45741d7 100644 1.8.4 -From 51689e75d057be6b9f5885bfe9adca60ab1908ee Mon Sep 17 00:00:00 2001 +From 0f0e0780757aa0dba801775514a555fe6739ba40 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 26 Jul 2012 09:34:28 +0200 -Subject: [PATCH 33/74] X11: fix crash after a resolution change on startup +Subject: [PATCH 44/86] X11: fix crash after a resolution change on startup --- xbmc/windowing/X11/WinSystemX11.cpp | 3 ++- @@ -5592,10 +10526,10 @@ index 45741d7..a6cb67f 100644 1.8.4 -From 0943750796c6e88487220c9ace5011032f04424e Mon Sep 17 00:00:00 2001 +From b3113141719e46946d0d86b5ff9aa5dab01ed2eb Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 15 Sep 2012 18:27:29 +0200 -Subject: [PATCH 34/74] X11: lock graphics context in NotifyXRREvent +Subject: [PATCH 45/86] X11: lock graphics context in NotifyXRREvent --- xbmc/windowing/X11/WinSystemX11.cpp | 2 ++ @@ -5618,10 +10552,10 @@ index a6cb67f..70b5f10 100644 1.8.4 -From e22bc0f6afe2910c8f7160f07774bce62c3fad06 Mon Sep 17 00:00:00 2001 +From a7fd8275509f6af1acebad0578291c488f72c2c5 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 23 Aug 2012 19:39:49 +0200 -Subject: [PATCH 35/74] ffmpeg: add av_find_default_stream_index to interface +Subject: [PATCH 46/86] ffmpeg: add av_find_default_stream_index to interface --- lib/DllAvFormat.h | 4 ++++ @@ -5667,10 +10601,10 @@ index 0016c0b..3514856 100644 1.8.4 -From 7a6466dc251f9815c9cb998909bc2023d97541be Mon Sep 17 00:00:00 2001 +From eadcbc6d43d123f1ff086cf7cd6c347a1e257b77 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 20 Aug 2012 16:06:39 +0200 -Subject: [PATCH 36/74] dvdplayer: observe pts counter overflow +Subject: [PATCH 47/86] dvdplayer: observe pts counter overflow --- .../cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 198 ++++++++++++++++++++- @@ -5957,10 +10891,10 @@ index aef5ab1..35abbdf 100644 1.8.4 -From f26c3f1d2698faca69557919be0406efebcacb9b Mon Sep 17 00:00:00 2001 +From 299eff8935aee82464a95f0aa8138f9dc110216b Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 2 Oct 2012 13:02:10 +0200 -Subject: [PATCH 37/74] dvdplayer: avoid short screen flicker caused by +Subject: [PATCH 48/86] dvdplayer: avoid short screen flicker caused by unnecessary reconfigure of renderer --- @@ -5993,10 +10927,10 @@ index c40d193..6419951 100644 1.8.4 -From 7328564d0cb47499549fb83bf18b45dc83d20193 Mon Sep 17 00:00:00 2001 +From e5ce1003977212bcb66239a70b0d33286062330f Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 11 Oct 2012 12:05:50 +0200 -Subject: [PATCH 38/74] vdpau: advanced settings for auto deinterlacing +Subject: [PATCH 49/86] vdpau: advanced settings for auto deinterlacing --- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 8 ++++---- @@ -6062,10 +10996,10 @@ index e6e02ad..70a8e9a 100644 1.8.4 -From 16941939de022e6f1e2fd89039be2a8b304b8c38 Mon Sep 17 00:00:00 2001 +From c8ce4e5de9aa520b68974b8e3fee18db44c3e647 Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 2 Nov 2012 13:20:03 +0100 -Subject: [PATCH 39/74] player: fix rewind +Subject: [PATCH 50/86] player: fix rewind --- xbmc/cores/dvdplayer/DVDMessage.h | 5 ++++- @@ -6113,10 +11047,10 @@ index 2ea8b8f..e8274f9 100644 class CDVDMsgPlayerSeekChapter : public CDVDMsg diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp -index d8847f2..c17a5b2 100644 +index 437276b..2c9fdf1 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp -@@ -1550,11 +1550,13 @@ void CDVDPlayer::HandlePlaySpeed() +@@ -1549,11 +1549,13 @@ void CDVDPlayer::HandlePlaySpeed() } else if (m_CurrentVideo.id >= 0 && (m_CurrentVideo.inited == true || GetPlaySpeed() < 0) // allow rewind at end of file @@ -6131,7 +11065,7 @@ index d8847f2..c17a5b2 100644 // check how much off clock video is when ff/rw:ing // a problem here is that seeking isn't very accurate // and since the clock will be resynced after seek -@@ -1573,7 +1575,7 @@ void CDVDPlayer::HandlePlaySpeed() +@@ -1572,7 +1574,7 @@ void CDVDPlayer::HandlePlaySpeed() { CLog::Log(LOGDEBUG, "CDVDPlayer::Process - Seeking to catch up"); int64_t iTime = (int64_t)DVD_TIME_TO_MSEC(m_clock.GetClock() + m_State.time_offset + 500000.0 * m_playSpeed / DVD_PLAYSPEED_NORMAL); @@ -6140,7 +11074,7 @@ index d8847f2..c17a5b2 100644 } } } -@@ -2061,7 +2063,7 @@ void CDVDPlayer::HandleMessages() +@@ -2060,7 +2062,7 @@ void CDVDPlayer::HandleMessages() else m_StateInput.dts = start; @@ -6149,7 +11083,7 @@ index d8847f2..c17a5b2 100644 } else CLog::Log(LOGWARNING, "error while seeking"); -@@ -2200,9 +2202,10 @@ void CDVDPlayer::HandleMessages() +@@ -2199,9 +2201,10 @@ void CDVDPlayer::HandleMessages() double offset; offset = CDVDClock::GetAbsoluteClock() - m_State.timestamp; offset *= m_playSpeed / DVD_PLAYSPEED_NORMAL; @@ -6161,7 +11095,7 @@ index d8847f2..c17a5b2 100644 m_State.timestamp = CDVDClock::GetAbsoluteClock(); } -@@ -2218,7 +2221,8 @@ void CDVDPlayer::HandleMessages() +@@ -2217,7 +2220,8 @@ void CDVDPlayer::HandleMessages() // do a seek after rewind, clock is not in sync with current pts if (m_playSpeed < 0 && speed >= 0) { @@ -6171,7 +11105,7 @@ index d8847f2..c17a5b2 100644 } // if playspeed is different then DVD_PLAYSPEED_NORMAL or DVD_PLAYSPEED_PAUSE -@@ -3175,7 +3179,7 @@ bool CDVDPlayer::CloseTeletextStream(bool bWaitForBuffers) +@@ -3174,7 +3178,7 @@ bool CDVDPlayer::CloseTeletextStream(bool bWaitForBuffers) return true; } @@ -6180,7 +11114,7 @@ index d8847f2..c17a5b2 100644 { double startpts; if(accurate) -@@ -3187,19 +3191,23 @@ void CDVDPlayer::FlushBuffers(bool queued, double pts, bool accurate) +@@ -3186,19 +3190,23 @@ void CDVDPlayer::FlushBuffers(bool queued, double pts, bool accurate) if(startpts != DVD_NOPTS_VALUE) startpts -= m_offset_pts; @@ -6208,7 +11142,7 @@ index d8847f2..c17a5b2 100644 m_CurrentTeletext.dts = DVD_NOPTS_VALUE; m_CurrentTeletext.startpts = startpts; -@@ -3243,7 +3251,7 @@ void CDVDPlayer::FlushBuffers(bool queued, double pts, bool accurate) +@@ -3242,7 +3250,7 @@ void CDVDPlayer::FlushBuffers(bool queued, double pts, bool accurate) m_CurrentTeletext.started = false; } @@ -6218,10 +11152,10 @@ index d8847f2..c17a5b2 100644 UpdatePlayState(0); diff --git a/xbmc/cores/dvdplayer/DVDPlayer.h b/xbmc/cores/dvdplayer/DVDPlayer.h -index 29dd12a..fa96b24 100644 +index 1f4b2e8..090d4a2 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.h +++ b/xbmc/cores/dvdplayer/DVDPlayer.h -@@ -304,7 +304,7 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer +@@ -305,7 +305,7 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer bool GetCachingTimes(double& play_left, double& cache_left, double& file_offset); @@ -6230,7 +11164,7 @@ index 29dd12a..fa96b24 100644 void HandleMessages(); void HandlePlaySpeed(); -@@ -353,8 +353,9 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer +@@ -354,8 +354,9 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer int m_playSpeed; struct SSpeedState { @@ -6280,10 +11214,10 @@ index 59c7f09..65dea76 100644 1.8.4 -From 3df6ab7f242355aa7a498dc0587828ea3f52180e Mon Sep 17 00:00:00 2001 +From cfb51b16656c46420a8bb318046e5b9dad0bb01d Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 23 Nov 2012 17:41:12 +0100 -Subject: [PATCH 40/74] xrandr: fix query for multiple screens +Subject: [PATCH 51/86] xrandr: fix query for multiple screens --- xbmc/windowing/X11/XRandR.cpp | 10 ++++++---- @@ -6324,10 +11258,10 @@ index 9e181f2..ce0a02b 100644 1.8.4 -From 204459604f094869d34265dc341d4dcd0818e1ad Mon Sep 17 00:00:00 2001 +From c4a02cec0e0a97163c2b9403dab6e30179d5bd2e Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 2 Dec 2012 15:46:55 +0100 -Subject: [PATCH 41/74] X11: add debug log to print out refresh after xrr event +Subject: [PATCH 52/86] X11: add debug log to print out refresh after xrr event --- xbmc/windowing/X11/WinSystemX11.cpp | 6 ++++++ @@ -6354,10 +11288,10 @@ index 70b5f10..64d5730 100644 1.8.4 -From edd899abfb5a94ed27610d9d10e7f5e3c13eb84f Mon Sep 17 00:00:00 2001 +From ca7f95ae2fdc8b77450fa706c8dcfb00e95ea8ce Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 11 Dec 2012 11:08:13 +0100 -Subject: [PATCH 42/74] X11: dont call XCloseDisplay on shutdown, it crashes +Subject: [PATCH 53/86] X11: dont call XCloseDisplay on shutdown, it crashes when powered doen by cec on ATI --- @@ -6382,10 +11316,10 @@ index 64d5730..edc81c8 100644 1.8.4 -From 16f2924bb6694a0e6d437140a6308610a9d8e43f Mon Sep 17 00:00:00 2001 +From 0f3d1bc85939212fafe1890f8fc41b10ad860684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Coutant?= Date: Wed, 12 Dec 2012 19:49:47 +0100 -Subject: [PATCH 43/74] x11: support for multiple x screens +Subject: [PATCH 54/86] x11: support for multiple x screens --- xbmc/windowing/X11/XRandR.cpp | 2 +- @@ -6408,10 +11342,10 @@ index ce0a02b..aa27d2b 100644 1.8.4 -From beeda2ba6039ca33958d811a17538c28d431509a Mon Sep 17 00:00:00 2001 +From 7e1e7e6cbb105a3f27bd4641d8b98b84eff8466e Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 24 Dec 2012 16:02:42 +0100 -Subject: [PATCH 44/74] pvr: increase changes counter of stream on stream +Subject: [PATCH 55/86] pvr: increase changes counter of stream on stream change, cosmetics after dd307930d39d92f145a01a16600cd00e01ec39be --- @@ -6445,10 +11379,10 @@ index b96d520..df89f6f 100644 1.8.4 -From bdd946fd4f545a3260015be2a94b70eb7535c1d8 Mon Sep 17 00:00:00 2001 +From aae22b74edfea53a4291fc378c68b66927a39230 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 17 Jan 2013 16:03:22 +0100 -Subject: [PATCH 45/74] X11: add keymapping for XF86XK_Sleep +Subject: [PATCH 56/86] X11: add keymapping for XF86XK_Sleep --- xbmc/windowing/WinEventsX11.cpp | 1 + @@ -6470,10 +11404,10 @@ index a62521f..263cb5a 100644 1.8.4 -From 2dc2364a7a67ae5cd3f1cad9f487a88f4f9ad4c2 Mon Sep 17 00:00:00 2001 +From 32733eaa36e9c5aa357094f7e30056eaeabce30e Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 21 Jan 2013 09:00:19 +0100 -Subject: [PATCH 46/74] X11: remove toggle full screen after resume +Subject: [PATCH 57/86] X11: remove toggle full screen after resume --- xbmc/powermanagement/PowerManager.cpp | 5 ----- @@ -6499,10 +11433,10 @@ index 2033574..c79bbc1 100644 1.8.4 -From da7c976c50332e9a7cf99a84db51ef70abaa23fb Mon Sep 17 00:00:00 2001 +From 970b6e7acad94efe23ff671e1f9b22b5f8c36964 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 23 Jan 2013 17:03:02 +0100 -Subject: [PATCH 47/74] xrandr: set screen on mode change command +Subject: [PATCH 58/86] xrandr: set screen on mode change command --- xbmc/windowing/X11/XRandR.cpp | 2 +- @@ -6525,10 +11459,10 @@ index aa27d2b..67bf6ca 100644 1.8.4 -From 87ec6a2d86dcc92722f51a116afb4f0e451b543e Mon Sep 17 00:00:00 2001 +From 0ae35a6b4c892338c1064d643037787b7170f358 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 23 Jan 2013 17:03:39 +0100 -Subject: [PATCH 48/74] X11: recreate glx context when output changes +Subject: [PATCH 59/86] X11: recreate glx context when output changes --- xbmc/windowing/X11/WinSystemX11.cpp | 6 +++--- @@ -6579,10 +11513,10 @@ index 28d9d03..5a21b00 100644 1.8.4 -From 39759e81a4b49af0d2339d48f87922b73e2aea60 Mon Sep 17 00:00:00 2001 +From 3191e66f9fb6d4de00e561a28c55d744fecbfb1e Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 14 Dec 2012 14:19:15 +0100 -Subject: [PATCH 49/74] pvr: do not show selection dialog for a single menu +Subject: [PATCH 60/86] pvr: do not show selection dialog for a single menu hook --- @@ -6620,10 +11554,10 @@ index aab6345..a880778 100644 1.8.4 -From 2a4e15a0559cbaaa13ce108555614d76cd058964 Mon Sep 17 00:00:00 2001 +From c696584526c4fafd99ed0e181d24bc76084f4d41 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 3 Feb 2013 08:17:16 +0100 -Subject: [PATCH 50/74] X11: use default screen parameters if no output +Subject: [PATCH 61/86] X11: use default screen parameters if no output connected --- @@ -6727,10 +11661,10 @@ index c6aa51a..f481ea4 100644 1.8.4 -From c9efbceaef7302b16d1683ef328d917966106299 Mon Sep 17 00:00:00 2001 +From 3ec8f414b2674985e7a324f32b18ee616ee09585 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 23 Mar 2013 15:13:32 +0100 -Subject: [PATCH 51/74] X11: create parent window +Subject: [PATCH 62/86] X11: create parent window --- xbmc/windowing/X11/WinSystemX11.cpp | 69 +++++++++++++++++++++++-------------- @@ -6996,10 +11930,10 @@ index 5a21b00..b866d52 100644 1.8.4 -From a3732aa59ef87c1be8d9ca899918c5fd719f3fb0 Mon Sep 17 00:00:00 2001 +From 1a1a85897bd928bc18e5bbd9dc2065240bd196ad Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 24 Mar 2013 12:30:12 +0100 -Subject: [PATCH 52/74] X11: use system key repeat rate instead of hardcoded +Subject: [PATCH 63/86] X11: use system key repeat rate instead of hardcoded one, taken from 58fd64b194e38b73b5f3132744bab35e994e7441 --- @@ -7201,10 +12135,10 @@ index c69169c..6429291 100644 1.8.4 -From 0394ae3595920d73aecba45f5263c8c466634039 Mon Sep 17 00:00:00 2001 +From f963e46d3c57a0b4b35623cb7f397acf38918d16 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 24 Mar 2013 16:04:48 +0100 -Subject: [PATCH 53/74] linux: use CLOCK_MONOTONIC_RAW as this is not subject +Subject: [PATCH 64/86] linux: use CLOCK_MONOTONIC_RAW as this is not subject to NTP --- @@ -7213,10 +12147,10 @@ Subject: [PATCH 53/74] linux: use CLOCK_MONOTONIC_RAW as this is not subject 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xbmc/threads/SystemClock.cpp b/xbmc/threads/SystemClock.cpp -index 5bb749c..2f995d0 100644 +index 657a154..35e3abf 100644 --- a/xbmc/threads/SystemClock.cpp +++ b/xbmc/threads/SystemClock.cpp -@@ -42,7 +42,7 @@ +@@ -43,7 +43,7 @@ now_time = (uint64_t)timeGetTime(); #else struct timespec ts = {}; @@ -7242,17 +12176,17 @@ index c06b8c5..4390d2e 100644 1.8.4 -From 23f70b51e16653d3beedbef416868354d1b6d025 Mon Sep 17 00:00:00 2001 +From 82c6272313d108dcbd00abc0306e6f5d226f142c Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 28 Mar 2013 15:18:53 +0100 -Subject: [PATCH 54/74] OMXPlayer: some caching fixes for pvr +Subject: [PATCH 65/86] OMXPlayer: some caching fixes for pvr --- xbmc/cores/omxplayer/OMXPlayer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp -index e9e8821..1ce961f 100644 +index 56099fe..fc1d725 100644 --- a/xbmc/cores/omxplayer/OMXPlayer.cpp +++ b/xbmc/cores/omxplayer/OMXPlayer.cpp @@ -2465,7 +2465,8 @@ void COMXPlayer::HandleMessages() @@ -7269,20 +12203,20 @@ index e9e8821..1ce961f 100644 1.8.4 -From c6f724693f94fcfc4f4b4f628862ff7c0b450980 Mon Sep 17 00:00:00 2001 +From a52ceb74973e0a12977ffb388e429e062daad8ff Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 28 Mar 2013 20:50:59 +0100 -Subject: [PATCH 55/74] fix incorrect display of fps when dr kicks in +Subject: [PATCH 66/86] fix incorrect display of fps when dr kicks in --- xbmc/Application.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp -index 990125b..ba14bd0 100644 +index 8278740..ca1cfa0 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp -@@ -2229,10 +2229,11 @@ void CApplication::Render() +@@ -2225,10 +2225,11 @@ void CApplication::Render() if (frameTime < singleFrameTime) Sleep(singleFrameTime - frameTime); } @@ -7299,10 +12233,10 @@ index 990125b..ba14bd0 100644 1.8.4 -From 5160c71bd8d323ef7321850f714b2fcf9d908246 Mon Sep 17 00:00:00 2001 +From 4eea944e480097efe8ce3ee481b9fb394441dfb9 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 13 Apr 2013 08:32:06 +0200 -Subject: [PATCH 56/74] X11: fix mouse coverage +Subject: [PATCH 67/86] X11: fix mouse coverage --- xbmc/windowing/X11/WinSystemX11.cpp | 11 ++++++++--- @@ -7368,10 +12302,10 @@ index b866d52..3f1b5f8 100644 1.8.4 -From 939687a27c745c71d7b0bb97459384f1e35ce1d3 Mon Sep 17 00:00:00 2001 +From 93b58ac58c012ea0e851baed64c2400d7197207e Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Wed, 8 May 2013 13:14:58 +0200 -Subject: [PATCH 57/74] X11: fix incorrectly used screen num in desktop +Subject: [PATCH 68/86] X11: fix incorrectly used screen num in desktop resolution --- @@ -7406,10 +12340,10 @@ index 7987cc2..b13f1a5 100644 1.8.4 -From 33bb15af7f154379aa1e9c3e49d2829f73858700 Mon Sep 17 00:00:00 2001 +From 8f2eb8b5fc1cef333ff3bfb6efb3cdcc0a9bd8e0 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 9 May 2013 12:07:09 +0200 -Subject: [PATCH 58/74] X11: do not overwrite user selected monitor with +Subject: [PATCH 69/86] X11: do not overwrite user selected monitor with fallback --- @@ -7534,10 +12468,10 @@ index 3f1b5f8..ed70d9c 100644 1.8.4 -From 9acda16b53ce55b319ef5d784117b723f6c5f1ca Mon Sep 17 00:00:00 2001 +From f53d2f9479a2171a3fc7f8e847673d6203c1de06 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sun, 12 May 2013 10:50:30 +0200 -Subject: [PATCH 59/74] xrandr: add turn on/off to wrapper +Subject: [PATCH 70/86] xrandr: add turn on/off to wrapper --- xbmc/windowing/X11/XRandR.cpp | 78 +++++++++++++++++++++++++++++++++++++++---- @@ -7703,10 +12637,10 @@ index d37838a..059062f 100644 1.8.4 -From cc23a2f530a88680f54b12d967ba5ad46785b462 Mon Sep 17 00:00:00 2001 +From 2fdd4246809702a5bba7a33ccd2127506546c86b Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sun, 19 May 2013 12:55:35 +0200 -Subject: [PATCH 60/74] xrandr: add GetPreferredMode to wrapper +Subject: [PATCH 71/86] xrandr: add GetPreferredMode to wrapper --- xbmc/windowing/X11/XRandR.cpp | 23 +++++++++++++++++++++++ @@ -7763,10 +12697,10 @@ index 059062f..ab7cc63 100644 1.8.4 -From 10952c266591f8f1cd87b973ede6e4dab89074bd Mon Sep 17 00:00:00 2001 +From 7cf2de0f690b89e91997bb93df344f09b29649cd Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sat, 11 May 2013 17:12:12 +0200 -Subject: [PATCH 61/74] X11: multi-head improvement - poll for desired output +Subject: [PATCH 72/86] X11: multi-head improvement - poll for desired output if we do not get an xrr event --- @@ -7781,10 +12715,10 @@ Subject: [PATCH 61/74] X11: multi-head improvement - poll for desired output 8 files changed, 105 insertions(+), 12 deletions(-) diff --git a/language/English/strings.po b/language/English/strings.po -index c6b2b44..0392955 100755 +index a48da84..c792f9b 100755 --- a/language/English/strings.po +++ b/language/English/strings.po -@@ -6262,7 +6262,7 @@ msgctxt "#14071" +@@ -6432,7 +6432,7 @@ msgctxt "#14071" msgid "Allow file renaming and deletion" msgstr "" @@ -7793,7 +12727,7 @@ index c6b2b44..0392955 100755 msgctxt "#14074" msgid "Set timezone" -@@ -6394,7 +6394,12 @@ msgctxt "#14100" +@@ -6564,7 +6564,12 @@ msgctxt "#14100" msgid "Stop ripping CD" msgstr "" @@ -7808,10 +12742,10 @@ index c6b2b44..0392955 100755 #: xbmc/dialogs/GUIDialogFavourites.cpp msgctxt "#15015" diff --git a/system/settings/settings.xml b/system/settings/settings.xml -index 5490bcb..56c537c 100644 +index 1c7d158..6e00f2d 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml -@@ -1871,6 +1871,11 @@ +@@ -1869,6 +1869,11 @@ @@ -7823,7 +12757,7 @@ index 5490bcb..56c537c 100644 0 0 -@@ -1922,6 +1927,7 @@ +@@ -1920,6 +1925,7 @@ @@ -8047,10 +12981,10 @@ index 4809821..1ad26b2 100644 1.8.4 -From 720cdc2542185e040a5d21b40da0a5554d6c4a08 Mon Sep 17 00:00:00 2001 +From 98d33e25a4a22dcd5ea24fd5119ab96a600c0662 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Wed, 15 May 2013 09:14:34 +0200 -Subject: [PATCH 62/74] X11: ignore mouse move event form other windows +Subject: [PATCH 73/86] X11: ignore mouse move event form other windows --- xbmc/windowing/WinEventsX11.cpp | 4 +++- @@ -8082,10 +13016,10 @@ index 908c8b6..938ad26 100644 1.8.4 -From 9ca9482f4017bbb8a8538b520f67471171411708 Mon Sep 17 00:00:00 2001 +From 75653e53df5de54a23b908f887a914f9c52e553d Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Tue, 11 Jun 2013 16:20:29 +0200 -Subject: [PATCH 63/74] renderer: allow some lateness within vblank interval +Subject: [PATCH 74/86] renderer: allow some lateness within vblank interval --- xbmc/cores/VideoRenderers/RenderManager.cpp | 12 ++++++++++-- @@ -8145,10 +13079,10 @@ index befd851..27283ec 100644 1.8.4 -From a5bac0013a56095dd1b02ac74a2925fd4958d836 Mon Sep 17 00:00:00 2001 +From f93de3d41e3aba6963ba1d093b264c46bc1fe9ef Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 16 Jun 2013 13:22:58 +0200 -Subject: [PATCH 64/74] X11: another fix for mouse coverage +Subject: [PATCH 75/86] X11: another fix for mouse coverage --- xbmc/windowing/WinEventsX11.cpp | 6 ++++-- @@ -8181,10 +13115,10 @@ index 938ad26..e4ca56d 100644 1.8.4 -From 4b7d6e1772a46700b2f47124bf91711041194c45 Mon Sep 17 00:00:00 2001 +From 5b39530c677395c920d91f2c8692c5f5ffb449c5 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Fri, 5 Jul 2013 12:14:00 +0200 -Subject: [PATCH 65/74] X11: set windows class name +Subject: [PATCH 76/86] X11: set windows class name --- xbmc/windowing/X11/WinSystemX11.cpp | 9 ++++++++- @@ -8226,20 +13160,20 @@ index cbb56bf..e74f2b0 100644 1.8.4 -From 12adccd810416e60845ce6870d40eb156084b8ec Mon Sep 17 00:00:00 2001 +From b5000c0456fd8d4d24a4771be89cb110c1e915d0 Mon Sep 17 00:00:00 2001 From: spiff Date: Tue, 16 Jul 2013 14:34:04 +0200 -Subject: [PATCH 66/74] fixed: typo +Subject: [PATCH 77/86] fixed: typo --- language/English/strings.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/English/strings.po b/language/English/strings.po -index 0392955..f31ccc6 100755 +index c792f9b..cb7a58a 100755 --- a/language/English/strings.po +++ b/language/English/strings.po -@@ -6396,7 +6396,7 @@ msgstr "" +@@ -6566,7 +6566,7 @@ msgstr "" #: xbmc/settings/settings.xml msgctxt "#14101" @@ -8252,17 +13186,17 @@ index 0392955..f31ccc6 100755 1.8.4 -From e410933ff678171b8e8f6117cc93619ba9192652 Mon Sep 17 00:00:00 2001 +From 10c25779282770a6cd7e70cf5dcadc8edd2f949c Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 25 Jul 2013 17:18:13 +0200 -Subject: [PATCH 67/74] ActiveAE: slightly reduce buffer size +Subject: [PATCH 78/86] ActiveAE: slightly reduce buffer size --- xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -index 6fbed5c..4cae9e8 100644 +index 6a3f700..543670b 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp @@ -30,8 +30,8 @@ @@ -8280,10 +13214,10 @@ index 6fbed5c..4cae9e8 100644 1.8.4 -From 5d3352fe52ef17b313ba37118df7796c2e679fe4 Mon Sep 17 00:00:00 2001 +From a15f3b944ee60b417b1df368d9e8d64885d99dcf Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sun, 4 Aug 2013 10:11:16 +0200 -Subject: [PATCH 68/74] Revert "vdpau: comment some features that will be added +Subject: [PATCH 79/86] Revert "vdpau: comment some features that will be added later" This reverts commit e00b4f65864d623ab4d2e9e5c06db138e661f1cf. @@ -8339,10 +13273,10 @@ index 7ee2ed9..7201c21 100644 1.8.4 -From 8983a0f6452dffba0be4c24deb84ddb73aa27d11 Mon Sep 17 00:00:00 2001 +From 0a8823480f217c8dafb4866789f24ab2c9684728 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Fri, 9 Aug 2013 18:01:40 +0200 -Subject: [PATCH 69/74] X11: fix keysyms +Subject: [PATCH 80/86] X11: fix keysyms --- xbmc/windowing/WinEventsX11.cpp | 2 +- @@ -8365,10 +13299,10 @@ index e4ca56d..b20130c 100644 1.8.4 -From 880aa5df1f3e0865785b5ed81076d8553dd58fc6 Mon Sep 17 00:00:00 2001 +From 0b9163c082446552e09a9bc45d76c7eb0ca33b8a Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Fri, 9 Aug 2013 18:42:36 +0200 -Subject: [PATCH 70/74] X11: fix keysym for non-IM +Subject: [PATCH 81/86] X11: fix keysym for non-IM --- xbmc/windowing/WinEventsX11.cpp | 2 +- @@ -8391,10 +13325,10 @@ index b20130c..a38890c 100644 1.8.4 -From 973f2a0de0ad85bd67e7f0b3af3992775b795a5d Mon Sep 17 00:00:00 2001 +From 7333834e636f7678def8e6a957c6502b57381482 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sat, 10 Aug 2013 11:18:16 +0200 -Subject: [PATCH 71/74] add some missing multi media keys +Subject: [PATCH 82/86] add some missing multi media keys --- system/keymaps/keyboard.xml | 3 +++ @@ -8449,10 +13383,10 @@ index ee6bb69..364b45a 100644 1.8.4 -From 7c5f2880006d6ea40d37052f065a9a2e8f121bbc Mon Sep 17 00:00:00 2001 +From 98e20f5d928c04b5e89a2ba0675a525e1eda21aa Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sat, 10 Aug 2013 15:53:45 +0200 -Subject: [PATCH 72/74] X11: squash multi +Subject: [PATCH 83/86] X11: squash multi --- xbmc/windowing/X11/WinSystemX11.cpp | 2 +- @@ -8475,10 +13409,10 @@ index e74f2b0..480efb3 100644 1.8.4 -From eb5f2e6532e6a96a754669e74d765af335e1581b Mon Sep 17 00:00:00 2001 +From 1ce6d0c399cd11a0a49c3b2fde447c010810569a Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Tue, 3 Sep 2013 20:46:17 +0200 -Subject: [PATCH 73/74] X11: do not poll default monitor +Subject: [PATCH 84/86] X11: do not poll default monitor --- xbmc/windowing/X11/WinSystemX11.cpp | 2 +- @@ -8501,10 +13435,10 @@ index 480efb3..dd04357 100644 1.8.4 -From cad2b2126ed88fdd1b64c9c36c1074067a5ace9e Mon Sep 17 00:00:00 2001 +From 31237c342d0de251c8c6f5c2754cc3db954f107d Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Fri, 11 Oct 2013 09:01:57 +0200 -Subject: [PATCH 74/74] vdpau: check for GL_NV_vdpau_interop in open +Subject: [PATCH 85/86] vdpau: check for GL_NV_vdpau_interop in open --- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 23 ++++++++++------------- @@ -8561,3 +13495,36 @@ index 7201c21..1ac0978 100644 -- 1.8.4 + +From 95a90fe620d1219fda8f5d2ecd9c748296bece06 Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Tue, 15 Oct 2013 07:54:33 +0200 +Subject: [PATCH 86/86] Revert "dvdplayer: disallow hw accel of SD mpeg2's" + +This reverts commit 99243803fc0c13051f44040dc5081e5a98634252. +--- + xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +index b585461..9f1fc03 100644 +--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +@@ -71,14 +71,6 @@ enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx + if(!ctx->IsHardwareAllowed()) + return ctx->m_dllAvCodec.avcodec_default_get_format(avctx, fmt); + +- /* there are many corrupt mpeg2 rips from dvd's which don't * +- * follow profile spec properly, they go corrupt on hw, so * +- * keep those running in software for the time being. */ +- if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO +- && avctx->height <= 576 +- && avctx->width <= 720) +- return ctx->m_dllAvCodec.avcodec_default_get_format(avctx, fmt); +- + const PixelFormat * cur = fmt; + while(*cur != PIX_FMT_NONE) + { +-- +1.8.4 + diff --git a/packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-995.10-disable-minimize.patch b/packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-995.10-disable-minimize.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-995.10-disable-minimize.patch rename to packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-995.10-disable-minimize.patch diff --git a/packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-AML-XB9295c3f-04-fixed-context-menu-remove-safely-selection.patch b/packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-AML-XB9295c3f-04-fixed-context-menu-remove-safely-selection.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-AML-XB9295c3f-04-fixed-context-menu-remove-safely-selection.patch rename to packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-AML-XB9295c3f-04-fixed-context-menu-remove-safely-selection.patch diff --git a/packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-AML-XB9295c3f-05-use-udevil-to-umount.-escape-mountpath.patch b/packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-AML-XB9295c3f-05-use-udevil-to-umount.-escape-mountpath.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/13.alpha-923f1c8/xbmc-AML-XB9295c3f-05-use-udevil-to-umount.-escape-mountpath.patch rename to packages/mediacenter/xbmc/patches/13.alpha-ed1d9c7/xbmc-AML-XB9295c3f-05-use-udevil-to-umount.-escape-mountpath.patch