diff --git a/packages/databases/mysql/package.mk b/packages/databases/mysql/package.mk index 083d661455..ba26f88038 100644 --- a/packages/databases/mysql/package.mk +++ b/packages/databases/mysql/package.mk @@ -19,98 +19,140 @@ ################################################################################ PKG_NAME="mysql" -PKG_VERSION="5.1.68" +PKG_VERSION="5.6.13" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="LGPL" PKG_SITE="http://www.mysql.com" -PKG_URL="http://ftp.gwdg.de/pub/misc/$PKG_NAME/Downloads/MySQL-5.1/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_URL="http://cdn.mysql.com/Downloads/MySQL-5.6/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="zlib ncurses" -PKG_BUILD_DEPENDS_HOST="toolchain zlib:host" -PKG_BUILD_DEPENDS_TARGET="toolchain zlib ncurses mysql:host" +PKG_BUILD_DEPENDS_HOST="toolchain zlib openssl ncurses" +PKG_BUILD_DEPENDS_TARGET="toolchain zlib openssl ncurses mysql:host" PKG_PRIORITY="optional" PKG_SECTION="database" PKG_SHORTDESC="mysql: A database server" PKG_LONGDESC="MySQL is a SQL (Structured Query Language) database server. SQL is the most popular database language in the world. MySQL is a client server implementation that consists of a server daemon mysqld and many different client programs/libraries." PKG_IS_ADDON="no" -PKG_AUTORECONF="yes" +PKG_AUTORECONF="no" -TARGET_CFLAGS="$TARGET_CFLAGS -fPIC -DPIC" +pre_configure_host() { + sed -i "/ADD_SUBDIRECTORY(sql\/share)/d" ../CMakeLists.txt + sed -i "s/ADD_SUBDIRECTORY(libmysql)/&\\nADD_SUBDIRECTORY(sql\/share)/" ../CMakeLists.txt + sed -i "s@data/test@\${INSTALL_MYSQLSHAREDIR}@g" ../sql/CMakeLists.txt + sed -i "s@data/mysql@\${INSTALL_MYSQLTESTDIR}@g" ../sql/CMakeLists.txt +} -PKG_CONFIGURE_OPTS_HOST="--with-zlib-dir=$ROOT/$TOOLCHAIN" - -PKG_CONFIGURE_OPTS_TARGET="ac_cv_c_stack_direction=-1 \ - ac_cv_sys_restartable_syscalls=yes \ - --localstatedir=/storage/.mysql \ - --with-unix-socket-path=/var/tmp/mysql.socket \ - --with-tcp-port=3306 \ - --enable-static \ - --disable-shared \ - --with-low-memory \ - --enable-largefile \ - --with-big-tables \ - --with-mysqld-user=mysqld \ - --with-extra-charsets=all \ - --with-pthread \ - --with-named-thread-libs=-lpthread \ - --enable-thread-safe-client \ - --enable-assembler \ - --enable-local-infile \ - --without-debug \ - --without-docs \ - --without-man \ - --with-readline \ - --without-libwrap \ - --without-pstack \ - --without-server \ - --without-embedded-server \ - --without-libedit \ - --with-query-cache \ - --without-plugin-partition \ - --without-plugin-daemon_example \ - --without-plugin-ftexample \ - --without-plugin-archive \ - --without-plugin-blackhole \ - --without-plugin-example \ - --without-plugin-federated \ - --without-plugin-ibmdb2i \ - --without-plugin-innobase \ - --without-plugin-innodb_plugin \ - --without-plugin-ndbcluster" +# package specific configure options +configure_host() { + cmake -DCMAKE_INSTALL_PREFIX=$TOOLCHAIN \ + -DCMAKE_BUILD_TYPE=Release \ + -DWITHOUT_SERVER=OFF \ + -DWITH_EMBEDDED_SERVER=OFF \ + -DWITH_EXTRA_CHARSETS=none \ + -DWITH_EDITLINE=bundled \ + -DWITH_LIBEVENT=bundled \ + -DWITH_SSL=bundled \ + -DWITH_UNIT_TESTS=OFF \ + -DWITH_ZLIB=bundled \ + .. +} make_host() { - make -C include my_config.h - make -C mysys libmysys.a - make -C strings libmystrings.a - make -C dbug factorial - make -C vio libvio.a - make -C dbug libdbug.a - make -C regex libregex.a - make -C sql gen_lex_hash - make -C scripts comp_sql - make -C extra comp_err + make comp_err + make gen_lex_hash + make comp_sql + make gen_pfs_lex_token } makeinstall_host() { - cp -PR dbug/factorial $ROOT/$TOOLCHAIN/bin/mysql-factorial - cp -PR sql/gen_lex_hash $ROOT/$TOOLCHAIN/bin/mysql-gen_lex_hash - cp -PR scripts/comp_sql $ROOT/$TOOLCHAIN/bin/mysql-comp_sql - cp -PR extra/comp_err $ROOT/$TOOLCHAIN/bin/mysql-comp_err + mkdir -p $ROOT/$TOOLCHAIN/bin + cp -PR extra/comp_err $ROOT/$TOOLCHAIN/bin + cp -PR sql/gen_lex_hash $ROOT/$TOOLCHAIN/bin + cp -PR scripts/comp_sql $ROOT/$TOOLCHAIN/bin + cp -PR storage/perfschema/gen_pfs_lex_token $ROOT/$TOOLCHAIN/bin +} + +configure_target() { + cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \ + -DCMAKE_BUILD_TYPE=Release \ + -DFEATURE_SET=community \ + -DDISABLE_SHARED=ON \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DINSTALL_DOCDIR=share/doc/mysql \ + -DINSTALL_DOCREADMEDIR=share/doc/mysql \ + -DINSTALL_INCLUDEDIR=include/mysql \ + -DINSTALL_INFODIR=share/info \ + -DINSTALL_MANDIR=share/man \ + -DINSTALL_MYSQLDATADIR=/storage/.mysql \ + -DINSTALL_MYSQLSHAREDIR=share/mysql \ + -DINSTALL_MYSQLTESTDIR=share/mysql/test \ + -DINSTALL_PLUGINDIR=lib/mysql/plugin \ + -DINSTALL_SBINDIR=sbin \ + -DINSTALL_SCRIPTDIR=bin \ + -DINSTALL_SQLBENCHDIR=share/mysql/bench \ + -DINSTALL_SUPPORTFILESDIR=share/mysql/support \ + -DMYSQL_DATADIR=/storage/.mysql \ + -DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \ + -DSYSCONFDIR=/etc/mysql \ + -DWITHOUT_SERVER=OFF \ + -DWITH_EMBEDDED_SERVER=OFF \ + -DWITH_PARTITION_STORAGE_ENGINE=OFF \ + -DWITH_PERFSCHEMA_STORAGE_ENGINE=ON \ + -DWITH_EXTRA_CHARSETS=all \ + -DENABLE_DTRACE=OFF \ + -DWITH_EDITLINE=bundled \ + -DWITH_LIBEVENT=bundled \ + -DWITH_SSL=system \ + -DWITH_UNIT_TESTS=OFF \ + -DWITH_ZLIB=system \ + -DSTACK_DIRECTION=1 \ + .. +} + +pre_make_target() { +# copy host binaries back - should be fixed + cp -PR ../.$HOST_NAME/scripts/comp_sql ../scripts/comp_sql } post_makeinstall_target() { sed -i "s|pkgincludedir=.*|pkgincludedir=\'$SYSROOT_PREFIX/usr/include/mysql\'|" scripts/mysql_config sed -i "s|pkglibdir=.*|pkglibdir=\'$SYSROOT_PREFIX/usr/lib/mysql\'|" scripts/mysql_config - cp scripts/mysql_config $SYSROOT_PREFIX/usr/bin - ln -sf $SYSROOT_PREFIX/usr/bin/mysql_config $ROOT/$TOOLCHAIN/bin/mysql_config - for i in `ls -d $SYSROOT_PREFIX/usr/lib/mysql/*.a`; do - ln -v -sf $i $SYSROOT_PREFIX/usr/lib - done + mkdir -p $ROOT/$TOOLCHAIN/bin + cp -PR scripts/mysql_config $ROOT/$TOOLCHAIN/bin rm -rf $INSTALL/usr/bin - rm -rf $INSTALL/usr/mysql-test - rm -rf $INSTALL/usr/share/mysql - rm -rf $INSTALL/usr/sql-bench + rm -rf $INSTALL/usr/sbin + rm -rf $INSTALL/usr/lib/mysql/plugin + rm -rf $INSTALL/usr/share/mysql/bench + rm -rf $INSTALL/usr/share/mysql/support + rm -rf $INSTALL/usr/share/mysql/test + + if [ "$MYSQL_SERVER" = "yes" ]; then + mkdir -p $INSTALL/usr/bin + cp -P extra/resolveip $INSTALL/usr/bin + cp -P extra/my_print_defaults $INSTALL/usr/bin + cp -P client/mysql $INSTALL/usr/bin + cp -P client/mysqladmin $INSTALL/usr/bin + cp -P ../scripts/mysql_install_db.sh $INSTALL/usr/bin/mysql_install_db + chmod +x $INSTALL/usr/bin/mysql_install_db + sed -e 's,@localstatedir@,/storage/.mysql,g' \ + -e 's,@bindir@,/usr/bin,g' \ + -e 's,@prefix@,/usr,g' \ + -e 's,@libexecdir@,/usr/sbin,g' \ + -e 's,@pkgdatadir@,/usr/share/mysql,g' \ + -e 's,@scriptdir@,/usr/bin,g' \ + -e 's,^.basedir=.*,basedir="/usr",g' \ + -e 's,@HOSTNAME@,cat /proc/sys/kernel/hostname,g' \ + -i $INSTALL/usr/bin/mysql_install_db + + mkdir -p $INSTALL/usr/sbin + cp -P sql/mysqld $INSTALL/usr/sbin + + mkdir -p $INSTALL/etc/init.d + cp $PKG_DIR/scripts/* $INSTALL/etc/init.d + else + rm -rf $INSTALL/usr/share/mysql + fi } diff --git a/packages/databases/mysql/patches/mysql-010_crosscompiling.patch b/packages/databases/mysql/patches/mysql-010_crosscompiling.patch deleted file mode 100644 index b6c3e068a1..0000000000 --- a/packages/databases/mysql/patches/mysql-010_crosscompiling.patch +++ /dev/null @@ -1,128 +0,0 @@ -diff -Naur mysql-5.1.38/dbug/Makefile.am mysql-5.1.38.patch/dbug/Makefile.am ---- mysql-5.1.38/dbug/Makefile.am 2009-08-21 14:09:22.000000000 +0200 -+++ mysql-5.1.38.patch/dbug/Makefile.am 2009-09-10 02:57:59.000000000 +0200 -@@ -44,19 +44,19 @@ - -groff -mm user.r > $@ - - output1.r: factorial -- ./factorial 1 2 3 4 5 | cat > $@ -+ mysql-factorial 1 2 3 4 5 | cat > $@ - - output2.r: factorial -- ./factorial -\#t:o 2 3 | cat >$@ -+ mysql-factorial -\#t:o 2 3 | cat >$@ - - output3.r: factorial -- ./factorial -\#d:t:o 3 | cat >$@ -+ mysql-factorial -\#d:t:o 3 | cat >$@ - - output4.r: factorial -- ./factorial -\#d,result:o 4 | cat >$@ -+ mysql-factorial -\#d,result:o 4 | cat >$@ - - output5.r: factorial -- ./factorial -\#d:f,factorial:F:L:o 3 | cat >$@ -+ mysql-factorial -\#d:f,factorial:F:L:o 3 | cat >$@ - .c.r: - @RM@ -f $@ - @SED@ -e 's!\\!\\\\!g' $< > $@ -diff -Naur mysql-5.1.38/dbug/Makefile.in mysql-5.1.38.patch/dbug/Makefile.in ---- mysql-5.1.38/dbug/Makefile.in 2009-08-21 14:17:15.000000000 +0200 -+++ mysql-5.1.38.patch/dbug/Makefile.in 2009-09-10 02:58:14.000000000 +0200 -@@ -746,19 +746,19 @@ - -groff -mm user.r > $@ - - output1.r: factorial -- ./factorial 1 2 3 4 5 | cat > $@ -+ mysql-factorial 1 2 3 4 5 | cat > $@ - - output2.r: factorial -- ./factorial -\#t:o 2 3 | cat >$@ -+ mysql-factorial -\#t:o 2 3 | cat >$@ - - output3.r: factorial -- ./factorial -\#d:t:o 3 | cat >$@ -+ mysql-factorial -\#d:t:o 3 | cat >$@ - - output4.r: factorial -- ./factorial -\#d,result:o 4 | cat >$@ -+ mysql-factorial -\#d,result:o 4 | cat >$@ - - output5.r: factorial -- ./factorial -\#d:f,factorial:F:L:o 3 | cat >$@ -+ mysql-factorial -\#d:f,factorial:F:L:o 3 | cat >$@ - .c.r: - @RM@ -f $@ - @SED@ -e 's!\\!\\\\!g' $< > $@ -diff -Naur mysql-5.1.38/extra/Makefile.am mysql-5.1.38.patch/extra/Makefile.am ---- mysql-5.1.38/extra/Makefile.am 2009-08-21 14:09:23.000000000 +0200 -+++ mysql-5.1.38.patch/extra/Makefile.am 2009-09-10 02:53:50.000000000 +0200 -@@ -32,7 +32,7 @@ - $(top_builddir)/include/mysqld_error.h: comp_err.c \ - $(top_srcdir)/sql/share/errmsg.txt - $(MAKE) $(AM_MAKEFLAGS) comp_err$(EXEEXT) -- $(top_builddir)/extra/comp_err$(EXEEXT) \ -+ mysql-comp_err$(EXEEXT) \ - --charset=$(top_srcdir)/sql/share/charsets \ - --out-dir=$(top_builddir)/sql/share/ \ - --header_file=$(top_builddir)/include/mysqld_error.h \ -diff -Naur mysql-5.1.38/extra/Makefile.in mysql-5.1.38.patch/extra/Makefile.in ---- mysql-5.1.38/extra/Makefile.in 2009-08-21 14:17:16.000000000 +0200 -+++ mysql-5.1.38.patch/extra/Makefile.in 2009-09-10 02:53:16.000000000 +0200 -@@ -936,7 +936,7 @@ - $(top_builddir)/include/mysqld_error.h: comp_err.c \ - $(top_srcdir)/sql/share/errmsg.txt - $(MAKE) $(AM_MAKEFLAGS) comp_err$(EXEEXT) -- $(top_builddir)/extra/comp_err$(EXEEXT) \ -+ mysql-comp_err$(EXEEXT) \ - --charset=$(top_srcdir)/sql/share/charsets \ - --out-dir=$(top_builddir)/sql/share/ \ - --header_file=$(top_builddir)/include/mysqld_error.h \ -diff -Naur mysql-5.1.38/scripts/Makefile.am mysql-5.1.38.patch/scripts/Makefile.am ---- mysql-5.1.38/scripts/Makefile.am 2009-08-21 14:11:26.000000000 +0200 -+++ mysql-5.1.38.patch/scripts/Makefile.am 2009-09-10 02:57:01.000000000 +0200 -@@ -121,7 +121,7 @@ - mysql_fix_privilege_tables_sql.c: comp_sql.c mysql_fix_privilege_tables.sql - $(MAKE) $(AM_MAKEFLAGS) comp_sql$(EXEEXT) - sleep 2 -- $(top_builddir)/scripts/comp_sql$(EXEEXT) \ -+ mysql-comp_sql$(EXEEXT) \ - mysql_fix_privilege_tables \ - $(top_srcdir)/scripts/mysql_fix_privilege_tables.sql $@ - -diff -Naur mysql-5.1.38/scripts/Makefile.in mysql-5.1.38.patch/scripts/Makefile.in ---- mysql-5.1.38/scripts/Makefile.in 2009-08-21 14:17:23.000000000 +0200 -+++ mysql-5.1.38.patch/scripts/Makefile.in 2009-09-10 02:57:11.000000000 +0200 -@@ -802,7 +802,7 @@ - mysql_fix_privilege_tables_sql.c: comp_sql.c mysql_fix_privilege_tables.sql - $(MAKE) $(AM_MAKEFLAGS) comp_sql$(EXEEXT) - sleep 2 -- $(top_builddir)/scripts/comp_sql$(EXEEXT) \ -+ mysql-comp_sql$(EXEEXT) \ - mysql_fix_privilege_tables \ - $(top_srcdir)/scripts/mysql_fix_privilege_tables.sql $@ - -diff -Naur mysql-5.1.38/sql/Makefile.am mysql-5.1.38.patch/sql/Makefile.am ---- mysql-5.1.38/sql/Makefile.am 2009-08-21 14:12:24.000000000 +0200 -+++ mysql-5.1.38.patch/sql/Makefile.am 2009-09-10 02:55:09.000000000 +0200 -@@ -174,7 +174,7 @@ - # this avoid the rebuild of the built files in a source dist - lex_hash.h: gen_lex_hash.cc lex.h - $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT) -- ./gen_lex_hash$(EXEEXT) > $@-t -+ mysql-gen_lex_hash$(EXEEXT) > $@-t - $(MV) $@-t $@ - - # For testing of udf_example.so -diff -Naur mysql-5.1.38/sql/Makefile.in mysql-5.1.38.patch/sql/Makefile.in ---- mysql-5.1.38/sql/Makefile.in 2009-08-21 14:17:25.000000000 +0200 -+++ mysql-5.1.38.patch/sql/Makefile.in 2009-09-10 02:55:22.000000000 +0200 -@@ -1302,7 +1302,7 @@ - # this avoid the rebuild of the built files in a source dist - lex_hash.h: gen_lex_hash.cc lex.h - $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT) -- ./gen_lex_hash$(EXEEXT) > $@-t -+ mysql-gen_lex_hash$(EXEEXT) > $@-t - $(MV) $@-t $@ - - # We might have some stuff not built in this build, but that we want to install diff --git a/packages/network/openssh/install b/packages/databases/mysql/scripts/54_mysql old mode 100755 new mode 100644 similarity index 55% rename from packages/network/openssh/install rename to packages/databases/mysql/scripts/54_mysql index 4645770c8e..697337669d --- a/packages/network/openssh/install +++ b/packages/databases/mysql/scripts/54_mysql @@ -1,5 +1,3 @@ -#!/bin/sh - ################################################################################ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) @@ -20,28 +18,28 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -. config/options $1 +# start MySql Server +# +# runlevels: openelec, textmode -add_user sshd x 74 74 "Privilege-separated SSH" "/var/empty/sshd" "/bin/sh" -add_group sshd 74 +MYSQL_DATADIR="$CONFIG_CACHE/mysql" -mkdir -p $INSTALL/etc - cp $PKG_DIR/config/ssh_config $INSTALL/etc - cp $PKG_DIR/config/sshd_config $INSTALL/etc - cp $PKG_BUILD/moduli $INSTALL/etc +( + progress "Starting MySql server" + mkdir -p /run/mysqld -mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/scp $INSTALL/usr/bin/ - cp $PKG_BUILD/ssh $INSTALL/usr/bin/ - cp $PKG_BUILD/ssh-add $INSTALL/usr/bin/ - cp $PKG_BUILD/ssh-agent $INSTALL/usr/bin/ - cp $PKG_BUILD/ssh-keygen $INSTALL/usr/bin/ + if [ ! -d "$MYSQL_DATADIR" ]; then + progress "Creating MySql Database" + mkdir -p "$MYSQL_DATADIR" + mysql_install_db --user=root --datadir="$MYSQL_DATADIR" > /dev/null 2>&1 + mysqld --user=root --datadir="$MYSQL_DATADIR" > /dev/null 2>&1 & + usleep 3000000 + mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'openelec' WITH GRANT OPTION;" > /dev/null 2>&1 + mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'openelec' WITH GRANT OPTION;" > /dev/null 2>&1 -mkdir -p $INSTALL/usr/sbin - cp $PKG_BUILD/sshd $INSTALL/usr/sbin/ - -if [ $SFTP_SERVER = "yes" ]; then - mkdir -p $INSTALL/usr/libexec - cp $PKG_BUILD/sftp-server $INSTALL/usr/libexec -fi + killall mysqld + usleep 2000000 + fi + mysqld --user=root --datadir="$MYSQL_DATADIR" > /dev/null 2>&1 +)& diff --git a/packages/devel/dbus-glib-host/meta b/packages/devel/dbus-glib-host/meta index 4ca0904d51..842c55bb0a 100644 --- a/packages/devel/dbus-glib-host/meta +++ b/packages/devel/dbus-glib-host/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://freedesktop.org/wiki/Software/dbus" PKG_URL="" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain glib-host dbus-host" +PKG_BUILD_DEPENDS="toolchain glib-host dbus:host" PKG_PRIORITY="optional" PKG_SECTION="devel" PKG_SHORTDESC="dbus-glib: A message bus system" diff --git a/packages/devel/ncurses/build b/packages/devel/ncurses/build index 033b60b2f8..0521eb0534 100755 --- a/packages/devel/ncurses/build +++ b/packages/devel/ncurses/build @@ -37,6 +37,7 @@ make -C progs tic cp progs/tic $ROOT/$TOOLCHAIN/bin cp lib/*.so* $ROOT/$TOOLCHAIN/lib +make -C include install cd "$CWD" diff --git a/packages/graphics/Mesa/package.mk b/packages/graphics/Mesa/package.mk index cd44f5da08..680d4825b8 100644 --- a/packages/graphics/Mesa/package.mk +++ b/packages/graphics/Mesa/package.mk @@ -19,14 +19,14 @@ ################################################################################ PKG_NAME="Mesa" -PKG_VERSION="9.1.5" +PKG_VERSION="9.1.6" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.mesa3d.org/" PKG_URL="ftp://freedesktop.org/pub/mesa/$PKG_VERSION/MesaLib-$PKG_VERSION.tar.bz2" PKG_DEPENDS="libXdamage libdrm expat libXext libXfixes libX11" -PKG_BUILD_DEPENDS_TARGET="toolchain Python-host makedepend libxml2-host expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11" +PKG_BUILD_DEPENDS_TARGET="toolchain Python-host makedepend:host libxml2-host expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11" PKG_PRIORITY="optional" PKG_SECTION="graphics" PKG_SHORTDESC="mesa: 3-D graphics library with OpenGL API" @@ -35,6 +35,9 @@ PKG_LONGDESC="Mesa is a 3-D graphics library with an API which is very similar t PKG_IS_ADDON="no" PKG_AUTORECONF="yes" +# configure GPU drivers and dependencies: + get_graphicdrivers + if [ "$LLVM_SUPPORT" = "yes" ]; then PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET llvm" PKG_DEPENDS="$PKG_DEPENDS llvm" @@ -57,8 +60,6 @@ if [ "$MESA_VAAPI_SUPPORT" = "yes" ]; then PKG_DEPENDS="$PKG_DEPENDS libva" fi -get_graphicdrivers - XA_CONFIG="--disable-xa" for drv in $GRAPHIC_DRIVERS; do [ "$drv" = "vmware" ] && XA_CONFIG="--enable-xa" diff --git a/packages/graphics/libdrm/meta b/packages/graphics/libdrm/meta index abd352431d..c09fa43a37 100644 --- a/packages/graphics/libdrm/meta +++ b/packages/graphics/libdrm/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="libdrm" -PKG_VERSION="2.4.45" +PKG_VERSION="2.4.46" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/initramfs/sysutils/dosfstools-initramfs/install b/packages/initramfs/sysutils/dosfstools-initramfs/install index a6f700fede..229737ae14 100755 --- a/packages/initramfs/sysutils/dosfstools-initramfs/install +++ b/packages/initramfs/sysutils/dosfstools-initramfs/install @@ -25,6 +25,4 @@ DOSFSTOOLS_DIR="$BUILD/dosfstools-*" mkdir -p $INSTALL/sbin - cp $DOSFSTOOLS_DIR/dosfsck $INSTALL/sbin - ln -sf dosfsck $INSTALL/sbin/fsck.vfat - ln -sf dosfsck $INSTALL/sbin/fsck.msdos + cp -PR $DOSFSTOOLS_DIR/.install_pkg/usr/sbin/fsck.* $INSTALL/sbin diff --git a/packages/linux/firmware/radeon/ARUBA_rlc.bin b/packages/linux/firmware/radeon/ARUBA_rlc.bin index dc133c4338..3582fe6c49 100644 Binary files a/packages/linux/firmware/radeon/ARUBA_rlc.bin and b/packages/linux/firmware/radeon/ARUBA_rlc.bin differ diff --git a/packages/linux/firmware/radeon/BARTS_smc.bin b/packages/linux/firmware/radeon/BARTS_smc.bin new file mode 100644 index 0000000000..a4d1e0860d Binary files /dev/null and b/packages/linux/firmware/radeon/BARTS_smc.bin differ diff --git a/packages/linux/firmware/radeon/BONAIRE_ce.bin b/packages/linux/firmware/radeon/BONAIRE_ce.bin new file mode 100644 index 0000000000..7d40fbf14c Binary files /dev/null and b/packages/linux/firmware/radeon/BONAIRE_ce.bin differ diff --git a/packages/linux/firmware/radeon/BONAIRE_mc.bin b/packages/linux/firmware/radeon/BONAIRE_mc.bin new file mode 100644 index 0000000000..a3c70472a8 Binary files /dev/null and b/packages/linux/firmware/radeon/BONAIRE_mc.bin differ diff --git a/packages/linux/firmware/radeon/BONAIRE_me.bin b/packages/linux/firmware/radeon/BONAIRE_me.bin new file mode 100644 index 0000000000..75bff89784 Binary files /dev/null and b/packages/linux/firmware/radeon/BONAIRE_me.bin differ diff --git a/packages/linux/firmware/radeon/BONAIRE_mec.bin b/packages/linux/firmware/radeon/BONAIRE_mec.bin new file mode 100644 index 0000000000..65fd6fb8cc Binary files /dev/null and b/packages/linux/firmware/radeon/BONAIRE_mec.bin differ diff --git a/packages/linux/firmware/radeon/BONAIRE_pfp.bin b/packages/linux/firmware/radeon/BONAIRE_pfp.bin new file mode 100644 index 0000000000..e12a1af2b6 Binary files /dev/null and b/packages/linux/firmware/radeon/BONAIRE_pfp.bin differ diff --git a/packages/linux/firmware/radeon/BONAIRE_rlc.bin b/packages/linux/firmware/radeon/BONAIRE_rlc.bin new file mode 100644 index 0000000000..7e322354a8 Binary files /dev/null and b/packages/linux/firmware/radeon/BONAIRE_rlc.bin differ diff --git a/packages/linux/firmware/radeon/BONAIRE_sdma.bin b/packages/linux/firmware/radeon/BONAIRE_sdma.bin new file mode 100644 index 0000000000..4766a2a96b Binary files /dev/null and b/packages/linux/firmware/radeon/BONAIRE_sdma.bin differ diff --git a/packages/linux/firmware/radeon/BONAIRE_uvd.bin b/packages/linux/firmware/radeon/BONAIRE_uvd.bin new file mode 100644 index 0000000000..0876de9e9b Binary files /dev/null and b/packages/linux/firmware/radeon/BONAIRE_uvd.bin differ diff --git a/packages/linux/firmware/radeon/BTC_rlc.bin b/packages/linux/firmware/radeon/BTC_rlc.bin index 93e8c401d8..e529a7277a 100644 Binary files a/packages/linux/firmware/radeon/BTC_rlc.bin and b/packages/linux/firmware/radeon/BTC_rlc.bin differ diff --git a/packages/linux/firmware/radeon/CAICOS_smc.bin b/packages/linux/firmware/radeon/CAICOS_smc.bin new file mode 100644 index 0000000000..bc8840cf04 Binary files /dev/null and b/packages/linux/firmware/radeon/CAICOS_smc.bin differ diff --git a/packages/linux/firmware/radeon/CAYMAN_rlc.bin b/packages/linux/firmware/radeon/CAYMAN_rlc.bin index 2ba672fb24..d7f3ceb805 100644 Binary files a/packages/linux/firmware/radeon/CAYMAN_rlc.bin and b/packages/linux/firmware/radeon/CAYMAN_rlc.bin differ diff --git a/packages/linux/firmware/radeon/CAYMAN_smc.bin b/packages/linux/firmware/radeon/CAYMAN_smc.bin new file mode 100644 index 0000000000..5e1c2e56bc Binary files /dev/null and b/packages/linux/firmware/radeon/CAYMAN_smc.bin differ diff --git a/packages/linux/firmware/radeon/CEDAR_rlc.bin b/packages/linux/firmware/radeon/CEDAR_rlc.bin index 1358c7a183..674e580d3c 100644 Binary files a/packages/linux/firmware/radeon/CEDAR_rlc.bin and b/packages/linux/firmware/radeon/CEDAR_rlc.bin differ diff --git a/packages/linux/firmware/radeon/CEDAR_smc.bin b/packages/linux/firmware/radeon/CEDAR_smc.bin new file mode 100644 index 0000000000..1ad1f4e7fa Binary files /dev/null and b/packages/linux/firmware/radeon/CEDAR_smc.bin differ diff --git a/packages/linux/firmware/radeon/CYPRESS_rlc.bin b/packages/linux/firmware/radeon/CYPRESS_rlc.bin index 1358c7a183..674e580d3c 100644 Binary files a/packages/linux/firmware/radeon/CYPRESS_rlc.bin and b/packages/linux/firmware/radeon/CYPRESS_rlc.bin differ diff --git a/packages/linux/firmware/radeon/CYPRESS_smc.bin b/packages/linux/firmware/radeon/CYPRESS_smc.bin new file mode 100644 index 0000000000..69376fa5b4 Binary files /dev/null and b/packages/linux/firmware/radeon/CYPRESS_smc.bin differ diff --git a/packages/linux/firmware/radeon/CYPRESS_uvd.bin b/packages/linux/firmware/radeon/CYPRESS_uvd.bin new file mode 100644 index 0000000000..570b652abb Binary files /dev/null and b/packages/linux/firmware/radeon/CYPRESS_uvd.bin differ diff --git a/packages/linux/firmware/radeon/HAINAN_ce.bin b/packages/linux/firmware/radeon/HAINAN_ce.bin new file mode 100644 index 0000000000..497e13213f Binary files /dev/null and b/packages/linux/firmware/radeon/HAINAN_ce.bin differ diff --git a/packages/linux/firmware/radeon/HAINAN_mc.bin b/packages/linux/firmware/radeon/HAINAN_mc.bin new file mode 100644 index 0000000000..a7b80c3d74 Binary files /dev/null and b/packages/linux/firmware/radeon/HAINAN_mc.bin differ diff --git a/packages/linux/firmware/radeon/HAINAN_me.bin b/packages/linux/firmware/radeon/HAINAN_me.bin new file mode 100644 index 0000000000..6dc895ba2e Binary files /dev/null and b/packages/linux/firmware/radeon/HAINAN_me.bin differ diff --git a/packages/linux/firmware/radeon/HAINAN_pfp.bin b/packages/linux/firmware/radeon/HAINAN_pfp.bin new file mode 100644 index 0000000000..1918d64afe Binary files /dev/null and b/packages/linux/firmware/radeon/HAINAN_pfp.bin differ diff --git a/packages/linux/firmware/radeon/HAINAN_rlc.bin b/packages/linux/firmware/radeon/HAINAN_rlc.bin new file mode 100644 index 0000000000..df07678f6e Binary files /dev/null and b/packages/linux/firmware/radeon/HAINAN_rlc.bin differ diff --git a/packages/linux/firmware/radeon/HAINAN_smc.bin b/packages/linux/firmware/radeon/HAINAN_smc.bin new file mode 100644 index 0000000000..6bf5b369c8 Binary files /dev/null and b/packages/linux/firmware/radeon/HAINAN_smc.bin differ diff --git a/packages/linux/firmware/radeon/JUNIPER_rlc.bin b/packages/linux/firmware/radeon/JUNIPER_rlc.bin index 1358c7a183..674e580d3c 100644 Binary files a/packages/linux/firmware/radeon/JUNIPER_rlc.bin and b/packages/linux/firmware/radeon/JUNIPER_rlc.bin differ diff --git a/packages/linux/firmware/radeon/JUNIPER_smc.bin b/packages/linux/firmware/radeon/JUNIPER_smc.bin new file mode 100644 index 0000000000..7c2c06acb2 Binary files /dev/null and b/packages/linux/firmware/radeon/JUNIPER_smc.bin differ diff --git a/packages/linux/firmware/radeon/KABINI_ce.bin b/packages/linux/firmware/radeon/KABINI_ce.bin new file mode 100644 index 0000000000..7d40fbf14c Binary files /dev/null and b/packages/linux/firmware/radeon/KABINI_ce.bin differ diff --git a/packages/linux/firmware/radeon/KABINI_me.bin b/packages/linux/firmware/radeon/KABINI_me.bin new file mode 100644 index 0000000000..d1da075691 Binary files /dev/null and b/packages/linux/firmware/radeon/KABINI_me.bin differ diff --git a/packages/linux/firmware/radeon/KABINI_mec.bin b/packages/linux/firmware/radeon/KABINI_mec.bin new file mode 100644 index 0000000000..719e457b27 Binary files /dev/null and b/packages/linux/firmware/radeon/KABINI_mec.bin differ diff --git a/packages/linux/firmware/radeon/KABINI_pfp.bin b/packages/linux/firmware/radeon/KABINI_pfp.bin new file mode 100644 index 0000000000..6efa1382f1 Binary files /dev/null and b/packages/linux/firmware/radeon/KABINI_pfp.bin differ diff --git a/packages/linux/firmware/radeon/KABINI_rlc.bin b/packages/linux/firmware/radeon/KABINI_rlc.bin new file mode 100644 index 0000000000..b0cb2bdf20 Binary files /dev/null and b/packages/linux/firmware/radeon/KABINI_rlc.bin differ diff --git a/packages/linux/firmware/radeon/KABINI_sdma.bin b/packages/linux/firmware/radeon/KABINI_sdma.bin new file mode 100644 index 0000000000..4766a2a96b Binary files /dev/null and b/packages/linux/firmware/radeon/KABINI_sdma.bin differ diff --git a/packages/linux/firmware/radeon/LICENSE.radeon_rlc b/packages/linux/firmware/radeon/LICENSE.radeon similarity index 97% rename from packages/linux/firmware/radeon/LICENSE.radeon_rlc rename to packages/linux/firmware/radeon/LICENSE.radeon index 4ece3404c9..0d1894f8a8 100644 --- a/packages/linux/firmware/radeon/LICENSE.radeon_rlc +++ b/packages/linux/firmware/radeon/LICENSE.radeon @@ -1,4 +1,4 @@ -Copyright (C) 2009, 2010 Advanced Micro Devices, Inc. All rights reserved. +Copyright (C) 2009-2013 Advanced Micro Devices, Inc. All rights reserved. REDISTRIBUTION: Permission is hereby granted, free of any license fees, to any person obtaining a copy of this microcode (the "Software"), to diff --git a/packages/linux/firmware/radeon/OLAND_ce.bin b/packages/linux/firmware/radeon/OLAND_ce.bin new file mode 100644 index 0000000000..497e13213f Binary files /dev/null and b/packages/linux/firmware/radeon/OLAND_ce.bin differ diff --git a/packages/linux/firmware/radeon/OLAND_mc.bin b/packages/linux/firmware/radeon/OLAND_mc.bin new file mode 100644 index 0000000000..a7b80c3d74 Binary files /dev/null and b/packages/linux/firmware/radeon/OLAND_mc.bin differ diff --git a/packages/linux/firmware/radeon/OLAND_me.bin b/packages/linux/firmware/radeon/OLAND_me.bin new file mode 100644 index 0000000000..6dc895ba2e Binary files /dev/null and b/packages/linux/firmware/radeon/OLAND_me.bin differ diff --git a/packages/linux/firmware/radeon/OLAND_pfp.bin b/packages/linux/firmware/radeon/OLAND_pfp.bin new file mode 100644 index 0000000000..496a20bace Binary files /dev/null and b/packages/linux/firmware/radeon/OLAND_pfp.bin differ diff --git a/packages/linux/firmware/radeon/OLAND_rlc.bin b/packages/linux/firmware/radeon/OLAND_rlc.bin new file mode 100644 index 0000000000..9e575acc39 Binary files /dev/null and b/packages/linux/firmware/radeon/OLAND_rlc.bin differ diff --git a/packages/linux/firmware/radeon/OLAND_smc.bin b/packages/linux/firmware/radeon/OLAND_smc.bin new file mode 100644 index 0000000000..44c07f9c5d Binary files /dev/null and b/packages/linux/firmware/radeon/OLAND_smc.bin differ diff --git a/packages/linux/firmware/radeon/PITCAIRN_rlc.bin b/packages/linux/firmware/radeon/PITCAIRN_rlc.bin index f4e16a97d5..8070f9a8ff 100644 Binary files a/packages/linux/firmware/radeon/PITCAIRN_rlc.bin and b/packages/linux/firmware/radeon/PITCAIRN_rlc.bin differ diff --git a/packages/linux/firmware/radeon/PITCAIRN_smc.bin b/packages/linux/firmware/radeon/PITCAIRN_smc.bin new file mode 100644 index 0000000000..c918c880af Binary files /dev/null and b/packages/linux/firmware/radeon/PITCAIRN_smc.bin differ diff --git a/packages/linux/firmware/radeon/R700_rlc.bin b/packages/linux/firmware/radeon/R700_rlc.bin index 280568f9ea..bf028ae8ac 100644 Binary files a/packages/linux/firmware/radeon/R700_rlc.bin and b/packages/linux/firmware/radeon/R700_rlc.bin differ diff --git a/packages/linux/firmware/radeon/REDWOOD_rlc.bin b/packages/linux/firmware/radeon/REDWOOD_rlc.bin index 1358c7a183..674e580d3c 100644 Binary files a/packages/linux/firmware/radeon/REDWOOD_rlc.bin and b/packages/linux/firmware/radeon/REDWOOD_rlc.bin differ diff --git a/packages/linux/firmware/radeon/REDWOOD_smc.bin b/packages/linux/firmware/radeon/REDWOOD_smc.bin new file mode 100644 index 0000000000..5c835def29 Binary files /dev/null and b/packages/linux/firmware/radeon/REDWOOD_smc.bin differ diff --git a/packages/linux/firmware/radeon/RV710_smc.bin b/packages/linux/firmware/radeon/RV710_smc.bin new file mode 100644 index 0000000000..5679b82101 Binary files /dev/null and b/packages/linux/firmware/radeon/RV710_smc.bin differ diff --git a/packages/linux/firmware/radeon/RV710_uvd.bin b/packages/linux/firmware/radeon/RV710_uvd.bin new file mode 100644 index 0000000000..93a931c5cb Binary files /dev/null and b/packages/linux/firmware/radeon/RV710_uvd.bin differ diff --git a/packages/linux/firmware/radeon/RV730_smc.bin b/packages/linux/firmware/radeon/RV730_smc.bin new file mode 100644 index 0000000000..4daf985c14 Binary files /dev/null and b/packages/linux/firmware/radeon/RV730_smc.bin differ diff --git a/packages/linux/firmware/radeon/RV740_smc.bin b/packages/linux/firmware/radeon/RV740_smc.bin new file mode 100644 index 0000000000..8f416d981b Binary files /dev/null and b/packages/linux/firmware/radeon/RV740_smc.bin differ diff --git a/packages/linux/firmware/radeon/RV770_smc.bin b/packages/linux/firmware/radeon/RV770_smc.bin new file mode 100644 index 0000000000..50955ca528 Binary files /dev/null and b/packages/linux/firmware/radeon/RV770_smc.bin differ diff --git a/packages/linux/firmware/radeon/SUMO_rlc.bin b/packages/linux/firmware/radeon/SUMO_rlc.bin index a77627319c..61b509fdf1 100644 Binary files a/packages/linux/firmware/radeon/SUMO_rlc.bin and b/packages/linux/firmware/radeon/SUMO_rlc.bin differ diff --git a/packages/linux/firmware/radeon/SUMO_uvd.bin b/packages/linux/firmware/radeon/SUMO_uvd.bin new file mode 100644 index 0000000000..4964c8a251 Binary files /dev/null and b/packages/linux/firmware/radeon/SUMO_uvd.bin differ diff --git a/packages/linux/firmware/radeon/TAHITI_rlc.bin b/packages/linux/firmware/radeon/TAHITI_rlc.bin index d9266920f2..cdb7437160 100644 Binary files a/packages/linux/firmware/radeon/TAHITI_rlc.bin and b/packages/linux/firmware/radeon/TAHITI_rlc.bin differ diff --git a/packages/linux/firmware/radeon/TAHITI_smc.bin b/packages/linux/firmware/radeon/TAHITI_smc.bin new file mode 100644 index 0000000000..a6ef51e71a Binary files /dev/null and b/packages/linux/firmware/radeon/TAHITI_smc.bin differ diff --git a/packages/linux/firmware/radeon/TAHITI_uvd.bin b/packages/linux/firmware/radeon/TAHITI_uvd.bin new file mode 100644 index 0000000000..a2dc9183e4 Binary files /dev/null and b/packages/linux/firmware/radeon/TAHITI_uvd.bin differ diff --git a/packages/linux/firmware/radeon/TURKS_smc.bin b/packages/linux/firmware/radeon/TURKS_smc.bin new file mode 100644 index 0000000000..d644ab63f8 Binary files /dev/null and b/packages/linux/firmware/radeon/TURKS_smc.bin differ diff --git a/packages/linux/firmware/radeon/VERDE_rlc.bin b/packages/linux/firmware/radeon/VERDE_rlc.bin index 6ad5d5b05d..beb17b0a0c 100644 Binary files a/packages/linux/firmware/radeon/VERDE_rlc.bin and b/packages/linux/firmware/radeon/VERDE_rlc.bin differ diff --git a/packages/linux/firmware/radeon/VERDE_smc.bin b/packages/linux/firmware/radeon/VERDE_smc.bin new file mode 100644 index 0000000000..78a154e96c Binary files /dev/null and b/packages/linux/firmware/radeon/VERDE_smc.bin differ diff --git a/packages/linux/meta b/packages/linux/meta index a0cd50163f..dbba7cc3d7 100644 --- a/packages/linux/meta +++ b/packages/linux/meta @@ -34,7 +34,7 @@ case "$LINUX" in PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" ;; *) - PKG_VERSION="3.10.2" + PKG_VERSION="3.10.5" PKG_URL="http://www.kernel.org/pub/linux/kernel/v3.x/$PKG_NAME-$PKG_VERSION.tar.xz" ;; esac diff --git a/packages/linux/patches/3.10.2/linux-999.02-drm-i915-correctly-restore-fences-with-objects-attached.patch b/packages/linux/patches/3.10.2/linux-999.02-drm-i915-correctly-restore-fences-with-objects-attached.patch deleted file mode 100644 index ce2b44dfdc..0000000000 --- a/packages/linux/patches/3.10.2/linux-999.02-drm-i915-correctly-restore-fences-with-objects-attached.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 94a335dba34ff47cad3d6d0c29b452d43a1be3c8 Mon Sep 17 00:00:00 2001 -From: Daniel Vetter -Date: Wed, 17 Jul 2013 12:51:28 +0000 -Subject: drm/i915: correctly restore fences with objects attached - -To avoid stalls we delay tiling changes and especially hold of -committing the new fence state for as long as possible. -Synchronization points are in the execbuf code and in our gtt fault -handler. - -Unfortunately we've missed that tricky detail when adding proper fence -restore code in - -commit 19b2dbde5732170a03bd82cc8bd442cf88d856f7 -Author: Chris Wilson -Date: Wed Jun 12 10:15:12 2013 +0100 - - drm/i915: Restore fences after resume and GPU resets - -The result was that we've restored fences for objects with no tiling, -since the object<->fence link still existed after resume. Now that -wouldn't have been too bad since any subsequent access would have -fixed things up, but if we've changed from tiled to untiled real havoc -happened: - -The tiling stride is stored -1 in the fence register, so a stride of 0 -resulted in all 1s in the top 32bits, and so a completely bogus fence -spanning everything from the start of the object to the top of the -GTT. The tell-tale in the register dumps looks like: - - FENCE START 2: 0x0214d001 - FENCE END 2: 0xfffff3ff - -Bit 11 isn't set since the hw doesn't store it, even when writing all -1s (at least on my snb here). - -To prevent such a gaffle in the future add a sanity check for fences -with an untiled object attached in i915_gem_write_fence. - -v2: Fix the WARN, spotted by Chris. - -v3: Trying to reuse get_fences looked ugly and obfuscated the code. -Instead reuse update_fence and to make it really dtrt also move the -fence dirty state clearing into update_fence. - -Cc: Chris Wilson -Cc: Stéphane Marchesin -Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=60530 -Cc: stable@vger.kernel.org (for 3.10 only) -Reviewed-by: Chris Wilson -Tested-by: Matthew Garrett -Tested-by: Björn Bidar -Signed-off-by: Daniel Vetter ---- -diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c -index 97afd26..d9e2208 100644 ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -2258,7 +2258,17 @@ void i915_gem_restore_fences(struct drm_device *dev) - - for (i = 0; i < dev_priv->num_fence_regs; i++) { - struct drm_i915_fence_reg *reg = &dev_priv->fence_regs[i]; -- i915_gem_write_fence(dev, i, reg->obj); -+ -+ /* -+ * Commit delayed tiling changes if we have an object still -+ * attached to the fence, otherwise just clear the fence. -+ */ -+ if (reg->obj) { -+ i915_gem_object_update_fence(reg->obj, reg, -+ reg->obj->tiling_mode); -+ } else { -+ i915_gem_write_fence(dev, i, NULL); -+ } - } - } - -@@ -2795,6 +2805,10 @@ static void i915_gem_write_fence(struct drm_device *dev, int reg, - if (i915_gem_object_needs_mb(dev_priv->fence_regs[reg].obj)) - mb(); - -+ WARN(obj && (!obj->stride || !obj->tiling_mode), -+ "bogus fence setup with stride: 0x%x, tiling mode: %i\n", -+ obj->stride, obj->tiling_mode); -+ - switch (INTEL_INFO(dev)->gen) { - case 7: - case 6: -@@ -2836,6 +2850,7 @@ static void i915_gem_object_update_fence(struct drm_i915_gem_object *obj, - fence->obj = NULL; - list_del_init(&fence->lru_list); - } -+ obj->fence_dirty = false; - } - - static int -@@ -2965,7 +2980,6 @@ i915_gem_object_get_fence(struct drm_i915_gem_object *obj) - return 0; - - i915_gem_object_update_fence(obj, reg, enable); -- obj->fence_dirty = false; - - return 0; - } --- -cgit v0.9.0.2-2-gbebe diff --git a/packages/linux/patches/3.10.2/linux-003-no_dev_console.patch b/packages/linux/patches/3.10.5/linux-003-no_dev_console.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-003-no_dev_console.patch rename to packages/linux/patches/3.10.5/linux-003-no_dev_console.patch diff --git a/packages/linux/patches/3.10.2/linux-010-perf_crosscompiling.patch b/packages/linux/patches/3.10.5/linux-010-perf_crosscompiling.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-010-perf_crosscompiling.patch rename to packages/linux/patches/3.10.5/linux-010-perf_crosscompiling.patch diff --git a/packages/linux/patches/3.10.2/linux-052-XBOX_remote_support.patch b/packages/linux/patches/3.10.5/linux-052-XBOX_remote_support.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-052-XBOX_remote_support.patch rename to packages/linux/patches/3.10.5/linux-052-XBOX_remote_support.patch diff --git a/packages/linux/patches/3.10.2/linux-053-spinelplus-remote-0.2.patch b/packages/linux/patches/3.10.5/linux-053-spinelplus-remote-0.2.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-053-spinelplus-remote-0.2.patch rename to packages/linux/patches/3.10.5/linux-053-spinelplus-remote-0.2.patch diff --git a/packages/linux/patches/3.10.2/linux-054-nuvoton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch b/packages/linux/patches/3.10.5/linux-054-nuvoton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-054-nuvoton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch rename to packages/linux/patches/3.10.5/linux-054-nuvoton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch diff --git a/packages/linux/patches/3.10.2/linux-055-add_Formosa_eHome_Infrared_Receiver.patch b/packages/linux/patches/3.10.5/linux-055-add_Formosa_eHome_Infrared_Receiver.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-055-add_Formosa_eHome_Infrared_Receiver.patch rename to packages/linux/patches/3.10.5/linux-055-add_Formosa_eHome_Infrared_Receiver.patch diff --git a/packages/linux/patches/3.10.2/linux-056-add_Adaptec_eHome_Infrared_Receiver.patch b/packages/linux/patches/3.10.5/linux-056-add_Adaptec_eHome_Infrared_Receiver.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-056-add_Adaptec_eHome_Infrared_Receiver.patch rename to packages/linux/patches/3.10.5/linux-056-add_Adaptec_eHome_Infrared_Receiver.patch diff --git a/packages/linux/patches/3.10.2/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch b/packages/linux/patches/3.10.5/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch rename to packages/linux/patches/3.10.5/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch diff --git a/packages/linux/patches/3.10.2/linux-057-add_SMK_Manufacturing_Inc_Infrared_Receiver.patch b/packages/linux/patches/3.10.5/linux-057-add_SMK_Manufacturing_Inc_Infrared_Receiver.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-057-add_SMK_Manufacturing_Inc_Infrared_Receiver.patch rename to packages/linux/patches/3.10.5/linux-057-add_SMK_Manufacturing_Inc_Infrared_Receiver.patch diff --git a/packages/linux/patches/3.10.2/linux-058.01-HID-Sony-upstream_patches.patch b/packages/linux/patches/3.10.5/linux-058.01-HID-Sony-upstream_patches.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-058.01-HID-Sony-upstream_patches.patch rename to packages/linux/patches/3.10.5/linux-058.01-HID-Sony-upstream_patches.patch diff --git a/packages/linux/patches/3.10.2/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch b/packages/linux/patches/3.10.5/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch rename to packages/linux/patches/3.10.5/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch diff --git a/packages/linux/patches/3.10.5/linux-058.06-hid_sony-add_SMK_link.patch b/packages/linux/patches/3.10.5/linux-058.06-hid_sony-add_SMK_link.patch new file mode 100644 index 0000000000..bc92ecf487 --- /dev/null +++ b/packages/linux/patches/3.10.5/linux-058.06-hid_sony-add_SMK_link.patch @@ -0,0 +1,47 @@ +commit 5a601d61d36236a667cc7d170b300d18dd6240c6 +Author: Juan J. Sierralta +Date: Sun Jul 28 09:26:04 2013 +0300 + + Add support for SMK-Link PS3 remote + +diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c +index 396d24d..9eb7129 100644 +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -1686,6 +1686,7 @@ static const struct hid_device_id hid_have_special_driver[] = { + { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) }, ++ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SONY_PS3_BDREMOTE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_BDREMOTE) }, +diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h +index dd0511e..2801df1 100644 +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -734,6 +734,7 @@ + #define USB_VENDOR_ID_SKYCABLE 0x1223 + #define USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER 0x3F07 + ++#define USB_VENDOR_ID_SMK 0x0609 + #define USB_VENDOR_ID_SONY 0x054c + #define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE 0x024b + #define USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE 0x0374 +diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c +index 8f425e2..614f057 100644 +--- a/drivers/hid/hid-sony.c ++++ b/drivers/hid/hid-sony.c +@@ -728,8 +728,12 @@ static const struct hid_device_id sony_devices[] = { + /* Logitech Harmony Adapter for PS3 */ + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_PS3), + .driver_data = PS3REMOTE }, ++ /* SMK-Link Universal Remote Control VP3700 */ ++ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SONY_PS3_BDREMOTE), ++ .driver_data = PS3REMOTE }, + { } + }; ++ + MODULE_DEVICE_TABLE(hid, sony_devices); + + static struct hid_driver sony_driver = { diff --git a/packages/linux/patches/3.10.2/linux-059-remove_some_xpad_pids-0.2.patch b/packages/linux/patches/3.10.5/linux-059-remove_some_xpad_pids-0.2.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-059-remove_some_xpad_pids-0.2.patch rename to packages/linux/patches/3.10.5/linux-059-remove_some_xpad_pids-0.2.patch diff --git a/packages/linux/patches/3.10.2/linux-060-add_AUGUST_DVB-T205.patch b/packages/linux/patches/3.10.5/linux-060-add_AUGUST_DVB-T205.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-060-add_AUGUST_DVB-T205.patch rename to packages/linux/patches/3.10.5/linux-060-add_AUGUST_DVB-T205.patch diff --git a/packages/linux/patches/3.10.2/linux-203-stb0899_enable_low_symbol_rate.patch b/packages/linux/patches/3.10.5/linux-203-stb0899_enable_low_symbol_rate.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-203-stb0899_enable_low_symbol_rate.patch rename to packages/linux/patches/3.10.5/linux-203-stb0899_enable_low_symbol_rate.patch diff --git a/packages/linux/patches/3.10.2/linux-210-dvbsky.patch b/packages/linux/patches/3.10.5/linux-210-dvbsky.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-210-dvbsky.patch rename to packages/linux/patches/3.10.5/linux-210-dvbsky.patch diff --git a/packages/linux/patches/3.10.2/linux-212-mantis_stb0899_faster_lock.patch b/packages/linux/patches/3.10.5/linux-212-mantis_stb0899_faster_lock.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-212-mantis_stb0899_faster_lock.patch rename to packages/linux/patches/3.10.5/linux-212-mantis_stb0899_faster_lock.patch diff --git a/packages/linux/patches/3.10.2/linux-221-ngene-octopus.patch b/packages/linux/patches/3.10.5/linux-221-ngene-octopus.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-221-ngene-octopus.patch rename to packages/linux/patches/3.10.5/linux-221-ngene-octopus.patch diff --git a/packages/linux/patches/3.10.2/linux-222-stb0899_signal_quality.patch b/packages/linux/patches/3.10.5/linux-222-stb0899_signal_quality.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-222-stb0899_signal_quality.patch rename to packages/linux/patches/3.10.5/linux-222-stb0899_signal_quality.patch diff --git a/packages/linux/patches/3.10.2/linux-223-Fix-video-artifacts-with-tt-3600-s2-usb.patch b/packages/linux/patches/3.10.5/linux-223-Fix-video-artifacts-with-tt-3600-s2-usb.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-223-Fix-video-artifacts-with-tt-3600-s2-usb.patch rename to packages/linux/patches/3.10.5/linux-223-Fix-video-artifacts-with-tt-3600-s2-usb.patch diff --git a/packages/linux/patches/3.10.2/linux-700-jmicron_1_0_8_5.patch b/packages/linux/patches/3.10.5/linux-700-jmicron_1_0_8_5.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-700-jmicron_1_0_8_5.patch rename to packages/linux/patches/3.10.5/linux-700-jmicron_1_0_8_5.patch diff --git a/packages/linux/patches/3.10.2/linux-701-linksys_aes2500_brcmfmac.patch b/packages/linux/patches/3.10.5/linux-701-linksys_aes2500_brcmfmac.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-701-linksys_aes2500_brcmfmac.patch rename to packages/linux/patches/3.10.5/linux-701-linksys_aes2500_brcmfmac.patch diff --git a/packages/linux/patches/3.10.2/linux-702-Support-for-cheap-Ralink-3070-WiFi-plug.patch b/packages/linux/patches/3.10.5/linux-702-Support-for-cheap-Ralink-3070-WiFi-plug.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-702-Support-for-cheap-Ralink-3070-WiFi-plug.patch rename to packages/linux/patches/3.10.5/linux-702-Support-for-cheap-Ralink-3070-WiFi-plug.patch diff --git a/packages/linux/patches/3.10.2/linux-703-macmini2012-ethernet.patch b/packages/linux/patches/3.10.5/linux-703-macmini2012-ethernet.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-703-macmini2012-ethernet.patch rename to packages/linux/patches/3.10.5/linux-703-macmini2012-ethernet.patch diff --git a/packages/linux/patches/3.10.2/linux-900-hide_tsc_error.patch b/packages/linux/patches/3.10.5/linux-900-hide_tsc_error.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-900-hide_tsc_error.patch rename to packages/linux/patches/3.10.5/linux-900-hide_tsc_error.patch diff --git a/packages/linux/patches/3.10.2/linux-950-saa716x_PCIe_interface_chipset.patch b/packages/linux/patches/3.10.5/linux-950-saa716x_PCIe_interface_chipset.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-950-saa716x_PCIe_interface_chipset.patch rename to packages/linux/patches/3.10.5/linux-950-saa716x_PCIe_interface_chipset.patch diff --git a/packages/linux/patches/3.10.2/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch b/packages/linux/patches/3.10.5/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch rename to packages/linux/patches/3.10.5/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch diff --git a/packages/linux/patches/3.10.2/linux-995-CX24120-13Z_frontend.patch b/packages/linux/patches/3.10.5/linux-995-CX24120-13Z_frontend.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-995-CX24120-13Z_frontend.patch rename to packages/linux/patches/3.10.5/linux-995-CX24120-13Z_frontend.patch diff --git a/packages/linux/patches/3.10.2/linux-997-disable-rc6-on-sandybridge-gt1.patch b/packages/linux/patches/3.10.5/linux-997-disable-rc6-on-sandybridge-gt1.patch similarity index 100% rename from packages/linux/patches/3.10.2/linux-997-disable-rc6-on-sandybridge-gt1.patch rename to packages/linux/patches/3.10.5/linux-997-disable-rc6-on-sandybridge-gt1.patch diff --git a/packages/linux/patches/3.10.5/linux-998.01-cpufreq-revert-9d3ce4af3be0235d4cf41ea9fd774205a32e58a2.patch b/packages/linux/patches/3.10.5/linux-998.01-cpufreq-revert-9d3ce4af3be0235d4cf41ea9fd774205a32e58a2.patch new file mode 100644 index 0000000000..7ba44dc839 --- /dev/null +++ b/packages/linux/patches/3.10.5/linux-998.01-cpufreq-revert-9d3ce4af3be0235d4cf41ea9fd774205a32e58a2.patch @@ -0,0 +1,84 @@ +This reverts +https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/patch/?id=9d3ce4af3be0235d4cf41ea9fd774205a32e58a2 + +From 9d3ce4af3be0235d4cf41ea9fd774205a32e58a2 Mon Sep 17 00:00:00 2001 +From: Srivatsa S. Bhat +Date: Thu, 11 Jul 2013 22:15:37 +0000 +Subject: cpufreq: Revert commit a66b2e to fix suspend/resume regression + +commit aae760ed21cd690fe8a6db9f3a177ad55d7e12ab upstream. + +commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) +has unfortunately caused several things in the cpufreq subsystem to +break subtly after a suspend/resume cycle. + +The intention of that patch was to retain the file permissions of the +cpufreq related sysfs files across suspend/resume. To achieve that, +the commit completely removed the calls to cpufreq_add_dev() and +__cpufreq_remove_dev() during suspend/resume transitions. But the +problem is that those functions do 2 kinds of things: + 1. Low-level initialization/tear-down that are critical to the + correct functioning of cpufreq-core. + 2. Kobject and sysfs related initialization/teardown. + +Ideally we should have reorganized the code to cleanly separate these +two responsibilities, and skipped only the sysfs related parts during +suspend/resume. Since we skipped the entire callbacks instead (which +also included some CPU and cpufreq-specific critical components), +cpufreq subsystem started behaving erratically after suspend/resume. + +So revert the commit to fix the regression. We'll revisit and address +the original goal of that commit separately, since it involves quite a +bit of careful code reorganization and appears to be non-trivial. + +(While reverting the commit, note that another commit f51e1eb + (cpufreq: Fix cpufreq regression after suspend/resume) already + reverted part of the original set of changes. So revert only the + remaining ones). + +Signed-off-by: Srivatsa S. Bhat +Acked-by: Viresh Kumar +Tested-by: Paul Bolle +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- +diff -Naur linux-3.10.4/drivers/cpufreq/cpufreq.c linux-3.10.4.patch/drivers/cpufreq/cpufreq.c +--- linux-3.10.4/drivers/cpufreq/cpufreq.c 2013-07-29 01:30:49.000000000 +0200 ++++ linux-3.10.4.patch/drivers/cpufreq/cpufreq.c 2013-07-30 08:08:08.016815021 +0200 +@@ -1837,15 +1837,13 @@ + if (dev) { + switch (action) { + case CPU_ONLINE: +- case CPU_ONLINE_FROZEN: + cpufreq_add_dev(dev, NULL); + break; + case CPU_DOWN_PREPARE: +- case CPU_DOWN_PREPARE_FROZEN: ++ case CPU_UP_CANCELED_FROZEN: + __cpufreq_remove_dev(dev, NULL); + break; + case CPU_DOWN_FAILED: +- case CPU_DOWN_FAILED_FROZEN: + cpufreq_add_dev(dev, NULL); + break; + } +diff -Naur linux-3.10.4/drivers/cpufreq/cpufreq_stats.c linux-3.10.4.patch/drivers/cpufreq/cpufreq_stats.c +--- linux-3.10.4/drivers/cpufreq/cpufreq_stats.c 2013-07-29 01:30:49.000000000 +0200 ++++ linux-3.10.4.patch/drivers/cpufreq/cpufreq_stats.c 2013-07-30 08:08:08.016815021 +0200 +@@ -353,11 +353,13 @@ + cpufreq_update_policy(cpu); + break; + case CPU_DOWN_PREPARE: +- case CPU_DOWN_PREPARE_FROZEN: + cpufreq_stats_free_sysfs(cpu); + break; + case CPU_DEAD: +- case CPU_DEAD_FROZEN: ++ cpufreq_stats_free_table(cpu); ++ break; ++ case CPU_UP_CANCELED_FROZEN: ++ cpufreq_stats_free_sysfs(cpu); + cpufreq_stats_free_table(cpu); + break; + } diff --git a/packages/mediacenter/service.openelec.settings/patches.upstream/service.openelec.settings-fixes-0.1.patch b/packages/mediacenter/service.openelec.settings/patches.upstream/service.openelec.settings-fixes-0.1.patch new file mode 100644 index 0000000000..bc4039aaaa --- /dev/null +++ b/packages/mediacenter/service.openelec.settings/patches.upstream/service.openelec.settings-fixes-0.1.patch @@ -0,0 +1,2431 @@ +From 2a119229b70a1826c52482a00cc2dff38571e6f7 Mon Sep 17 00:00:00 2001 +From: lfiebach +Date: Sun, 28 Jul 2013 15:38:33 +0200 +Subject: [PATCH 1/3] Fix Update Notification + +--- + resources/lib/modules/system.py | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/resources/lib/modules/system.py b/resources/lib/modules/system.py +index de474d4..35ebfdf 100755 +--- a/resources/lib/modules/system.py ++++ b/resources/lib/modules/system.py +@@ -354,7 +354,12 @@ def load_values(self): + if not value is None: + self.config['update']['settings']['AutoUpdate']['value' + ] = value +- ++ ++ value = self.oe.read_setting('system', 'UpdateNotify') ++ if not value is None: ++ self.config['update']['settings']['UpdateNotify' ++ ]['value'] = value ++ + # AutoUpdate = manual by environment var. + if 'UPDATE_SUPPORT' in os.environ: + if os.environ['UPDATE_SUPPORT'] == 'false': +@@ -366,11 +371,6 @@ def load_values(self): + + self.config['update']['settings']['CheckUpdate']['not_supported' + ] = [self.arch] +- +- value = self.oe.read_setting('system', 'UpdateNotify') +- if not value is None: +- self.config['update']['settings']['UpdateNotify' +- ]['value'] = value + + # AutoUpdate File and URL + value = self.oe.read_setting('system', 'update_file') +-- +1.8.1.6 + + +From cc33f3c6a4e9f81b3a6eba9b8b20de5eb742c90a Mon Sep 17 00:00:00 2001 +From: lfiebach +Date: Mon, 29 Jul 2013 21:26:22 +0200 +Subject: [PATCH 2/3] redesign menu build + +--- + addon.xml | 2 +- + changelog.txt | 4 + + oe.py | 4 +- + resources/lib/modules/about.py | 1 + + resources/lib/modules/bluetooth.py | 7 +- + resources/lib/modules/connman.py | 554 +++++++--------------------- + resources/lib/modules/services.py | 128 ++----- + resources/lib/modules/system.py | 299 +++++++-------- + resources/lib/oeWindows.py | 109 +++++- + resources/skins/Default/720p/mainWindow.xml | 8 +- + 10 files changed, 410 insertions(+), 706 deletions(-) + mode change 100644 => 100755 addon.xml + +diff --git a/addon.xml b/addon.xml +old mode 100644 +new mode 100755 +index f395217..c130660 +--- a/addon.xml ++++ b/addon.xml +@@ -1,7 +1,7 @@ + + + + +diff --git a/changelog.txt b/changelog.txt +index c125464..a83a37d 100755 +--- a/changelog.txt ++++ b/changelog.txt +@@ -1,3 +1,7 @@ ++2013-07-29 v0.1.31 ++ (change) menu loader redesign ++ (fix) kill update thread on exit ++ + 2013-07-23 v0.1.30 + (change) use subprocess.Popen to start LCDd + (fix) stop LCDd on driver change +diff --git a/oe.py b/oe.py +index f2b5b2c..2e9f993 100755 +--- a/oe.py ++++ b/oe.py +@@ -114,8 +114,8 @@ def _(code): + return __addon__.getLocalizedString(code) + + def dbg_log(source, text, level=4): +- if os.environ.get('DEBUG', 'no') == 'no': +- return ++ #if os.environ.get('DEBUG', 'no') == 'no': ++ # return + + xbmc.log('## OpenELEC Addon ## ' + source + ' ## ' + text, level) + xbmc.log(traceback.format_exc()) +diff --git a/resources/lib/modules/about.py b/resources/lib/modules/about.py +index fdfee8a..76020b6 100755 +--- a/resources/lib/modules/about.py ++++ b/resources/lib/modules/about.py +@@ -39,6 +39,7 @@ def __init__(self, oeMain): + + oeMain.dbg_log('about::__init__', 'enter_function', 0) + ++ self.enabled = True + self.oe = oeMain + self.controls = {} + +diff --git a/resources/lib/modules/bluetooth.py b/resources/lib/modules/bluetooth.py +index 74c008a..f74416e 100755 +--- a/resources/lib/modules/bluetooth.py ++++ b/resources/lib/modules/bluetooth.py +@@ -46,6 +46,7 @@ class bluetooth: + 'listTyp': 'btlist', + 'InfoText': 704, + }} ++ + bt_daemon = '/usr/lib/bluetooth/bluetoothd' + bluez_init = '/etc/init.d/54_bluez' + +@@ -54,7 +55,8 @@ def __init__(self, oeMain): + try: + + oeMain.dbg_log('bluetooth::__init__', 'enter_function', 0) +- ++ ++ self.enabled = True + self.discovery_time = 30 # Seconds + self.listItems = {} + self.oe = oeMain +@@ -64,6 +66,9 @@ def __init__(self, oeMain): + self.active = False + self.dbusBluezAdapter = None + ++ if not os.path.exists(self.bt_daemon): ++ self.enabled = False ++ + self.oe.dbg_log('bluetooth::__init__', 'exit_function', 0) + except Exception, e: + +diff --git a/resources/lib/modules/connman.py b/resources/lib/modules/connman.py +index b7517e5..63541b3 100755 +--- a/resources/lib/modules/connman.py ++++ b/resources/lib/modules/connman.py +@@ -58,6 +58,7 @@ def __init__(self, mount_id, oeMain): + 'value': '', + 'type': 'multivalue', + 'values': ['cifs', 'nfs'], ++ 'action': 'set_value' + }, + 'mountpoint': { + 'order': 2, +@@ -66,6 +67,7 @@ def __init__(self, mount_id, oeMain): + 'type': 'text', + 'parent': {'entry': 'type', 'value': ['cifs', + 'nfs']}, ++ 'action': 'set_value' + }, + 'server': { + 'order': 3, +@@ -74,6 +76,7 @@ def __init__(self, mount_id, oeMain): + 'type': 'text', + 'parent': {'entry': 'type', 'value': ['cifs', + 'nfs']}, ++ 'action': 'set_value' + }, + 'share': { + 'order': 4, +@@ -82,6 +85,7 @@ def __init__(self, mount_id, oeMain): + 'type': 'text', + 'parent': {'entry': 'type', 'value': ['cifs', + 'nfs']}, ++ 'action': 'set_value' + }, + 'user': { + 'order': 5, +@@ -90,6 +94,7 @@ def __init__(self, mount_id, oeMain): + 'type': 'text', + 'parent': {'entry': 'type', 'value': ['cifs', + 'nfs']}, ++ 'action': 'set_value' + }, + 'pass': { + 'order': 6, +@@ -98,6 +103,7 @@ def __init__(self, mount_id, oeMain): + 'type': 'text', + 'parent': {'entry': 'type', 'value': ['cifs', + 'nfs']}, ++ 'action': 'set_value' + }, + 'options': { + 'order': 7, +@@ -106,6 +112,7 @@ def __init__(self, mount_id, oeMain): + 'type': 'text', + 'parent': {'entry': 'type', 'value': ['cifs', + 'nfs']}, ++ 'action': 'set_value' + }, + }, + }} +@@ -170,45 +177,9 @@ def menu_loader(self, menuItem): + if self.mount_id != 'new_mount': + self.winOeMount.showButton(2, 32141, 'networkMount', + 'delete_mount') +- category = 'mount' +- for entry in sorted(self.struct[category]['settings'], +- key=lambda x: \ +- self.struct[category]['settings' +- ][x]['order']): +- +- dictProperties = { +- 'value': self.struct[category]['settings' +- ][entry]['value'], +- 'typ': self.struct[category]['settings' +- ][entry]['type'], +- 'entry': entry, +- 'category': category, +- 'action': 'set_value', +- } +- +- if 'values' in self.struct[category]['settings'][entry]: +- dictProperties['values'] = \ +- ','.join(self.struct[category]['settings' +- ][entry]['values']) +- +- if not 'parent' in self.struct[category]['settings' +- ][entry]: +- +- self.winOeMount.addConfigItem(self.oe._(self.struct[category]['settings' +- ][entry]['name']), dictProperties, +- self.oe.listObject['list']) +- else: +- +- if self.struct[category]['settings' +- ][self.struct[category]['settings' +- ][entry]['parent']['entry']]['value'] \ +- in self.struct[category]['settings' +- ][entry]['parent']['value']: +- +- self.winOeMount.addConfigItem(self.oe._(self.struct[category]['settings' +- ][entry]['name']), dictProperties, +- self.oe.listObject['list']) + ++ self.winOeMount.build_menu(self.struct) ++ + self.oe.dbg_log('networkMount::menu_loader', 'exit_function' + , 0) + except Exception, e: +@@ -359,6 +330,8 @@ def delete_mount(self): + xbmc.executebuiltin('Notification(Umount Error, ' + + umount + ')') + else: ++ del self.oe.dictModules['connman'].struct['mounts' ++ ]['settings'][self.mount_id] + self.oe.remove_node(self.mount_id) + + self.oe.dbg_log('save_mount::delete_mount', 'exit_function' +@@ -398,6 +371,7 @@ def __init__(self, servicePath, oeMain): + 'value': '', + 'type': 'bool', + 'dbus': 'Boolean', ++ 'action': 'set_value' + }}, + }, + 'IPv4': { +@@ -412,6 +386,7 @@ def __init__(self, servicePath, oeMain): + 'type': 'multivalue', + 'dbus': 'String', + 'values': ['dhcp', 'manual', 'off'], ++ 'action': 'set_value' + }, + 'Address': { + 'order': 2, +@@ -421,6 +396,7 @@ def __init__(self, servicePath, oeMain): + 'dbus': 'String', + 'parent': {'entry': 'Method', + 'value': ['manual']}, ++ 'action': 'set_value' + }, + 'Netmask': { + 'order': 3, +@@ -430,6 +406,7 @@ def __init__(self, servicePath, oeMain): + 'dbus': 'String', + 'parent': {'entry': 'Method', + 'value': ['manual']}, ++ 'action': 'set_value' + }, + 'Gateway': { + 'order': 4, +@@ -439,6 +416,7 @@ def __init__(self, servicePath, oeMain): + 'dbus': 'String', + 'parent': {'entry': 'Method', + 'value': ['manual']}, ++ 'action': 'set_value' + }, + }, + }, +@@ -455,6 +433,7 @@ def __init__(self, servicePath, oeMain): + 'dbus': 'String', + 'values': ['auto', 'manual', '6to4', 'off' + ], ++ 'action': 'set_value' + }, + 'Address': { + 'order': 2, +@@ -464,6 +443,7 @@ def __init__(self, servicePath, oeMain): + 'dbus': 'String', + 'parent': {'entry': 'Method', + 'value': ['manual']}, ++ 'action': 'set_value' + }, + 'PrefixLength': { + 'order': 4, +@@ -473,6 +453,7 @@ def __init__(self, servicePath, oeMain): + 'dbus': 'Byte', + 'parent': {'entry': 'Method', + 'value': ['manual']}, ++ 'action': 'set_value' + }, + 'Gateway': { + 'order': 3, +@@ -482,6 +463,7 @@ def __init__(self, servicePath, oeMain): + 'dbus': 'String', + 'parent': {'entry': 'Method', + 'value': ['manual']}, ++ 'action': 'set_value' + }, + 'Privacy': { + 'order': 5, +@@ -493,6 +475,7 @@ def __init__(self, servicePath, oeMain): + 'value': ['manual']}, + 'values': ['disabled', 'enabled', 'prefered' + ], ++ 'action': 'set_value' + }, + }, + }, +@@ -506,18 +489,21 @@ def __init__(self, servicePath, oeMain): + 'value': '', + 'type': 'ip', + 'dbus': 'String', ++ 'action': 'set_value' + }, '1': { + 'order': 2, + 'name': 32121, + 'value': '', + 'type': 'ip', + 'dbus': 'String', ++ 'action': 'set_value' + }, '2': { + 'order': 3, + 'name': 32122, + 'value': '', + 'type': 'ip', + 'dbus': 'String', ++ 'action': 'set_value' + }}, + }, + 'Timeservers': { +@@ -530,18 +516,21 @@ def __init__(self, servicePath, oeMain): + 'value': '', + 'type': 'text', + 'dbus': 'String', ++ 'action': 'set_value' + }, '1': { + 'order': 2, + 'name': 32125, + 'value': '', + 'type': 'text', + 'dbus': 'String', ++ 'action': 'set_value' + }, '2': { + 'order': 3, + 'name': 32126, + 'value': '', + 'type': 'text', + 'dbus': 'String', ++ 'action': 'set_value' + }}, + }, + 'Domains': { +@@ -554,18 +543,21 @@ def __init__(self, servicePath, oeMain): + 'value': '', + 'type': 'text', + 'dbus': 'String', ++ 'action': 'set_value' + }, '1': { + 'order': 2, + 'name': 32129, + 'value': '', + 'type': 'text', + 'dbus': 'String', ++ 'action': 'set_value' + }, '2': { + 'order': 3, + 'name': 32130, + 'value': '', + 'type': 'text', + 'dbus': 'String', ++ 'action': 'set_value' + }}, + }, + } +@@ -646,16 +638,6 @@ def __init__(self, servicePath, oeMain): + for strEntry in sorted(self.struct, key=lambda x: \ + self.struct[x]['order']): + +- if strEntry == 'Provider': +- if 'Type' in self.service_properties: +- if not self.service_properties['Type'] == 'vpn': +- break +- +- if strEntry != 'Provider': +- if 'Type' in self.service_properties: +- if self.service_properties['Type'] == 'vpn': +- continue +- + dictProperties = { + 'modul': 'connmanNetworkConfig', + 'listTyp': self.oe.listObject['list'], +@@ -738,45 +720,9 @@ def menu_loader(self, menuItem): + self.oe.listObject['list'], + ) + +- category = menuItem.getProperty('category') +- for entry in sorted(self.struct[category]['settings'], +- key=lambda x: \ +- self.struct[category]['settings' +- ][x]['order']): +- +- dictProperties = { +- 'value': self.struct[category]['settings' +- ][entry]['value'], +- 'typ': self.struct[category]['settings' +- ][entry]['type'], +- 'entry': entry, +- 'category': category, +- 'action': 'set_value', +- } +- +- if 'values' in self.struct[category]['settings'][entry]: +- dictProperties['values'] = \ +- ','.join(self.struct[category]['settings' +- ][entry]['values']) +- +- if not 'parent' in self.struct[category]['settings' +- ][entry]: +- +- self.winOeCon.addConfigItem(self.oe._(self.struct[category]['settings' +- ][entry]['name']), dictProperties, +- menuItem.getProperty('listTyp')) +- else: +- +- if self.struct[category]['settings' +- ][self.struct[category]['settings' +- ][entry]['parent']['entry']]['value'] \ +- in self.struct[category]['settings' +- ][entry]['parent']['value']: +- +- self.winOeCon.addConfigItem(self.oe._(self.struct[category]['settings' +- ][entry]['name']), dictProperties, +- menuItem.getProperty('listTyp')) +- ++ self.winOeCon.build_menu(self.struct, ++ fltr=[menuItem.getProperty('category')]) ++ + self.oe.dbg_log('connmanService::menu_loader', + 'exit_function', 0) + except Exception, e: +@@ -1012,7 +958,7 @@ def __init__(self, vpn, oeMain): + 'openvpn']}, + }, + 'Domain': { +- 'order': 27, ++ 'order': 7, + 'name': 32134, + 'value': 'vpn', + 'action': 'set_value', +@@ -1037,8 +983,19 @@ def __init__(self, vpn, oeMain): + 'type': 'text', + 'parent': {'entry': 'Type', 'value': ['pptp']}, + }, ++ ++ 'advanced': { ++ 'order': 8, ++ 'name': 'Show Advanced', ++ 'value': '0', ++ 'action': 'set_value', ++ 'type': 'bool', ++ 'parent': {'entry': 'Type', 'value': ['pptp','openvpn']}, ++ }, ++ ++ + 'PPTP.EchoFailure': { +- 'order': 25, ++ 'order': 9, + 'name': 32162, + 'value': '0', + 'action': 'set_value', +@@ -1047,7 +1004,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'PPTP.EchoInterval': { +- 'order': 26, ++ 'order': 9, + 'name': 32163, + 'value': '0', + 'action': 'set_value', +@@ -1056,7 +1013,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'PPTP.RefuseEAP': { +- 'order': 13, ++ 'order': 9, + 'name': 32151, + 'value': '0', + 'action': 'set_value', +@@ -1065,7 +1022,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'PPTP.RefusePAP': { +- 'order': 14, ++ 'order': 9, + 'name': 32152, + 'value': '0', + 'action': 'set_value', +@@ -1074,7 +1031,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'PPTP.RefuseCHAP': { +- 'order': 15, ++ 'order': 9, + 'name': 32153, + 'value': '0', + 'action': 'set_value', +@@ -1083,7 +1040,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'PPTP.RefuseMSCHAP': { +- 'order': 16, ++ 'order': 9, + 'name': 32154, + 'value': '0', + 'action': 'set_value', +@@ -1092,7 +1049,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'PPTP.RefuseMSCHAP2': { +- 'order': 17, ++ 'order': 9, + 'name': 32155, + 'value': '0', + 'action': 'set_value', +@@ -1101,7 +1058,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'PPTP.NoBSDComp': { +- 'order': 28, ++ 'order': 9, + 'name': 32160, + 'value': '0', + 'action': 'set_value', +@@ -1110,7 +1067,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'PPTP.NoDeflate': { +- 'order': 27, ++ 'order': 9, + 'name': 32164, + 'value': '0', + 'action': 'set_value', +@@ -1119,7 +1076,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'PPTP.RequirMPPE': { +- 'order': 20, ++ 'order': 9, + 'name': 32156, + 'value': '0', + 'action': 'set_value', +@@ -1128,7 +1085,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'PPTP.RequirMPPE40': { +- 'order': 21, ++ 'order': 9, + 'name': 32157, + 'value': '0', + 'action': 'set_value', +@@ -1137,7 +1094,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'PPTP.RequirMPPE128': { +- 'order': 22, ++ 'order': 9, + 'name': 32158, + 'value': '0', + 'action': 'set_value', +@@ -1146,7 +1103,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'PPTP.RequirMPPEStateful': { +- 'order': 23, ++ 'order': 9, + 'name': 32159, + 'value': '0', + 'action': 'set_value', +@@ -1155,7 +1112,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'PPTP.NoVJ': { +- 'order': 24, ++ 'order': 9, + 'name': 32161, + 'value': '0', + 'action': 'set_value', +@@ -1164,7 +1121,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'OpenVPN.CACert': { +- 'order': 8, ++ 'order': 5, + 'name': 32137, + 'value': '', + 'action': 'set_value', +@@ -1173,7 +1130,7 @@ def __init__(self, vpn, oeMain): + ]}, + }, + 'OpenVPN.Cert': { +- 'order': 8, ++ 'order': 5, + 'name': 32138, + 'value': '', + 'action': 'set_value', +@@ -1182,7 +1139,7 @@ def __init__(self, vpn, oeMain): + ]}, + }, + 'OpenVPN.Key': { +- 'order': 8, ++ 'order': 5, + 'name': 32139, + 'value': '', + 'action': 'set_value', +@@ -1191,7 +1148,7 @@ def __init__(self, vpn, oeMain): + ]}, + }, + 'OpenVPN.MTU': { +- 'order': 11, ++ 'order': 9, + 'name': 32165, + 'value': '', + 'action': 'set_value', +@@ -1201,7 +1158,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'OpenVPN.NSCertType': { +- 'order': 12, ++ 'order': 9, + 'name': 32166, + 'value': '', + 'action': 'set_value', +@@ -1211,7 +1168,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'OpenVPN.Proto': { +- 'order': 13, ++ 'order': 9, + 'name': 32167, + 'value': '', + 'action': 'set_value', +@@ -1221,7 +1178,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'OpenVPN.Port': { +- 'order': 6, ++ 'order': 9, + 'name': 32168, + 'value': '', + 'action': 'set_value', +@@ -1231,7 +1188,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'OpenVPN.AuthUserPass': { +- 'order': 5, ++ 'order': 9, + 'name': 32169, + 'value': '', + 'action': 'set_value', +@@ -1241,7 +1198,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'OpenVPN.AskPass': { +- 'order': 16, ++ 'order': 9, + 'name': 32170, + 'value': '0', + 'action': 'set_value', +@@ -1251,7 +1208,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'OpenVPN.AuthNoCache': { +- 'order': 17, ++ 'order': 9, + 'name': 32171, + 'value': '0', + 'action': 'set_value', +@@ -1261,7 +1218,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'OpenVPN.TLSRemote': { +- 'order': 18, ++ 'order': 9, + 'name': 32172, + 'value': '0', + 'action': 'set_value', +@@ -1271,7 +1228,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'OpenVPN.TLSAuth': { +- 'order': 19, ++ 'order': 9, + 'name': 32173, + 'value': '0', + 'action': 'set_value', +@@ -1281,7 +1238,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'OpenVPN.TLSAuthDir': { +- 'order': 20, ++ 'order': 9, + 'name': 32174, + 'value': '', + 'action': 'set_value', +@@ -1291,7 +1248,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'OpenVPN.Auth': { +- 'order': 4, ++ 'order': 9, + 'name': 32175, + 'value': '', + 'action': 'set_value', +@@ -1301,7 +1258,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'OpenVPN.CompLZO': { +- 'order': 22, ++ 'order': 9, + 'name': 32176, + 'value': '0', + 'action': 'set_value', +@@ -1311,7 +1268,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'OpenVPN.RemoteCertTls': { +- 'order': 23, ++ 'order': 9, + 'name': 32177, + 'value': '0', + 'action': 'set_value', +@@ -1321,7 +1278,7 @@ def __init__(self, vpn, oeMain): + 'optional': '', + }, + 'OpenVPN.ConfigFile': { +- 'order': 7, ++ 'order': 9, + 'name': 32178, + 'value': '', + 'action': 'set_value', +@@ -1414,108 +1371,9 @@ def menu_loader(self, menuItem): + self.winOeCon.showButton(1, 32141, 'connmanVpnConfig', + 'delete_vpn_config') + +- category = menuItem.getProperty('category') +- for entry in sorted(self.struct[category]['settings'], +- key=lambda x: \ +- self.struct[category]['settings' +- ][x]['order']): +- +- if 'optional' in self.struct[category]['settings' +- ][entry]: +- continue +- +- dictProperties = { +- 'value': self.struct[category]['settings' +- ][entry]['value'], +- 'typ': self.struct[category]['settings' +- ][entry]['type'], +- 'entry': entry, +- 'category': category, +- 'action': 'set_value', +- } +- +- if 'values' in self.struct[category]['settings'][entry]: +- dictProperties['values'] = \ +- ','.join(self.struct[category]['settings' +- ][entry]['values']) +- +- if not 'parent' in self.struct[category]['settings' +- ][entry]: +- +- self.winOeCon.addConfigItem(self.oe._(self.struct[category]['settings' +- ][entry]['name']), dictProperties, +- menuItem.getProperty('listTyp')) +- else: +- +- if self.struct[category]['settings' +- ][self.struct[category]['settings' +- ][entry]['parent']['entry']]['value'] \ +- in self.struct[category]['settings' +- ][entry]['parent']['value']: +- +- self.winOeCon.addConfigItem(self.oe._(self.struct[category]['settings' +- ][entry]['name']), dictProperties, +- menuItem.getProperty('listTyp')) +- +- if self.struct[category]['settings']['Type']['value'] != '': +- +- self.winOeCon.addConfigItem('Advanced', +- {'typ': 'separator'}, +- menuItem.getProperty('listTyp')) +- +- dictProperties = {'value': self.show_advanced_entrys, +- 'typ': 'bool', +- 'action': 'show_advanced'} +- +- self.winOeCon.addConfigItem('Show Advanced', +- dictProperties, menuItem.getProperty('listTyp')) +- +- if self.show_advanced_entrys == '1': +- +- for entry in sorted(self.struct[category]['settings' +- ], key=lambda x: \ +- self.struct[category]['settings'][x]['order' +- ]): +- +- if not 'optional' \ +- in self.struct[category]['settings'][entry]: +- continue +- +- dictProperties = { +- 'value': self.struct[category]['settings' +- ][entry]['value'], +- 'typ': self.struct[category]['settings' +- ][entry]['type'], +- 'entry': entry, +- 'category': category, +- 'action': 'set_value', +- } +- +- if 'values' in self.struct[category]['settings' +- ][entry]: +- dictProperties['values'] = \ +- ','.join(self.struct[category]['settings' +- ][entry]['values']) +- +- if not 'parent' \ +- in self.struct[category]['settings'][entry]: +- +- self.winOeCon.addConfigItem(self.oe._(self.struct[category]['settings' +- ][entry]['name']), dictProperties, +- menuItem.getProperty('listTyp')) +- else: +- +- if self.struct[category]['settings' +- ][self.struct[category]['settings' +- ][entry]['parent']['entry']]['value' +- ] \ +- in self.struct[category]['settings' +- ][entry]['parent']['value']: +- +- self.winOeCon.addConfigItem(self.oe._(self.struct[category]['settings' +- ][entry]['name']), +- dictProperties, +- menuItem.getProperty('listTyp')) ++ self.winOeCon.build_menu(self.struct, ++ fltr=[menuItem.getProperty('category')], ++ optional=self.struct['Provider']['settings']['advanced']['value']) + + self.oe.dbg_log('connmanVpn::menu_loader', 'exit_function', + 0) +@@ -1693,6 +1551,7 @@ def __init__(self, oeMain): + + self.struct = { + '/net/connman/technology/wifi': { ++ 'hidden': 'true', + 'order': 1, + 'name': 32102, + 'dbus': 'Dictionary', +@@ -1742,8 +1601,9 @@ def __init__(self, oeMain): + 'InfoText': 729, + }, + }, +- }, ++ 'order': 0}, + '/net/connman/technology/ethernet': { ++ 'hidden': 'true', + 'order': 2, + 'name': 32103, + 'dbus': 'Dictionary', +@@ -1755,7 +1615,8 @@ def __init__(self, oeMain): + 'type': 'bool', + 'dbus': 'Boolean', + 'InfoText': 730, +- }}, ++ }}, ++ 'order': 1 + }, + 'vpn': { + 'order': 3, +@@ -1763,11 +1624,13 @@ def __init__(self, oeMain): + 'dbus': 'Dictionary', + 'settings': {'add': { + 'order': 1, ++ 'value': '', + 'name': 32322, + 'action': 'add_vpn', + 'type': 'button', + 'InfoText': 731, + }}, ++ 'order': 2 + }, + 'Timeservers': { + 'order': 4, +@@ -1801,16 +1664,18 @@ def __init__(self, oeMain): + 'validate': '^([a-zA-Z0-9](?:[a-zA-Z0-9-\.]*[a-zA-Z0-9]))$', + 'InfoText': 734, + }}, ++ 'order': 2 + }, + 'mounts': {'order': 5, 'name': 32348, + 'settings': {'add': { + 'order': 1, + 'name': 32349, +- 'value': '', ++ 'value': 'new_mount', + 'action': 'edit_mount', + 'type': 'button', + 'InfoText': 735, +- }}}, ++ }}, 'order': 3 ++ }, + 'advanced': {'order': 6, 'name': 32368, + 'settings': {'wait_for_network': { + 'order': 1, +@@ -1828,15 +1693,24 @@ def __init__(self, oeMain): + 'parent': {'entry': 'wait_for_network', + 'value': ['1']}, + 'InfoText': 737, +- }}}, ++ }}, 'order': 4 ++ }, + } + + self.busy = 0 + self.oe = oeMain ++ self.enabled = True ++ self.connman_daemon = "/usr/sbin/connmand" + + self.wait_conf_file = \ + '%s/openelec/network_wait' % self.oe.CONFIG_CACHE + ++ self.vpn_plugins_dir = \ ++ '/usr/lib/connman/plugins-vpn' ++ ++ if not os.path.exists(self.connman_daemon): ++ self.enabled = False ++ + self.oe.dbg_log('connman::__init__', 'exit_function', 0) + self.vpn_conf_dir = '%s/vpn-config/' % self.oe.USER_CONFIG + except Exception, e: +@@ -1882,7 +1756,8 @@ def exit(self): + + self.oe.dbg_log('connman::exit', 'enter_function', 0) + +- self.dbusMonitor.exit() ++ if hasattr(self, 'dbusMonitor'): ++ self.dbusMonitor.exit() + + self.clear_list() + +@@ -1908,7 +1783,10 @@ def load_values(self): + + self.oe.dbg_log('connman::load_values', 'enter_function', 0) + +- ++ # VPN Available ++ if not os.path.exists(self.vpn_plugins_dir): ++ self.struct['vpn']['hidden'] = 'true' ++ + # Network Wait + self.struct['advanced']['settings']['wait_for_network' + ]['value'] = '0' +@@ -2081,197 +1959,47 @@ def menu_loader(self, menuItem=None): + , '/'), 'net.connman.Clock') + self.clock_properties = self.clock.GetProperties() + +- # Wifi and Ethernet ++ self.struct['/net/connman/technology/wifi']['hidden'] = 'true' ++ self.struct['/net/connman/technology/ethernet']['hidden'] = 'true' ++ + for (path, technologie) in self.technologie_properties: +- + if path in self.struct: +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct[path]['name' +- ]), {'typ': 'separator'}, +- menuItem.getProperty('listTyp')) +- +- if path in self.struct: +- for entry in sorted(self.struct[path]['settings'], +- key=lambda x: self.struct[path]['settings' +- ][x]['order']): +- if entry in technologie: +- if not 'changed' \ +- in self.struct[path]['settings'][entry]: +- self.struct[path]['settings' +- ][entry]['value'] = \ +- unicode(technologie[entry]) +- +- dictProperties = { +- 'value': self.struct[path]['settings' +- ][entry]['value'], +- 'typ': self.struct[path]['settings' +- ][entry]['type'], +- 'entry': entry, +- 'category': path, +- 'action': self.struct[path]['settings' +- ][entry]['action'], +- } +- +- if 'InfoText' in self.struct[path]['settings' +- ][entry]: +- dictProperties['InfoText'] = \ +- self.oe._(self.struct[path]['settings' +- ][entry]['InfoText']) +- +- if 'validate' in self.struct[path]['settings' +- ][entry]: +- dictProperties['validate'] = \ +- self.struct[path]['settings' +- ][entry]['validate'] +- +- if 'values' in self.struct[path]['settings' +- ][entry]: +- dictProperties['values'] = \ +- ','.join(self.struct[path]['settings' +- ][entry]['values']) +- +- if not 'parent' in self.struct[path]['settings' +- ][entry]: +- +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct[path]['settings' +- ][entry]['name']), dictProperties, +- menuItem.getProperty('listTyp')) +- else: +- +- if self.struct[path]['settings' +- ][self.struct[path]['settings' +- ][entry]['parent']['entry']]['value' +- ] in self.struct[path]['settings' +- ][entry]['parent']['value']: +- +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct[path]['settings' +- ][entry]['name']), +- dictProperties, +- menuItem.getProperty('listTyp')) +- +- # Virtual Private Network +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct['vpn' +- ]['name']), {'typ': 'separator'}, +- menuItem.getProperty('listTyp')) +- +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct['vpn' +- ]['settings']['add']['name']), {'typ': 'button', +- 'action': self.struct['vpn']['settings']['add' +- ]['action'], 'InfoText': self.oe._(self.struct['vpn' +- ]['settings']['add']['InfoText'])}, +- menuItem.getProperty('listTyp')) +- +- # Timeservers +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct['Timeservers' +- ]['name']), {'typ': 'separator'}, +- menuItem.getProperty('listTyp')) +- +- if 'Timeservers' in self.clock_properties: +- for setting in sorted(self.struct['Timeservers' +- ]['settings']): +- if int(setting) \ +- < len(self.clock_properties['Timeservers']): +- if not 'changed' in self.struct['Timeservers' +- ]['settings'][setting]: +- self.struct['Timeservers']['settings' +- ][setting]['value'] = \ +- self.clock_properties['Timeservers' +- ][int(setting)] +- +- dictProperties = { +- 'value': self.struct['Timeservers']['settings' +- ][unicode(setting)]['value'], +- 'typ': self.struct['Timeservers']['settings' +- ][unicode(setting)]['type'], +- 'entry': unicode(setting), +- 'category': 'Timeservers', +- 'action': self.struct['Timeservers']['settings' +- ][unicode(setting)]['action'], +- } +- +- if 'InfoText' in self.struct['Timeservers' +- ]['settings'][setting]: +- dictProperties['InfoText'] = \ +- self.oe._(self.struct['Timeservers' +- ]['settings'][setting]['InfoText']) +- +- if 'validate' in self.struct['Timeservers' +- ]['settings'][unicode(setting)]: +- dictProperties['validate'] = \ +- self.struct['Timeservers']['settings' +- ][unicode(setting)]['validate'] +- +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct['Timeservers' +- ]['settings'][unicode(setting)]['name']), +- dictProperties, +- menuItem.getProperty('listTyp')) +- +- # Mounts +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct['mounts' +- ]['name']), {'typ': 'separator'}, +- menuItem.getProperty('listTyp')) +- +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct['mounts' +- ]['settings']['add']['name']), { +- 'typ': self.struct['mounts']['settings']['add']['type' +- ], +- 'action': self.struct['mounts']['settings']['add' +- ]['action'], +- 'entry': 'new_mount', +- 'InfoText': self.oe._(self.struct['mounts']['settings' +- ]['add']['InfoText']), +- }, menuItem.getProperty('listTyp')) +- ++ if 'hidden' in self.struct[path]: ++ del self.struct[path]['hidden'] ++ ++ for entry in self.struct[path]['settings']: ++ if entry in technologie: ++ self.struct[path]['settings' ++ ][entry]['value'] = \ ++ unicode(technologie[entry]) ++ ++ for setting in self.struct['Timeservers']['settings']: ++ if 'Timeservers' in self.clock_properties: ++ if int(setting) < len(self.clock_properties['Timeservers']): ++ self.struct['Timeservers']['settings' ++ ][setting]['value'] = \ ++ self.clock_properties['Timeservers' ++ ][int(setting)] ++ else: ++ self.struct['Timeservers']['settings' ++ ][setting]['value'] = '' ++ + mount_dict = self.oe.read_node('mounts') + if 'mounts' in mount_dict: + for mount in mount_dict['mounts']: +- +- dictProperties = { +- 'typ': 'button', +- 'entry': mount, +- 'category': 'mounts', ++ tmp_mount = { ++ 'type': 'button', ++ 'name': mount_dict['mounts'][mount]['mountpoint'], ++ 'value': mount, + 'action': 'edit_mount', ++ 'dynamic': 'true', ++ 'order': 1 + } +- +- self.oe.winOeMain.addConfigItem(mount_dict['mounts' +- ][mount]['mountpoint'], dictProperties, +- menuItem.getProperty('listTyp')) +- +- # Network Wait +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct['advanced' +- ]['name']), {'typ': 'separator'}, +- menuItem.getProperty('listTyp')) +- +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct['advanced' +- ]['settings']['wait_for_network']['name']), { +- 'entry': 'wait_for_network', +- 'category': 'advanced', +- 'typ': self.struct['advanced']['settings' +- ]['wait_for_network']['type'], +- 'action': self.struct['advanced']['settings' +- ]['wait_for_network']['action'], +- 'value': self.struct['advanced']['settings' +- ]['wait_for_network']['value'], +- 'InfoText': self.oe._(self.struct['advanced']['settings' +- ]['wait_for_network']['InfoText']), +- }, menuItem.getProperty('listTyp')) +- +- if self.struct['advanced']['settings']['wait_for_network' +- ]['value'] in self.struct['advanced']['settings' +- ]['wait_for_network_time']['parent']['value']: +- +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct['advanced' +- ]['settings']['wait_for_network_time']['name' +- ]), { +- 'entry': 'wait_for_network_time', +- 'category': 'advanced', +- 'typ': self.struct['advanced']['settings' +- ]['wait_for_network_time']['type'], +- 'action': self.struct['advanced']['settings' +- ]['wait_for_network_time']['action'], +- 'value': self.struct['advanced']['settings' +- ]['wait_for_network_time']['value'], +- }, menuItem.getProperty('listTyp')) +- ++ self.struct['mounts']['settings' ++ ][mount] = tmp_mount ++ ++ self.oe.winOeMain.build_menu(self.struct) ++ + self.oe.set_busy(0) + self.oe.dbg_log('connman::menu_loader', 'exit_function', 0) + except Exception, e: +@@ -2750,7 +2478,7 @@ def edit_mount(self, listItem=None): + self.oe.dbg_log('connman::add_mount', 'enter_function', 0) + + self.configureMount = \ +- networkMount(listItem.getProperty('entry'), self.oe) ++ networkMount(listItem.getProperty('value'), self.oe) + del self.configureMount + + self.oe.dbg_log('connman::add_mount', 'enter_function', 0) +diff --git a/resources/lib/modules/services.py b/resources/lib/modules/services.py +index 4a0456d..8cd68dd 100755 +--- a/resources/lib/modules/services.py ++++ b/resources/lib/modules/services.py +@@ -55,7 +55,7 @@ def __init__(self, oeMain): + 'name': 32204, + 'value': '1', + 'action': 'initialize_samba', +- 'typ': 'bool', ++ 'type': 'bool', + 'InfoText': 738, + }, + 'samba_secure': { +@@ -63,7 +63,7 @@ def __init__(self, oeMain): + 'name': 32202, + 'value': '0', + 'action': 'initialize_samba', +- 'typ': 'bool', ++ 'type': 'bool', + 'parent': {'entry': 'samba_autostart', + 'value': ['1']}, + 'InfoText': 739, +@@ -73,7 +73,7 @@ def __init__(self, oeMain): + 'name': 32106, + 'value': 'openelec', + 'action': 'initialize_samba', +- 'typ': 'text', ++ 'type': 'text', + 'parent': {'entry': 'samba_secure', + 'value': ['1']}, + 'InfoText': 740, +@@ -83,7 +83,7 @@ def __init__(self, oeMain): + 'name': 32107, + 'value': 'openelec', + 'action': 'initialize_samba', +- 'typ': 'text', ++ 'type': 'text', + 'parent': {'entry': 'samba_secure', + 'value': ['1']}, + 'InfoText': 741, +@@ -99,14 +99,14 @@ def __init__(self, oeMain): + 'name': 32205, + 'value': '0', + 'action': 'initialize_ssh', +- 'typ': 'bool', ++ 'type': 'bool', + 'InfoText': 742, + }, 'ssh_unsecure': { + 'order': 2, + 'name': 32203, + 'value': '0', + 'action': 'initialize_ssh', +- 'typ': 'bool', ++ 'type': 'bool', + 'parent': {'entry': 'ssh_autostart', + 'value': ['1']}, + 'InfoText': 743, +@@ -121,7 +121,7 @@ def __init__(self, oeMain): + 'name': 32206, + 'value': '1', + 'action': 'initialize_avahi', +- 'typ': 'bool', ++ 'type': 'bool', + 'InfoText': 744, + }}, + }, +@@ -134,7 +134,7 @@ def __init__(self, oeMain): + 'name': 32320, + 'value': '0', + 'action': 'initialize_cron', +- 'typ': 'bool', ++ 'type': 'bool', + 'InfoText': 745, + }}, + }, +@@ -147,14 +147,14 @@ def __init__(self, oeMain): + 'name': 32341, + 'value': '0', + 'action': 'initialize_syslog', +- 'typ': 'bool', ++ 'type': 'bool', + 'InfoText': 746, + }, 'remote_syslog_ip': { + 'order': 2, + 'name': 32342, + 'value': '0', + 'action': 'initialize_syslog', +- 'typ': 'ip', ++ 'type': 'ip', + 'parent': {'entry': 'remote_syslog_autostart', + 'value': ['1']}, + 'InfoText': 747, +@@ -169,12 +169,14 @@ def __init__(self, oeMain): + 'name': 32344, + 'value': '0', + 'action': 'init_bluetooth', +- 'typ': 'bool', ++ 'type': 'bool', + 'InfoText': 720, + }}, + }, + } + ++ self.enabled = True ++ + self.oe = oeMain + + self.kernel_cmd = '/proc/cmdline' +@@ -262,73 +264,8 @@ def load_menu(self, focusItem): + + self.oe.dbg_log('services::load_menu', 'enter_function', 0) + +- for category in sorted(self.struct, key=lambda x: \ +- self.struct[x]['order']): +- if 'not_supported' in self.struct[category]: +- if self.arch \ +- in self.struct[category]['not_supported'] \ +- or not hasattr(self, category): +- continue +- +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct[category]['name' +- ]), {'typ': 'separator'}, +- focusItem.getProperty('listTyp')) +- +- for setting in sorted(self.struct[category]['settings' +- ], key=lambda x: \ +- self.struct[category]['settings'][x]['order']): +- +- if 'not_supported' in self.struct[category]['settings'][setting]: +- +- #skip setting +- self.oe.dbg_log('services::load_menu', 'skip setting ' + setting, 0) +- +- else: +- +- dictProperties = { +- 'entry': setting, +- 'category': category, +- 'action': self.struct[category]['settings' +- ][setting]['action'], +- 'value': self.struct[category]['settings' +- ][setting]['value'], +- 'typ': self.struct[category]['settings' +- ][setting]['typ'], +- } +- +- if 'InfoText' in self.struct[category]['settings' +- ][setting]: +- dictProperties['InfoText'] = \ +- self.oe._(self.struct[category]['settings' +- ][setting]['InfoText']) +- +- if 'values' in self.struct[category]['settings' +- ][setting]: +- if len(self.struct[category]['settings' +- ][setting]['values']) > 0: +- dictProperties['values'] = \ +- ','.join(self.struct[category]['settings' +- ][setting]['values']) +- +- if not 'parent' in self.struct[category]['settings' +- ][setting]: +- +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct[category]['settings' +- ][setting]['name']), dictProperties, +- focusItem.getProperty('listTyp')) +- else: +- +- if self.struct[category]['settings' +- ][self.struct[category]['settings' +- ][setting]['parent']['entry']]['value' +- ] in self.struct[category]['settings' +- ][setting]['parent']['value']: +- +- self.oe.winOeMain.addConfigItem(self.oe._(self.struct[category]['settings' +- ][setting]['name']), +- dictProperties, +- focusItem.getProperty('listTyp')) +- ++ self.oe.winOeMain.build_menu(self.struct) ++ + self.oe.dbg_log('services::load_menu', 'exit_function', 0) + except Exception, e: + +@@ -345,8 +282,6 @@ def load_values(self): + + # SSH + if os.path.isfile(self.ssh_daemon): +- self.ssh = True +- + if os.path.exists(self.ssh_conf_dir + '/' + + self.ssh_conf_file): + ssh_file = open(self.ssh_conf_dir + '/' +@@ -386,37 +321,41 @@ def load_values(self): + cmd_args = cmd_file.read() + if 'ssh' in cmd_args: + self.struct['ssh']['settings']['ssh_autostart'] \ +- ['not_supported'] = True ++ ['hidden'] = 'true' + + cmd_file.close() +- ++ else: ++ self.struct['ssh']['hidden'] = 'true' ++ + if os.path.isfile(self.samba_nmbd) \ + and os.path.isfile(self.samba_smbd): +- self.samba = True + for entry in self.struct['samba']['settings']: + value = self.oe.read_setting('services', entry) + if not value is None: + self.struct['samba']['settings'][entry]['value' + ] = value +- ++ else: ++ self.struct['samba']['hidden'] = 'true' ++ + if os.path.isfile(self.avahi_daemon): +- self.avahi = True + value = self.oe.read_setting('services', + 'avahi_autostart') + if not value is None: + self.struct['avahi']['settings']['avahi_autostart' + ]['value'] = value +- ++ else: ++ self.struct['avahi']['hidden'] = 'true' ++ + if os.path.isfile(self.cron_daemon): +- self.cron = True + value = self.oe.read_setting('services', + 'cron_autostart') + if not value is None: + self.struct['cron']['settings']['cron_autostart' + ]['value'] = value +- ++ else: ++ self.struct['cron']['hidden'] = 'true' ++ + if os.path.isfile(self.syslog_daemon): +- self.syslog = True + value = self.oe.read_setting('services', + 'remote_syslog_autostart') + ip = self.oe.read_setting('services', 'remote_syslog_ip' +@@ -427,15 +366,18 @@ def load_values(self): + value + self.struct['syslog']['settings']['remote_syslog_ip' + ]['value'] = ip +- +- if os.path.isfile(self.bluetooth_daemon): +- self.bt = True ++ else: ++ self.struct['syslog']['hidden'] = 'true' ++ ++ if os.path.isfile(self.bluetooth_daemon): + value = self.oe.read_setting('services', + 'disable_bt') + if not value is None: + self.struct['bt']['settings']['disable_bt' + ]['value'] = value +- ++ else: ++ self.struct['bt']['hidden'] = 'true' ++ + + self.oe.dbg_log('services::load_values', 'exit_function', 0) + except Exception, e: +diff --git a/resources/lib/modules/system.py b/resources/lib/modules/system.py +index 35ebfdf..e1867fb 100755 +--- a/resources/lib/modules/system.py ++++ b/resources/lib/modules/system.py +@@ -60,16 +60,16 @@ def __init__(self, oeMain): + + self.oe = oeMain + +- self.config = { ++ self.struct = { + 'ident': { + 'order': 1, + 'name': 32189, +- 'not_supported': [], + 'settings': {'hostname': { ++ 'order': 1, + 'name': 32190, + 'value': 'OpenELEC', + 'action': 'set_hostname', +- 'typ': 'text', ++ 'type': 'text', + 'validate': '^([a-zA-Z0-9](?:[a-zA-Z0-9-\.]*[a-zA-Z0-9]))$', + 'InfoText': 710, + }}, +@@ -78,126 +78,134 @@ def __init__(self, oeMain): + 'order': 2, + 'name': 32009, + 'settings': {'KeyboardLayout1': { ++ 'order': 1, + 'name': 32010, + 'value': 'us', + 'action': 'set_keyboard_layout', +- 'typ': 'multivalue', ++ 'type': 'multivalue', + 'values': [], + 'InfoText': 711, + }, 'KeyboardLayout2': { ++ 'order': 2, + 'name': 32010, + 'value': 'us', + 'action': 'set_keyboard_layout', +- 'typ': 'multivalue', ++ 'type': 'multivalue', + 'values': [], + 'InfoText': 712, +- 'not_supported': ['RPi.arm'], + }, 'KeyboardType': { ++ 'order': 3, + 'name': 32330, + 'value': 'pc105', + 'action': 'set_keyboard_layout', +- 'typ': 'multivalue', ++ 'type': 'multivalue', + 'values': [], +- 'InfoText': 713, +- 'not_supported': ['RPi.arm'], ++ 'InfoText': 713, + }}, + }, + 'update': { + 'order': 3, + 'name': 32013, +- 'not_supported': [], + 'settings': {'AutoUpdate': { + 'name': 32014, + 'value': 'manual', + 'action': 'set_auto_update', +- 'typ': 'multivalue', ++ 'type': 'multivalue', + 'values': ['manual', 'auto'], + 'InfoText': 714, ++ 'order': 1, + }, 'UpdateNotify': { + 'name': 32365, + 'value': '1', + 'action': 'set_value', +- 'typ': 'bool', ++ 'type': 'bool', + 'InfoText': 715, ++ 'order': 2, + }, 'CheckUpdate': { + 'name': 32362, + 'value': '', + 'action': 'manual_check_update', +- 'typ': 'button', ++ 'type': 'button', + 'InfoText': 716, ++ 'order': 3, + }}, + }, + 'driver': { + 'order': 4, + 'name': 32007, +- 'not_supported': [], + 'settings': {'lcd': { + 'name': 32008, + 'value': 'none', + 'action': 'set_lcd_driver', +- 'typ': 'multivalue', ++ 'type': 'multivalue', + 'values': [], + 'InfoText': 717, ++ 'order': 1, + }}, + }, + 'power': { + 'order': 5, + 'name': 32011, +- 'not_supported': [], + 'settings': {'enable_hdd_standby': { + 'name': 32347, + 'value': '0', + 'action': 'set_hdd_standby', +- 'typ': 'bool', ++ 'type': 'bool', + 'InfoText': 718, ++ 'order': 1, + }, 'hdd_standby': { + 'name': 32012, + 'value': '0', + 'action': 'set_hdd_standby', +- 'typ': 'num', ++ 'type': 'num', + 'parent': {'entry': 'enable_hdd_standby', + 'value': ['1']}, + 'InfoText': 719, ++ 'order': 2, + }}, + }, + 'backup': { + 'order': 7, + 'name': 32371, +- 'not_supported': [], + 'settings': {'backup': { + 'name': 32372, + 'value': '0', + 'action': 'do_backup', +- 'typ': 'button', ++ 'type': 'button', + 'InfoText': 722, ++ 'order': 1, + }, 'restore': { + 'name': 32373, + 'value': '0', + 'action': 'do_restore', +- 'typ': 'button', ++ 'type': 'button', + 'InfoText': 723, ++ 'order': 2, + }}, + }, + 'reset': { + 'order': 8, + 'name': 32323, +- 'not_supported': [], + 'settings': {'xbmc_reset': { + 'name': 32324, + 'value': '0', + 'action': 'reset_xbmc', +- 'typ': 'button', ++ 'type': 'button', + 'InfoText': 724, ++ 'order': 1, + }, 'oe_reset': { + 'name': 32325, + 'value': '0', + 'action': 'reset_oe', +- 'typ': 'button', ++ 'type': 'button', + 'InfoText': 725, ++ 'order': 2, + }}, + }, + } + ++ self.enabled = True ++ + self.kernel_cmd = '/proc/cmdline' + + self.lcd_dir = '/usr/lib/lcdproc/' +@@ -264,6 +272,20 @@ def start_service(self): + self.oe.dbg_log('system::start_service', 'ERROR: (' + + repr(e) + ')') + ++ def stop_service(self): ++ try: ++ ++ self.oe.dbg_log('system::stop_service', 'enter_function', ++ 0) ++ if hasattr(self, 'update_thread'): ++ self.update_thread.stop() ++ ++ self.oe.dbg_log('system::stop_service', 'exit_function', 0) ++ except Exception, e: ++ ++ self.oe.dbg_log('system::stop_service', 'ERROR: (' ++ + repr(e) + ')') ++ + def do_init(self): + try: + +@@ -290,31 +312,31 @@ def load_values(self): + + if not arrTypes is None: + +- self.config['keyboard']['settings']['KeyboardType' ++ self.struct['keyboard']['settings']['KeyboardType' + ]['values'] = arrTypes + + value = self.oe.read_setting('system', 'KeyboardType') + if not value is None: +- self.config['keyboard']['settings']['KeyboardType' ++ self.struct['keyboard']['settings']['KeyboardType' + ]['value'] = value + + if not arrLayouts is None: + +- self.config['keyboard']['settings']['KeyboardLayout1' ++ self.struct['keyboard']['settings']['KeyboardLayout1' + ]['values'] = arrLayouts +- self.config['keyboard']['settings']['KeyboardLayout2' ++ self.struct['keyboard']['settings']['KeyboardLayout2' + ]['values'] = arrLayouts + + value = self.oe.read_setting('system', 'KeyboardLayout1' + ) + if not value is None: +- self.config['keyboard']['settings' ++ self.struct['keyboard']['settings' + ]['KeyboardLayout1']['value'] = value + + value = self.oe.read_setting('system', 'KeyboardLayout2' + ) + if not value is None: +- self.config['keyboard']['settings' ++ self.struct['keyboard']['settings' + ]['KeyboardLayout2']['value'] = value + + if not arrTypes == None: +@@ -322,64 +344,65 @@ def load_values(self): + else: + self.rpi_keyboard_layouts = True + ++ if self.arch == "RPi.arm": ++ self.struct['keyboard']['settings'][ ++ 'KeyboardLayout2']['hidden'] = 'true' ++ self.struct['keyboard']['settings'][ ++ 'KeyboardType']['hidden'] = 'true' ++ + # Hostname + value = self.oe.read_setting('system', 'hostname') + if not value is None: +- self.config['ident']['settings']['hostname']['value'] = \ ++ self.struct['ident']['settings']['hostname']['value'] = \ + value + + # LCD Driver + if not arrLcd is None: +- self.config['driver']['settings']['lcd']['values'] = \ ++ self.struct['driver']['settings']['lcd']['values'] = \ + arrLcd + + value = self.oe.read_setting('system', 'lcd') + if not value is None: +- self.config['driver']['settings']['lcd']['value'] = \ ++ self.struct['driver']['settings']['lcd']['value'] = \ + value + + # HDD Standby + value = self.oe.read_setting('system', 'enable_hdd_standby') + if not value is None: +- self.config['power']['settings']['enable_hdd_standby']['value' ++ self.struct['power']['settings']['enable_hdd_standby']['value' + ] = value + + value = self.oe.read_setting('system', 'hdd_standby') + if not value is None: +- self.config['power']['settings']['hdd_standby']['value' ++ self.struct['power']['settings']['hdd_standby']['value' + ] = value + + # AutoUpdate + value = self.oe.read_setting('system', 'AutoUpdate') + if not value is None: +- self.config['update']['settings']['AutoUpdate']['value' ++ self.struct['update']['settings']['AutoUpdate']['value' + ] = value + + value = self.oe.read_setting('system', 'UpdateNotify') + if not value is None: +- self.config['update']['settings']['UpdateNotify' ++ self.struct['update']['settings']['UpdateNotify' + ]['value'] = value + + # AutoUpdate = manual by environment var. +- if 'UPDATE_SUPPORT' in os.environ: +- if os.environ['UPDATE_SUPPORT'] == 'false': +- self.config['update']['settings']['AutoUpdate']['value' +- ] = 'manual' +- +- self.config['update']['settings']['AutoUpdate']['not_supported' +- ] = [self.arch] +- +- self.config['update']['settings']['CheckUpdate']['not_supported' +- ] = [self.arch] ++ ++ if os.environ.get('UPDATE_SUPPORT', 'true') == 'false': ++ ++ self.update_disabled = True ++ ++ self.struct['update']['hidden'] = 'true' ++ ++ self.struct['update']['settings']['AutoUpdate']['value' ++ ] = 'manual' + +- # AutoUpdate File and URL +- value = self.oe.read_setting('system', 'update_file') +- if value != None and value != '': +- self.update_file = value +- value = self.oe.read_setting('system', 'update_url') +- if value != None and value != '': +- self.update_url = value ++ self.struct['update']['settings']['UpdateNotify' ++ ]['value'] = '0' + ++ xbmc.log(repr(self.struct)) + self.oe.dbg_log('system::load_values', 'exit_function', 0) + except Exception, e: + +@@ -392,80 +415,8 @@ def load_menu(self, focusItem): + + self.oe.dbg_log('system::load_menu', 'enter_function', 0) + +- selectedPos = \ +- self.oe.winOeMain.getControl(self.oe.winOeMain.guiList).getSelectedPosition() +- +- for category in sorted(self.config, key=lambda x: \ +- self.config[x]['order']): +- if 'not_supported' in self.config[category]: +- if self.arch \ +- in self.config[category]['not_supported']: +- continue +- +- self.oe.winOeMain.addConfigItem(self.oe._(self.config[category]['name' +- ]), {'typ': 'separator'}, +- focusItem.getProperty('listTyp')) +- +- for setting in sorted(self.config[category]['settings' +- ]): +- +- if 'not_supported' in self.config[category]['settings'][setting]: +- if self.arch \ +- in self.config[category]['settings'][setting]['not_supported']: +- continue +- +- dictProperties = { +- 'entry': setting, +- 'category': category, +- 'action': self.config[category]['settings' +- ][setting]['action'], +- 'value': self.config[category]['settings' +- ][setting]['value'], +- 'typ': self.config[category]['settings' +- ][setting]['typ'], +- } +- +- if 'InfoText' in self.config[category]['settings' +- ][setting]: +- dictProperties['InfoText'] = \ +- self.oe._(self.config[category]['settings' +- ][setting]['InfoText']) +- +- if 'validate' in self.config[category]['settings' +- ][setting]: +- dictProperties['validate'] = \ +- self.config[category]['settings' +- ][setting]['validate'] +- +- if 'values' in self.config[category]['settings' +- ][setting]: +- if len(self.config[category]['settings' +- ][setting]['values']) > 0: +- dictProperties['values'] = \ +- ','.join(self.config[category]['settings' +- ][setting]['values']) +- +- if not 'parent' in self.config[category]['settings' +- ][setting]: +- +- self.oe.winOeMain.addConfigItem(self.oe._(self.config[category]['settings' +- ][setting]['name']), dictProperties, +- focusItem.getProperty('listTyp')) +- else: +- +- if self.config[category]['settings' +- ][self.config[category]['settings' +- ][setting]['parent']['entry']]['value' +- ] in self.config[category]['settings' +- ][setting]['parent']['value']: +- +- self.oe.winOeMain.addConfigItem(self.oe._(self.config[category]['settings' +- ][setting]['name']), +- dictProperties, +- focusItem.getProperty('listTyp')) +- +- self.oe.winOeMain.getControl(self.oe.winOeMain.guiList).selectItem(selectedPos) +- ++ self.oe.winOeMain.build_menu(self.struct) ++ + self.oe.dbg_log('system::load_menu', 'exit_function', 0) + except Exception, e: + +@@ -477,7 +428,7 @@ def set_value(self, listItem): + + self.oe.dbg_log('system::set_value', 'enter_function', 0) + +- self.config[listItem.getProperty('category')]['settings' ++ self.struct[listItem.getProperty('category')]['settings' + ][listItem.getProperty('entry')]['value'] = \ + listItem.getProperty('value') + +@@ -504,34 +455,34 @@ def set_keyboard_layout(self, listItem=None): + if self.keyboard_layouts == True: + + self.oe.dbg_log('system::set_keyboard_layout', +- unicode(self.config['keyboard']['settings' ++ unicode(self.struct['keyboard']['settings' + ]['KeyboardLayout1']['value']) + ',' +- + unicode(self.config['keyboard']['settings' ++ + unicode(self.struct['keyboard']['settings' + ]['KeyboardLayout2']['value']) + ' ' +- + '-model ' + unicode(self.config['keyboard' ++ + '-model ' + unicode(self.struct['keyboard' + ]['settings']['KeyboardType']['value']), 1) + + if not os.path.exists(os.path.dirname(self.udev_keyboard_file)): + os.makedirs(os.path.dirname(self.udev_keyboard_file)) + + config_file = open(self.udev_keyboard_file, 'w') +- config_file.write('XKBMODEL="' + self.config['keyboard' ++ config_file.write('XKBMODEL="' + self.struct['keyboard' + ]['settings']['KeyboardType']['value'] + + '"\n') + config_file.write('XKBVARIANT=""\n') +- config_file.write('XKBLAYOUT="' + self.config['keyboard' ++ config_file.write('XKBLAYOUT="' + self.struct['keyboard' + ]['settings']['KeyboardLayout1']['value'] +- + ',' + self.config['keyboard']['settings' ++ + ',' + self.struct['keyboard']['settings' + ]['KeyboardLayout2']['value'] + '"\n') + config_file.write('XKBOPTIONS="grp:alt_shift_toggle"\n') + config_file.close() + + parameters = ['-display ' + os.environ['DISPLAY'], +- '-layout ' + self.config['keyboard' ++ '-layout ' + self.struct['keyboard' + ]['settings']['KeyboardLayout1']['value'] +- + ',' + self.config['keyboard']['settings' ++ + ',' + self.struct['keyboard']['settings' + ]['KeyboardLayout2']['value'], '-model ' +- + unicode(self.config['keyboard']['settings' ++ + unicode(self.struct['keyboard']['settings' + ]['KeyboardType']['value']), + '-option "grp:alt_shift_toggle"'] + +@@ -541,10 +492,10 @@ def set_keyboard_layout(self, listItem=None): + elif self.rpi_keyboard_layouts == True: + + self.oe.dbg_log('system::set_keyboard_layout', +- unicode(self.config['keyboard']['settings' ++ unicode(self.struct['keyboard']['settings' + ]['KeyboardLayout1']['value']) , 1) + +- parameter = self.config['keyboard' ++ parameter = self.struct['keyboard' + ]['settings']['KeyboardLayout1']['value'] + + command = 'loadkmap < `ls -1 %s/*/%s.bmap`' % (self.rpi_keyboard_info, parameter) +@@ -577,21 +528,21 @@ def set_hostname(self, listItem=None): + if not listItem == None: + self.set_value(listItem) + +- if not self.config['ident']['settings']['hostname']['value' +- ] is None and not self.config['ident']['settings' ++ if not self.struct['ident']['settings']['hostname']['value' ++ ] is None and not self.struct['ident']['settings' + ]['hostname']['value'] == '': + + self.oe.dbg_log('system::set_hostname', +- self.config['ident']['settings' ++ self.struct['ident']['settings' + ]['hostname']['value'], 1) + + hostname = open('/proc/sys/kernel/hostname', 'w') +- hostname.write(self.config['ident']['settings' ++ hostname.write(self.struct['ident']['settings' + ]['hostname']['value']) + hostname.close() + + hostname = open('%s/hostname' % self.oe.CONFIG_CACHE, 'w') +- hostname.write(self.config['ident']['settings' ++ hostname.write(self.struct['ident']['settings' + ]['hostname']['value']) + hostname.close() + +@@ -605,7 +556,7 @@ def set_hostname(self, listItem=None): + user_hosts.close() + + hosts.write('127.0.0.1\tlocalhost %s\n' +- % self.config['ident']['settings' ++ % self.struct['ident']['settings' + ]['hostname']['value']) + hosts.close() + else: +@@ -637,16 +588,16 @@ def set_lcd_driver(self, listItem=None): + else: + lcd_config_file = '/etc/LCDd.conf' + +- if not self.config['driver']['settings']['lcd']['value'] \ +- is None and not self.config['driver']['settings']['lcd' ++ if not self.struct['driver']['settings']['lcd']['value'] \ ++ is None and not self.struct['driver']['settings']['lcd' + ]['value'] == 'none': + + self.oe.dbg_log('system::set_lcd_driver', +- self.config['driver']['settings']['lcd' ++ self.struct['driver']['settings']['lcd' + ]['value'], 1) + + parameters = ['-c ' + lcd_config_file, '-d ' +- + self.config['driver']['settings']['lcd' ++ + self.struct['driver']['settings']['lcd' + ]['value'], '-s true'] + + os.system('killall LCDd') +@@ -679,13 +630,13 @@ def set_hdd_standby(self, listItem=None): + if not listItem == None: + self.set_value(listItem) + +- if self.config['power']['settings']['hdd_standby']['value'] \ +- != None and self.config['power']['settings' ++ if self.struct['power']['settings']['hdd_standby']['value'] \ ++ != None and self.struct['power']['settings' + ]['hdd_standby']['value'] != '0' \ +- and self.config['power']['settings' ++ and self.struct['power']['settings' + ]['enable_hdd_standby']['value'] == '1': + +- value = int(self.config['power']['settings' ++ value = int(self.struct['power']['settings' + ]['hdd_standby']['value']) #* 12 + + #find system hdd +@@ -765,15 +716,17 @@ def set_auto_update(self, listItem=None): + if not listItem == None: + self.set_value(listItem) + +- if not hasattr(self, 'update_thread'): +- self.update_thread = updateThread(self.oe) +- self.update_thread.start() +- else: +- self.update_thread.wait_evt.set() ++ if not hasattr(self, 'update_disabled'): ++ ++ if not hasattr(self, 'update_thread'): ++ self.update_thread = updateThread(self.oe) ++ self.update_thread.start() ++ else: ++ self.update_thread.wait_evt.set() + +- self.oe.dbg_log('system::set_auto_update', +- unicode(self.config['update']['settings' +- ]['AutoUpdate']['value']), 1) ++ self.oe.dbg_log('system::set_auto_update', ++ unicode(self.struct['update']['settings' ++ ]['AutoUpdate']['value']), 1) + + self.oe.dbg_log('system::set_auto_update', 'exit_function', + 0) +@@ -913,13 +866,13 @@ def check_updates_v2(self, force=False): + self.update_file = self.download_url_v2 % (update_json['data']['folder'], + update_json['data']['update']) + +- if self.config['update']['settings']['UpdateNotify' ++ if self.struct['update']['settings']['UpdateNotify' + ]['value'] == '1': + xbmc.executebuiltin('Notification(' + + self.oe._(32363).encode('utf-8') + ', ' + + self.oe._(32364).encode('utf-8') + ')') + +- if (self.config['update']['settings']['AutoUpdate']['value' ++ if (self.struct['update']['settings']['AutoUpdate']['value' + ] == 'manual' and force == True): + silent = False + xbmcDialog = xbmcgui.Dialog() +@@ -935,7 +888,7 @@ def check_updates_v2(self, force=False): + self.update_in_progress = True + self.do_autoupdate() + +- if (self.config['update']['settings']['AutoUpdate']['value' ++ if (self.struct['update']['settings']['AutoUpdate']['value' + ] == 'auto' and force == False): + + self.update_in_progress = True +@@ -966,7 +919,7 @@ def do_autoupdate(self, listItem=None, silent=False): + + self.update_file = self.update_file.split('/')[-1] + +- if self.config['update']['settings']['UpdateNotify' ++ if self.struct['update']['settings']['UpdateNotify' + ]['value'] == '1': + xbmc.executebuiltin('Notification(' + + self.oe._(32363) + ', ' +@@ -981,7 +934,7 @@ def do_autoupdate(self, listItem=None, silent=False): + self.temp_folder + 'oe_update/', silent) \ + == 1: + +- if self.config['update']['settings' ++ if self.struct['update']['settings' + ]['UpdateNotify']['value'] == '1': + xbmc.executebuiltin('Notification(' + + self.oe._(32363) + ', ' +@@ -1281,7 +1234,7 @@ def do_wizard(self): + self.oe.winOeMain.set_wizard_title(self.oe._(32003)) + self.oe.winOeMain.set_wizard_text(self.oe._(32304)) + self.oe.winOeMain.set_wizard_button_title(self.oe._(32308)) +- self.oe.winOeMain.set_wizard_button_1(self.config['ident' ++ self.oe.winOeMain.set_wizard_button_1(self.struct['ident' + ]['settings']['hostname']['value'], self, + 'wizard_set_hostname') + +@@ -1297,7 +1250,7 @@ def wizard_set_hostname(self): + self.oe.dbg_log('system::wizard_set_hostname', + 'enter_function', 0) + +- currentHostname = self.config['ident']['settings' ++ currentHostname = self.struct['ident']['settings' + ]['hostname']['value'] + + xbmcKeyboard = xbmc.Keyboard(currentHostname) +@@ -1307,7 +1260,7 @@ def wizard_set_hostname(self): + + if xbmcKeyboard.isConfirmed(): + result_is_valid = True +- validate_string = self.config['ident']['settings' ++ validate_string = self.struct['ident']['settings' + ]['hostname']['validate'] + if validate_string != '': + if not re.search(validate_string, +@@ -1317,13 +1270,13 @@ def wizard_set_hostname(self): + result_is_valid = True + + if xbmcKeyboard.isConfirmed(): +- self.config['ident']['settings']['hostname']['value'] = \ ++ self.struct['ident']['settings']['hostname']['value'] = \ + xbmcKeyboard.getText() + self.set_hostname() +- self.oe.winOeMain.getControl(1401).setLabel(self.config['ident' ++ self.oe.winOeMain.getControl(1401).setLabel(self.struct['ident' + ]['settings']['hostname']['value']) + self.oe.write_setting('system', 'hostname', +- self.config['ident']['settings']['hostname' ++ self.struct['ident']['settings']['hostname' + ]['value']) + + self.oe.dbg_log('system::wizard_set_hostname', +diff --git a/resources/lib/oeWindows.py b/resources/lib/oeWindows.py +index ea33749..8f23699 100755 +--- a/resources/lib/oeWindows.py ++++ b/resources/lib/oeWindows.py +@@ -85,25 +85,26 @@ def onInit(self): + self.oe.dictModules[x].menu.keys()): + + self.oe.dbg_log('init module', strModule, 0) +- if hasattr(self.oe.dictModules[strModule], 'do_init'): +- Thread(target=self.oe.dictModules[strModule].do_init(), +- args=()).start() +- +- for men in self.oe.dictModules[strModule].menu: +- dictProperties = {'modul': strModule, +- 'listTyp': self.oe.listObject[self.oe.dictModules[strModule].menu[men]['listTyp' +- ]], +- 'menuLoader': self.oe.dictModules[strModule].menu[men]['menuLoader' +- ]} +- +- if 'InfoText' \ +- in self.oe.dictModules[strModule].menu[men]: +- dictProperties['InfoText'] = \ +- self.oe._(self.oe.dictModules[strModule].menu[men]['InfoText' +- ]) +- +- self.addMenuItem(self.oe.dictModules[strModule].menu[men]['name' +- ], dictProperties) ++ if self.oe.dictModules[strModule].enabled: ++ if hasattr(self.oe.dictModules[strModule], 'do_init'): ++ Thread(target=self.oe.dictModules[strModule].do_init(), ++ args=()).start() ++ ++ for men in self.oe.dictModules[strModule].menu: ++ dictProperties = {'modul': strModule, ++ 'listTyp': self.oe.listObject[self.oe.dictModules[strModule].menu[men]['listTyp' ++ ]], ++ 'menuLoader': self.oe.dictModules[strModule].menu[men]['menuLoader' ++ ]} ++ ++ if 'InfoText' \ ++ in self.oe.dictModules[strModule].menu[men]: ++ dictProperties['InfoText'] = \ ++ self.oe._(self.oe.dictModules[strModule].menu[men]['InfoText' ++ ]) ++ ++ self.addMenuItem(self.oe.dictModules[strModule].menu[men]['name' ++ ], dictProperties) + + self.setFocusId(self.guiMenList) + self.onFocus(self.guiMenList) +@@ -155,6 +156,76 @@ def addConfigItem( + self.oe.dbg_log('oeWindows.mainWindow::addConfigItem(' + + strName + ')', 'ERROR: (' + repr(e) + ')') + ++ def build_menu(self, struct, fltr=[], optional='0'): ++ ++ try: ++ ++ for category in sorted(struct, key=lambda x: struct[x]['order']): ++ ++ if not 'hidden' in struct[category]: ++ ++ if fltr == []: ++ self.addConfigItem(self.oe._(struct[category]['name' ++ ]), {'typ': 'separator'}, 1100) ++ ++ else: ++ if category not in fltr: ++ continue ++ ++ for entry in sorted(struct[category]['settings'], ++ key=lambda x: struct[category]['settings' ++ ][x]['order']): ++ ++ setting = struct[category]['settings'][entry] ++ ++ if not 'hidden' in setting: ++ ++ dictProperties = { ++ 'value': setting['value'], ++ 'typ': setting['type'], ++ 'entry': entry, ++ 'category': category, ++ 'action': setting['action'], ++ } ++ ++ if 'InfoText' in setting: ++ dictProperties['InfoText'] = \ ++ self.oe._(setting['InfoText']) ++ ++ if 'validate' in setting: ++ dictProperties['validate'] = \ ++ setting['validate'] ++ ++ if 'values' in setting: ++ dictProperties['values'] = \ ++ ','.join(setting['values']) ++ ++ if isinstance(setting['name'], basestring): ++ name = setting['name'] ++ else: ++ name = self.oe._(setting['name']) ++ ++ if not 'parent' in setting: ++ ++ self.addConfigItem(name, ++ dictProperties, ++ 1100) ++ else: ++ ++ if struct[category]['settings' ++ ][setting['parent']['entry']]['value' ++ ] in setting['parent']['value']: ++ ++ if not 'optional' in setting or \ ++ ('optional' in setting and optional != '0'): ++ self.addConfigItem(name, ++ dictProperties, ++ 1100) ++ ++ except Exception, e: ++ ++ self.oe.dbg_log('oeWindows.mainWindow::build_menu', 'ERROR: (' + repr(e) + ')') ++ + def showButton( + self, + number, +diff --git a/resources/skins/Default/720p/mainWindow.xml b/resources/skins/Default/720p/mainWindow.xml +index a632515..dc035ce 100755 +--- a/resources/skins/Default/720p/mainWindow.xml ++++ b/resources/skins/Default/720p/mainWindow.xml +@@ -371,7 +371,7 @@ + FF757677 + white + ListItem.Property(value) +- !StringCompare(ListItem.Property(Typ), bool) ++ !StringCompare(ListItem.Property(Typ), bool) + !StringCompare(ListItem.Property(Typ), button) + + + +@@ -442,7 +442,7 @@ + 2 + 796 + 38 +- Control.HasFocus(1100) ++ Control.HasFocus(1100) + button-focus2.png + + +@@ -452,7 +452,7 @@ + 20 + white + ListItem.Label +- true ++ true + + + right +@@ -462,7 +462,7 @@ + 20 + white + ListItem.Property(value) +- !StringCompare(ListItem.Property(Typ), bool) ++ !StringCompare(ListItem.Property(Typ), bool) + !StringCompare(ListItem.Property(Typ), button) + + + +-- +1.8.1.6 + + +From 555b10b6bb53088aeaeab8c90e122e00e4187a87 Mon Sep 17 00:00:00 2001 +From: lfiebach +Date: Fri, 2 Aug 2013 17:56:23 +0200 +Subject: [PATCH 3/3] fix wizard + +--- + addon.xml | 2 +- + changelog.txt | 3 +++ + resources/lib/modules/services.py | 2 +- + resources/lib/oeWindows.py | 8 ++++---- + 4 files changed, 9 insertions(+), 6 deletions(-) + +diff --git a/addon.xml b/addon.xml +index c130660..f9741f3 100755 +--- a/addon.xml ++++ b/addon.xml +@@ -1,7 +1,7 @@ + + + + +diff --git a/changelog.txt b/changelog.txt +index a83a37d..eb50d6f 100755 +--- a/changelog.txt ++++ b/changelog.txt +@@ -1,3 +1,6 @@ ++2013-08-02 v0.1.32 ++ (fix) wizard fail after menu redesign ++ + 2013-07-29 v0.1.31 + (change) menu loader redesign + (fix) kill update thread on exit +diff --git a/resources/lib/modules/services.py b/resources/lib/modules/services.py +index 8cd68dd..37aa0c5 100755 +--- a/resources/lib/modules/services.py ++++ b/resources/lib/modules/services.py +@@ -859,7 +859,7 @@ def set_wizard_buttons(self): + self.oe.winOeMain.set_wizard_radiobutton_1(self.oe._(32201), + self, 'wizard_set_ssh') + +- if hasattr(self, 'samba'): ++ if not 'hidden' in self.struct['samba']: + if self.struct['samba']['settings']['samba_autostart' + ]['value'] == '1': + self.oe.winOeMain.set_wizard_radiobutton_2(self.oe._(32200), +diff --git a/resources/lib/oeWindows.py b/resources/lib/oeWindows.py +index 8f23699..10cd60b 100755 +--- a/resources/lib/oeWindows.py ++++ b/resources/lib/oeWindows.py +@@ -1180,7 +1180,7 @@ def get_keyboard_layout(self): + try: + + current_layout = self.oe.dictModules['system' +- ].config['keyboard']['settings']['KeyboardLayout1' ++ ].struct['keyboard']['settings']['KeyboardLayout1' + ]['value'] + + return current_layout +@@ -1196,16 +1196,16 @@ def select_keyboard(self): + select_window = selectWindow('selectWindow.xml', + self.oe.__cwd__, 'Default', oeMain=self.oe) + select_window.defaultValue = self.oe.dictModules['system' +- ].config['keyboard']['settings']['KeyboardLayout1' ++ ].struct['keyboard']['settings']['KeyboardLayout1' + ]['value'] + select_window.availValues = \ +- ','.join(self.oe.dictModules['system'].config['keyboard' ++ ','.join(self.oe.dictModules['system'].struct['keyboard' + ]['settings']['KeyboardLayout1']['values']) + self.oe.set_busy(0) + select_window.doModal() + + if select_window.defaultValue != select_window.result: +- self.oe.dictModules['system'].config['keyboard' ++ self.oe.dictModules['system'].struct['keyboard' + ]['settings']['KeyboardLayout1']['value'] = \ + select_window.result + self.oe.write_setting('system', 'KeyboardLayout1', +-- +1.8.1.6 + diff --git a/packages/mediacenter/service.openelec.settings/unpack b/packages/mediacenter/service.openelec.settings/unpack index 09ae905c23..6c5b6426b7 100755 --- a/packages/mediacenter/service.openelec.settings/unpack +++ b/packages/mediacenter/service.openelec.settings/unpack @@ -27,3 +27,10 @@ ZIP_PKG="`echo $PKG_URL | sed 's%.*/\(.*\)$%\1%'`" mkdir -p $BUILD/${PKG_NAME}-${PKG_VERSION} unzip $SOURCES/$1/$ZIP_PKG -d $BUILD/${PKG_NAME}-${PKG_VERSION} >/dev/null 2>&1 + +echo "### Applying upstream patches ###" + +for patch in `ls $PKG_DIR/patches.upstream/*.patch`; do + cat $patch | patch -d \ + `echo $BUILD/$PKG_NAME-$PKG_VERSION | cut -f1 -d\ ` -p1 +done diff --git a/packages/mediacenter/xbmc-theme-Confluence/meta b/packages/mediacenter/xbmc-theme-Confluence/meta index 6541659273..89104478d9 100644 --- a/packages/mediacenter/xbmc-theme-Confluence/meta +++ b/packages/mediacenter/xbmc-theme-Confluence/meta @@ -19,9 +19,9 @@ ################################################################################ PKG_NAME="xbmc-theme-Confluence" -PKG_VERSION="12.2-8e4f924" +PKG_VERSION="12.2-e40d13d" if [ "$XBMC" = "master" ]; then - PKG_VERSION="c218d5c" + PKG_VERSION="13.alpha-df91888" elif [ "$XBMC" = "xbmc-aml" ]; then PKG_VERSION="aml-frodo-d9119f2" fi diff --git a/packages/mediacenter/xbmc/build b/packages/mediacenter/xbmc/build deleted file mode 100755 index 8a284b739f..0000000000 --- a/packages/mediacenter/xbmc/build +++ /dev/null @@ -1,336 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -if [ "$DISPLAYSERVER" = "xorg-server" ]; then - XBMC_XORG="--enable-x11 --enable-xrandr" -else - XBMC_XORG="--disable-x11 --disable-xrandr" -fi - -if [ "$OPENGL" = "Mesa" ]; then - XBMC_OPENGL="--enable-gl" -else - XBMC_OPENGL="--disable-gl" -fi - -if [ "$OPENGLES_SUPPORT" = yes ]; then - XBMC_OPENGLES="--enable-gles" -else - XBMC_OPENGLES="--disable-gles" -fi - -if [ "$SDL_SUPPORT" = yes ]; then - XBMC_SDL="--enable-sdl" -else - XBMC_SDL="--disable-sdl" -fi - -if [ "$XBMC_SCR_RSXS" = yes ]; then - XBMC_RSXS="--enable-rsxs" - # fix build of RSXS Screensaver support if not using libiconv - export jm_cv_func_gettimeofday_clobber=no -else - XBMC_RSXS="--disable-rsxs" -fi - -if [ "$XBMC_VIS_PROJECTM" = yes ]; then - XBMC_PROJECTM="--enable-projectm" -else - XBMC_PROJECTM="--disable-projectm" -fi - -if [ "$XBMC_VIS_GOOM" = yes ]; then - XBMC_GOOM="--enable-goom" -else - XBMC_GOOM="--disable-goom" -fi - -if [ "$ALSA_SUPPORT" = yes ]; then - XBMC_ALSA="--enable-alsa" -else - XBMC_ALSA="--disable-alsa" -fi - -if [ "$PULSEAUDIO_SUPPORT" = yes ]; then - XBMC_PULSEAUDIO="--enable-pulse" -else - XBMC_PULSEAUDIO="--disable-pulse" -fi - -if [ "$CEC_SUPPORT" = yes ]; then - XBMC_CEC="--enable-libcec" -else - XBMC_CEC="--disable-libcec" -fi - -if [ "$JOYSTICK_SUPPORT" = yes ]; then - XBMC_JOYSTICK="--enable-joystick" -else - XBMC_JOYSTICK="--disable-joystick" -fi - -if [ "$NONFREE_SUPPORT" = yes ]; then - XBMC_NONFREE="--enable-non-free" -else - XBMC_NONFREE="--disable-non-free" -fi - -if [ "$AIRPLAY_SUPPORT" = yes ]; then - XBMC_AIRPLAY="--enable-airplay" -else - XBMC_AIRPLAY="--disable-airplay" -fi - -if [ "$AIRTUNES_SUPPORT" = yes ]; then - XBMC_AIRTUNES="--enable-airtunes" -else - XBMC_AIRTUNES="--disable-airtunes" -fi - -if [ "$DVDCSS_SUPPORT" = yes ]; then - XBMC_DVDCSS="--enable-dvdcss" -else - XBMC_DVDCSS="--disable-dvdcss" -fi - -if [ "$ENCODER_LAME" = yes ]; then - XBMC_LAMEENC="--enable-libmp3lame" -else - XBMC_LAMEENC="--disable-libmp3lame" -fi - -if [ "$ENCODER_VORBIS" = yes ]; then - XBMC_VORBISENC="--enable-libvorbisenc" -else - XBMC_VORBISENC="--disable-libvorbisenc" -fi - -if [ "$BLURAY_SUPPORT" = yes ]; then - XBMC_BLURAY="--enable-libbluray" -else - XBMC_BLURAY="--disable-libbluray" -fi - -if [ "$AVAHI_DAEMON" = yes ]; then - XBMC_AVAHI="--enable-avahi" -else - XBMC_AVAHI="--disable-avahi" -fi - -if [ "$UPNP_SUPPORT" = yes ]; then - XBMC_UPNP="--enable-upnp" -else - XBMC_UPNP="--disable-upnp" -fi - -if [ "$MYSQL_SUPPORT" = yes ]; then - XBMC_MYSQL="--enable-mysql" -else - XBMC_MYSQL="--disable-mysql" - -fi -if [ "$SSHLIB_SUPPORT" = yes ]; then - XBMC_SSH="--enable-ssh" -else - XBMC_SSH="--disable-ssh" -fi - -if [ "$OPTICAL_DRIVE_SUPPORT" = yes ]; then - XBMC_OPTICAL="--enable-optical-drive" -else - XBMC_OPTICAL="--disable-optical-drive" -fi - -if [ "$NFS_SUPPORT" = yes ]; then - XBMC_NFS="--enable-nfs" -else - XBMC_NFS="--disable-nfs" -fi - -if [ "$AFP_SUPPORT" = yes ]; then - XBMC_AFP="--enable-afpclient" -else - XBMC_AFP="--disable-afpclient" -fi - -if [ "$SAMBA_SUPPORT" = yes ]; then - XBMC_SAMBA="--enable-samba" - export LIBS="$LIBS -ltalloc -ltdb -lwbclient" -else - XBMC_SAMBA="--disable-samba" -fi - -if [ "$WEBSERVER" = yes ]; then - XBMC_WEBSERVER="--enable-webserver" -else - XBMC_WEBSERVER="--disable-webserver" -fi - -if [ "$XBMCPLAYER_DRIVER" = bcm2835-driver ]; then - XBMC_OPENMAX="--enable-openmax" - XBMC_PLAYER="--enable-player=omxplayer" - XBMC_CODEC="--with-platform=raspberry-pi" - BCM2835_INCLUDES="-I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads/ \ - -I$SYSROOT_PREFIX/usr/include/interface/vmcs_host/linux" - CFLAGS="$CFLAGS $BCM2835_INCLUDES" - CXXFLAGS="$CXXFLAGS $BCM2835_INCLUDES" -elif [ "$XBMCPLAYER_DRIVER" = "marvell-libgfx" ]; then - XBMC_OPENMAX="--disable-openmax" - XBMC_PLAYER="--with-platform=marvell-dove" - XBMC_CODEC="" -elif [ "$XBMCPLAYER_DRIVER" = "libamlplayer-m1" -o "$XBMCPLAYER_DRIVER" = "libamlplayer-m3" ]; then - XBMC_OPENMAX="--disable-openmax" - XBMC_PLAYER="--enable-player=amlplayer" - XBMC_CODEC="--enable-codec=amcodec" - AMLPLAYER_INCLUDES="-I$SYSROOT_PREFIX/usr/include/amlplayer" - CFLAGS="$CFLAGS $AMLPLAYER_INCLUDES" - CXXFLAGS="$CXXFLAGS $AMLPLAYER_INCLUDES" -else - XBMC_OPENMAX="--disable-openmax" -fi - -if [ "$VDPAU" = yes ]; then - XBMC_VDPAU="--enable-vdpau" -else - XBMC_VDPAU="--disable-vdpau" -fi - -if [ "$VAAPI" = yes ]; then - XBMC_VAAPI="--enable-vaapi" -else - XBMC_VAAPI="--disable-vaapi" -fi - -if [ "$XVBA" = yes ]; then - XBMC_XVBA="--enable-xvba" -else - XBMC_XVBA="--disable-xvba" -fi - -if [ "$CRYSTALHD" = yes ]; then - XBMC_CRYSTALHD="--enable-crystalhd" -else - XBMC_CRYSTALHD="--disable-crystalhd" -fi - -# xbmc fails to build with LTO optimization if build without GOLD support - [ ! "$GOLD_SUPPORT" = "yes" ] && strip_lto - -# Todo: XBMC segfaults on exit when building with LTO support - strip_lto - -# dont build parallel -# MAKEFLAGS=-j1 - - export PYTHON_VERSION="2.7" - export PYTHON_CPPFLAGS="-I$SYSROOT_PREFIX/usr/include/python$PYTHON_VERSION" - export PYTHON_LDFLAGS="-L$SYSROOT_PREFIX/usr/lib/python$PYTHON_VERSION -lpython$PYTHON_VERSION" - export PYTHON_SITE_PKG="$SYSROOT_PREFIX/usr/lib/python$PYTHON_VERSION/site-packages" - export ac_python_version="$PYTHON_VERSION" - -# setup skin dir from default skin - SKIN_DIR="skin.`tolower $SKIN_DEFAULT`" - -cd $PKG_BUILD - -# adding fake Makefile for stripped skin - mkdir -p addons/skin.confluence/media - touch addons/skin.confluence/media/Makefile.in - -# autoreconf - BOOTSTRAP_STANDALONE=1 make -f bootstrap.mk - -export gl_cv_func_gettimeofday_clobber=no -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --with-arch=$TARGET_ARCH \ - --with-cpu=$TARGET_CPU \ - --prefix=/usr \ - --exec-prefix=/usr \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --disable-debug \ - --disable-optimizations \ - $XBMC_OPENGL \ - $XBMC_OPENGLES \ - $XBMC_SDL \ - $XBMC_OPENMAX \ - $XBMC_VDPAU \ - $XBMC_VAAPI \ - $XBMC_CRYSTALHD \ - $XBMC_XVBA \ - --disable-vdadecoder \ - --disable-vtbdecoder \ - --disable-tegra \ - --disable-profiling \ - $XBMC_JOYSTICK \ - $XBMC_CEC \ - --enable-udev \ - --disable-libusb \ - $XBMC_GOOM \ - $XBMC_RSXS \ - $XBMC_PROJECTM \ - $XBMC_XORG \ - --disable-ccache \ - $XBMC_ALSA \ - $XBMC_PULSEAUDIO \ - --enable-rtmp \ - $XBMC_SAMBA \ - $XBMC_NFS \ - $XBMC_AFP \ - $XBMC_VORBISENC \ - --enable-ffmpeg-libvorbis \ - $XBMC_LAMEENC \ - $XBMC_DVDCSS \ - --disable-mid \ - --disable-hal \ - $XBMC_AVAHI \ - $XBMC_UPNP \ - $XBMC_MYSQL \ - $XBMC_SSH \ - $XBMC_AIRPLAY \ - $XBMC_AIRTUNES \ - $XBMC_NONFREE \ - --disable-asap-codec \ - $XBMC_WEBSERVER \ - $XBMC_OPTICAL \ - $XBMC_BLURAY \ - --enable-texturepacker --with-texturepacker-root="$ROOT/$TOOLCHAIN" \ - --disable-external-libraries \ - --enable-external-ffmpeg \ - $XBMC_CODEC \ - $XBMC_PLAYER \ - -# setup default skin inside the sources - sed -i -e "s|skin.confluence|$SKIN_DIR|g" xbmc/settings/Settings.h - -make externals -make xbmc.bin - -if [ "$DISPLAYSERVER" = "xorg-server" ]; then - make xbmc-xrandr -fi - -make -C tools/TexturePacker -cp -PR tools/TexturePacker/TexturePacker $ROOT/$TOOLCHAIN/bin diff --git a/packages/mediacenter/xbmc/install b/packages/mediacenter/xbmc/install deleted file mode 100755 index 399c6acdf2..0000000000 --- a/packages/mediacenter/xbmc/install +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -PYTHON_LIBDIR="`ls -d $INSTALL/usr/lib/python*`" - -mkdir -p $INSTALL/usr/bin - cp $PKG_DIR/scripts/cputemp $INSTALL/usr/bin - cp $PKG_DIR/scripts/gputemp $INSTALL/usr/bin - cp $PKG_BUILD/tools/EventClients/Clients/XBMC\ Send/xbmc-send.py $INSTALL/usr/bin/xbmc-send - cp $PKG_DIR/scripts/setwakeup.sh $INSTALL/usr/bin - -mkdir -p $INSTALL/usr/lib/xbmc - cp $PKG_BUILD/xbmc.bin $INSTALL/usr/lib/xbmc - if [ "$DISPLAYSERVER" = "xorg-server" ]; then - cp $PKG_BUILD/xbmc-xrandr $INSTALL/usr/lib/xbmc - fi - -cd $PKG_BUILD - find system addons \ - -regextype posix-extended -type f \ - -not -iregex ".*svn.*|.*win32(dx)?\.vis|.*osx\.vis" \ - -iregex ".*-linux.*|.*-arm.*|.*\.vis|.*\.xbs" \ - -exec install -D "{}" $ROOT/$INSTALL/usr/lib/xbmc/"{}" ";" - - find addons language media sounds userdata system \ - -regextype posix-extended -type f \ - -not -iregex ".*-linux.*|.*-arm.*|.*\.vis|.*\.xbs|.*svn.*|.*\.orig|.*\.so|.*\.dll|.*\.pyd|.*python|.*\.zlib|.*\.conf" \ - -exec install -D -m 0644 "{}" $ROOT/$INSTALL/usr/share/xbmc/"{}" ";" -cd - - -if [ ! "$XBMC_SCR_RSXS" = yes ]; then - rm -rf $ROOT/$INSTALL/usr/share/xbmc/addons/screensaver.rsxs.* -fi - -if [ ! "$XBMC_VIS_PROJECTM" = yes ]; then - rm -rf $ROOT/$INSTALL/usr/share/xbmc/addons/visualization.projectm -fi - -rm -rf $ROOT/$INSTALL/usr/share/xbmc/addons/visualization.dxspectrum -rm -rf $ROOT/$INSTALL/usr/share/xbmc/addons/visualization.itunes -rm -rf $ROOT/$INSTALL/usr/share/xbmc/addons/visualization.milkdrop - -# overriding Splash image -mkdir -p $INSTALL/usr/share/xbmc/media -# rm -rf $INSTALL/usr/share/xbmc/media/Splash.png -# if [ -f $PROJECT_DIR/$PROJECT/splash/splash.png ]; then -# cp $PROJECT_DIR/$PROJECT/splash/splash.png $INSTALL/usr/share/xbmc/media/Splash.png -# else -# cp $PKG_DIR/splash/splash.png $INSTALL/usr/share/xbmc/media/Splash.png -# fi - -# cleanup and python addon fixes - rm -rf $INSTALL/usr/share/xbmc/addons/script.module.pysqlite - rm -rf $INSTALL/usr/share/xbmc/addons/script.module.simplejson - -mkdir -p $INSTALL/usr/share/xbmc/addons - cp -R $PKG_DIR/config/os.openelec.tv $INSTALL/usr/share/xbmc/addons - $SED "s|@OS_VERSION@|$OS_VERSION|g" -i $INSTALL/usr/share/xbmc/addons/os.openelec.tv/addon.xml - cp -R $PKG_DIR/config/repository.openelec.tv $INSTALL/usr/share/xbmc/addons - $SED "s|@ADDON_URL@|$ADDON_URL|g" -i $INSTALL/usr/share/xbmc/addons/repository.openelec.tv/addon.xml - -mkdir -p $PYTHON_LIBDIR/site-packages/xbmc - cp -R $PKG_BUILD/tools/EventClients/lib/python/* $PYTHON_LIBDIR/site-packages/xbmc - -# install powermanagement hooks - mkdir -p $INSTALL/etc/pm/sleep.d - cp $PKG_DIR/sleep.d/* $INSTALL/etc/pm/sleep.d - -# install project specific configs - mkdir -p $INSTALL/usr/share/xbmc/config - if [ -f $PROJECT_DIR/$PROJECT/xbmc/guisettings.xml ]; then - cp -R $PROJECT_DIR/$PROJECT/xbmc/guisettings.xml $INSTALL/usr/share/xbmc/config - fi - - if [ -f $PROJECT_DIR/$PROJECT/xbmc/sources.xml ]; then - cp -R $PROJECT_DIR/$PROJECT/xbmc/sources.xml $INSTALL/usr/share/xbmc/config - fi - - mkdir -p $INSTALL/usr/share/xbmc/system/ - if [ -f $PROJECT_DIR/$PROJECT/xbmc/advancedsettings.xml ]; then - cp $PROJECT_DIR/$PROJECT/xbmc/advancedsettings.xml $INSTALL/usr/share/xbmc/system/ - else - cp $PKG_DIR/config/advancedsettings.xml $INSTALL/usr/share/xbmc/system/ - fi - -if [ "$XBMC" = master ]; then - mkdir -p $INSTALL/usr/share/xbmc/system/settings - if [ -f $PROJECT_DIR/$PROJECT/xbmc/appliance.xml ]; then - cp $PROJECT_DIR/$PROJECT/xbmc/appliance.xml $INSTALL/usr/share/xbmc/system/settings - else - cp $PKG_DIR/config/appliance.xml $INSTALL/usr/share/xbmc/system/settings - fi -fi - -if [ "$XBMC_EXTRA_FONTS" = yes ]; then - mkdir -p $INSTALL/usr/share/xbmc/media/Fonts - cp $PKG_DIR/fonts/*.ttf $INSTALL/usr/share/xbmc/media/Fonts -fi diff --git a/packages/mediacenter/xbmc/meta b/packages/mediacenter/xbmc/meta deleted file mode 100644 index a0369ad6b7..0000000000 --- a/packages/mediacenter/xbmc/meta +++ /dev/null @@ -1,205 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -PKG_NAME="xbmc" -PKG_VERSION="12.2-8e4f924" -if [ "$XBMC" = "master" ]; then - PKG_VERSION="c218d5c" -elif [ "$XBMC" = "xbmc-aml" ]; then - PKG_VERSION="aml-frodo-d9119f2" -fi -PKG_REV="1" -PKG_ARCH="any" -PKG_LICENSE="GPL" -PKG_SITE="http://www.xbmc.org" -PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" -PKG_DEPENDS="Python zlib bzip2 systemd ffmpeg libass curl rtmpdump fontconfig freetype libmad libogg libmodplug faad2 flac libmpeg2 taglib service.openelec.settings" -PKG_BUILD_DEPENDS="toolchain boost Python zlib bzip2 systemd lzo pcre swig ffmpeg libass enca curl libssh rtmpdump fontconfig fribidi tinyxml libjpeg-turbo libpng tiff freetype jasper libmad libsamplerate libogg libcdio libmodplug faad2 flac libmpeg2 taglib yajl sqlite" -PKG_PRIORITY="optional" -PKG_SECTION="mediacenter" -PKG_SHORTDESC="xbmc: XBMC Mediacenter" -PKG_LONGDESC="XBMC Media Center (which was formerly named Xbox Media Center) is a free and open source cross-platform media player and home entertainment system software with a 10-foot user interface designed for the living-room TV. Its graphical user interface allows the user to easily manage video, photos, podcasts, and music from a computer, optical disk, local network, and the internet using a remote control." -PKG_IS_ADDON="no" - -PKG_AUTORECONF="no" - -# needed for hosttools (Texturepacker) - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS lzo:host SDL-host SDL_image-host" - -# some python stuff needed for various addons - PKG_DEPENDS="$PKG_DEPENDS Imaging" - PKG_DEPENDS="$PKG_DEPENDS simplejson" - PKG_DEPENDS="$PKG_DEPENDS pycrypto" - -# various PVR clients - PKG_DEPENDS="$PKG_DEPENDS xbmc-pvr-addons" - PKG_DEPENDS="$PKG_DEPENDS xbmc-addon-xvdr" - -if [ "$DISPLAYSERVER" = "xorg-server" ]; then - # for libX11 support - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libX11 libXext" - PKG_DEPENDS="$PKG_DEPENDS libX11 libXext" - - # for libXrandr support - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libXrandr" - PKG_DEPENDS="$PKG_DEPENDS libXrandr" - - # for SDL support - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS SDL SDL_image" - PKG_DEPENDS="$PKG_DEPENDS SDL SDL_image" -fi - -if [ "$OPENGL" = "Mesa" ]; then - # for OpenGL (GLX) support - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS Mesa glu glew" - PKG_DEPENDS="$PKG_DEPENDS Mesa glu" -fi - -if [ "$OPENGLES_SUPPORT" = yes ]; then - # for OpenGL-ES support - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS $OPENGLES" - PKG_DEPENDS="$PKG_DEPENDS $OPENGLES" -fi - -# for dbus support - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS dbus" - PKG_DEPENDS="$PKG_DEPENDS dbus" - -if [ "$ALSA_SUPPORT" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS alsa-lib" - PKG_DEPENDS="$PKG_DEPENDS alsa-lib" -fi - -if [ "$PULSEAUDIO_SUPPORT" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS pulseaudio" - PKG_DEPENDS="$PKG_DEPENDS pulseaudio" -fi - -if [ "$CEC_SUPPORT" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libcec" - PKG_DEPENDS="$PKG_DEPENDS libcec" -fi - -#if [ ! "$LCD_DRIVER" = "none" ]; then -# PKG_DEPENDS="$PKG_DEPENDS xbmc-addon-lcd" -#fi - -if [ "$XBMC_SCR_RSXS" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libXt libXmu" -fi - -if [ "$FAAC_SUPPORT" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS faac" - PKG_DEPENDS="$PKG_DEPENDS faac" -fi - -if [ "$ENCODER_LAME" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS lame" - PKG_DEPENDS="$PKG_DEPENDS lame" -fi - -if [ "$ENCODER_VORBIS" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libvorbis" - PKG_DEPENDS="$PKG_DEPENDS libvorbis" -fi - -if [ "$BLURAY_SUPPORT" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libbluray" - PKG_DEPENDS="$PKG_DEPENDS libbluray" -fi - -if [ "$AVAHI_DAEMON" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS avahi" - PKG_DEPENDS="$PKG_DEPENDS avahi" -fi - -if [ "$MYSQL_SUPPORT" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS mysql" - PKG_DEPENDS="$PKG_DEPENDS mysql" -fi - -if [ "$AIRPLAY_SUPPORT" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libplist" - PKG_DEPENDS="$PKG_DEPENDS libplist" -fi - -if [ "$AIRTUNES_SUPPORT" = yes ]; then - if [ "$XBMC" = master ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libshairplay" - PKG_DEPENDS="$PKG_DEPENDS libshairplay" - else - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libshairport" - PKG_DEPENDS="$PKG_DEPENDS libshairport" - fi -fi - -if [ "$NFS_SUPPORT" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libnfs" - PKG_DEPENDS="$PKG_DEPENDS libnfs" -fi - -if [ "$AFP_SUPPORT" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS afpfs-ng" - PKG_DEPENDS="$PKG_DEPENDS afpfs-ng" -fi - -if [ "$SAMBA_SUPPORT" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS samba" - PKG_DEPENDS="$PKG_DEPENDS samba" -fi - -if [ "$WEBSERVER" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libmicrohttpd" -fi - -if [ ! "$XBMCPLAYER_DRIVER" = default ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS $XBMCPLAYER_DRIVER" - PKG_DEPENDS="$PKG_DEPENDS $XBMCPLAYER_DRIVER" - - if [ "$XBMCPLAYER_DRIVER" = marvell-libvmeta ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS marvell-ipp" - PKG_DEPENDS="$PKG_DEPENDS marvell-ipp" - fi -fi - -if [ "$VDPAU" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libvdpau" - PKG_DEPENDS="$PKG_DEPENDS libvdpau" -fi - -if [ "$VAAPI" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libva" - PKG_DEPENDS="$PKG_DEPENDS libva" -fi - -if [ "$CRYSTALHD" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS crystalhd" - PKG_DEPENDS="$PKG_DEPENDS crystalhd" -fi - -get_graphicdrivers - -for drv in $GRAPHIC_DRIVERS; do - if [ "$drv" = "fglrx" -a "$XVBA" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS xf86-video-fglrx" - elif [ "$drv" = "fglrx-legacy" -a "$XVBA" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS xf86-video-fglrx-legacy" - fi -done diff --git a/packages/mediacenter/xbmc/package.mk b/packages/mediacenter/xbmc/package.mk new file mode 100644 index 0000000000..209b8961b4 --- /dev/null +++ b/packages/mediacenter/xbmc/package.mk @@ -0,0 +1,537 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="xbmc" +PKG_VERSION="12.2-e40d13d" +if [ "$XBMC" = "master" ]; then + PKG_VERSION="13.alpha-df91888" +elif [ "$XBMC" = "xbmc-aml" ]; then + PKG_VERSION="aml-frodo-d9119f2" +fi +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.xbmc.org" +PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS="Python zlib bzip2 systemd ffmpeg libass curl rtmpdump fontconfig freetype libmad libogg libmodplug faad2 flac libmpeg2 taglib service.openelec.settings" +PKG_BUILD_DEPENDS_TARGET="toolchain boost Python zlib bzip2 systemd lzo pcre swig ffmpeg libass enca curl libssh rtmpdump fontconfig fribidi tinyxml libjpeg-turbo libpng tiff freetype jasper libmad libsamplerate libogg libcdio libmodplug faad2 flac libmpeg2 taglib yajl sqlite" +PKG_PRIORITY="optional" +PKG_SECTION="mediacenter" +PKG_SHORTDESC="xbmc: XBMC Mediacenter" +PKG_LONGDESC="XBMC Media Center (which was formerly named Xbox Media Center) is a free and open source cross-platform media player and home entertainment system software with a 10-foot user interface designed for the living-room TV. Its graphical user interface allows the user to easily manage video, photos, podcasts, and music from a computer, optical disk, local network, and the internet using a remote control." + +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + +# for dbus support + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET dbus" + PKG_DEPENDS="$PKG_DEPENDS dbus" + +# needed for hosttools (Texturepacker) + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET lzo:host SDL-host SDL_image-host" + +# some python stuff needed for various addons + PKG_DEPENDS="$PKG_DEPENDS Imaging" + PKG_DEPENDS="$PKG_DEPENDS simplejson" + PKG_DEPENDS="$PKG_DEPENDS pycrypto" + +# various PVR clients + PKG_DEPENDS="$PKG_DEPENDS xbmc-pvr-addons" + PKG_DEPENDS="$PKG_DEPENDS xbmc-addon-xvdr" + +if [ "$DISPLAYSERVER" = "xorg-server" ]; then +# for libX11 support + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libX11 libXext" + PKG_DEPENDS="$PKG_DEPENDS libX11 libXext" +# for libXrandr support + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libXrandr" + PKG_DEPENDS="$PKG_DEPENDS libXrandr" + XBMC_XORG="--enable-x11 --enable-xrandr" +else + XBMC_XORG="--disable-x11 --disable-xrandr" +fi + +if [ "$OPENGL" = "Mesa" ]; then +# for OpenGL (GLX) support + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET Mesa glu glew" + PKG_DEPENDS="$PKG_DEPENDS Mesa glu" + XBMC_OPENGL="--enable-gl" +else + XBMC_OPENGL="--disable-gl" +fi + +if [ "$OPENGLES_SUPPORT" = yes ]; then +# for OpenGL-ES support + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET $OPENGLES" + PKG_DEPENDS="$PKG_DEPENDS $OPENGLES" + XBMC_OPENGLES="--enable-gles" +else + XBMC_OPENGLES="--disable-gles" +fi + +if [ "$SDL_SUPPORT" = yes ]; then +# for SDL support + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET SDL SDL_image" + PKG_DEPENDS="$PKG_DEPENDS SDL SDL_image" + XBMC_SDL="--enable-sdl" +else + XBMC_SDL="--disable-sdl" +fi + +if [ "$ALSA_SUPPORT" = yes ]; then +# for ALSA support + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET alsa-lib" + PKG_DEPENDS="$PKG_DEPENDS alsa-lib" + XBMC_ALSA="--enable-alsa" +else + XBMC_ALSA="--disable-alsa" +fi + +if [ "$PULSEAUDIO_SUPPORT" = yes ]; then +# for PulseAudio support + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET pulseaudio" + PKG_DEPENDS="$PKG_DEPENDS pulseaudio" + XBMC_PULSEAUDIO="--enable-pulse" +else + XBMC_PULSEAUDIO="--disable-pulse" +fi + +if [ "$CEC_SUPPORT" = yes ]; then +# for CEC support + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libcec" + PKG_DEPENDS="$PKG_DEPENDS libcec" + XBMC_CEC="--enable-libcec" +else + XBMC_CEC="--disable-libcec" +fi + +if [ "$XBMC_SCR_RSXS" = yes ]; then +# for RSXS Screensaver support + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libXt libXmu" + XBMC_RSXS="--enable-rsxs" +# fix build of RSXS Screensaver support if not using libiconv + export jm_cv_func_gettimeofday_clobber=no +else + XBMC_RSXS="--disable-rsxs" +fi + +if [ "$XBMC_VIS_PROJECTM" = yes ]; then +# for ProjectM Visualisation support + XBMC_PROJECTM="--enable-projectm" +else + XBMC_PROJECTM="--disable-projectm" +fi + +if [ "$XBMC_VIS_GOOM" = yes ]; then +# for GOOM Visualisation support + XBMC_GOOM="--enable-goom" +else + XBMC_GOOM="--disable-goom" +fi + +if [ "$JOYSTICK_SUPPORT" = yes ]; then +# for Joystick support + XBMC_JOYSTICK="--enable-joystick" +else + XBMC_JOYSTICK="--disable-joystick" +fi + +if [ "$OPTICAL_DRIVE_SUPPORT" = yes ]; then + XBMC_OPTICAL="--enable-optical-drive" +else + XBMC_OPTICAL="--disable-optical-drive" +fi + +if [ "$NONFREE_SUPPORT" = yes ]; then +# for non-free support + XBMC_NONFREE="--enable-non-free" +else + XBMC_NONFREE="--disable-non-free" +fi + +if [ "$DVDCSS_SUPPORT" = yes ]; then + XBMC_DVDCSS="--enable-dvdcss" +else + XBMC_DVDCSS="--disable-dvdcss" +fi + +if [ "$FAAC_SUPPORT" = yes ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET faac" + PKG_DEPENDS="$PKG_DEPENDS faac" +fi + +if [ "$ENCODER_LAME" = yes ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET lame" + PKG_DEPENDS="$PKG_DEPENDS lame" + XBMC_LAMEENC="--enable-libmp3lame" +else + XBMC_LAMEENC="--disable-libmp3lame" +fi + +if [ "$ENCODER_VORBIS" = yes ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libvorbis" + PKG_DEPENDS="$PKG_DEPENDS libvorbis" + XBMC_VORBISENC="--enable-libvorbisenc" +else + XBMC_VORBISENC="--disable-libvorbisenc" +fi + +if [ "$BLURAY_SUPPORT" = yes ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libbluray" + PKG_DEPENDS="$PKG_DEPENDS libbluray" + XBMC_BLURAY="--enable-libbluray" +else + XBMC_BLURAY="--disable-libbluray" +fi + +if [ "$AVAHI_DAEMON" = yes ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET avahi" + PKG_DEPENDS="$PKG_DEPENDS avahi" + XBMC_AVAHI="--enable-avahi" +else + XBMC_AVAHI="--disable-avahi" +fi + +if [ "$MYSQL_SUPPORT" = yes ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET mysql" + PKG_DEPENDS="$PKG_DEPENDS mysql" + XBMC_MYSQL="--enable-mysql" +else + XBMC_MYSQL="--disable-mysql" +fi + +if [ "$AIRPLAY_SUPPORT" = yes ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libplist" + PKG_DEPENDS="$PKG_DEPENDS libplist" + XBMC_AIRPLAY="--enable-airplay" +else + XBMC_AIRPLAY="--disable-airplay" +fi + +if [ "$AIRTUNES_SUPPORT" = yes ]; then + if [ "$XBMC" = master ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libshairplay" + PKG_DEPENDS="$PKG_DEPENDS libshairplay" + else + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libshairport" + PKG_DEPENDS="$PKG_DEPENDS libshairport" + fi + XBMC_AIRTUNES="--enable-airtunes" +else + XBMC_AIRTUNES="--disable-airtunes" +fi + +if [ "$NFS_SUPPORT" = yes ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libnfs" + PKG_DEPENDS="$PKG_DEPENDS libnfs" + XBMC_NFS="--enable-nfs" +else + XBMC_NFS="--disable-nfs" +fi + +if [ "$AFP_SUPPORT" = yes ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET afpfs-ng" + PKG_DEPENDS="$PKG_DEPENDS afpfs-ng" + XBMC_AFP="--enable-afpclient" +else + XBMC_AFP="--disable-afpclient" +fi + +if [ "$SAMBA_SUPPORT" = yes ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET samba" + PKG_DEPENDS="$PKG_DEPENDS samba" + XBMC_SAMBA="--enable-samba" + XBMC_LIBS="$XBMC_LIBS -ltalloc -ltdb -ltevent -lwbclient" +else + XBMC_SAMBA="--disable-samba" +fi + +if [ "$WEBSERVER" = yes ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libmicrohttpd" + XBMC_WEBSERVER="--enable-webserver" +else + XBMC_WEBSERVER="--disable-webserver" +fi + +if [ "$UPNP_SUPPORT" = yes ]; then + XBMC_UPNP="--enable-upnp" +else + XBMC_UPNP="--disable-upnp" +fi + +if [ "$SSHLIB_SUPPORT" = yes ]; then + XBMC_SSH="--enable-ssh" +else + XBMC_SSH="--disable-ssh" +fi + +if [ ! "$XBMCPLAYER_DRIVER" = default ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET $XBMCPLAYER_DRIVER" + PKG_DEPENDS="$PKG_DEPENDS $XBMCPLAYER_DRIVER" + + if [ "$XBMCPLAYER_DRIVER" = bcm2835-driver ]; then + XBMC_OPENMAX="--enable-openmax" + XBMC_PLAYER="--enable-player=omxplayer" + XBMC_CODEC="--with-platform=raspberry-pi" + BCM2835_INCLUDES="-I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads/ \ + -I$SYSROOT_PREFIX/usr/include/interface/vmcs_host/linux" + XBMC_CFLAGS="$XBMC_CFLAGS $BCM2835_INCLUDES" + XBMC_CXXFLAGS="$XBMC_CXXFLAGS $BCM2835_INCLUDES" + elif [ "$XBMCPLAYER_DRIVER" = "marvell-libgfx" ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET marvell-ipp" + PKG_DEPENDS="$PKG_DEPENDS marvell-ipp" + XBMC_OPENMAX="--disable-openmax" + XBMC_PLAYER="--with-platform=marvell-dove" + XBMC_CODEC="" + elif [ "$XBMCPLAYER_DRIVER" = "libamlplayer-m1" -o "$XBMCPLAYER_DRIVER" = "libamlplayer-m3" ]; then + XBMC_OPENMAX="--disable-openmax" + XBMC_PLAYER="--enable-player=amlplayer" + XBMC_CODEC="--enable-codec=amcodec" + AMLPLAYER_INCLUDES="-I$SYSROOT_PREFIX/usr/include/amlplayer" + XBMC_CFLAGS="$XBMC_CFLAGS $AMLPLAYER_INCLUDES" + XBMC_CXXFLAGS="$XBMC_CXXFLAGS $AMLPLAYER_INCLUDES" + + else + XBMC_OPENMAX="--disable-openmax" + fi +fi + +if [ "$VDPAU" = yes ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libvdpau" + PKG_DEPENDS="$PKG_DEPENDS libvdpau" + XBMC_VDPAU="--enable-vdpau" +else + XBMC_VDPAU="--disable-vdpau" +fi + +if [ "$VAAPI" = yes ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libva" + PKG_DEPENDS="$PKG_DEPENDS libva" + XBMC_VAAPI="--enable-vaapi" +else + XBMC_VAAPI="--disable-vaapi" +fi + +if [ "$XVBA" = yes ]; then + get_graphicdrivers + for drv in $GRAPHIC_DRIVERS; do + if [ "$drv" = "fglrx" ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET xf86-video-fglrx" + elif [ "$drv" = "fglrx-legacy" ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET xf86-video-fglrx-legacy" + fi + done + XBMC_XVBA="--enable-xvba" +else + XBMC_XVBA="--disable-xvba" +fi + +if [ "$CRYSTALHD" = yes ]; then + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET crystalhd" + PKG_DEPENDS="$PKG_DEPENDS crystalhd" + XBMC_CRYSTALHD="--enable-crystalhd" +else + XBMC_CRYSTALHD="--disable-crystalhd" +fi + +export PYTHON_VERSION="2.7" +export PYTHON_CPPFLAGS="-I$SYSROOT_PREFIX/usr/include/python$PYTHON_VERSION" +export PYTHON_LDFLAGS="-L$SYSROOT_PREFIX/usr/lib/python$PYTHON_VERSION -lpython$PYTHON_VERSION" +export PYTHON_SITE_PKG="$SYSROOT_PREFIX/usr/lib/python$PYTHON_VERSION/site-packages" +export ac_python_version="$PYTHON_VERSION" + +PKG_CONFIGURE_OPTS_TARGET="gl_cv_func_gettimeofday_clobber=no \ + --with-arch=$TARGET_ARCH \ + --with-cpu=$TARGET_CPU \ + --disable-debug \ + --disable-optimizations \ + $XBMC_OPENGL \ + $XBMC_OPENGLES \ + $XBMC_SDL \ + $XBMC_OPENMAX \ + $XBMC_VDPAU \ + $XBMC_VAAPI \ + $XBMC_CRYSTALHD \ + $XBMC_XVBA \ + --disable-vdadecoder \ + --disable-vtbdecoder \ + --disable-tegra \ + --disable-profiling \ + $XBMC_JOYSTICK \ + $XBMC_CEC \ + --enable-udev \ + --disable-libusb \ + $XBMC_GOOM \ + $XBMC_RSXS \ + $XBMC_PROJECTM \ + $XBMC_XORG \ + --disable-ccache \ + $XBMC_ALSA \ + $XBMC_PULSEAUDIO \ + --enable-rtmp \ + $XBMC_SAMBA \ + $XBMC_NFS \ + $XBMC_AFP \ + $XBMC_VORBISENC \ + --enable-ffmpeg-libvorbis \ + $XBMC_LAMEENC \ + $XBMC_DVDCSS \ + --disable-mid \ + --disable-hal \ + $XBMC_AVAHI \ + $XBMC_UPNP \ + $XBMC_MYSQL \ + $XBMC_SSH \ + $XBMC_AIRPLAY \ + $XBMC_AIRTUNES \ + $XBMC_NONFREE \ + --disable-asap-codec \ + $XBMC_WEBSERVER \ + $XBMC_OPTICAL \ + $XBMC_BLURAY \ + --enable-texturepacker --with-texturepacker-root="$ROOT/$TOOLCHAIN" \ + --disable-external-libraries \ + --enable-external-ffmpeg \ + $XBMC_CODEC \ + $XBMC_PLAYER" + +pre_build_target() { +# adding fake Makefile for stripped skin + mkdir -p $PKG_BUILD/addons/skin.confluence/media + touch $PKG_BUILD/addons/skin.confluence/media/Makefile.in + +# autoreconf + BOOTSTRAP_STANDALONE=1 make -C $PKG_BUILD -f bootstrap.mk +} + +pre_configure_target() { +# xbmc fails to build in subdirs + cd $ROOT/$PKG_BUILD + rm -rf .$TARGET_NAME + +# xbmc fails to build with LTO optimization if build without GOLD support + [ ! "$GOLD_SUPPORT" = "yes" ] && strip_lto + +# Todo: XBMC segfaults on exit when building with LTO support + strip_lto + +# dont build parallel +# MAKEFLAGS=-j1 + + export CFLAGS="$CFLAGS $XBMC_CFLAGS" + export CXXFLAGS="$CXXFLAGS $XBMC_CXXFLAGS" + export LIBS="$LIBS $XBMC_LIBS" +} + +make_target() { +# setup skin dir from default skin + SKIN_DIR="skin.`tolower $SKIN_DEFAULT`" + +# setup default skin inside the sources + sed -i -e "s|skin.confluence|$SKIN_DIR|g" $ROOT/$PKG_BUILD/xbmc/settings/Settings.h + + make externals + make xbmc.bin + + if [ "$DISPLAYSERVER" = "xorg-server" ]; then + make xbmc-xrandr + fi + + make -C tools/TexturePacker + cp -PR tools/TexturePacker/TexturePacker $ROOT/$TOOLCHAIN/bin +} + +post_makeinstall_target() { + mkdir -p $INSTALL/usr/bin + cp $PKG_DIR/scripts/cputemp $INSTALL/usr/bin + cp $PKG_DIR/scripts/gputemp $INSTALL/usr/bin + cp $PKG_DIR/scripts/setwakeup.sh $INSTALL/usr/bin + cp tools/EventClients/Clients/XBMC\ Send/xbmc-send.py $INSTALL/usr/bin/xbmc-send + + rm -rf $INSTALL/usr/bin/xbmc + rm -rf $INSTALL/usr/bin/xbmc-standalone + + if [ ! "$DISPLAYSERVER" = "xorg-server" ]; then + rm -rf $INSTALL/usr/lib/xbmc/xbmc-xrandr + fi + + if [ ! "$XBMC_SCR_RSXS" = yes ]; then + rm -rf $INSTALL/usr/share/xbmc/addons/screensaver.rsxs.* + fi + + if [ ! "$XBMC_VIS_PROJECTM" = yes ]; then + rm -rf $INSTALL/usr/share/xbmc/addons/visualization.projectm + fi + + rm -rf $INSTALL/usr/share/applications + rm -rf $INSTALL/usr/share/icons + rm -rf $INSTALL/usr/share/xbmc/addons/repository.pvr-* + rm -rf $INSTALL/usr/share/xbmc/addons/script.module.pysqlite + rm -rf $INSTALL/usr/share/xbmc/addons/script.module.simplejson + rm -rf $INSTALL/usr/share/xbmc/addons/visualization.dxspectrum + rm -rf $INSTALL/usr/share/xbmc/addons/visualization.itunes + rm -rf $INSTALL/usr/share/xbmc/addons/visualization.milkdrop + rm -rf $INSTALL/usr/share/xsessions + + mkdir -p $INSTALL/usr/share/xbmc/addons + cp -R $PKG_DIR/config/os.openelec.tv $INSTALL/usr/share/xbmc/addons + $SED "s|@OS_VERSION@|$OS_VERSION|g" -i $INSTALL/usr/share/xbmc/addons/os.openelec.tv/addon.xml + cp -R $PKG_DIR/config/repository.openelec.tv $INSTALL/usr/share/xbmc/addons + $SED "s|@ADDON_URL@|$ADDON_URL|g" -i $INSTALL/usr/share/xbmc/addons/repository.openelec.tv/addon.xml + + mkdir -p $INSTALL/usr/lib/python"$PYTHON_VERSION"/site-packages/xbmc + cp -R tools/EventClients/lib/python/* $INSTALL/usr/lib/python"$PYTHON_VERSION"/site-packages/xbmc + +# install powermanagement hooks + mkdir -p $INSTALL/etc/pm/sleep.d + cp $PKG_DIR/sleep.d/* $INSTALL/etc/pm/sleep.d + +# install project specific configs + mkdir -p $INSTALL/usr/share/xbmc/config + if [ -f $PROJECT_DIR/$PROJECT/xbmc/guisettings.xml ]; then + cp -R $PROJECT_DIR/$PROJECT/xbmc/guisettings.xml $INSTALL/usr/share/xbmc/config + fi + + if [ -f $PROJECT_DIR/$PROJECT/xbmc/sources.xml ]; then + cp -R $PROJECT_DIR/$PROJECT/xbmc/sources.xml $INSTALL/usr/share/xbmc/config + fi + + mkdir -p $INSTALL/usr/share/xbmc/system/ + if [ -f $PROJECT_DIR/$PROJECT/xbmc/advancedsettings.xml ]; then + cp $PROJECT_DIR/$PROJECT/xbmc/advancedsettings.xml $INSTALL/usr/share/xbmc/system/ + else + cp $PKG_DIR/config/advancedsettings.xml $INSTALL/usr/share/xbmc/system/ + fi + + if [ "$XBMC" = master ]; then + mkdir -p $INSTALL/usr/share/xbmc/system/settings + if [ -f $PROJECT_DIR/$PROJECT/xbmc/appliance.xml ]; then + cp $PROJECT_DIR/$PROJECT/xbmc/appliance.xml $INSTALL/usr/share/xbmc/system/settings + else + cp $PKG_DIR/config/appliance.xml $INSTALL/usr/share/xbmc/system/settings + fi + fi + + if [ "$XBMC_EXTRA_FONTS" = yes ]; then + mkdir -p $INSTALL/usr/share/xbmc/media/Fonts + cp $PKG_DIR/fonts/*.ttf $INSTALL/usr/share/xbmc/media/Fonts + fi +} + diff --git a/packages/mediacenter/xbmc/patches/12.2-8e4f924/todo/xbmc-990.27-PR2232.patch.bk b/packages/mediacenter/xbmc/patches/12.2-e40d13d/todo/xbmc-990.27-PR2232.patch.bk similarity index 100% rename from packages/mediacenter/xbmc/patches/12.2-8e4f924/todo/xbmc-990.27-PR2232.patch.bk rename to packages/mediacenter/xbmc/patches/12.2-e40d13d/todo/xbmc-990.27-PR2232.patch.bk diff --git a/packages/mediacenter/xbmc/patches/12.2-8e4f924/todo/xbmc-995.03-OMXPlayer-Audio-fix_incorrect_usage_of_flag_talled.patch.bk b/packages/mediacenter/xbmc/patches/12.2-e40d13d/todo/xbmc-995.03-OMXPlayer-Audio-fix_incorrect_usage_of_flag_talled.patch.bk similarity index 100% rename from packages/mediacenter/xbmc/patches/12.2-8e4f924/todo/xbmc-995.03-OMXPlayer-Audio-fix_incorrect_usage_of_flag_talled.patch.bk rename to packages/mediacenter/xbmc/patches/12.2-e40d13d/todo/xbmc-995.03-OMXPlayer-Audio-fix_incorrect_usage_of_flag_talled.patch.bk diff --git a/packages/mediacenter/xbmc/patches/12.2-8e4f924/todo/xbmc-995.04-OMXPlayer-some_caching_fixes_for_pvr.patch.bk b/packages/mediacenter/xbmc/patches/12.2-e40d13d/todo/xbmc-995.04-OMXPlayer-some_caching_fixes_for_pvr.patch.bk similarity index 100% rename from packages/mediacenter/xbmc/patches/12.2-8e4f924/todo/xbmc-995.04-OMXPlayer-some_caching_fixes_for_pvr.patch.bk rename to packages/mediacenter/xbmc/patches/12.2-e40d13d/todo/xbmc-995.04-OMXPlayer-some_caching_fixes_for_pvr.patch.bk diff --git a/packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-321-texturepacker-hostflags-and-rework.patch b/packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-321-texturepacker-hostflags-and-rework.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-321-texturepacker-hostflags-and-rework.patch rename to packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-321-texturepacker-hostflags-and-rework.patch diff --git a/packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch b/packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch rename to packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-452-change_lcd_content-0.1.patch b/packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-452-change_lcd_content-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-452-change_lcd_content-0.1.patch rename to packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-452-change_lcd_content-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-453-add_openelec.tv_RSS_news-0.1.patch b/packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-453-add_openelec.tv_RSS_news-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-453-add_openelec.tv_RSS_news-0.1.patch rename to packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-453-add_openelec.tv_RSS_news-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-990.00-remove-windowed-display-mode.patch b/packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-990.00-remove-windowed-display-mode.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-990.00-remove-windowed-display-mode.patch rename to packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-990.00-remove-windowed-display-mode.patch diff --git a/packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-990.24-smbnfsdeinit-and-wait-for-nic-on-wakeup.patch b/packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-990.24-smbnfsdeinit-and-wait-for-nic-on-wakeup.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-990.24-smbnfsdeinit-and-wait-for-nic-on-wakeup.patch rename to packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-990.24-smbnfsdeinit-and-wait-for-nic-on-wakeup.patch diff --git a/packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-995.11-enable-vpp-deinterlacing.patch b/packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-995.11-enable-vpp-deinterlacing.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-995.11-enable-vpp-deinterlacing.patch rename to packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-995.11-enable-vpp-deinterlacing.patch diff --git a/packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-995.12-enable-vpp-fix-audio-out-of-sync.patch b/packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-995.12-enable-vpp-fix-audio-out-of-sync.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-995.12-enable-vpp-fix-audio-out-of-sync.patch rename to packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-995.12-enable-vpp-fix-audio-out-of-sync.patch diff --git a/packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-995.13-vpp-fix-skipping.patch b/packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-995.13-vpp-fix-skipping.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/12.2-8e4f924/xbmc-995.13-vpp-fix-skipping.patch rename to packages/mediacenter/xbmc/patches/12.2-e40d13d/xbmc-995.13-vpp-fix-skipping.patch diff --git a/packages/mediacenter/xbmc/patches/c218d5c/xbmc-321-texturepacker-hostflags-and-rework.patch b/packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-321-texturepacker-hostflags-and-rework.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/c218d5c/xbmc-321-texturepacker-hostflags-and-rework.patch rename to packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-321-texturepacker-hostflags-and-rework.patch diff --git a/packages/mediacenter/xbmc/patches/c218d5c/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch b/packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/c218d5c/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch rename to packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/c218d5c/xbmc-453-add_openelec.tv_RSS_news-0.1.patch b/packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-453-add_openelec.tv_RSS_news-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/c218d5c/xbmc-453-add_openelec.tv_RSS_news-0.1.patch rename to packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-453-add_openelec.tv_RSS_news-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-602-add_as.xml_busy_dialog_delay_control.patch b/packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-602-add_as.xml_busy_dialog_delay_control.patch new file mode 100644 index 0000000000..88807638f3 --- /dev/null +++ b/packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-602-add_as.xml_busy_dialog_delay_control.patch @@ -0,0 +1,57 @@ +diff -Naur xbmc-13.alpha-6edea14/xbmc/cores/dvdplayer/DVDPlayer.cpp xbmc-13.alpha-6edea14.patch/xbmc/cores/dvdplayer/DVDPlayer.cpp +--- xbmc-13.alpha-6edea14/xbmc/cores/dvdplayer/DVDPlayer.cpp 2013-08-02 16:28:51.000000000 +0200 ++++ xbmc-13.alpha-6edea14.patch/xbmc/cores/dvdplayer/DVDPlayer.cpp 2013-08-02 17:19:34.162512140 +0200 +@@ -479,7 +479,7 @@ + #endif + + Create(); +- if(!m_ready.WaitMSec(100)) ++ if(!m_ready.WaitMSec(g_advancedSettings.m_videoBusyDialogDelay_ms)) + { + CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY); + if(dialog) +diff -Naur xbmc-13.alpha-6edea14/xbmc/cores/omxplayer/OMXPlayer.cpp xbmc-13.alpha-6edea14.patch/xbmc/cores/omxplayer/OMXPlayer.cpp +--- xbmc-13.alpha-6edea14/xbmc/cores/omxplayer/OMXPlayer.cpp 2013-08-02 16:28:51.000000000 +0200 ++++ xbmc-13.alpha-6edea14.patch/xbmc/cores/omxplayer/OMXPlayer.cpp 2013-08-02 17:19:34.164512143 +0200 +@@ -522,7 +522,7 @@ + #endif + + Create(); +- if(!m_ready.WaitMSec(100)) ++ if(!m_ready.WaitMSec(g_advancedSettings.m_videoBusyDialogDelay_ms)) + { + CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY); + if(dialog) +diff -Naur xbmc-13.alpha-6edea14/xbmc/settings/AdvancedSettings.cpp xbmc-13.alpha-6edea14.patch/xbmc/settings/AdvancedSettings.cpp +--- xbmc-13.alpha-6edea14/xbmc/settings/AdvancedSettings.cpp 2013-08-02 16:28:51.000000000 +0200 ++++ xbmc-13.alpha-6edea14.patch/xbmc/settings/AdvancedSettings.cpp 2013-08-02 17:21:43.772739525 +0200 +@@ -184,6 +184,7 @@ + + m_videoDefaultLatency = 0.0; + m_videoDisableHi10pMultithreading = false; ++ m_videoBusyDialogDelay_ms = 100; + + m_musicUseTimeSeeking = true; + m_musicTimeSeekForward = 10; +@@ -700,6 +701,10 @@ + //0 = disable fps detect, 1 = only detect on timestamps with uniform spacing, 2 detect on all timestamps + XMLUtils::GetInt(pElement, "fpsdetect", m_videoFpsDetect, 0, 2); + ++ // controls the delay, in milliseconds, until ++ // the busy dialog is shown when starting video playback. ++ XMLUtils::GetInt(pElement, "busydialogdelayms", m_videoBusyDialogDelay_ms, 0, 1000); ++ + // Store global display latency settings + TiXmlElement* pVideoLatency = pElement->FirstChildElement("latency"); + if (pVideoLatency) +diff -Naur xbmc-13.alpha-6edea14/xbmc/settings/AdvancedSettings.h xbmc-13.alpha-6edea14.patch/xbmc/settings/AdvancedSettings.h +--- xbmc-13.alpha-6edea14/xbmc/settings/AdvancedSettings.h 2013-08-02 16:28:51.000000000 +0200 ++++ xbmc-13.alpha-6edea14.patch/xbmc/settings/AdvancedSettings.h 2013-08-02 17:21:29.790714897 +0200 +@@ -190,6 +190,7 @@ + bool m_DXVANoDeintProcForProgressive; + int m_videoFpsDetect; + bool m_videoDisableHi10pMultithreading; ++ int m_videoBusyDialogDelay_ms; + StagefrightConfig m_stagefrightConfig; + + CStdString m_videoDefaultPlayer; diff --git a/packages/mediacenter/xbmc/patches/c218d5c/xbmc-990.15-depends-mark_our_wrapped_functions_as_used.patch b/packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-990.15-depends-mark_our_wrapped_functions_as_used.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/c218d5c/xbmc-990.15-depends-mark_our_wrapped_functions_as_used.patch rename to packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-990.15-depends-mark_our_wrapped_functions_as_used.patch diff --git a/packages/mediacenter/xbmc/patches/c218d5c/xbmc-995.01-xvba_support-da1ff12.patch b/packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-995.01-xvba_support-8fdcc86.patch similarity index 72% rename from packages/mediacenter/xbmc/patches/c218d5c/xbmc-995.01-xvba_support-da1ff12.patch rename to packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-995.01-xvba_support-8fdcc86.patch index c6bd3082c1..24c5392f3c 100644 --- a/packages/mediacenter/xbmc/patches/c218d5c/xbmc-995.01-xvba_support-da1ff12.patch +++ b/packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-995.01-xvba_support-8fdcc86.patch @@ -1,7062 +1,7 @@ -From 16898b6bd8f19f416c9f4765ee20858fb42ead11 Mon Sep 17 00:00:00 2001 -From: fritsch -Date: Mon, 15 Apr 2013 20:27:39 +0200 -Subject: [PATCH 001/123] AE: Start of planar format internally - ---- - xbmc/cores/AudioEngine/AEAudioFormat.h | 7 +++++++ - xbmc/cores/AudioEngine/Utils/AEUtil.cpp | 14 ++++++++++++++ - 2 files changed, 21 insertions(+) - -diff --git a/xbmc/cores/AudioEngine/AEAudioFormat.h b/xbmc/cores/AudioEngine/AEAudioFormat.h -index 369811c..64be36f 100644 ---- a/xbmc/cores/AudioEngine/AEAudioFormat.h -+++ b/xbmc/cores/AudioEngine/AEAudioFormat.h -@@ -31,26 +31,33 @@ enum AEDataFormat - AE_FMT_INVALID = -1, - - AE_FMT_U8, -+ AE_FMT_U8P, - AE_FMT_S8, - - AE_FMT_S16BE, - AE_FMT_S16LE, - AE_FMT_S16NE, -+ AE_FMT_S16NEP, - - AE_FMT_S32BE, - AE_FMT_S32LE, - AE_FMT_S32NE, -+ AE_FMT_S32NEP, - - AE_FMT_S24BE4, - AE_FMT_S24LE4, - AE_FMT_S24NE4, /* S24 in 4 bytes */ -+ AE_FMT_S24NE4P, - - AE_FMT_S24BE3, - AE_FMT_S24LE3, - AE_FMT_S24NE3, /* S24 in 3 bytes */ -+ AE_FMT_S24NE3P, - - AE_FMT_DOUBLE, -+ AE_FMT_DOUBLEP, - AE_FMT_FLOAT, -+ AE_FMT_FLOATP, - - /* Bitstream formats */ - AE_FMT_AAC, -diff --git a/xbmc/cores/AudioEngine/Utils/AEUtil.cpp b/xbmc/cores/AudioEngine/Utils/AEUtil.cpp -index 6de84dc..3322226 100644 ---- a/xbmc/cores/AudioEngine/Utils/AEUtil.cpp -+++ b/xbmc/cores/AudioEngine/Utils/AEUtil.cpp -@@ -82,26 +82,33 @@ const unsigned int CAEUtil::DataFormatToBits(const enum AEDataFormat dataFormat) - static const unsigned int formats[AE_FMT_MAX] = - { - 8, /* U8 */ -+ 8, /* U8P */ - 8, /* S8 */ - - 16, /* S16BE */ - 16, /* S16LE */ - 16, /* S16NE */ -+ 16, /* S16NEP */ - - 32, /* S32BE */ - 32, /* S32LE */ - 32, /* S32NE */ -+ 32, /* S32NEP */ - - 32, /* S24BE */ - 32, /* S24LE */ - 32, /* S24NE */ -+ 32, /* S24NEP */ - - 24, /* S24BE3 */ - 24, /* S24LE3 */ - 24, /* S24NE3 */ -+ 24, /* S24NE3P*/ - - sizeof(double) << 3, /* DOUBLE */ -+ sizeof(double) << 3, /* DOUBLEP */ - sizeof(float ) << 3, /* FLOAT */ -+ sizeof(float ) << 3, /* FLOATP */ - - 16, /* AAC */ - 16, /* AC3 */ -@@ -123,26 +130,33 @@ const char* CAEUtil::DataFormatToStr(const enum AEDataFormat dataFormat) - static const char *formats[AE_FMT_MAX] = - { - "AE_FMT_U8", -+ "AE_FMT_U8P", - "AE_FMT_S8", - - "AE_FMT_S16BE", - "AE_FMT_S16LE", - "AE_FMT_S16NE", -+ "AE_FMT_S16NEP", - - "AE_FMT_S32BE", - "AE_FMT_S32LE", - "AE_FMT_S32NE", -+ "AE_FMT_S32NEP", - - "AE_FMT_S24BE4", - "AE_FMT_S24LE4", - "AE_FMT_S24NE4", /* S24 in 4 bytes */ -+ "AE_FMT_S24NE4P", - - "AE_FMT_S24BE3", - "AE_FMT_S24LE3", - "AE_FMT_S24NE3", /* S24 in 3 bytes */ -+ "AE_FMT_S24NE3P", - - "AE_FMT_DOUBLE", -+ "AE_FMT_DOUBLEP", - "AE_FMT_FLOAT", -+ "AE_FMT_FLOATP", - - /* for passthrough streams and the like */ - "AE_FMT_AAC", --- -1.8.1.6 - - -From 7be39700ca76a23e1f51315a77e4fba5dfdfbc39 Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Fri, 31 May 2013 16:28:30 +0200 -Subject: [PATCH 002/123] AE: register callback for all audio settings - ---- - xbmc/settings/Settings.cpp | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp -index 65e685a..ee97753 100644 ---- a/xbmc/settings/Settings.cpp -+++ b/xbmc/settings/Settings.cpp -@@ -840,8 +840,18 @@ void CSettings::InitializeISettingCallbacks() - m_settingsManager->RegisterCallback(&CDisplaySettings::Get(), settingSet); - - settingSet.clear(); -+ settingSet.insert("audiooutput.mode"); - settingSet.insert("audiooutput.channels"); - settingSet.insert("audiooutput.guisoundmode"); -+ settingSet.insert("audiooutput.stereoupmix"); -+ settingSet.insert("audiooutput.ac3passthrough"); -+ settingSet.insert("audiooutput.dtspassthrough"); -+ 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("lookandfeel.skin"); - settingSet.insert("lookandfeel.skinsettings"); - settingSet.insert("lookandfeel.font"); --- -1.8.1.6 - - -From a2070bcc6555822f98e8bb5d846dee36c3b98028 Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Thu, 23 May 2013 10:05:11 +0200 -Subject: [PATCH 003/123] AESinkALSA: drop unneeded member - ---- - xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 11 ++++++----- - xbmc/cores/AudioEngine/Sinks/AESinkALSA.h | 1 - - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp -index 9d3cefa..32fb450 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp -@@ -131,19 +131,20 @@ void CAESinkALSA::GetAESParams(AEAudioFormat format, std::string& params) - - bool CAESinkALSA::Initialize(AEAudioFormat &format, std::string &device) - { -+ CAEChannelInfo channelLayout; - m_initDevice = device; - m_initFormat = format; - - /* if we are raw, correct the data format */ - if (AE_IS_RAW(format.m_dataFormat)) - { -- m_channelLayout = GetChannelLayout(format); -+ channelLayout = GetChannelLayout(format); - format.m_dataFormat = AE_FMT_S16NE; - m_passthrough = true; - } - else - { -- m_channelLayout = GetChannelLayout(format); -+ channelLayout = GetChannelLayout(format); - m_passthrough = false; - } - #if defined(HAS_AMLPLAYER) || defined(HAS_LIBAMCODEC) -@@ -154,13 +155,13 @@ bool CAESinkALSA::Initialize(AEAudioFormat &format, std::string &device) - } - #endif - -- if (m_channelLayout.Count() == 0) -+ if (channelLayout.Count() == 0) - { - CLog::Log(LOGERROR, "CAESinkALSA::Initialize - Unable to open the requested channel layout"); - return false; - } - -- format.m_channelLayout = m_channelLayout; -+ format.m_channelLayout = channelLayout; - - AEDeviceType devType = AEDeviceTypeFromName(device); - -@@ -176,7 +177,7 @@ bool CAESinkALSA::Initialize(AEAudioFormat &format, std::string &device) - snd_config_t *config; - snd_config_copy(&config, snd_config); - -- if (!OpenPCMDevice(device, AESParams, m_channelLayout.Count(), &m_pcm, config)) -+ if (!OpenPCMDevice(device, AESParams, channelLayout.Count(), &m_pcm, config)) - { - CLog::Log(LOGERROR, "CAESinkALSA::Initialize - failed to initialize device \"%s\"", device.c_str()); - snd_config_delete(config); -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h -index e2b4e4f..73615a5 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h -@@ -64,7 +64,6 @@ class CAESinkALSA : public IAESink - unsigned int m_bufferSize; - double m_formatSampleRateMul; - bool m_passthrough; -- CAEChannelInfo m_channelLayout; - std::string m_device; - snd_pcm_t *m_pcm; - int m_timeout; --- -1.8.1.6 - - -From 1871f8bc6bb5828299b57db0fbf131392e2ea5a1 Mon Sep 17 00:00:00 2001 -From: xbmc -Date: Sat, 27 Apr 2013 10:47:01 +0200 -Subject: [PATCH 004/123] ffmpeg: add methods to the interface needed for - resampling - ---- - lib/DllAvUtil.h | 14 ++++++++++++++ - lib/DllSwResample.h | 15 +++++++++++++++ - 2 files changed, 29 insertions(+) - -diff --git a/lib/DllAvUtil.h b/lib/DllAvUtil.h -index 1afee5e..bbe9be2 100644 ---- a/lib/DllAvUtil.h -+++ b/lib/DllAvUtil.h -@@ -95,6 +95,9 @@ class DllAvUtilInterface - virtual void av_dict_free(AVDictionary **pm) = 0; - virtual int av_samples_get_buffer_size (int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align) = 0; - virtual int64_t av_get_default_channel_layout(int nb_channels)=0; -+ virtual int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align) = 0; -+ virtual int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt) = 0; -+ virtual int av_get_channel_layout_channel_index (uint64_t channel_layout, uint64_t channel) = 0; - }; - - #if defined (USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) -@@ -133,6 +136,10 @@ class DllAvUtilBase : public DllDynamic, DllAvUtilInterface - virtual int av_samples_get_buffer_size (int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align) - { return ::av_samples_get_buffer_size(linesize, nb_channels, nb_samples, sample_fmt, align); } - virtual int64_t av_get_default_channel_layout(int nb_channels) { return ::av_get_default_channel_layout(nb_channels); } -+ virtual int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align) -+ { return ::av_samples_alloc(audio_data, linesize, nb_channels, nb_samples, sample_fmt, align); } -+ virtual int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt) { return ::av_sample_fmt_is_planar(sample_fmt); } -+ virtual int av_get_channel_layout_channel_index (uint64_t channel_layout, uint64_t channel) { return ::av_get_channel_layout_channel_index(channel_layout, channel); } - - // DLL faking. - virtual bool ResolveExports() { return true; } -@@ -178,6 +185,9 @@ class DllAvUtilBase : public DllDynamic, DllAvUtilInterface - DEFINE_METHOD1(void, av_dict_free, (AVDictionary **p1)); - DEFINE_METHOD5(int, av_samples_get_buffer_size, (int *p1, int p2, int p3, enum AVSampleFormat p4, int p5)) - DEFINE_METHOD1(int64_t, av_get_default_channel_layout, (int p1)) -+ DEFINE_METHOD6(int, av_samples_alloc, (uint8_t **p1, int *p2, int p3, int p4, enum AVSampleFormat p5, int p6)) -+ DEFINE_METHOD1(int, av_sample_fmt_is_planar, (enum AVSampleFormat p1)) -+ DEFINE_METHOD2(int, av_get_channel_layout_channel_index, (uint64_t p1, uint64_t p2)) - - public: - BEGIN_METHOD_RESOLVE() -@@ -206,6 +216,10 @@ class DllAvUtilBase : public DllDynamic, DllAvUtilInterface - RESOLVE_METHOD(av_dict_free) - RESOLVE_METHOD(av_samples_get_buffer_size) - RESOLVE_METHOD(av_get_default_channel_layout) -+ RESOLVE_METHOD(av_samples_alloc) -+ RESOLVE_METHOD(av_sample_fmt_is_planar) -+ RESOLVE_METHOD(av_get_channel_layout_channel_index) -+ - END_METHOD_RESOLVE() - }; - -diff --git a/lib/DllSwResample.h b/lib/DllSwResample.h -index e9613d3..320b3a7 100644 ---- a/lib/DllSwResample.h -+++ b/lib/DllSwResample.h -@@ -60,6 +60,9 @@ class DllSwResampleInterface - virtual int swr_init(struct SwrContext *s)=0; - virtual void swr_free(struct SwrContext **s)=0; - virtual int swr_convert(struct SwrContext *s, uint8_t **out, int out_count, const uint8_t **in , int in_count)=0; -+ virtual int64_t swr_get_delay(struct SwrContext *s, int64_t base) = 0; -+ virtual int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map) = 0; -+ virtual int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride) = 0; - }; - - #if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) -@@ -84,6 +87,9 @@ class DllSwResample : public DllDynamic, DllSwResampleInterface - virtual int swr_init(struct SwrContext *s) { return ::swr_init(s); } - virtual void swr_free(struct SwrContext **s){ return ::swr_free(s); } - virtual int swr_convert(struct SwrContext *s, uint8_t **out, int out_count, const uint8_t **in , int in_count){ return ::swr_convert(s, out, out_count, in, in_count); } -+ virtual int64_t swr_get_delay(struct SwrContext *s, int64_t base) { return ::swr_get_delay(s, base); } -+ virtual int swr_set_channel_mapping (struct SwrContext *s, const int *channel_map) { return ::swr_set_channel_mapping(s, channel_map); } -+ virtual int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride) { return ::swr_set_matrix(s, matrix, stride); } - }; - #else - // Wrap the same API through libavresample. -@@ -114,6 +120,9 @@ class DllSwResample : public DllDynamic, DllSwResampleInterface - virtual int swr_init(struct SwrContext *s) { return ::avresample_open(s); } - virtual void swr_free(struct SwrContext **s){ ::avresample_close(*s); *s = NULL; } - virtual int swr_convert(struct SwrContext *s, uint8_t **out, int out_count, const uint8_t **in , int in_count){ return ::avresample_convert(s, out, 0, out_count, (uint8_t**)in, 0,in_count); } -+ virtual int64_t swr_get_delay(struct SwrContext *s, int64_t base){return ::swr_get_delay(s, base);} -+ virtual int swr_set_channel_mapping (struct SwrContext *s, const int *channel_map){return ::swr_set_channel_mapping(s, channel_map);} -+ virtual int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride) { return ::swr_set_matrix(s, matrix, stride);} - }; - #endif - -@@ -129,12 +138,18 @@ class DllSwResample : public DllDynamic, DllSwResampleInterface - DEFINE_METHOD1(int, swr_init, (struct SwrContext *p1)) - DEFINE_METHOD1(void, swr_free, (struct SwrContext **p1)) - DEFINE_METHOD5(int, swr_convert, (struct SwrContext *p1, uint8_t **p2, int p3, const uint8_t **p4, int p5)) -+ DEFINE_METHOD2(int64_t, swr_get_delay, (struct SwrContext *p1, int64_t p2)) -+ DEFINE_METHOD2(int, swr_set_channel_mapping, (struct SwrContext *p1, const int *p2)) -+ DEFINE_METHOD3(int, swr_set_matrix, (struct SwrContext *p1, const double *p2, int p3)) - - BEGIN_METHOD_RESOLVE() - RESOLVE_METHOD(swr_alloc_set_opts) - RESOLVE_METHOD(swr_init) - RESOLVE_METHOD(swr_free) - RESOLVE_METHOD(swr_convert) -+ RESOLVE_METHOD(swr_get_delay) -+ RESOLVE_METHOD(swr_set_channel_mapping) -+ RESOLVE_METHOD(swr_set_matrix) - END_METHOD_RESOLVE() - - /* dependencies of libavformat */ --- -1.8.1.6 - - -From efe72091a8b488b8bb11063149252b6de292f66b Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Wed, 26 Jun 2013 15:12:28 +0200 -Subject: [PATCH 005/123] AE: allow encoder to be fed with planar format - ---- - .../cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp | 66 +++++++++++++++++++++- - xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h | 3 +- - xbmc/cores/AudioEngine/Interfaces/AEEncoder.h | 13 ++++- - 3 files changed, 78 insertions(+), 4 deletions(-) - -diff --git a/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp b/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp -index 99d9a47..36bae54 100644 ---- a/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp -+++ b/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp -@@ -98,7 +98,7 @@ unsigned int CAEEncoderFFmpeg::BuildChannelLayout(const int64_t ffmap, CAEChanne - return layout.Count(); - } - --bool CAEEncoderFFmpeg::Initialize(AEAudioFormat &format) -+bool CAEEncoderFFmpeg::Initialize(AEAudioFormat &format, bool allow_planar_input) - { - Reset(); - -@@ -150,6 +150,7 @@ bool CAEEncoderFFmpeg::Initialize(AEAudioFormat &format) - bool hasS32 = false; - bool hasS16 = false; - bool hasU8 = false; -+ bool hasFloatP = false; - bool hasUnknownFormat = false; - - for(int i = 0; codec->sample_fmts[i] != AV_SAMPLE_FMT_NONE; ++i) -@@ -161,6 +162,12 @@ bool CAEEncoderFFmpeg::Initialize(AEAudioFormat &format) - case AV_SAMPLE_FMT_S32: hasS32 = true; break; - case AV_SAMPLE_FMT_S16: hasS16 = true; break; - case AV_SAMPLE_FMT_U8 : hasU8 = true; break; -+ case AV_SAMPLE_FMT_FLTP: -+ if (allow_planar_input) -+ hasFloatP = true; -+ else -+ hasUnknownFormat = true; -+ break; - case AV_SAMPLE_FMT_NONE: return false; - default: hasUnknownFormat = true; break; - } -@@ -171,6 +178,11 @@ bool CAEEncoderFFmpeg::Initialize(AEAudioFormat &format) - m_CodecCtx->sample_fmt = AV_SAMPLE_FMT_FLT; - format.m_dataFormat = AE_FMT_FLOAT; - } -+ else if (hasFloatP) -+ { -+ m_CodecCtx->sample_fmt = AV_SAMPLE_FMT_FLTP; -+ format.m_dataFormat = AE_FMT_FLOATP; -+ } - else if (hasDouble) - { - m_CodecCtx->sample_fmt = AV_SAMPLE_FMT_DBL; -@@ -214,7 +226,6 @@ bool CAEEncoderFFmpeg::Initialize(AEAudioFormat &format) - return false; - } - -- format.m_dataFormat = AE_FMT_FLOAT; - format.m_frames = m_CodecCtx->frame_size; - format.m_frameSamples = m_CodecCtx->frame_size * m_CodecCtx->channels; - format.m_frameSize = m_CodecCtx->channels * (CAEUtil::DataFormatToBits(format.m_dataFormat) >> 3); -@@ -351,6 +362,57 @@ int CAEEncoderFFmpeg::Encode(float *data, unsigned int frames) - return m_NeededFrames; - } - -+int CAEEncoderFFmpeg::Encode(uint8_t *in, int in_size, uint8_t *out, int out_size) -+{ -+ int got_output; -+ AVFrame *frame; -+ -+ if (!m_CodecCtx) -+ return 0; -+ -+ /* allocate the input frame -+ * sadly, we have to alloc/dealloc it everytime since we have no guarantee the -+ * data argument will be constant over iterated calls and the frame needs to -+ * setup pointers inside data */ -+ frame = m_dllAvCodec.avcodec_alloc_frame(); -+ if (!frame) -+ return 0; -+ -+ frame->nb_samples = m_CodecCtx->frame_size; -+ frame->format = m_CodecCtx->sample_fmt; -+ frame->channel_layout = m_CodecCtx->channel_layout; -+ -+ m_dllAvCodec.avcodec_fill_audio_frame(frame, m_CodecCtx->channels, m_CodecCtx->sample_fmt, -+ in, in_size, 0); -+ -+ /* initialize the output packet */ -+ m_dllAvCodec.av_init_packet(&m_Pkt); -+ m_Pkt.size = out_size - IEC61937_DATA_OFFSET; -+ m_Pkt.data = out + IEC61937_DATA_OFFSET; -+ -+ /* encode it */ -+ int ret = m_dllAvCodec.avcodec_encode_audio2(m_CodecCtx, &m_Pkt, frame, &got_output); -+ -+ /* free temporary data */ -+ m_dllAvCodec.avcodec_free_frame(&frame); -+ -+ if (ret < 0 || !got_output) -+ { -+ CLog::Log(LOGERROR, "CAEEncoderFFmpeg::Encode - Encoding failed"); -+ return 0; -+ } -+ -+ /* pack it into an IEC958 frame */ -+ m_PackFunc(NULL, m_Pkt.size, out); -+ -+ /* free the packet */ -+ m_dllAvCodec.av_free_packet(&m_Pkt); -+ -+ /* return the number of frames used */ -+ return m_NeededFrames; -+} -+ -+ - int CAEEncoderFFmpeg::GetData(uint8_t **data) - { - int size; -diff --git a/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h b/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h -index d422ab6..2d442df 100644 ---- a/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h -+++ b/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h -@@ -36,7 +36,7 @@ class CAEEncoderFFmpeg: public IAEEncoder - virtual ~CAEEncoderFFmpeg(); - - virtual bool IsCompatible(AEAudioFormat format); -- virtual bool Initialize(AEAudioFormat &format); -+ virtual bool Initialize(AEAudioFormat &format, bool allow_planar_input = false); - virtual void Reset(); - - virtual unsigned int GetBitRate (); -@@ -44,6 +44,7 @@ class CAEEncoderFFmpeg: public IAEEncoder - virtual unsigned int GetFrames (); - - virtual int Encode (float *data, unsigned int frames); -+ virtual int Encode (uint8_t *in, int in_size, uint8_t *out, int out_size); - virtual int GetData(uint8_t **data); - virtual double GetDelay(unsigned int bufferSize); - private: -diff --git a/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h b/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h -index e304908..0e6f1f8 100644 ---- a/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h -+++ b/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h -@@ -48,9 +48,10 @@ class IAEEncoder - /** - * Called to setup the encoder to accept data in the specified format - * @param format the desired audio format, may be changed to suit the encoder -+ * @param allow_planar_input allow engine to use with planar formats - * @return true on success, false on failure - */ -- virtual bool Initialize(AEAudioFormat &format) = 0; -+ virtual bool Initialize(AEAudioFormat &format, bool allow_planar_input = false) = 0; - - /** - * Reset the encoder for new data -@@ -84,6 +85,16 @@ class IAEEncoder - virtual int Encode(float *data, unsigned int frames) = 0; - - /** -+ * Encodes the supplied samples into a provided buffer -+ * @param in the PCM samples encoder requested format -+ * @param in_size input buffer size -+ * @param output buffer -+ * @param out_size output buffer size -+ * @return the number of samples consumed -+ */ -+ virtual int Encode (uint8_t *in, int in_size, uint8_t *out, int out_size) { return 0; }; -+ -+ /** - * Get the encoded data - * @param data return pointer to the buffer with the current encoded block - * @return the size in bytes of *data --- -1.8.1.6 - - -From 796f1dbc328099fd3527756675795b8708436468 Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Wed, 26 Jun 2013 15:13:22 +0200 -Subject: [PATCH 006/123] AE: alsa - close device in blocking mode, fixes - device busy - ---- - xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp -index 32fb450..91cfc08 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp -@@ -196,8 +196,8 @@ bool CAESinkALSA::Initialize(AEAudioFormat &format, std::string &device) - if (!InitializeHW(format) || !InitializeSW(format)) - return false; - -- snd_pcm_nonblock(m_pcm, 1); - snd_pcm_prepare (m_pcm); -+ snd_pcm_nonblock(m_pcm, 1); - - m_format = format; - m_formatSampleRateMul = 1.0 / (double)m_format.m_sampleRate; -@@ -436,10 +436,10 @@ bool CAESinkALSA::InitializeSW(AEAudioFormat &format) - - void CAESinkALSA::Deinitialize() - { -- Stop(); -- - if (m_pcm) - { -+ snd_pcm_nonblock(m_pcm, 0); -+ Stop(); - snd_pcm_close(m_pcm); - m_pcm = NULL; - } --- -1.8.1.6 - - -From 5cdc044bbfdf1740992d930501d48f78ea104d5d Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Wed, 26 Jun 2013 18:48:30 +0200 -Subject: [PATCH 007/123] AE: alsa - set to prepared after drain - ---- - xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp -index 91cfc08..ee7b549 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp -@@ -196,8 +196,8 @@ bool CAESinkALSA::Initialize(AEAudioFormat &format, std::string &device) - if (!InitializeHW(format) || !InitializeSW(format)) - return false; - -- snd_pcm_prepare (m_pcm); - snd_pcm_nonblock(m_pcm, 1); -+ snd_pcm_prepare (m_pcm); - - m_format = format; - m_formatSampleRateMul = 1.0 / (double)m_format.m_sampleRate; -@@ -574,6 +574,7 @@ void CAESinkALSA::Drain() - - snd_pcm_nonblock(m_pcm, 0); - snd_pcm_drain(m_pcm); -+ snd_pcm_prepare(m_pcm); - snd_pcm_nonblock(m_pcm, 1); - } - --- -1.8.1.6 - - -From a28f4c46f39407d1e155a6b300a38eadca67a2c6 Mon Sep 17 00:00:00 2001 -From: fritsch -Date: Fri, 5 Jul 2013 21:02:00 +0200 -Subject: [PATCH 008/123] AE: Add blocking option to AddPackets, makes Sink - behaviour choosable after c2493d5bf6bc2be2fb45f563affdd214bf9862fb - ---- - xbmc/cores/AudioEngine/Interfaces/AESink.h | 2 +- - xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 11 +++++++++-- - xbmc/cores/AudioEngine/Sinks/AESinkALSA.h | 2 +- - xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp | 2 +- - xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h | 2 +- - xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp | 4 ++-- - xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h | 2 +- - xbmc/cores/AudioEngine/Sinks/AESinkNULL.cpp | 2 +- - xbmc/cores/AudioEngine/Sinks/AESinkNULL.h | 2 +- - xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp | 2 +- - xbmc/cores/AudioEngine/Sinks/AESinkOSS.h | 2 +- - xbmc/cores/AudioEngine/Sinks/AESinkProfiler.cpp | 2 +- - xbmc/cores/AudioEngine/Sinks/AESinkProfiler.h | 2 +- - xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp | 2 +- - xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h | 2 +- - 15 files changed, 24 insertions(+), 17 deletions(-) - -diff --git a/xbmc/cores/AudioEngine/Interfaces/AESink.h b/xbmc/cores/AudioEngine/Interfaces/AESink.h -index cb9c04b..65395bf 100644 ---- a/xbmc/cores/AudioEngine/Interfaces/AESink.h -+++ b/xbmc/cores/AudioEngine/Interfaces/AESink.h -@@ -71,7 +71,7 @@ class IAESink - /* - Adds packets to be sent out, this routine MUST block or sleep. - */ -- virtual unsigned int AddPackets(uint8_t *data, unsigned int frames, bool hasAudio) = 0; -+ virtual unsigned int AddPackets(uint8_t *data, unsigned int frames, bool hasAudio, bool blocking = false) = 0; - - /* - Drain the sink -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp -index ee7b549..8d2e6a1 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp -@@ -497,7 +497,7 @@ double CAESinkALSA::GetCacheTotal() - return (double)m_bufferSize * m_formatSampleRateMul; - } - --unsigned int CAESinkALSA::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio) -+unsigned int CAESinkALSA::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio, bool blocking) - { - if (!m_pcm) - { -@@ -518,7 +518,14 @@ unsigned int CAESinkALSA::AddPackets(uint8_t *data, unsigned int frames, bool ha - } - - if ((unsigned int)ret < frames) -- return 0; -+ if(blocking) -+ { -+ ret = snd_pcm_wait(m_pcm, m_timeout); -+ if (ret < 0) -+ HandleError("snd_pcm_wait", ret); -+ } -+ else -+ return 0; - - ret = snd_pcm_writei(m_pcm, (void*)data, frames); - if (ret < 0) -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h -index 73615a5..69c8a85 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h -@@ -47,7 +47,7 @@ class CAESinkALSA : public IAESink - virtual double GetDelay (); - virtual double GetCacheTime (); - virtual double GetCacheTotal (); -- virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio); -+ virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio, bool blocking = false); - virtual void Drain (); - virtual bool SoftSuspend(); - virtual bool SoftResume(); -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp -index c37bf2d..66e4c6a 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp -@@ -212,7 +212,7 @@ double CAESinkAUDIOTRACK::GetCacheTotal() - return m_sinkbuffer_sec + m_audiotrackbuffer_sec; - } - --unsigned int CAESinkAUDIOTRACK::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio) -+unsigned int CAESinkAUDIOTRACK::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio, bool blocking) - { - // write as many frames of audio as we can fit into our internal buffer. - -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h -index d07ab8d..e923cd6 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.h -@@ -39,7 +39,7 @@ class CAESinkAUDIOTRACK : public CThread, public IAESink - virtual double GetDelay (); - virtual double GetCacheTime (); - virtual double GetCacheTotal (); -- virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio); -+ virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio, bool blocking = false); - virtual void Drain (); - virtual bool HasVolume (); - virtual void SetVolume (float scale); -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp -index e3a3695..8df9cab 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp -@@ -367,7 +367,7 @@ bool CAESinkDirectSound::IsCompatible(const AEAudioFormat format, const std::str - return false; - } - --unsigned int CAESinkDirectSound::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio) -+unsigned int CAESinkDirectSound::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio, bool blocking = false) - { - if (!m_initialized) - return 0; -@@ -910,4 +910,4 @@ bool CAESinkDirectSound::SoftResume() - { - /* Return false to force re-init by engine */ - return false; --} -\ No newline at end of file -+} -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h b/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h -index 944e598..f06e929 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h -@@ -42,7 +42,7 @@ class CAESinkDirectSound : public IAESink - virtual double GetDelay (); - virtual double GetCacheTime (); - virtual double GetCacheTotal (); -- virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio); -+ virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio, bool blocking = false); - virtual bool SoftSuspend (); - virtual bool SoftResume (); - static std::string GetDefaultDevice (); -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkNULL.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkNULL.cpp -index 9f980f8..28cadcc 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkNULL.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkNULL.cpp -@@ -99,7 +99,7 @@ double CAESinkNULL::GetCacheTotal() - return m_sinkbuffer_sec_per_byte * (double)m_sinkbuffer_size; - } - --unsigned int CAESinkNULL::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio) -+unsigned int CAESinkNULL::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio, bool blocking) - { - unsigned int max_frames = (m_sinkbuffer_size - m_sinkbuffer_level) / m_sink_frameSize; - if (frames > max_frames) -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkNULL.h b/xbmc/cores/AudioEngine/Sinks/AESinkNULL.h -index 47bf18f..09e49f0 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkNULL.h -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkNULL.h -@@ -38,7 +38,7 @@ class CAESinkNULL : public CThread, public IAESink - virtual double GetDelay (); - virtual double GetCacheTime (); - virtual double GetCacheTotal (); -- virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio); -+ virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio, bool blocking = false); - virtual void Drain (); - - static void EnumerateDevices(AEDeviceList &devices, bool passthrough); -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp -index 00f57d0..97d1725 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp -@@ -408,7 +408,7 @@ double CAESinkOSS::GetDelay() - return (double)delay / (m_format.m_frameSize * m_format.m_sampleRate); - } - --unsigned int CAESinkOSS::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio) -+unsigned int CAESinkOSS::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio, bool blocking) - { - int size = frames * m_format.m_frameSize; - if (m_fd == -1) -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkOSS.h b/xbmc/cores/AudioEngine/Sinks/AESinkOSS.h -index ab1b457..18cadce 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkOSS.h -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkOSS.h -@@ -41,7 +41,7 @@ class CAESinkOSS : public IAESink - virtual double GetDelay (); - virtual double GetCacheTime () { return 0.0; } /* FIXME */ - virtual double GetCacheTotal () { return 0.0; } /* FIXME */ -- virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio); -+ virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio, bool blocking = false); - virtual void Drain (); - static void EnumerateDevicesEx(AEDeviceInfoList &list, bool force = false); - private: -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkProfiler.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkProfiler.cpp -index 7c01573..1cf4843 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkProfiler.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkProfiler.cpp -@@ -71,7 +71,7 @@ double CAESinkProfiler::GetDelay() - return 0.0f; - } - --unsigned int CAESinkProfiler::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio) -+unsigned int CAESinkProfiler::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio, bool blocking) - { - int64_t ts = CurrentHostCounter(); - CLog::Log(LOGDEBUG, "CAESinkProfiler::AddPackets - latency %f ms", (float)(ts - m_ts) / 1000000.0f); -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkProfiler.h b/xbmc/cores/AudioEngine/Sinks/AESinkProfiler.h -index 621e0f3..814670a 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkProfiler.h -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkProfiler.h -@@ -39,7 +39,7 @@ class CAESinkProfiler : public IAESink - virtual double GetDelay (); - virtual double GetCacheTime () { return 0.0; } - virtual double GetCacheTotal () { return 0.0; } -- virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio); -+ virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio, bool blocking = false); - virtual void Drain (); - static void EnumerateDevices(AEDeviceList &devices, bool passthrough); - private: -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp -index 472366d..6d6e477 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp -@@ -423,7 +423,7 @@ double CAESinkWASAPI::GetCacheTotal() - return m_sinkLatency; - } - --unsigned int CAESinkWASAPI::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio) -+unsigned int CAESinkWASAPI::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio, bool blocking) - { - if (!m_initialized) - return 0; -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h -index 312866c..c88dd91 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h -@@ -42,7 +42,7 @@ class CAESinkWASAPI : public IAESink - virtual double GetDelay (); - virtual double GetCacheTime (); - virtual double GetCacheTotal (); -- virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio); -+ virtual unsigned int AddPackets (uint8_t *data, unsigned int frames, bool hasAudio, bool blocking = false); - virtual bool SoftSuspend (); - virtual bool SoftResume (); - static void EnumerateDevicesEx (AEDeviceInfoList &deviceInfoList, bool force = false); --- -1.8.1.6 - - -From d6064a357c0423d7601c50568f78496fc7fd89ea Mon Sep 17 00:00:00 2001 -From: fritsch -Date: Sat, 6 Jul 2013 08:07:30 +0200 -Subject: [PATCH 009/123] AE: Give Sinks the possibility to be used in a - blocking way - ---- - xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp | 5 ++++ - xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp | 11 +++++--- - xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp | 2 +- - xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp | 29 +++++++++++++++++++--- - 4 files changed, 40 insertions(+), 7 deletions(-) - -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp -index 66e4c6a..bd179d5 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp -@@ -243,6 +243,11 @@ unsigned int CAESinkAUDIOTRACK::AddPackets(uint8_t *data, unsigned int frames, b - break; - } - } -+ // AddPackets runs under a non-idled AE thread we must block or sleep. -+ // Trying to calc the optimal sleep is tricky so just a minimal sleep. -+ if(blocking) -+ Sleep(10); -+ - return hasAudio ? write_frames:frames; - } - -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp -index 8df9cab..6f4353d 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp -@@ -367,7 +367,7 @@ bool CAESinkDirectSound::IsCompatible(const AEAudioFormat format, const std::str - return false; - } - --unsigned int CAESinkDirectSound::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio, bool blocking = false) -+unsigned int CAESinkDirectSound::AddPackets(uint8_t *data, unsigned int frames, bool hasAudio, bool blocking) - { - if (!m_initialized) - return 0; -@@ -386,10 +386,15 @@ unsigned int CAESinkDirectSound::AddPackets(uint8_t *data, unsigned int frames, - - while (GetSpace() < total) - { -- if (m_isDirtyDS) -+ if(m_isDirtyDS) - return INT_MAX; - else -- return 0; -+ { -+ if(blocking) -+ Sleep(total * 1000 / m_AvgBytesPerSec); -+ else -+ return 0; -+ } - } - - while (len) -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp -index 97d1725..ab13671 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp -@@ -420,7 +420,7 @@ unsigned int CAESinkOSS::AddPackets(uint8_t *data, unsigned int frames, bool has - int wrote = write(m_fd, data, size); - if (wrote < 0) - { -- if(errno == EAGAIN || errno == EWOULDBLOCK) -+ if(!blocking && (errno == EAGAIN || errno == EWOULDBLOCK)) - return 0; - - CLog::Log(LOGERROR, "CAESinkOSS::AddPackets - Failed to write"); -diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp -index 6d6e477..5aebb47 100644 ---- a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp -+++ b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp -@@ -488,10 +488,33 @@ unsigned int CAESinkWASAPI::AddPackets(uint8_t *data, unsigned int frames, bool - #endif - - /* Wait for Audio Driver to tell us it's got a buffer available */ -- DWORD eventAudioCallback = WaitForSingleObject(m_needDataEvent, 0); -+ DWORD eventAudioCallback; -+ if(!blocking) -+ eventAudioCallback = WaitForSingleObject(m_needDataEvent, 0); -+ else -+ eventAudioCallback = WaitForSingleObject(m_needDataEvent, 1100); -+ -+ if (!blocking) -+ { -+ if(eventAudioCallback != WAIT_OBJECT_0) -+ return 0; -+ } -+ else -+ { -+ if(eventAudioCallback != WAIT_OBJECT_0 || !&buf) -+ { -+ /* Event handle timed out - flag sink as dirty for re-initializing */ -+ CLog::Log(LOGERROR, __FUNCTION__": Endpoint Buffer timed out"); -+ if (g_advancedSettings.m_streamSilence) -+ { -+ m_isDirty = true; //flag new device or re-init needed -+ Deinitialize(); -+ m_running = false; -+ return INT_MAX; -+ } -+ } -+ } - -- if (eventAudioCallback != WAIT_OBJECT_0) -- return 0; - - if (!m_running) - return 0; --- -1.8.1.6 - - -From feafa929a610c5de9ebdaf7f1fd1657348d48945 Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Sun, 7 Jul 2013 18:22:04 +0200 -Subject: [PATCH 010/123] AE: allow to register audio callback directly into - engine - ---- - xbmc/cores/AudioEngine/AEFactory.cpp | 12 ++++++++++++ - xbmc/cores/AudioEngine/AEFactory.h | 3 +++ - xbmc/cores/AudioEngine/Interfaces/AE.h | 5 +++++ - xbmc/cores/dvdplayer/DVDPlayer.h | 5 +++-- - xbmc/cores/paplayer/PAPlayer.cpp | 2 ++ - 5 files changed, 25 insertions(+), 2 deletions(-) - -diff --git a/xbmc/cores/AudioEngine/AEFactory.cpp b/xbmc/cores/AudioEngine/AEFactory.cpp -index 7141dd3..0befba9 100644 ---- a/xbmc/cores/AudioEngine/AEFactory.cpp -+++ b/xbmc/cores/AudioEngine/AEFactory.cpp -@@ -358,3 +358,15 @@ void CAEFactory::SettingOptionsAudioDevicesFillerGeneral(const CSetting *setting - if (!foundValue) - current = firstDevice; - } -+ -+void CAEFactory::RegisterAudioCallback(IAudioCallback* pCallback) -+{ -+ if (AE) -+ AE->RegisterAudioCallback(pCallback); -+} -+ -+void CAEFactory::UnregisterAudioCallback() -+{ -+ if (AE) -+ AE->UnregisterAudioCallback(); -+} -diff --git a/xbmc/cores/AudioEngine/AEFactory.h b/xbmc/cores/AudioEngine/AEFactory.h -index 56a1e27..9e15f79 100644 ---- a/xbmc/cores/AudioEngine/AEFactory.h -+++ b/xbmc/cores/AudioEngine/AEFactory.h -@@ -67,6 +67,9 @@ class CAEFactory - 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 RegisterAudioCallback(IAudioCallback* pCallback); -+ static void UnregisterAudioCallback(); -+ - private: - static bool LoadEngine(enum AEEngine engine); - static IAE *AE; -diff --git a/xbmc/cores/AudioEngine/Interfaces/AE.h b/xbmc/cores/AudioEngine/Interfaces/AE.h -index cbfa8ed..5741cd8 100644 ---- a/xbmc/cores/AudioEngine/Interfaces/AE.h -+++ b/xbmc/cores/AudioEngine/Interfaces/AE.h -@@ -34,6 +34,7 @@ - class IAEStream; - class IAESound; - class IAEPacketizer; -+class IAudioCallback; - - /* sound options */ - #define AE_SOUND_OFF 0 /* disable sounds */ -@@ -183,5 +184,9 @@ class IAE - * @returns true if the AudioEngine is capable of RAW output - */ - virtual bool SupportsRaw() { return false; } -+ -+ virtual void RegisterAudioCallback(IAudioCallback* pCallback) {} -+ -+ virtual void UnregisterAudioCallback() {} - }; - -diff --git a/xbmc/cores/dvdplayer/DVDPlayer.h b/xbmc/cores/dvdplayer/DVDPlayer.h -index ceb9996..6da30eb 100644 ---- a/xbmc/cores/dvdplayer/DVDPlayer.h -+++ b/xbmc/cores/dvdplayer/DVDPlayer.h -@@ -39,6 +39,7 @@ - #include "Edl.h" - #include "FileItem.h" - #include "threads/SingleLock.h" -+#include "cores/AudioEngine/AEFactory.h" - - - class CDVDInputStream; -@@ -185,8 +186,8 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer - virtual float GetPercentage(); - virtual float GetCachePercentage(); - -- virtual void RegisterAudioCallback(IAudioCallback* pCallback) { m_dvdPlayerAudio.RegisterAudioCallback(pCallback); } -- virtual void UnRegisterAudioCallback() { m_dvdPlayerAudio.UnRegisterAudioCallback(); } -+ virtual void RegisterAudioCallback(IAudioCallback* pCallback) { CAEFactory::RegisterAudioCallback(pCallback); m_dvdPlayerAudio.RegisterAudioCallback(pCallback); } -+ virtual void UnRegisterAudioCallback() { CAEFactory::UnregisterAudioCallback(); m_dvdPlayerAudio.UnRegisterAudioCallback(); } - virtual void SetVolume(float nVolume) { m_dvdPlayerAudio.SetVolume(nVolume); } - virtual void SetDynamicRangeCompression(long drc) { m_dvdPlayerAudio.SetDynamicRangeCompression(drc); } - virtual void GetAudioInfo(CStdString& strAudioInfo); -diff --git a/xbmc/cores/paplayer/PAPlayer.cpp b/xbmc/cores/paplayer/PAPlayer.cpp -index cfde8fb..c9d56ac 100644 ---- a/xbmc/cores/paplayer/PAPlayer.cpp -+++ b/xbmc/cores/paplayer/PAPlayer.cpp -@@ -717,6 +717,7 @@ void PAPlayer::OnExit() - void PAPlayer::RegisterAudioCallback(IAudioCallback* pCallback) - { - CSharedLock lock(m_streamsLock); -+ CAEFactory::RegisterAudioCallback(pCallback); - m_audioCallback = pCallback; - if (m_currentStream && m_currentStream->m_stream) - m_currentStream->m_stream->RegisterAudioCallback(pCallback); -@@ -725,6 +726,7 @@ void PAPlayer::RegisterAudioCallback(IAudioCallback* pCallback) - void PAPlayer::UnRegisterAudioCallback() - { - CSharedLock lock(m_streamsLock); -+ CAEFactory::UnregisterAudioCallback(); - /* only one stream should have the callback, but we do it to all just incase */ - for(StreamList::iterator itt = m_streams.begin(); itt != m_streams.end(); ++itt) - if ((*itt)->m_stream) --- -1.8.1.6 - - -From 6df9543d4e87cc038938efb44bc44c4e8eba9c45 Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Mon, 1 Jul 2013 13:52:29 +0200 -Subject: [PATCH 011/123] AE: add parameter wait to drain, dvdplayer wants to - wait for the stream to be drained, papayer does not - ---- - xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEStream.cpp | 2 +- - xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEStream.h | 2 +- - xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp | 2 +- - xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.h | 2 +- - xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp | 2 +- - xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.h | 2 +- - xbmc/cores/AudioEngine/Interfaces/AEStream.h | 2 +- - xbmc/cores/dvdplayer/DVDAudio.cpp | 2 +- - xbmc/cores/paplayer/PAPlayer.cpp | 2 +- - 9 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEStream.cpp b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEStream.cpp -index a9422f7..073769a 100644 ---- a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEStream.cpp -+++ b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEStream.cpp -@@ -603,7 +603,7 @@ void CCoreAudioAEStream::Resume() - m_paused = false; - } - --void CCoreAudioAEStream::Drain() -+void CCoreAudioAEStream::Drain(bool wait) - { - m_draining = true; - } -diff --git a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEStream.h b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEStream.h -index 18c52ed..1366808 100644 ---- a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEStream.h -+++ b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEStream.h -@@ -73,7 +73,7 @@ class CCoreAudioAEStream : public IAEStream, public ICoreAudioSource - - virtual void Pause(); - virtual void Resume(); -- virtual void Drain(); -+ virtual void Drain(bool wait); - virtual void Flush(); - - virtual float GetVolume(); -diff --git a/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp b/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp -index 443c844..e1e1903 100644 ---- a/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp -+++ b/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp -@@ -386,7 +386,7 @@ void CPulseAEStream::Resume() - m_Paused = Cork(false); - } - --void CPulseAEStream::Drain() -+void CPulseAEStream::Drain(bool wait) - { - if (!m_Initialized) - return; -diff --git a/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.h b/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.h -index 51aeda8..8d9435b 100644 ---- a/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.h -+++ b/xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.h -@@ -48,7 +48,7 @@ class CPulseAEStream : public IAEStream - - virtual void Pause (); - virtual void Resume (); -- virtual void Drain (); -+ virtual void Drain (bool wait); - virtual void Flush (); - - virtual float GetVolume (); -diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp -index 05ee1b0..b5c2da3 100644 ---- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp -+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp -@@ -555,7 +555,7 @@ void CSoftAEStream::Resume() - AE.ResumeStream(this); - } - --void CSoftAEStream::Drain() -+void CSoftAEStream::Drain(bool wait) - { - CSingleLock lock(m_lock); - m_draining = true; -diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.h b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.h -index f7410e3..1475c83 100644 ---- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.h -+++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.h -@@ -59,7 +59,7 @@ class CSoftAEStream : public IAEStream - - virtual void Pause (); - virtual void Resume (); -- virtual void Drain (); -+ virtual void Drain (bool wait); - virtual bool IsDraining () { return m_draining; } - virtual bool IsDrained (); - virtual void Flush (); -diff --git a/xbmc/cores/AudioEngine/Interfaces/AEStream.h b/xbmc/cores/AudioEngine/Interfaces/AEStream.h -index 67fa5e2..92d5fef 100644 ---- a/xbmc/cores/AudioEngine/Interfaces/AEStream.h -+++ b/xbmc/cores/AudioEngine/Interfaces/AEStream.h -@@ -97,7 +97,7 @@ class IAEStream - * Start draining the stream - * @note Once called AddData will not consume more data. - */ -- virtual void Drain() = 0; -+ virtual void Drain(bool wait) = 0; - - /** - * Returns true if the is stream draining -diff --git a/xbmc/cores/dvdplayer/DVDAudio.cpp b/xbmc/cores/dvdplayer/DVDAudio.cpp -index 3d77f0a..d304026 100644 ---- a/xbmc/cores/dvdplayer/DVDAudio.cpp -+++ b/xbmc/cores/dvdplayer/DVDAudio.cpp -@@ -298,7 +298,7 @@ void CDVDAudio::Drain() - Finish(); - CSingleLock lock (m_critSection); - if (m_pAudioStream) -- m_pAudioStream->Drain(); -+ m_pAudioStream->Drain(true); - } - - void CDVDAudio::RegisterAudioCallback(IAudioCallback* pCallback) -diff --git a/xbmc/cores/paplayer/PAPlayer.cpp b/xbmc/cores/paplayer/PAPlayer.cpp -index c9d56ac..f2e288c 100644 ---- a/xbmc/cores/paplayer/PAPlayer.cpp -+++ b/xbmc/cores/paplayer/PAPlayer.cpp -@@ -568,7 +568,7 @@ inline void PAPlayer::ProcessStreams(double &delay, double &buffer) - /* unregister the audio callback */ - si->m_stream->UnRegisterAudioCallback(); - si->m_decoder.Destroy(); -- si->m_stream->Drain(); -+ si->m_stream->Drain(false); - m_finishing.push_back(si); - return; - } --- -1.8.1.6 - - -From 2381ed88238ff8445cc23ac227e59e37b809e513 Mon Sep 17 00:00:00 2001 -From: xbmc -Date: Mon, 25 Mar 2013 13:58:11 +0100 -Subject: [PATCH 012/123] ActiveAE: add new audio engine, co-author: fritsch - ---- - xbmc/cores/AudioEngine/AEFactory.cpp | 3 + - xbmc/cores/AudioEngine/AEFactory.h | 3 +- - .../AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 2189 ++++++++++++++++++++ - xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h | 332 +++ - .../Engines/ActiveAE/ActiveAEBuffer.cpp | 368 ++++ - .../AudioEngine/Engines/ActiveAE/ActiveAEBuffer.h | 110 + - .../Engines/ActiveAE/ActiveAEResample.cpp | 251 +++ - .../Engines/ActiveAE/ActiveAEResample.h | 61 + - .../AudioEngine/Engines/ActiveAE/ActiveAESink.cpp | 813 ++++++++ - .../AudioEngine/Engines/ActiveAE/ActiveAESink.h | 133 ++ - .../AudioEngine/Engines/ActiveAE/ActiveAESound.cpp | 164 ++ - .../AudioEngine/Engines/ActiveAE/ActiveAESound.h | 73 + - .../Engines/ActiveAE/ActiveAEStream.cpp | 357 ++++ - .../AudioEngine/Engines/ActiveAE/ActiveAEStream.h | 115 + - xbmc/cores/AudioEngine/Makefile.in | 7 + - xbmc/utils/ActorProtocol.cpp | 253 +++ - xbmc/utils/ActorProtocol.h | 87 + - xbmc/utils/Makefile.in | 1 + - 18 files changed, 5319 insertions(+), 1 deletion(-) - create mode 100644 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp - create mode 100644 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h - create mode 100644 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp - create mode 100644 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.h - create mode 100644 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.cpp - create mode 100644 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.h - create mode 100644 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp - create mode 100644 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.h - create mode 100644 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.cpp - create mode 100644 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.h - create mode 100644 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp - create mode 100644 xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h - create mode 100644 xbmc/utils/ActorProtocol.cpp - create mode 100644 xbmc/utils/ActorProtocol.h - -diff --git a/xbmc/cores/AudioEngine/AEFactory.cpp b/xbmc/cores/AudioEngine/AEFactory.cpp -index 0befba9..4f9f566 100644 ---- a/xbmc/cores/AudioEngine/AEFactory.cpp -+++ b/xbmc/cores/AudioEngine/AEFactory.cpp -@@ -27,6 +27,8 @@ - #include "settings/SettingsManager.h" - #else - #include "Engines/SoftAE/SoftAE.h" -+ #include "Engines/ActiveAE/ActiveAE.h" -+ using namespace ActiveAE; - #endif - - #if defined(HAS_PULSEAUDIO) -@@ -99,6 +101,7 @@ bool CAEFactory::LoadEngine(enum AEEngine engine) - case AE_ENGINE_COREAUDIO: AE = new CCoreAudioAE(); break; - #else - case AE_ENGINE_SOFT : AE = new CSoftAE(); break; -+ case AE_ENGINE_ACTIVE : AE = new CActiveAE(); break; - #endif - #if defined(HAS_PULSEAUDIO) - case AE_ENGINE_PULSE : AE = new CPulseAE(); break; -diff --git a/xbmc/cores/AudioEngine/AEFactory.h b/xbmc/cores/AudioEngine/AEFactory.h -index 9e15f79..3059001 100644 ---- a/xbmc/cores/AudioEngine/AEFactory.h -+++ b/xbmc/cores/AudioEngine/AEFactory.h -@@ -31,7 +31,8 @@ enum AEEngine - AE_ENGINE_NULL, - AE_ENGINE_SOFT, - AE_ENGINE_COREAUDIO, -- AE_ENGINE_PULSE -+ AE_ENGINE_PULSE, -+ AE_ENGINE_ACTIVE - }; - - class CAEFactory -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -new file mode 100644 -index 0000000..dc79da7 ---- /dev/null -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -@@ -0,0 +1,2189 @@ -+/* -+ * 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 "ActiveAE.h" -+ -+using namespace ActiveAE; -+#include "ActiveAESound.h" -+#include "ActiveAEStream.h" -+#include "Utils/AEUtil.h" -+#include "Encoders/AEEncoderFFmpeg.h" -+ -+#include "settings/Settings.h" -+#include "settings/AdvancedSettings.h" -+#include "windowing/WindowingFactory.h" -+ -+#define MAX_CACHE_LEVEL 0.5 // total cache time of stream in seconds -+#define MAX_WATER_LEVEL 0.25 // buffered time after stream stages in seconds -+ -+void CEngineStats::Reset(unsigned int sampleRate) -+{ -+ CSingleLock lock(m_lock); -+ m_sinkUpdate = XbmcThreads::SystemClockMillis(); -+ m_sinkDelay = 0; -+ m_sinkSampleRate = sampleRate; -+ m_bufferedSamples = 0; -+ m_suspended = false; -+} -+ -+void CEngineStats::UpdateSinkDelay(double delay, int samples) -+{ -+ CSingleLock lock(m_lock); -+ m_sinkUpdate = XbmcThreads::SystemClockMillis(); -+ m_sinkDelay = delay; -+ if (samples > m_bufferedSamples) -+ { -+ CLog::Log(LOGERROR, "CEngineStats::UpdateSinkDelay - inconsistency in buffer time"); -+ } -+ else -+ m_bufferedSamples -= samples; -+} -+ -+void CEngineStats::AddSamples(int samples, std::list &streams) -+{ -+ CSingleLock lock(m_lock); -+ m_bufferedSamples += samples; -+ -+ //update buffered time of streams -+ std::list::iterator it; -+ for(it=streams.begin(); it!=streams.end(); ++it) -+ { -+ float delay = 0; -+ std::deque::iterator itBuf; -+ for(itBuf=(*it)->m_processingSamples.begin(); itBuf!=(*it)->m_processingSamples.end(); ++itBuf) -+ { -+ delay += (float)(*itBuf)->pkt->nb_samples / (*itBuf)->pkt->config.sample_rate; -+ } -+ delay += (*it)->m_resampleBuffers->GetDelay(); -+ (*it)->m_bufferedTime = delay; -+ } -+} -+ -+float CEngineStats::GetDelay() -+{ -+ CSingleLock lock(m_lock); -+ unsigned int now = XbmcThreads::SystemClockMillis(); -+ float delay = m_sinkDelay - (double)(now-m_sinkUpdate) / 1000; -+ delay += (float)m_bufferedSamples / m_sinkSampleRate; -+ -+ return delay; -+} -+ -+float CEngineStats::GetDelay(CActiveAEStream *stream) -+{ -+ CSingleLock lock(m_lock); -+ unsigned int now = XbmcThreads::SystemClockMillis(); -+ float delay = m_sinkDelay - (double)(now-m_sinkUpdate) / 1000; -+ delay += (float)m_bufferedSamples / m_sinkSampleRate; -+ -+ delay += stream->m_bufferedTime; -+ return delay; -+} -+ -+float CEngineStats::GetCacheTime(CActiveAEStream *stream) -+{ -+ CSingleLock lock(m_lock); -+ float delay = (float)m_bufferedSamples / m_sinkSampleRate; -+ -+ delay += stream->m_bufferedTime; -+ return delay; -+} -+ -+float CEngineStats::GetCacheTotal(CActiveAEStream *stream) -+{ -+ return MAX_CACHE_LEVEL + m_sinkCacheTotal; -+} -+ -+float CEngineStats::GetWaterLevel() -+{ -+ return (float)m_bufferedSamples / m_sinkSampleRate; -+} -+ -+void CEngineStats::SetSuspended(bool state) -+{ -+ CSingleLock lock(m_lock); -+ m_suspended = state; -+} -+ -+bool CEngineStats::IsSuspended() -+{ -+ CSingleLock lock(m_lock); -+ return m_suspended; -+} -+ -+CActiveAE::CActiveAE() : -+ CThread("ActiveAE"), -+ m_controlPort("OutputControlPort", &m_inMsgEvent, &m_outMsgEvent), -+ m_dataPort("OutputDataPort", &m_inMsgEvent, &m_outMsgEvent), -+ m_sink(&m_outMsgEvent) -+{ -+ m_sinkBuffers = NULL; -+ m_silenceBuffers = NULL; -+ m_encoderBuffers = NULL; -+ m_vizBuffers = NULL; -+ m_volume = 1.0; -+ m_aeVolume = 1.0; -+ m_muted = false; -+ m_aeMuted = false; -+ m_mode = MODE_PCM; -+ m_encoder = NULL; -+ m_audioCallback = NULL; -+ m_vizInitialized = false; -+} -+ -+CActiveAE::~CActiveAE() -+{ -+ Dispose(); -+} -+ -+void CActiveAE::Dispose() -+{ -+#if defined(HAS_GLX) || defined(TARGET_DARWIN_OSX) -+ g_Windowing.Unregister(this); -+#endif -+ -+ m_bStop = true; -+ m_outMsgEvent.Set(); -+ StopThread(); -+ m_controlPort.Purge(); -+ m_dataPort.Purge(); -+ m_sink.Dispose(); -+ -+ m_dllAvFormat.Unload(); -+ m_dllAvCodec.Unload(); -+ m_dllAvUtil.Unload(); -+} -+ -+//----------------------------------------------------------------------------- -+// Behavior -+//----------------------------------------------------------------------------- -+ -+enum AE_STATES -+{ -+ AE_TOP = 0, // 0 -+ AE_TOP_ERROR, // 1 -+ AE_TOP_UNCONFIGURED, // 2 -+ AE_TOP_RECONFIGURING, // 3 -+ AE_TOP_CONFIGURED, // 4 -+ AE_TOP_CONFIGURED_SUSPEND, // 5 -+ AE_TOP_CONFIGURED_IDLE, // 6 -+ AE_TOP_CONFIGURED_PLAY, // 7 -+}; -+ -+int AE_parentStates[] = { -+ -1, -+ 0, //TOP_ERROR -+ 0, //TOP_UNCONFIGURED -+ 0, //TOP_CONFIGURED -+ 0, //TOP_RECONFIGURING -+ 4, //TOP_CONFIGURED_SUSPEND -+ 4, //TOP_CONFIGURED_IDLE -+ 4, //TOP_CONFIGURED_PLAY -+}; -+ -+void CActiveAE::StateMachine(int signal, Protocol *port, Message *msg) -+{ -+ for (int state = m_state; ; state = AE_parentStates[state]) -+ { -+ switch (state) -+ { -+ case AE_TOP: // TOP -+ if (port == &m_controlPort) -+ { -+ switch (signal) -+ { -+ case CActiveAEControlProtocol::GETSTATE: -+ msg->Reply(CActiveAEControlProtocol::ACC, &m_state, sizeof(m_state)); -+ return; -+ case CActiveAEControlProtocol::SOUNDMODE: -+ m_soundMode = *(int*)msg->data; -+ return; -+ case CActiveAEControlProtocol::VOLUME: -+ m_volume = *(float*)msg->data; -+ return; -+ case CActiveAEControlProtocol::MUTE: -+ m_muted = *(bool*)msg->data; -+ return; -+ default: -+ break; -+ } -+ } -+ else if (port == &m_dataPort) -+ { -+ switch (signal) -+ { -+ case CActiveAEDataProtocol::NEWSOUND: -+ CActiveAESound *sound; -+ sound = *(CActiveAESound**)msg->data; -+ if (sound) -+ { -+ m_sounds.push_back(sound); -+ ResampleSounds(); -+ } -+ return; -+ case CActiveAEDataProtocol::FREESTREAM: -+ CActiveAEStream *stream; -+ stream = *(CActiveAEStream**)msg->data; -+ DiscardStream(stream); -+ return; -+ case CActiveAEDataProtocol::FREESOUND: -+ sound = *(CActiveAESound**)msg->data; -+ DiscardSound(sound); -+ return; -+ case CActiveAEDataProtocol::DRAINSTREAM: -+ stream = *(CActiveAEStream**)msg->data; -+ stream->m_drain = true; -+ stream->m_resampleBuffers->m_drain = true; -+ msg->Reply(CActiveAEDataProtocol::ACC); -+ stream->m_streamPort->SendInMessage(CActiveAEDataProtocol::STREAMDRAINED); -+ return; -+ default: -+ break; -+ } -+ } -+ else if (&m_sink.m_dataPort) -+ { -+ switch (signal) -+ { -+ case CSinkDataProtocol::RETURNSAMPLE: -+ CSampleBuffer **buffer; -+ buffer = (CSampleBuffer**)msg->data; -+ if (buffer) -+ { -+ (*buffer)->Return(); -+ } -+ return; -+ default: -+ break; -+ } -+ } -+ { -+ std::string portName = port == NULL ? "timer" : port->portName; -+ CLog::Log(LOGWARNING, "CActiveAE::%s - signal: %d from port: %s not handled for state: %d", __FUNCTION__, signal, portName.c_str(), m_state); -+ } -+ return; -+ -+ case AE_TOP_ERROR: -+ break; -+ -+ case AE_TOP_UNCONFIGURED: -+ if (port == &m_controlPort) -+ { -+ switch (signal) -+ { -+ case CActiveAEControlProtocol::INIT: -+ m_extError = false; -+ m_sink.EnumerateSinkList(); -+ LoadSettings(); -+ Configure(); -+ msg->Reply(CActiveAEControlProtocol::ACC); -+ if (!m_extError) -+ { -+ m_state = AE_TOP_CONFIGURED_IDLE; -+ m_extTimeout = 0; -+ } -+ else -+ { -+ m_state = AE_TOP_ERROR; -+ } -+ return; -+ -+ default: -+ break; -+ } -+ } -+ break; -+ -+ case AE_TOP_RECONFIGURING: -+ if (port == NULL) // timeout -+ { -+ switch (signal) -+ { -+ case CActiveAEControlProtocol::TIMEOUT: -+ // drain -+ if (RunStages()) -+ { -+ m_extTimeout = 0; -+ return; -+ } -+ if (HasWork()) -+ { -+ m_extTimeout = 100; -+ return; -+ } -+ if (NeedReconfigureSink()) -+ DrainSink(); -+ Configure(); -+ if (!m_extError) -+ { -+ m_state = AE_TOP_CONFIGURED_PLAY; -+ m_extTimeout = 0; -+ } -+ else -+ { -+ m_state = AE_TOP_ERROR; -+ m_extTimeout = 1000; -+ } -+ m_dataPort.DeferOut(false); -+ return; -+ default: -+ break; -+ } -+ } -+ break; -+ -+ case AE_TOP_CONFIGURED: -+ if (port == &m_controlPort) -+ { -+ switch (signal) -+ { -+ case CActiveAEControlProtocol::RECONFIGURE: -+ LoadSettings(); -+ if (!NeedReconfigureBuffers() && !NeedReconfigureSink()) -+ return; -+ m_state = AE_TOP_RECONFIGURING; -+ m_extTimeout = 0; -+ // don't accept any data until we are reconfigured -+ m_dataPort.DeferOut(true); -+ return; -+ case CActiveAEControlProtocol::SUSPEND: -+ UnconfigureSink(); -+ m_stats.SetSuspended(true); -+ m_state = AE_TOP_CONFIGURED_SUSPEND; -+ return; -+ case CActiveAEControlProtocol::DISPLAYLOST: -+ if (m_settings.mode == AUDIO_HDMI) -+ { -+ UnconfigureSink(); -+ m_stats.SetSuspended(true); -+ m_state = AE_TOP_CONFIGURED_SUSPEND; -+ } -+ return; -+ case CActiveAEControlProtocol::PAUSESTREAM: -+ CActiveAEStream *stream; -+ stream = *(CActiveAEStream**)msg->data; -+ stream->m_paused = true; -+ return; -+ case CActiveAEControlProtocol::RESUMESTREAM: -+ stream = *(CActiveAEStream**)msg->data; -+ stream->m_paused = false; -+ m_state = AE_TOP_CONFIGURED_PLAY; -+ m_extTimeout = 0; -+ return; -+ case CActiveAEControlProtocol::STREAMAMP: -+ MsgStreamParameter *par; -+ par = (MsgStreamParameter*)msg->data; -+ par->stream->m_limiter.SetAmplification(par->parameter.float_par); -+ return; -+ case CActiveAEControlProtocol::STREAMVOLUME: -+ par = (MsgStreamParameter*)msg->data; -+ par->stream->m_volume = par->parameter.float_par; -+ return; -+ case CActiveAEControlProtocol::STREAMRGAIN: -+ par = (MsgStreamParameter*)msg->data; -+ par->stream->m_rgain = par->parameter.float_par; -+ return; -+ case CActiveAEControlProtocol::STREAMRESAMPLERATIO: -+ par = (MsgStreamParameter*)msg->data; -+ if (par->stream->m_resampleBuffers) -+ { -+ par->stream->m_resampleBuffers->m_resampleRatio = par->parameter.double_par; -+ par->stream->m_resampleBuffers->m_changeRatio = true; -+ } -+ return; -+ case CActiveAEControlProtocol::STREAMFADE: -+ MsgStreamFade *fade; -+ fade = (MsgStreamFade*)msg->data; -+ fade->stream->m_fadingBase = fade->from; -+ fade->stream->m_fadingTarget = fade->target; -+ fade->stream->m_fadingTime = fade->millis; -+ fade->stream->m_fadingSamples = -1; -+ return; -+ case CActiveAEControlProtocol::STOPSOUND: -+ CActiveAESound *sound; -+ sound = *(CActiveAESound**)msg->data; -+ SStopSound(sound); -+ return; -+ default: -+ break; -+ } -+ } -+ else if (port == &m_dataPort) -+ { -+ switch (signal) -+ { -+ case CActiveAEDataProtocol::PLAYSOUND: -+ CActiveAESound *sound; -+ sound = *(CActiveAESound**)msg->data; -+ if (m_soundMode == AE_SOUND_OFF || -+ (m_soundMode == AE_SOUND_IDLE && !m_streams.empty())) -+ return; -+ if (sound) -+ { -+ SoundState st = {sound, 0}; -+ m_sounds_playing.push_back(st); -+ m_extTimeout = 0; -+ m_state = AE_TOP_CONFIGURED_PLAY; -+ } -+ return; -+ case CActiveAEDataProtocol::NEWSTREAM: -+ MsgStreamNew *streamMsg; -+ CActiveAEStream *stream; -+ streamMsg = (MsgStreamNew*)msg->data; -+ stream = CreateStream(streamMsg); -+ if(stream) -+ { -+ msg->Reply(CActiveAEDataProtocol::ACC, &stream, sizeof(CActiveAEStream*)); -+ Configure(); -+ m_extTimeout = 0; -+ m_state = AE_TOP_CONFIGURED_PLAY; -+ } -+ else -+ msg->Reply(CActiveAEDataProtocol::ERR); -+ return; -+ case CActiveAEDataProtocol::STREAMSAMPLE: -+ MsgStreamSample *msgData; -+ CSampleBuffer *samples; -+ msgData = (MsgStreamSample*)msg->data; -+ samples = msgData->stream->m_processingSamples.front(); -+ msgData->stream->m_processingSamples.pop_front(); -+ if (samples != msgData->buffer) -+ CLog::Log(LOGERROR, "CActiveAE - inconsistency in stream sample message"); -+ if (msgData->buffer->pkt->nb_samples == 0) -+ msgData->buffer->Return(); -+ else -+ msgData->stream->m_resampleBuffers->m_inputSamples.push_back(msgData->buffer); -+ m_extTimeout = 0; -+ m_state = AE_TOP_CONFIGURED_PLAY; -+ return; -+ case CActiveAEDataProtocol::FREESTREAM: -+ stream = *(CActiveAEStream**)msg->data; -+ DiscardStream(stream); -+ if (m_streams.empty()) -+ { -+ m_extDrainTimer.Set(m_stats.GetDelay() * 1000); -+ m_extDrain = true; -+ } -+ m_extTimeout = 0; -+ m_state = AE_TOP_CONFIGURED_PLAY; -+ return; -+ case CActiveAEDataProtocol::DRAINSTREAM: -+ stream = *(CActiveAEStream**)msg->data; -+ stream->m_drain = true; -+ stream->m_resampleBuffers->m_drain = true; -+ m_extTimeout = 0; -+ m_state = AE_TOP_CONFIGURED_PLAY; -+ msg->Reply(CActiveAEDataProtocol::ACC); -+ return; -+ case CActiveAEDataProtocol::FLUSHSTREAM: -+ stream = *(CActiveAEStream**)msg->data; -+ SFlushStream(stream); -+ msg->Reply(CActiveAEDataProtocol::ACC); -+ return; -+ default: -+ break; -+ } -+ } -+ else if (&m_sink.m_dataPort) -+ { -+ switch (signal) -+ { -+ case CSinkDataProtocol::RETURNSAMPLE: -+ CSampleBuffer **buffer; -+ buffer = (CSampleBuffer**)msg->data; -+ if (buffer) -+ { -+ (*buffer)->Return(); -+ } -+ m_extTimeout = 0; -+ m_state = AE_TOP_CONFIGURED_PLAY; -+ return; -+ default: -+ break; -+ } -+ } -+ break; -+ -+ case AE_TOP_CONFIGURED_SUSPEND: -+ if (port == &m_controlPort) -+ { -+ bool displayReset = false; -+ switch (signal) -+ { -+ case CActiveAEControlProtocol::DISPLAYRESET: -+ displayReset = true; -+ case CActiveAEControlProtocol::INIT: -+ m_extError = false; -+ if (!displayReset) -+ { -+ m_sink.EnumerateSinkList(); -+ LoadSettings(); -+ } -+ Configure(); -+ if (!displayReset) -+ msg->Reply(CActiveAEControlProtocol::ACC); -+ if (!m_extError) -+ { -+ m_stats.SetSuspended(false); -+ m_state = AE_TOP_CONFIGURED_PLAY; -+ m_extTimeout = 0; -+ } -+ else -+ { -+ m_state = AE_TOP_ERROR; -+ } -+ return; -+ default: -+ break; -+ } -+ } -+ break; -+ -+ case AE_TOP_CONFIGURED_IDLE: -+ if (port == NULL) // timeout -+ { -+ switch (signal) -+ { -+ case CActiveAEControlProtocol::TIMEOUT: -+ ResampleSounds(); -+ ClearDiscardedBuffers(); -+ if (m_extDrain) -+ { -+ if (m_extDrainTimer.IsTimePast()) -+ { -+ Configure(); -+ m_state = AE_TOP_CONFIGURED_PLAY; -+ m_extTimeout = 0; -+ } -+ else -+ m_extTimeout = m_extDrainTimer.MillisLeft(); -+ } -+ else -+ m_extTimeout = 5000; -+ return; -+ default: -+ break; -+ } -+ } -+ break; -+ -+ case AE_TOP_CONFIGURED_PLAY: -+ if (port == NULL) // timeout -+ { -+ switch (signal) -+ { -+ case CActiveAEControlProtocol::TIMEOUT: -+ if (RunStages()) -+ { -+ m_extTimeout = 0; -+ return; -+ } -+ if (!m_extDrain && HasWork()) -+ { -+ ResampleSounds(); -+ ClearDiscardedBuffers(); -+ m_extTimeout = 100; -+ return; -+ } -+ m_extTimeout = 0; -+ m_state = AE_TOP_CONFIGURED_IDLE; -+ return; -+ default: -+ break; -+ } -+ } -+ break; -+ -+ default: // we are in no state, should not happen -+ CLog::Log(LOGERROR, "CActiveAE::%s - no valid state: %d", __FUNCTION__, m_state); -+ return; -+ } -+ } // for -+} -+ -+void CActiveAE::Process() -+{ -+ Message *msg = NULL; -+ Protocol *port = NULL; -+ bool gotMsg; -+ bool deferData; -+ -+ m_state = AE_TOP_UNCONFIGURED; -+ m_extTimeout = 1000; -+ m_bStateMachineSelfTrigger = false; -+ m_extDrain = false; -+ -+ // start sink -+ m_sink.Start(); -+ -+ while (!m_bStop) -+ { -+ gotMsg = false; -+ deferData = (m_state == AE_TOP_CONFIGURED_SUSPEND); -+ -+ if (m_bStateMachineSelfTrigger) -+ { -+ m_bStateMachineSelfTrigger = false; -+ // self trigger state machine -+ StateMachine(msg->signal, port, msg); -+ if (!m_bStateMachineSelfTrigger) -+ { -+ msg->Release(); -+ msg = NULL; -+ } -+ continue; -+ } -+ // check control port -+ else if (m_controlPort.ReceiveOutMessage(&msg)) -+ { -+ gotMsg = true; -+ port = &m_controlPort; -+ } -+ else if (!deferData) -+ { -+ // check data port -+ if (m_dataPort.ReceiveOutMessage(&msg)) -+ { -+ gotMsg = true; -+ port = &m_dataPort; -+ } -+ // check sink data port -+ else if (m_sink.m_dataPort.ReceiveInMessage(&msg)) -+ { -+ gotMsg = true; -+ port = &m_sink.m_dataPort; -+ } -+ // stream data ports -+ else -+ { -+ std::list::iterator it; -+ for(it=m_streams.begin(); it!=m_streams.end(); ++it) -+ { -+ if((*it)->m_streamPort->ReceiveOutMessage(&msg)) -+ { -+ gotMsg = true; -+ port = &m_dataPort; -+ break; -+ } -+ } -+ } -+ } -+ -+ if (gotMsg) -+ { -+ StateMachine(msg->signal, port, msg); -+ if (!m_bStateMachineSelfTrigger) -+ { -+ msg->Release(); -+ msg = NULL; -+ } -+ continue; -+ } -+ -+ // wait for message -+ else if (m_outMsgEvent.WaitMSec(m_extTimeout)) -+ { -+ continue; -+ } -+ // time out -+ else -+ { -+ msg = m_controlPort.GetMessage(); -+ msg->signal = CActiveAEControlProtocol::TIMEOUT; -+ port = 0; -+ // signal timeout to state machine -+ StateMachine(msg->signal, port, msg); -+ if (!m_bStateMachineSelfTrigger) -+ { -+ msg->Release(); -+ msg = NULL; -+ } -+ } -+ } -+} -+ -+void CActiveAE::Configure() -+{ -+ bool initSink = false; -+ AEAudioFormat sinkInputFormat, inputFormat; -+ m_mode = MODE_PCM; -+ -+ if (m_streams.empty()) -+ { -+ inputFormat.m_dataFormat = AE_FMT_FLOAT; -+ inputFormat.m_sampleRate = 44100; -+ inputFormat.m_encodedRate = 0; -+ inputFormat.m_channelLayout = AE_CH_LAYOUT_2_0; -+ inputFormat.m_frames = 0; -+ inputFormat.m_frameSamples = 0; -+ inputFormat.m_frameSize = 0; -+ UnregisterAudioCallback(); -+ } -+ else -+ { -+ inputFormat = m_streams.front()->m_format; -+ } -+ -+ m_sinkRequestFormat = inputFormat; -+ ApplySettingsToFormat(m_sinkRequestFormat, m_settings); -+ std::string device = AE_IS_RAW(m_sinkRequestFormat.m_dataFormat) ? m_settings.passthoughdevice : m_settings.device; -+ std::string driver; -+ CAESinkFactory::ParseDevice(device, driver); -+ if (!m_sink.IsCompatible(m_sinkRequestFormat, device) || m_settings.driver.compare(driver) != 0) -+ { -+ InitSink(); -+ m_settings.driver = driver; -+ initSink = true; -+ m_stats.Reset(m_sinkFormat.m_sampleRate); -+ } -+ -+ if (m_silenceBuffers) -+ { -+ m_discardBufferPools.push_back(m_silenceBuffers); -+ m_silenceBuffers = NULL; -+ } -+ -+ // buffers for driving gui sounds if no streams are active -+ if (m_streams.empty()) -+ { -+ inputFormat = m_sinkFormat; -+ inputFormat.m_dataFormat = AE_FMT_FLOAT; -+ inputFormat.m_frameSize = inputFormat.m_channelLayout.Count() * -+ (CAEUtil::DataFormatToBits(inputFormat.m_dataFormat) >> 3); -+ m_silenceBuffers = new CActiveAEBufferPool(inputFormat); -+ m_silenceBuffers->Create(MAX_WATER_LEVEL*1000); -+ sinkInputFormat = inputFormat; -+ m_internalFormat = inputFormat; -+ -+ bool silence = false; -+ m_sink.m_controlPort.SendOutMessage(CSinkControlProtocol::SILENCEMODE, &silence, sizeof(bool)); -+ -+ if (m_encoder) -+ { -+ delete m_encoder; -+ m_encoder = NULL; -+ } -+ if (m_encoderBuffers) -+ { -+ m_discardBufferPools.push_back(m_encoderBuffers); -+ m_encoderBuffers = NULL; -+ } -+ if (m_vizBuffers) -+ { -+ m_discardBufferPools.push_back(m_vizBuffers); -+ m_vizBuffers = NULL; -+ } -+ } -+ // resample buffers for streams -+ else -+ { -+ bool silence = true; -+ m_sink.m_controlPort.SendOutMessage(CSinkControlProtocol::SILENCEMODE, &silence, sizeof(bool)); -+ -+ AEAudioFormat outputFormat; -+ if (AE_IS_RAW(inputFormat.m_dataFormat)) -+ { -+ outputFormat = inputFormat; -+ sinkInputFormat = m_sinkFormat; -+ m_mode = MODE_RAW; -+ } -+ // transcode -+ else if (m_settings.ac3passthrough && !m_settings.multichannellpcm) -+ { -+ outputFormat = inputFormat; -+ outputFormat.m_dataFormat = AE_FMT_FLOATP; -+ -+ if (g_advancedSettings.m_audioResample) -+ { -+ outputFormat.m_sampleRate = g_advancedSettings.m_audioResample; -+ CLog::Log(LOGINFO, "CActiveAE::Configure - Forcing samplerate to %d", inputFormat.m_sampleRate); -+ } -+ -+ // setup encoder -+ if (!m_encoder) -+ { -+ m_encoder = new CAEEncoderFFmpeg(); -+ m_encoder->Initialize(outputFormat, true); -+ m_encoderFormat = outputFormat; -+ } -+ else -+ outputFormat = m_encoderFormat; -+ -+ outputFormat.m_channelLayout = m_encoderFormat.m_channelLayout; -+ outputFormat.m_frames = m_encoderFormat.m_frames; -+ -+ // encoder buffer -+ if (m_encoder->GetCodecID() == CODEC_ID_AC3) -+ { -+ AEAudioFormat format; -+ format.m_channelLayout = AE_CH_LAYOUT_2_0; -+ format.m_dataFormat = AE_FMT_S16NE; -+ format.m_frameSize = 2* (CAEUtil::DataFormatToBits(format.m_dataFormat) >> 3); -+ format.m_frames = AC3_FRAME_SIZE; -+ format.m_sampleRate = 48000; -+ if (m_encoderBuffers && initSink) -+ { -+ m_discardBufferPools.push_back(m_encoderBuffers); -+ m_encoderBuffers = NULL; -+ } -+ if (!m_encoderBuffers) -+ { -+ m_encoderBuffers = new CActiveAEBufferPool(format); -+ m_encoderBuffers->Create(MAX_WATER_LEVEL*1000); -+ } -+ } -+ -+ m_mode = MODE_TRANSCODE; -+ sinkInputFormat = m_sinkFormat; -+ } -+ else -+ { -+ outputFormat = m_sinkFormat; -+ outputFormat.m_channelLayout = m_sinkRequestFormat.m_channelLayout; -+ outputFormat.m_channelLayout.ResolveChannels(m_sinkFormat.m_channelLayout); -+ outputFormat.m_dataFormat = AE_FMT_FLOAT; -+ outputFormat.m_frameSize = outputFormat.m_channelLayout.Count() * -+ (CAEUtil::DataFormatToBits(outputFormat.m_dataFormat) >> 3); -+ // TODO: adjust to decoder -+ sinkInputFormat = outputFormat; -+ } -+ m_internalFormat = outputFormat; -+ -+ std::list::iterator it; -+ for(it=m_streams.begin(); it!=m_streams.end(); ++it) -+ { -+ if (!(*it)->m_inputBuffers) -+ { -+ // align input buffers with period of sink -+ (*it)->m_format.m_frames = m_sinkFormat.m_frames * ((float)(*it)->m_format.m_sampleRate / m_sinkFormat.m_sampleRate); -+ -+ // create buffer pool -+ (*it)->m_inputBuffers = new CActiveAEBufferPool((*it)->m_format); -+ (*it)->m_inputBuffers->Create(MAX_CACHE_LEVEL*1000); -+ } -+ if (initSink && (*it)->m_resampleBuffers) -+ { -+ m_discardBufferPools.push_back((*it)->m_resampleBuffers); -+ (*it)->m_resampleBuffers = NULL; -+ } -+ if (!(*it)->m_resampleBuffers) -+ { -+ (*it)->m_resampleBuffers = new CActiveAEBufferPoolResample((*it)->m_inputBuffers->m_format, outputFormat); -+ (*it)->m_resampleBuffers->Create(MAX_CACHE_LEVEL*1000, false); -+ } -+ if (m_mode == MODE_TRANSCODE || m_streams.size() > 1) -+ (*it)->m_resampleBuffers->m_fillPackets = true; -+ } -+ -+ // buffers for viz -+ if (!AE_IS_RAW(inputFormat.m_dataFormat)) -+ { -+ if (initSink && m_vizBuffers) -+ { -+ m_discardBufferPools.push_back(m_vizBuffers); -+ m_vizBuffers = NULL; -+ } -+ if (!m_vizBuffers) -+ { -+ AEAudioFormat vizFormat = m_internalFormat; -+ vizFormat.m_channelLayout = AE_CH_LAYOUT_2_0; -+ vizFormat.m_dataFormat = AE_FMT_FLOAT; -+ m_vizBuffers = new CActiveAEBufferPoolResample(m_internalFormat, vizFormat); -+ // TODO use cache of sync + water level -+ m_vizBuffers->Create(2000, false); -+ } -+ } -+ } -+ -+ // resample buffers for sink -+ if (m_sinkBuffers && !m_sink.IsCompatible(m_sinkBuffers->m_format, device)) -+ { -+ m_discardBufferPools.push_back(m_sinkBuffers); -+ m_sinkBuffers = NULL; -+ } -+ if (!m_sinkBuffers) -+ { -+ m_sinkBuffers = new CActiveAEBufferPoolResample(sinkInputFormat, m_sinkFormat); -+ m_sinkBuffers->Create(MAX_WATER_LEVEL*1000, true); -+ } -+ -+ // reset gui sounds -+ std::vector::iterator it; -+ for (it = m_sounds.begin(); it != m_sounds.end(); ++it) -+ { -+ (*it)->SetConverted(false); -+ } -+ -+ ClearDiscardedBuffers(); -+ m_extDrain = false; -+} -+ -+CActiveAEStream* CActiveAE::CreateStream(MsgStreamNew *streamMsg) -+{ -+ // we only can handle a single pass through stream -+ if (!m_streams.empty()) -+ { -+ if (AE_IS_RAW(m_streams.front()->m_format.m_dataFormat) || AE_IS_RAW(streamMsg->format.m_dataFormat)) -+ return NULL; -+ } -+ -+ // create the stream -+ CActiveAEStream *stream; -+ stream = new CActiveAEStream(&streamMsg->format); -+ stream->m_streamPort = new CActiveAEDataProtocol("stream", -+ &stream->m_inMsgEvent, &m_outMsgEvent); -+ -+ // create buffer pool -+ stream->m_inputBuffers = NULL; // create in Configure when we know the sink format -+ stream->m_resampleBuffers = NULL; // create in Configure when we know the sink format -+ stream->m_statsLock = m_stats.GetLock(); -+ stream->m_fadingSamples = 0; -+ stream->m_started = false; -+ -+ if (streamMsg->options & AESTREAM_PAUSED) -+ stream->m_paused = true; -+ -+ m_streams.push_back(stream); -+ -+ return stream; -+} -+ -+void CActiveAE::DiscardStream(CActiveAEStream *stream) -+{ -+ std::list::iterator it; -+ for (it=m_streams.begin(); it!=m_streams.end(); ) -+ { -+ if (stream == (*it)) -+ { -+ while (!(*it)->m_processingSamples.empty()) -+ { -+ (*it)->m_processingSamples.front()->Return(); -+ (*it)->m_processingSamples.pop_front(); -+ } -+ m_discardBufferPools.push_back((*it)->m_inputBuffers); -+ m_discardBufferPools.push_back((*it)->m_resampleBuffers); -+ CLog::Log(LOGDEBUG, "CActiveAE::DiscardStream - audio stream deleted"); -+ delete (*it)->m_streamPort; -+ delete (*it); -+ it = m_streams.erase(it); -+ } -+ else -+ ++it; -+ } -+ -+ ClearDiscardedBuffers(); -+} -+ -+void CActiveAE::SFlushStream(CActiveAEStream *stream) -+{ -+ while (!stream->m_processingSamples.empty()) -+ { -+ stream->m_processingSamples.front()->Return(); -+ stream->m_processingSamples.pop_front(); -+ } -+ stream->m_resampleBuffers->Flush(); -+ stream->m_streamPort->Purge(); -+ stream->m_bufferedTime = 0.0; -+ stream->m_paused = true; -+} -+ -+void CActiveAE::ClearDiscardedBuffers() -+{ -+ std::list::iterator it; -+ for (it=m_discardBufferPools.begin(); it!=m_discardBufferPools.end(); ++it) -+ { -+ CActiveAEBufferPoolResample *rbuf = dynamic_cast(*it); -+ if (rbuf) -+ { -+ rbuf->Flush(); -+ } -+ // if all buffers have returned, we can delete the buffer pool -+ if ((*it)->m_allSamples.size() == (*it)->m_freeSamples.size()) -+ { -+ delete (*it); -+ CLog::Log(LOGDEBUG, "CActiveAE::ClearDiscardedBuffers - buffer pool deleted"); -+ m_discardBufferPools.erase(it); -+ return; -+ } -+ } -+} -+ -+void CActiveAE::SStopSound(CActiveAESound *sound) -+{ -+ std::list::iterator it; -+ for (it=m_sounds_playing.begin(); it!=m_sounds_playing.end(); ++it) -+ { -+ if (it->sound == sound) -+ { -+ m_sounds_playing.erase(it); -+ return; -+ } -+ } -+} -+ -+void CActiveAE::DiscardSound(CActiveAESound *sound) -+{ -+ SStopSound(sound); -+ -+ std::vector::iterator it; -+ for (it=m_sounds.begin(); it!=m_sounds.end(); ++it) -+ { -+ if ((*it) == sound) -+ { -+ m_sounds.erase(it); -+ return; -+ } -+ } -+} -+ -+float CActiveAE::CalcStreamAmplification(CActiveAEStream *stream, CSampleBuffer *buf) -+{ -+ float amp = 1.0f; -+ int nb_floats = buf->pkt->nb_samples * buf->pkt->config.channels / buf->pkt->planes; -+ float tamp; -+ for(int i=0; ipkt->planes; i++) -+ { -+ tamp = stream->m_limiter.Run((float*)buf->pkt->data[i], nb_floats); -+ amp = std::min(amp, tamp); -+ } -+ return amp; -+} -+ -+void CActiveAE::ApplySettingsToFormat(AEAudioFormat &format, AudioSettings &settings) -+{ -+ // raw pass through -+ if (m_settings.mode != AUDIO_ANALOG && AE_IS_RAW(format.m_dataFormat)) -+ { -+ if ((format.m_dataFormat == AE_FMT_AC3 && !settings.ac3passthrough) || -+ (format.m_dataFormat == AE_FMT_TRUEHD && !settings.truehdpassthrough) || -+ (format.m_dataFormat == AE_FMT_DTS && !settings.dtspassthrough) || -+ (format.m_dataFormat == AE_FMT_DTSHD && !settings.dtshdpassthrough)) -+ { -+ CLog::Log(LOGERROR, "CActiveAE::ApplySettingsToFormat - input audio format is wrong"); -+ } -+ } -+ // transcode -+ else if (m_settings.mode != AUDIO_ANALOG && settings.ac3passthrough && !settings.multichannellpcm && !m_streams.empty()) -+ { -+ format.m_dataFormat = AE_FMT_AC3; -+ format.m_sampleRate = 48000; -+ } -+ else -+ { -+ if ((format.m_channelLayout.Count() > 2) || settings.stereoupmix) -+ { -+ switch (settings.channels) -+ { -+ default: -+ case 0: format.m_channelLayout = AE_CH_LAYOUT_2_0; break; -+ case 1: format.m_channelLayout = AE_CH_LAYOUT_2_0; break; -+ case 2: format.m_channelLayout = AE_CH_LAYOUT_2_1; break; -+ case 3: format.m_channelLayout = AE_CH_LAYOUT_3_0; break; -+ case 4: format.m_channelLayout = AE_CH_LAYOUT_3_1; break; -+ case 5: format.m_channelLayout = AE_CH_LAYOUT_4_0; break; -+ case 6: format.m_channelLayout = AE_CH_LAYOUT_4_1; break; -+ case 7: format.m_channelLayout = AE_CH_LAYOUT_5_0; break; -+ case 8: format.m_channelLayout = AE_CH_LAYOUT_5_1; break; -+ case 9: format.m_channelLayout = AE_CH_LAYOUT_7_0; break; -+ case 10: format.m_channelLayout = AE_CH_LAYOUT_7_1; break; -+ } -+ } -+ -+ if (g_advancedSettings.m_audioResample) -+ { -+ format.m_sampleRate = g_advancedSettings.m_audioResample; -+ 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; -+ } -+ -+ CAEChannelInfo stdLayout = format.m_channelLayout; -+ format.m_channelLayout.ResolveChannels(stdLayout); -+ } -+} -+ -+bool CActiveAE::NeedReconfigureBuffers() -+{ -+ AEAudioFormat newFormat = m_sinkRequestFormat; -+ ApplySettingsToFormat(newFormat, m_settings); -+ -+ if (newFormat.m_dataFormat != m_sinkRequestFormat.m_dataFormat || -+ newFormat.m_channelLayout != m_sinkRequestFormat.m_channelLayout || -+ newFormat.m_sampleRate != m_sinkRequestFormat.m_sampleRate) -+ return true; -+ -+ return false; -+} -+ -+bool CActiveAE::NeedReconfigureSink() -+{ -+ AEAudioFormat newFormat = m_sinkRequestFormat; -+ ApplySettingsToFormat(newFormat, m_settings); -+ -+ std::string device = AE_IS_RAW(newFormat.m_dataFormat) ? m_settings.passthoughdevice : m_settings.device; -+ std::string driver; -+ CAESinkFactory::ParseDevice(device, driver); -+ if (m_settings.driver.compare(driver) != 0) -+ return true; -+ -+ if (!m_sink.IsCompatible(newFormat, device)) -+ return true; -+ -+ return false; -+} -+ -+void CActiveAE::InitSink() -+{ -+ SinkConfig config; -+ config.format = m_sinkRequestFormat; -+ config.stats = &m_stats; -+ -+ // send message to sink -+ Message *reply; -+ if (m_sink.m_controlPort.SendOutMessageSync(CSinkControlProtocol::CONFIGURE, -+ &reply, -+ 5000, -+ &config, sizeof(config))) -+ { -+ bool success = reply->signal == CSinkControlProtocol::ACC ? true : false; -+ if (!success) -+ { -+ reply->Release(); -+ CLog::Log(LOGERROR, "ActiveAE::%s - returned error", __FUNCTION__); -+ m_extError = true; -+ return; -+ } -+ AEAudioFormat *data; -+ data = (AEAudioFormat*)reply->data; -+ if (data) -+ { -+ m_sinkFormat = *data; -+ } -+ reply->Release(); -+ } -+ else -+ { -+ CLog::Log(LOGERROR, "ActiveAE::%s - failed to init", __FUNCTION__); -+ m_extError = true; -+ return; -+ } -+ -+ m_inMsgEvent.Reset(); -+} -+ -+void CActiveAE::DrainSink() -+{ -+ // send message to sink -+ Message *reply; -+ if (m_sink.m_dataPort.SendOutMessageSync(CSinkDataProtocol::DRAIN, -+ &reply, -+ 2000)) -+ { -+ bool success = reply->signal == CSinkDataProtocol::ACC ? true : false; -+ if (!success) -+ { -+ reply->Release(); -+ CLog::Log(LOGERROR, "ActiveAE::%s - returned error on drain", __FUNCTION__); -+ m_extError = true; -+ return; -+ } -+ reply->Release(); -+ } -+ else -+ { -+ CLog::Log(LOGERROR, "ActiveAE::%s - failed to drain", __FUNCTION__); -+ m_extError = true; -+ return; -+ } -+} -+ -+void CActiveAE::UnconfigureSink() -+{ -+ // send message to sink -+ Message *reply; -+ if (m_sink.m_controlPort.SendOutMessageSync(CSinkControlProtocol::UNCONFIGURE, -+ &reply, -+ 2000)) -+ { -+ bool success = reply->signal == CSinkControlProtocol::ACC ? true : false; -+ if (!success) -+ { -+ CLog::Log(LOGERROR, "ActiveAE::%s - returned error", __FUNCTION__); -+ m_extError = true; -+ } -+ reply->Release(); -+ } -+ else -+ { -+ CLog::Log(LOGERROR, "ActiveAE::%s - failed to unconfigure", __FUNCTION__); -+ m_extError = true; -+ } -+ -+ m_inMsgEvent.Reset(); -+} -+ -+ -+bool CActiveAE::RunStages() -+{ -+ bool busy = false; -+ -+ // serve input streams -+ std::list::iterator it; -+ for (it = m_streams.begin(); it != m_streams.end(); ++it) -+ { -+ if ((*it)->m_resampleBuffers && !(*it)->m_paused) -+ busy = (*it)->m_resampleBuffers->ResampleBuffers(); -+ else if ((*it)->m_resampleBuffers && !(*it)->m_resampleBuffers->m_inputSamples.empty()) -+ { -+ CSingleLock lock((*it)->m_streamLock); -+ (*it)->m_streamIsBuffering = false; -+ } -+ -+ // provide buffers to stream -+ float time = m_stats.GetCacheTime((*it)); -+ CSampleBuffer *buffer; -+ if (!(*it)->m_drain) -+ { -+ while (time < MAX_CACHE_LEVEL && !(*it)->m_inputBuffers->m_freeSamples.empty()) -+ { -+ buffer = (*it)->m_inputBuffers->GetFreeBuffer(); -+ (*it)->m_processingSamples.push_back(buffer); -+ (*it)->m_streamPort->SendInMessage(CActiveAEDataProtocol::STREAMBUFFER, &buffer, sizeof(CSampleBuffer*)); -+ (*it)->IncFreeBuffers(); -+ time += (float)buffer->pkt->max_nb_samples / buffer->pkt->config.sample_rate; -+ } -+ } -+ else -+ { -+ if ((*it)->m_inputBuffers->m_allSamples.size() == (*it)->m_inputBuffers->m_freeSamples.size()) -+ { -+ (*it)->m_streamPort->SendInMessage(CActiveAEDataProtocol::STREAMDRAINED); -+ (*it)->m_drain = false; -+ (*it)->m_resampleBuffers->m_drain = false; -+ (*it)->m_started = false; -+ -+ // set variables being polled via stream interface -+ CSingleLock lock((*it)->m_streamLock); -+ if ((*it)->m_streamSlave) -+ { -+ ((CActiveAEStream*)(*it)->m_streamSlave)->m_paused = false;; -+ (*it)->m_streamSlave = NULL; -+ } -+ (*it)->m_streamDrained = true; -+ (*it)->m_streamDraining = false; -+ } -+ } -+ } -+ -+ if (m_stats.GetWaterLevel() < MAX_WATER_LEVEL && -+ (m_mode != MODE_TRANSCODE || (m_encoderBuffers && !m_encoderBuffers->m_freeSamples.empty()))) -+ { -+ // mix streams and sounds sounds -+ if (m_mode != MODE_RAW) -+ { -+ CSampleBuffer *out = NULL; -+ if (!m_sounds_playing.empty() && m_streams.empty()) -+ { -+ if (m_silenceBuffers && !m_silenceBuffers->m_freeSamples.empty()) -+ { -+ out = m_silenceBuffers->GetFreeBuffer(); -+ for (int i=0; ipkt->planes; i++) -+ { -+ memset(out->pkt->data[i], 0, out->pkt->linesize); -+ } -+ out->pkt->nb_samples = out->pkt->max_nb_samples; -+ } -+ } -+ -+ // mix streams -+ std::list::iterator it; -+ -+ // if we deal with more than a single stream, all streams -+ // must provide samples for mixing -+ bool allStreamsReady = true; -+ for (it = m_streams.begin(); it != m_streams.end(); ++it) -+ { -+ if ((*it)->m_paused || !(*it)->m_started || !(*it)->m_resampleBuffers) -+ continue; -+ -+ if ((*it)->m_resampleBuffers->m_outputSamples.empty()) -+ allStreamsReady = false; -+ } -+ -+ for (it = m_streams.begin(); it != m_streams.end() && allStreamsReady; ++it) -+ { -+ if ((*it)->m_paused || !(*it)->m_resampleBuffers) -+ continue; -+ -+ if (!(*it)->m_resampleBuffers->m_outputSamples.empty()) -+ { -+ (*it)->m_started = true; -+ -+ if (!out) -+ { -+ out = (*it)->m_resampleBuffers->m_outputSamples.front(); -+ (*it)->m_resampleBuffers->m_outputSamples.pop_front(); -+ -+ // volume for stream -+ float amp = (*it)->m_rgain * CalcStreamAmplification((*it), out); -+ -+ int nb_floats = out->pkt->nb_samples * out->pkt->config.channels / out->pkt->planes; -+ int nb_loops = 1; -+ float fadingStep; -+ -+ // fading -+ if ((*it)->m_fadingSamples == -1) -+ { -+ (*it)->m_fadingSamples = m_internalFormat.m_sampleRate * (float)(*it)->m_fadingTime / 1000.0f; -+ (*it)->m_volume = (*it)->m_fadingBase; -+ } -+ if ((*it)->m_fadingSamples > 0) -+ { -+ nb_floats = out->pkt->config.channels / out->pkt->planes; -+ nb_loops = out->pkt->nb_samples; -+ float delta = (*it)->m_fadingTarget - (*it)->m_fadingBase; -+ int samples = m_internalFormat.m_sampleRate * (float)(*it)->m_fadingTime / 1000.0f; -+ fadingStep = delta / samples; -+ } -+ for(int i=0; im_fadingSamples > 0) -+ { -+ (*it)->m_volume += fadingStep; -+ (*it)->m_fadingSamples--; -+ -+ if ((*it)->m_fadingSamples == 0) -+ { -+ // set variables being polled via stream interface -+ CSingleLock lock((*it)->m_streamLock); -+ (*it)->m_streamFading = false; -+ } -+ } -+ float volume = (*it)->m_volume * amp; -+ -+ for(int j=0; jpkt->planes; j++) -+ { -+#ifdef __SSE__ -+ CAEUtil::SSEMulArray((float*)out->pkt->data[j]+i*nb_floats, m_muted ? 0.0 : volume, nb_floats); -+#else -+ float* fbuffer = (float*) out->pkt->data[j]+i*nb_floats; -+ for (int k = 0; k < nb_floats; ++k) -+ *fbuffer++ *= m_muted ? 0.0 : volume; -+#endif -+ } -+ } -+ } -+ else -+ { -+ CSampleBuffer *mix = NULL; -+ mix = (*it)->m_resampleBuffers->m_outputSamples.front(); -+ (*it)->m_resampleBuffers->m_outputSamples.pop_front(); -+ -+ // volume for stream -+ float amp = (*it)->m_volume * (*it)->m_rgain * CalcStreamAmplification((*it), mix); -+ -+ int nb_floats = mix->pkt->nb_samples * mix->pkt->config.channels / mix->pkt->planes; -+ int nb_loops = 1; -+ float fadingStep; -+ -+ // fading -+ if ((*it)->m_fadingSamples == -1) -+ { -+ (*it)->m_fadingSamples = m_internalFormat.m_sampleRate * (float)(*it)->m_fadingTime / 1000.0f; -+ (*it)->m_volume = (*it)->m_fadingBase; -+ } -+ if ((*it)->m_fadingSamples > 0) -+ { -+ nb_floats = mix->pkt->config.channels / mix->pkt->planes; -+ nb_loops = mix->pkt->nb_samples; -+ float delta = (*it)->m_fadingTarget - (*it)->m_fadingBase; -+ int samples = m_internalFormat.m_sampleRate * (float)(*it)->m_fadingTime / 1000.0f; -+ fadingStep = delta / samples; -+ } -+ for(int i=0; im_fadingSamples > 0) -+ { -+ (*it)->m_volume += fadingStep; -+ (*it)->m_fadingSamples--; -+ -+ if ((*it)->m_fadingSamples == 0) -+ { -+ // set variables being polled via stream interface -+ CSingleLock lock((*it)->m_streamLock); -+ (*it)->m_streamFading = false; -+ } -+ } -+ float volume = (*it)->m_volume * amp; -+ -+ for(int j=0; jpkt->planes && jpkt->planes; j++) -+ { -+ float *dst = (float*)out->pkt->data[j]+i*nb_floats; -+ float *src = (float*)mix->pkt->data[j]+i*nb_floats; -+#ifdef __SSE__ -+ CAEUtil::SSEMulAddArray(dst, src, m_muted ? 0.0 : volume, nb_floats); -+#else -+ for (int k = 0; k < nb_floats; ++k) -+ *dst++ += *src++ * m_muted ? 0.0 : volume; -+#endif -+ } -+ } -+ mix->Return(); -+ } -+ busy = true; -+ } -+ } -+ -+ // process output buffer, gui sounds, encode, viz -+ if (out) -+ { -+ // mix gui sounds -+ MixSounds(*(out->pkt)); -+ Deamplify(*(out->pkt)); -+ -+ // viz -+ { -+ CSingleLock lock(m_vizLock); -+ if (m_audioCallback) -+ { -+ if (!m_vizInitialized) -+ { -+ m_audioCallback->OnInitialize(2, m_vizBuffers->m_format.m_sampleRate, 32); -+ m_vizInitialized = true; -+ } -+ -+ // if viz has no free buffer, it won't return current buffer "out" -+ if (!m_vizBuffers->m_freeSamples.empty()) -+ { -+ out->Acquire(); -+ m_vizBuffers->m_inputSamples.push_back(out); -+ } -+ else -+ CLog::Log(LOGWARNING,"ActiveAE::%s - viz ran out of free buffers", __FUNCTION__); -+ unsigned int now = XbmcThreads::SystemClockMillis(); -+ unsigned int timestamp = now + m_stats.GetDelay() * 1000; -+ m_vizBuffers->ResampleBuffers(timestamp); -+ while(!m_vizBuffers->m_outputSamples.empty()) -+ { -+ CSampleBuffer *buf = m_vizBuffers->m_outputSamples.front(); -+ if ((now - buf->timestamp) & 0x80000000) -+ break; -+ else -+ { -+ int submitted = 0; -+ int samples; -+ while(submitted < buf->pkt->nb_samples) -+ { -+ samples = std::min(512, buf->pkt->nb_samples-submitted); -+ m_audioCallback->OnAudioData((float*)(buf->pkt->data[0]+2*submitted), samples); -+ submitted += samples; -+ } -+ buf->Return(); -+ m_vizBuffers->m_outputSamples.pop_front(); -+ } -+ } -+ } -+ else if (m_vizBuffers) -+ m_vizBuffers->Flush(); -+ } -+ -+ // encode -+ if (m_mode == MODE_TRANSCODE && m_encoder) -+ { -+ CSampleBuffer *buf = m_encoderBuffers->GetFreeBuffer(); -+ int ret = m_encoder->Encode(out->pkt->data[0], out->pkt->planes*out->pkt->linesize, -+ buf->pkt->data[0], buf->pkt->planes*buf->pkt->linesize); -+ buf->pkt->nb_samples = buf->pkt->max_nb_samples; -+ out->Return(); -+ out = buf; -+ } -+ -+ // update stats -+ m_stats.AddSamples(out->pkt->nb_samples, m_streams); -+ m_sinkBuffers->m_inputSamples.push_back(out); -+ -+ busy = true; -+ } -+ } -+ // pass through -+ else -+ { -+ std::list::iterator it; -+ CSampleBuffer *buffer; -+ for (it = m_streams.begin(); it != m_streams.end(); ++it) -+ { -+ if (!(*it)->m_resampleBuffers->m_outputSamples.empty()) -+ { -+ buffer = (*it)->m_resampleBuffers->m_outputSamples.front(); -+ (*it)->m_resampleBuffers->m_outputSamples.pop_front(); -+ m_stats.AddSamples(buffer->pkt->nb_samples, m_streams); -+ m_sinkBuffers->m_inputSamples.push_back(buffer); -+ } -+ } -+ } -+ -+ // serve sink buffers -+ busy = m_sinkBuffers->ResampleBuffers(); -+ while(!m_sinkBuffers->m_outputSamples.empty()) -+ { -+ CSampleBuffer *out = NULL; -+ out = m_sinkBuffers->m_outputSamples.front(); -+ m_sinkBuffers->m_outputSamples.pop_front(); -+ m_sink.m_dataPort.SendOutMessage(CSinkDataProtocol::SAMPLE, -+ &out, sizeof(CSampleBuffer*)); -+ busy = true; -+ } -+ } -+ -+ return busy; -+} -+ -+bool CActiveAE::HasWork() -+{ -+ if (!m_sounds_playing.empty()) -+ return true; -+ if (!m_sinkBuffers->m_inputSamples.empty()) -+ return true; -+ if (!m_sinkBuffers->m_outputSamples.empty()) -+ return true; -+ -+ std::list::iterator it; -+ for (it = m_streams.begin(); it != m_streams.end(); ++it) -+ { -+ if (!(*it)->m_resampleBuffers->m_inputSamples.empty()) -+ return true; -+ if (!(*it)->m_resampleBuffers->m_outputSamples.empty()) -+ return true; -+ if (!(*it)->m_processingSamples.empty()) -+ return true; -+ } -+ -+ return false; -+} -+ -+void CActiveAE::MixSounds(CSoundPacket &dstSample) -+{ -+ if (m_sounds_playing.empty()) -+ return; -+ -+ float volume; -+ float *out; -+ float *sample_buffer; -+ int max_samples = dstSample.nb_samples; -+ -+ std::list::iterator it; -+ for (it = m_sounds_playing.begin(); it != m_sounds_playing.end(); ) -+ { -+ if (!it->sound->IsConverted()) -+ ResampleSound(it->sound); -+ int available_samples = it->sound->GetSound(false)->nb_samples - it->samples_played; -+ int mix_samples = std::min(max_samples, available_samples); -+ int start = it->samples_played * -+ m_dllAvUtil.av_get_bytes_per_sample(it->sound->GetSound(false)->config.fmt) * -+ it->sound->GetSound(false)->config.channels / -+ it->sound->GetSound(false)->planes; -+ -+ for(int j=0; jsound->GetVolume(); -+ out = (float*)dstSample.data[j]; -+ sample_buffer = (float*)(it->sound->GetSound(false)->data[j]+start); -+ int nb_floats = mix_samples * dstSample.config.channels / dstSample.planes; -+#ifdef __SSE__ -+ CAEUtil::SSEMulAddArray(out, sample_buffer, volume, nb_floats); -+#else -+ for (int k = 0; k < nb_floats; ++k) -+ *out++ += *sample_buffer++ * volume; -+#endif -+ } -+ -+ it->samples_played += mix_samples; -+ -+ // no more frames, so remove it from the list -+ if (it->samples_played >= it->sound->GetSound(false)->nb_samples) -+ { -+ it = m_sounds_playing.erase(it); -+ continue; -+ } -+ ++it; -+ } -+} -+ -+void CActiveAE::Deamplify(CSoundPacket &dstSample) -+{ -+ if (m_volume < 1.0) -+ { -+ float *buffer; -+ int nb_floats = dstSample.nb_samples * dstSample.config.channels / dstSample.planes; -+ -+ for(int j=0; jsignal == CActiveAEControlProtocol::ACC ? true : false; -+ reply->Release(); -+ if (!success) -+ { -+ CLog::Log(LOGERROR, "ActiveAE::%s - returned error", __FUNCTION__); -+ Dispose(); -+ return false; -+ } -+ } -+ else -+ { -+ CLog::Log(LOGERROR, "ActiveAE::%s - failed to init", __FUNCTION__); -+ Dispose(); -+ return false; -+ } -+ -+ // hook into windowing for receiving display reset events -+#if defined(HAS_GLX) || defined(TARGET_DARWIN_OSX) -+ g_Windowing.Register(this); -+#endif -+ -+ m_inMsgEvent.Reset(); -+ return true; -+} -+ -+void CActiveAE::EnumerateOutputDevices(AEDeviceList &devices, bool passthrough) -+{ -+ m_sink.EnumerateOutputDevices(devices, passthrough); -+} -+ -+std::string CActiveAE::GetDefaultDevice(bool passthrough) -+{ -+ return m_sink.GetDefaultDevice(passthrough); -+} -+ -+void CActiveAE::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") -+ { -+ m_controlPort.SendOutMessage(CActiveAEControlProtocol::RECONFIGURE); -+ } -+} -+ -+bool CActiveAE::SupportsRaw() -+{ -+ return true; -+} -+ -+void CActiveAE::Shutdown() -+{ -+ Dispose(); -+} -+ -+bool CActiveAE::Suspend() -+{ -+ return m_controlPort.SendOutMessage(CActiveAEControlProtocol::SUSPEND); -+} -+ -+bool CActiveAE::Resume() -+{ -+ Message *reply; -+ if (m_controlPort.SendOutMessageSync(CActiveAEControlProtocol::INIT, -+ &reply, -+ 5000)) -+ { -+ bool success = reply->signal == CActiveAEControlProtocol::ACC ? true : false; -+ reply->Release(); -+ if (!success) -+ { -+ CLog::Log(LOGERROR, "ActiveAE::%s - returned error", __FUNCTION__); -+ return false; -+ } -+ } -+ else -+ { -+ CLog::Log(LOGERROR, "ActiveAE::%s - failed to init", __FUNCTION__); -+ return false; -+ } -+ -+ m_inMsgEvent.Reset(); -+ return true; -+} -+ -+bool CActiveAE::IsSuspended() -+{ -+ return m_stats.IsSuspended(); -+} -+ -+float CActiveAE::GetVolume() -+{ -+ return m_aeVolume; -+} -+ -+void CActiveAE::SetVolume(const float volume) -+{ -+ m_aeVolume = std::max( 0.0f, std::min(1.0f, volume)); -+ m_controlPort.SendOutMessage(CActiveAEControlProtocol::VOLUME, &m_aeVolume, sizeof(float)); -+} -+ -+void CActiveAE::SetMute(const bool enabled) -+{ -+ m_aeMuted = enabled; -+ m_controlPort.SendOutMessage(CActiveAEControlProtocol::MUTE, &m_aeMuted, sizeof(bool)); -+} -+ -+bool CActiveAE::IsMuted() -+{ -+ return m_aeMuted; -+} -+ -+void CActiveAE::SetSoundMode(const int mode) -+{ -+ int soundmode = mode; -+ m_controlPort.SendOutMessage(CActiveAEControlProtocol::SOUNDMODE, &soundmode, sizeof(int)); -+} -+ -+ -+void CActiveAE::OnLostDevice() -+{ -+// m_controlPort.SendOutMessage(CActiveAEControlProtocol::DISPLAYLOST); -+} -+ -+void CActiveAE::OnResetDevice() -+{ -+// m_controlPort.SendOutMessage(CActiveAEControlProtocol::DISPLAYRESET); -+} -+ -+//----------------------------------------------------------------------------- -+// Utils -+//----------------------------------------------------------------------------- -+ -+uint8_t **CActiveAE::AllocSoundSample(SampleConfig &config, int &samples, int &bytes_per_sample, int &planes, int &linesize) -+{ -+ uint8_t **buffer; -+ planes = m_dllAvUtil.av_sample_fmt_is_planar(config.fmt) ? config.channels : 1; -+ buffer = new uint8_t*[planes]; -+ m_dllAvUtil.av_samples_alloc(buffer, &linesize, config.channels, -+ samples, config.fmt, 0); -+ bytes_per_sample = m_dllAvUtil.av_get_bytes_per_sample(config.fmt); -+ return buffer; -+} -+ -+void CActiveAE::FreeSoundSample(uint8_t **data) -+{ -+ m_dllAvUtil.av_freep(data); -+ delete [] data; -+} -+ -+//----------------------------------------------------------------------------- -+// GUI Sounds -+//----------------------------------------------------------------------------- -+ -+/** -+ * load sound from an audio file and store original format -+ * register the sound in ActiveAE -+ * later when the engine is idle it will convert the sound to sink format -+ */ -+ -+#define SOUNDBUFFER_SIZE 20480 -+ -+IAESound *CActiveAE::MakeSound(const std::string& file) -+{ -+ AVFormatContext *fmt_ctx = NULL; -+ AVCodecContext *dec_ctx = NULL; -+ AVIOContext *io_ctx; -+ AVInputFormat *io_fmt; -+ AVCodec *dec = NULL; -+ int bit_rate; -+ CActiveAESound *sound = NULL; -+ SampleConfig config; -+ -+ sound = new CActiveAESound(file); -+ if (!sound->Prepare()) -+ return NULL; -+ int fileSize = sound->GetFileSize(); -+ -+ fmt_ctx = m_dllAvFormat.avformat_alloc_context(); -+ unsigned char* buffer = (unsigned char*)m_dllAvUtil.av_malloc(SOUNDBUFFER_SIZE+FF_INPUT_BUFFER_PADDING_SIZE); -+ io_ctx = m_dllAvFormat.avio_alloc_context(buffer, SOUNDBUFFER_SIZE, 0, -+ sound, CActiveAESound::Read, NULL, CActiveAESound::Seek); -+ io_ctx->max_packet_size = sound->GetChunkSize(); -+ if(io_ctx->max_packet_size) -+ io_ctx->max_packet_size *= SOUNDBUFFER_SIZE / io_ctx->max_packet_size; -+ -+ if(!sound->IsSeekPosible()) -+ io_ctx->seekable = 0; -+ -+ fmt_ctx->pb = io_ctx; -+ -+ m_dllAvFormat.av_probe_input_buffer(io_ctx, &io_fmt, file.c_str(), NULL, 0, 0); -+ if (!io_fmt) -+ { -+ m_dllAvFormat.avformat_close_input(&fmt_ctx); -+ delete sound; -+ return NULL; -+ } -+ -+ // find decoder -+ if (m_dllAvFormat.avformat_open_input(&fmt_ctx, file.c_str(), NULL, NULL) == 0) -+ { -+ fmt_ctx->flags |= AVFMT_FLAG_NOPARSE; -+ if (m_dllAvFormat.avformat_find_stream_info(fmt_ctx, NULL) >= 0) -+ { -+ dec_ctx = fmt_ctx->streams[0]->codec; -+ dec = m_dllAvCodec.avcodec_find_decoder(dec_ctx->codec_id); -+ config.sample_rate = dec_ctx->sample_rate; -+ bit_rate = dec_ctx->bit_rate; -+ config.channels = dec_ctx->channels; -+ config.channel_layout = dec_ctx->channel_layout; -+ } -+ } -+ if (dec == NULL) -+ { -+ m_dllAvFormat.avformat_close_input(&fmt_ctx); -+ delete sound; -+ return NULL; -+ } -+ -+ dec_ctx = m_dllAvCodec.avcodec_alloc_context3(dec); -+ dec_ctx->sample_rate = config.sample_rate; -+ dec_ctx->channels = config.channels; -+ if (!config.channel_layout) -+ config.channel_layout = m_dllAvUtil.av_get_default_channel_layout(config.channels); -+ dec_ctx->channel_layout = config.channel_layout; -+ -+ AVPacket avpkt; -+ AVFrame *decoded_frame = NULL; -+ decoded_frame = m_dllAvCodec.avcodec_alloc_frame(); -+ -+ if (m_dllAvCodec.avcodec_open2(dec_ctx, dec, NULL) >= 0) -+ { -+ bool init = false; -+ -+ // decode until eof -+ m_dllAvCodec.av_init_packet(&avpkt); -+ int len; -+ while (m_dllAvFormat.av_read_frame(fmt_ctx, &avpkt) >= 0) -+ { -+ int got_frame = 0; -+ len = m_dllAvCodec.avcodec_decode_audio4(dec_ctx, decoded_frame, &got_frame, &avpkt); -+ if (len < 0) -+ { -+ m_dllAvCodec.avcodec_close(dec_ctx); -+ m_dllAvUtil.av_free(dec_ctx); -+ m_dllAvUtil.av_free(&decoded_frame); -+ m_dllAvFormat.avformat_close_input(&fmt_ctx); -+ delete sound; -+ return NULL; -+ } -+ if (got_frame) -+ { -+ if (!init) -+ { -+ int samples = fileSize / m_dllAvUtil.av_get_bytes_per_sample(dec_ctx->sample_fmt) / config.channels; -+ config.fmt = dec_ctx->sample_fmt; -+ sound->InitSound(true, config, samples); -+ init = true; -+ } -+ sound->StoreSound(true, decoded_frame->extended_data, -+ decoded_frame->nb_samples, decoded_frame->linesize[0]); -+ } -+ } -+ m_dllAvCodec.avcodec_close(dec_ctx); -+ } -+ -+ m_dllAvUtil.av_free(dec_ctx); -+ m_dllAvUtil.av_free(decoded_frame); -+ m_dllAvFormat.avformat_close_input(&fmt_ctx); -+ -+ sound->Finish(); -+ -+ // register sound -+ m_dataPort.SendOutMessage(CActiveAEDataProtocol::NEWSOUND, &sound, sizeof(CActiveAESound*)); -+ -+ return sound; -+} -+ -+void CActiveAE::FreeSound(IAESound *sound) -+{ -+ m_dataPort.SendOutMessage(CActiveAEDataProtocol::FREESOUND, &sound, sizeof(CActiveAESound*)); -+} -+ -+void CActiveAE::PlaySound(CActiveAESound *sound) -+{ -+ m_dataPort.SendOutMessage(CActiveAEDataProtocol::PLAYSOUND, &sound, sizeof(CActiveAESound*)); -+} -+ -+void CActiveAE::StopSound(CActiveAESound *sound) -+{ -+ m_controlPort.SendOutMessage(CActiveAEControlProtocol::STOPSOUND, &sound, sizeof(CActiveAESound*)); -+} -+ -+/** -+ * resample sounds to destination format for mixing -+ * destination format is either format of stream or -+ * default sink format when no stream is playing -+ */ -+void CActiveAE::ResampleSounds() -+{ -+ std::vector::iterator it; -+ for (it = m_sounds.begin(); it != m_sounds.end(); ++it) -+ { -+ if (!(*it)->IsConverted()) -+ ResampleSound(*it); -+ } -+} -+ -+bool CActiveAE::ResampleSound(CActiveAESound *sound) -+{ -+ SampleConfig orig_config, dst_config; -+ uint8_t **dst_buffer; -+ int dst_samples; -+ -+ if (m_mode == MODE_RAW || m_internalFormat.m_dataFormat == AE_FMT_INVALID) -+ return false; -+ -+ if (!sound->GetSound(true)) -+ return false; -+ -+ orig_config = sound->GetSound(true)->config; -+ -+ dst_config.channel_layout = CActiveAEResample::GetAVChannelLayout(m_internalFormat.m_channelLayout); -+ dst_config.channels = m_internalFormat.m_channelLayout.Count(); -+ dst_config.sample_rate = m_internalFormat.m_sampleRate; -+ dst_config.fmt = CActiveAEResample::GetAVSampleFormat(m_internalFormat.m_dataFormat); -+ -+ CActiveAEResample *resampler = new CActiveAEResample(); -+ resampler->Init(dst_config.channel_layout, -+ dst_config.channels, -+ dst_config.sample_rate, -+ dst_config.fmt, -+ orig_config.channel_layout, -+ orig_config.channels, -+ orig_config.sample_rate, -+ orig_config.fmt, -+ NULL); -+ -+ dst_samples = resampler->CalcDstSampleCount(sound->GetSound(true)->nb_samples, -+ m_internalFormat.m_sampleRate, -+ orig_config.sample_rate); -+ -+ dst_buffer = sound->InitSound(false, dst_config, dst_samples); -+ if (!dst_buffer) -+ { -+ delete resampler; -+ return false; -+ } -+ int samples = resampler->Resample(dst_buffer, dst_samples, -+ sound->GetSound(true)->data, -+ sound->GetSound(true)->nb_samples); -+ -+ sound->GetSound(false)->nb_samples = samples; -+ -+ delete resampler; -+ sound->SetConverted(true); -+ return true; -+} -+ -+//----------------------------------------------------------------------------- -+// Streams -+//----------------------------------------------------------------------------- -+ -+IAEStream *CActiveAE::MakeStream(enum AEDataFormat dataFormat, unsigned int sampleRate, unsigned int encodedSampleRate, CAEChannelInfo channelLayout, unsigned int options) -+{ -+ //TODO: pass number of samples in audio packet -+ -+ AEAudioFormat format; -+ format.m_dataFormat = dataFormat; -+ format.m_sampleRate = sampleRate; -+ format.m_encodedRate = encodedSampleRate; -+ format.m_channelLayout = channelLayout; -+ format.m_frames = format.m_sampleRate / 10; -+ format.m_frameSize = format.m_channelLayout.Count() * -+ (CAEUtil::DataFormatToBits(format.m_dataFormat) >> 3); -+ -+ MsgStreamNew msg; -+ msg.format = format; -+ msg.options = options; -+ -+ Message *reply; -+ if (m_dataPort.SendOutMessageSync(CActiveAEDataProtocol::NEWSTREAM, -+ &reply,1000, -+ &msg, sizeof(MsgStreamNew))) -+ { -+ bool success = reply->signal == CActiveAEControlProtocol::ACC ? true : false; -+ if (success) -+ { -+ CActiveAEStream *stream = *(CActiveAEStream**)reply->data; -+ reply->Release(); -+ return stream; -+ } -+ reply->Release(); -+ } -+ -+ CLog::Log(LOGERROR, "ActiveAE::%s - could not create stream", __FUNCTION__); -+ return NULL; -+} -+ -+IAEStream *CActiveAE::FreeStream(IAEStream *stream) -+{ -+ m_dataPort.SendOutMessage(CActiveAEDataProtocol::FREESTREAM, &stream, sizeof(IAEStream*)); -+ return NULL; -+} -+ -+void CActiveAE::FlushStream(CActiveAEStream *stream) -+{ -+ Message *reply; -+ if (m_dataPort.SendOutMessageSync(CActiveAEDataProtocol::FLUSHSTREAM, -+ &reply,1000, -+ &stream, sizeof(CActiveAEStream*))) -+ { -+ bool success = reply->signal == CActiveAEDataProtocol::ACC ? true : false; -+ reply->Release(); -+ if (!success) -+ { -+ CLog::Log(LOGERROR, "CActiveAE::FlushStream - failed"); -+ } -+ } -+} -+ -+void CActiveAE::PauseStream(CActiveAEStream *stream, bool pause) -+{ -+ // TODO pause sink, needs api change -+ if (pause) -+ m_controlPort.SendOutMessage(CActiveAEControlProtocol::PAUSESTREAM, -+ &stream, sizeof(CActiveAEStream*)); -+ else -+ m_controlPort.SendOutMessage(CActiveAEControlProtocol::RESUMESTREAM, -+ &stream, sizeof(CActiveAEStream*)); -+} -+ -+void CActiveAE::SetStreamAmplification(CActiveAEStream *stream, float amplify) -+{ -+ MsgStreamParameter msg; -+ msg.stream = stream; -+ msg.parameter.float_par = amplify; -+ m_controlPort.SendOutMessage(CActiveAEControlProtocol::STREAMAMP, -+ &msg, sizeof(MsgStreamParameter)); -+} -+ -+void CActiveAE::SetStreamReplaygain(CActiveAEStream *stream, float rgain) -+{ -+ MsgStreamParameter msg; -+ msg.stream = stream; -+ msg.parameter.float_par = rgain; -+ m_controlPort.SendOutMessage(CActiveAEControlProtocol::STREAMRGAIN, -+ &msg, sizeof(MsgStreamParameter)); -+} -+ -+void CActiveAE::SetStreamVolume(CActiveAEStream *stream, float volume) -+{ -+ MsgStreamParameter msg; -+ msg.stream = stream; -+ msg.parameter.float_par = volume; -+ m_controlPort.SendOutMessage(CActiveAEControlProtocol::STREAMVOLUME, -+ &msg, sizeof(MsgStreamParameter)); -+} -+ -+void CActiveAE::SetStreamResampleRatio(CActiveAEStream *stream, double ratio) -+{ -+ MsgStreamParameter msg; -+ msg.stream = stream; -+ msg.parameter.double_par = ratio; -+ m_controlPort.SendOutMessage(CActiveAEControlProtocol::STREAMRESAMPLERATIO, -+ &msg, sizeof(MsgStreamParameter)); -+} -+ -+void CActiveAE::SetStreamFade(CActiveAEStream *stream, float from, float target, unsigned int millis) -+{ -+ MsgStreamFade msg; -+ msg.stream = stream; -+ msg.from = from; -+ msg.target = target; -+ msg.millis = millis; -+ m_controlPort.SendOutMessage(CActiveAEControlProtocol::STREAMFADE, -+ &msg, sizeof(MsgStreamFade)); -+} -+ -+void CActiveAE::RegisterAudioCallback(IAudioCallback* pCallback) -+{ -+ CSingleLock lock(m_vizLock); -+ m_audioCallback = pCallback; -+ m_vizInitialized = false; -+} -+ -+void CActiveAE::UnregisterAudioCallback() -+{ -+ CSingleLock lock(m_vizLock); -+ m_audioCallback = NULL; -+} -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h -new file mode 100644 -index 0000000..30da1ac ---- /dev/null -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h -@@ -0,0 +1,332 @@ -+#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 "system.h" -+#include "threads/Thread.h" -+ -+#include "ActiveAESink.h" -+#include "ActiveAEResample.h" -+#include "Interfaces/AEStream.h" -+#include "Interfaces/AESound.h" -+#include "AEFactory.h" -+#include "guilib/DispResource.h" -+ -+// ffmpeg -+#include "DllAvFormat.h" -+#include "DllAvCodec.h" -+#include "DllAvUtil.h" -+ -+class IAESink; -+class IAEEncoder; -+ -+namespace ActiveAE -+{ -+ -+class CActiveAESound; -+class CActiveAEStream; -+ -+struct AudioSettings -+{ -+ std::string device; -+ std::string driver; -+ std::string passthoughdevice; -+ int mode; -+ int channels; -+ bool ac3passthrough; -+ bool dtspassthrough; -+ bool aacpassthrough; -+ bool truehdpassthrough; -+ bool dtshdpassthrough; -+ bool multichannellpcm; -+ bool stereoupmix; -+}; -+ -+class CActiveAEControlProtocol : public Protocol -+{ -+public: -+ CActiveAEControlProtocol(std::string name, CEvent* inEvent, CEvent *outEvent) : Protocol(name, inEvent, outEvent) {}; -+ enum OutSignal -+ { -+ INIT = 0, -+ RECONFIGURE, -+ SUSPEND, -+ MUTE, -+ VOLUME, -+ PAUSESTREAM, -+ RESUMESTREAM, -+ STREAMRGAIN, -+ STREAMVOLUME, -+ STREAMAMP, -+ STREAMRESAMPLERATIO, -+ STREAMFADE, -+ STOPSOUND, -+ SOUNDMODE, -+ GETSTATE, -+ DISPLAYLOST, -+ DISPLAYRESET, -+ TIMEOUT, -+ }; -+ enum InSignal -+ { -+ ACC, -+ ERR, -+ STATS, -+ }; -+}; -+ -+class CActiveAEDataProtocol : public Protocol -+{ -+public: -+ CActiveAEDataProtocol(std::string name, CEvent* inEvent, CEvent *outEvent) : Protocol(name, inEvent, outEvent) {}; -+ enum OutSignal -+ { -+ NEWSOUND = 0, -+ PLAYSOUND, -+ FREESOUND, -+ NEWSTREAM, -+ FREESTREAM, -+ STREAMSAMPLE, -+ DRAINSTREAM, -+ FLUSHSTREAM, -+ }; -+ enum InSignal -+ { -+ ACC, -+ ERR, -+ STREAMBUFFER, -+ STREAMDRAINED, -+ }; -+}; -+ -+struct MsgStreamNew -+{ -+ AEAudioFormat format; -+ unsigned int options; -+}; -+ -+struct MsgStreamSample -+{ -+ CSampleBuffer *buffer; -+ CActiveAEStream *stream; -+}; -+ -+struct MsgStreamParameter -+{ -+ CActiveAEStream *stream; -+ union -+ { -+ float float_par; -+ double double_par; -+ } parameter; -+}; -+ -+struct MsgStreamFade -+{ -+ CActiveAEStream *stream; -+ float from; -+ float target; -+ unsigned int millis; -+}; -+ -+class CEngineStats -+{ -+public: -+ void Reset(unsigned int sampleRate); -+ void UpdateSinkDelay(double delay, int samples); -+ void AddSamples(int samples, std::list &streams); -+ float GetDelay(); -+ float GetDelay(CActiveAEStream *stream); -+ float GetCacheTime(CActiveAEStream *stream); -+ float GetCacheTotal(CActiveAEStream *stream); -+ float GetWaterLevel(); -+ void SetSuspended(bool state); -+ void SetSinkCacheTotal(float time) { m_sinkCacheTotal = time; } -+ bool IsSuspended(); -+ CCriticalSection *GetLock() { return &m_lock; } -+protected: -+ float m_sinkDelay; -+ float m_sinkCacheTotal; -+ int m_bufferedSamples; -+ unsigned int m_sinkSampleRate; -+ unsigned int m_sinkUpdate; -+ bool m_suspended; -+ CCriticalSection m_lock; -+}; -+ -+#if defined(HAS_GLX) || defined(TARGET_DARWIN_OSX) -+class CActiveAE : public IAE, public IDispResource, private CThread -+#else -+class CActiveAE : public IAE, private CThread -+#endif -+{ -+protected: -+ friend class ::CAEFactory; -+ friend class CActiveAESound; -+ friend class CActiveAEStream; -+ friend class CSoundPacket; -+ friend class CActiveAEBufferPoolResample; -+ CActiveAE(); -+ virtual ~CActiveAE(); -+ virtual bool Initialize(); -+ -+public: -+ virtual void Shutdown(); -+ virtual bool Suspend(); -+ virtual bool Resume(); -+ virtual bool IsSuspended(); -+ virtual void OnSettingsChange(const std::string& setting); -+ -+ virtual float GetVolume(); -+ virtual void SetVolume(const float volume); -+ virtual void SetMute(const bool enabled); -+ virtual bool IsMuted(); -+ 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); -+ -+ virtual void GarbageCollect() {}; -+ -+ virtual void EnumerateOutputDevices(AEDeviceList &devices, bool passthrough); -+ virtual std::string GetDefaultDevice(bool passthrough); -+ virtual bool SupportsRaw(); -+ -+ virtual void RegisterAudioCallback(IAudioCallback* pCallback); -+ virtual void UnregisterAudioCallback(); -+ -+ virtual void OnLostDevice(); -+ virtual void OnResetDevice(); -+ -+protected: -+ void PlaySound(CActiveAESound *sound); -+ uint8_t **AllocSoundSample(SampleConfig &config, int &samples, int &bytes_per_sample, int &planes, int &linesize); -+ void FreeSoundSample(uint8_t **data); -+ float GetDelay(CActiveAEStream *stream) { return m_stats.GetDelay(stream); } -+ float GetCacheTime(CActiveAEStream *stream) { return m_stats.GetCacheTime(stream); } -+ float GetCacheTotal(CActiveAEStream *stream) { return m_stats.GetCacheTotal(stream); } -+ void FlushStream(CActiveAEStream *stream); -+ void PauseStream(CActiveAEStream *stream, bool pause); -+ void StopSound(CActiveAESound *sound); -+ void SetStreamAmplification(CActiveAEStream *stream, float amplify); -+ void SetStreamReplaygain(CActiveAEStream *stream, float rgain); -+ void SetStreamVolume(CActiveAEStream *stream, float volume); -+ void SetStreamResampleRatio(CActiveAEStream *stream, double ratio); -+ void SetStreamFade(CActiveAEStream *stream, float from, float target, unsigned int millis); -+ -+protected: -+ void Process(); -+ void StateMachine(int signal, Protocol *port, Message *msg); -+ void InitSink(); -+ void DrainSink(); -+ void UnconfigureSink(); -+ void Start(); -+ void Dispose(); -+ void LoadSettings(); -+ bool NeedReconfigureBuffers(); -+ bool NeedReconfigureSink(); -+ void ApplySettingsToFormat(AEAudioFormat &format, AudioSettings &settings); -+ void Configure(); -+ CActiveAEStream* CreateStream(MsgStreamNew *streamMsg); -+ void DiscardStream(CActiveAEStream *stream); -+ void SFlushStream(CActiveAEStream *stream); -+ void ClearDiscardedBuffers(); -+ void SStopSound(CActiveAESound *sound); -+ void DiscardSound(CActiveAESound *sound); -+ float CalcStreamAmplification(CActiveAEStream *stream, CSampleBuffer *buf); -+ -+ bool RunStages(); -+ bool HasWork(); -+ -+ void ResampleSounds(); -+ bool ResampleSound(CActiveAESound *sound); -+ void MixSounds(CSoundPacket &dstSample); -+ void Deamplify(CSoundPacket &dstSample); -+ -+ CEvent m_inMsgEvent; -+ CEvent m_outMsgEvent; -+ CActiveAEControlProtocol m_controlPort; -+ CActiveAEDataProtocol m_dataPort; -+ int m_state; -+ bool m_bStateMachineSelfTrigger; -+ int m_extTimeout; -+ bool m_extError; -+ bool m_extDrain; -+ XbmcThreads::EndTime m_extDrainTimer; -+ -+ enum -+ { -+ MODE_RAW, -+ MODE_TRANSCODE, -+ MODE_PCM -+ }m_mode; -+ -+ CActiveAESink m_sink; -+ AEAudioFormat m_sinkFormat; -+ AEAudioFormat m_sinkRequestFormat; -+ AEAudioFormat m_encoderFormat; -+ AEAudioFormat m_internalFormat; -+ AudioSettings m_settings; -+ CEngineStats m_stats; -+ IAEEncoder *m_encoder; -+ -+ // buffers -+ CActiveAEBufferPoolResample *m_sinkBuffers; -+ CActiveAEBufferPoolResample *m_vizBuffers; -+ CActiveAEBufferPool *m_silenceBuffers; // needed to drive gui sounds if we have no streams -+ CActiveAEBufferPool *m_encoderBuffers; -+ -+ // streams -+ std::list m_streams; -+ std::list m_discardBufferPools; -+ -+ // gui sounds -+ struct SoundState -+ { -+ CActiveAESound *sound; -+ int samples_played; -+ }; -+ std::list m_sounds_playing; -+ std::vector m_sounds; -+ int m_soundMode; -+ -+ float m_volume; -+ bool m_muted; -+ -+ // viz -+ IAudioCallback *m_audioCallback; -+ bool m_vizInitialized; -+ CCriticalSection m_vizLock; -+ -+ // ffmpeg -+ DllAvFormat m_dllAvFormat; -+ DllAvCodec m_dllAvCodec; -+ DllAvUtil m_dllAvUtil; -+ -+ // polled via the interface -+ float m_aeVolume; -+ bool m_aeMuted; -+}; -+}; -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp -new file mode 100644 -index 0000000..9a5f61e ---- /dev/null -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp -@@ -0,0 +1,368 @@ -+/* -+ * Copyright (C) 2010-2013 Team XBMC -+ * http://www.xbmc.org -+ * -+ * This Program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This Program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with XBMC; see the file COPYING. If not, see -+ * . -+ * -+ */ -+ -+#include "ActiveAEBuffer.h" -+#include "AEFactory.h" -+#include "ActiveAE.h" -+ -+using namespace ActiveAE; -+ -+/* typecast AE to CActiveAE */ -+#define AE (*((CActiveAE*)CAEFactory::GetEngine())) -+ -+CSoundPacket::CSoundPacket(SampleConfig conf, int samples) : config(conf) -+{ -+ data = AE.AllocSoundSample(config, samples, bytes_per_sample, planes, linesize); -+ max_nb_samples = samples; -+ nb_samples = 0; -+} -+ -+CSoundPacket::~CSoundPacket() -+{ -+ if (data) -+ AE.FreeSoundSample(data); -+} -+ -+CSampleBuffer::CSampleBuffer() : pkt(NULL), pool(NULL) -+{ -+ refCount = 0; -+} -+ -+CSampleBuffer::~CSampleBuffer() -+{ -+ if (pkt) -+ delete pkt; -+} -+ -+CSampleBuffer* CSampleBuffer::Acquire() -+{ -+ refCount++; -+ return this; -+} -+ -+void CSampleBuffer::Return() -+{ -+ refCount--; -+ if (pool && refCount <= 0) -+ pool->ReturnBuffer(this); -+} -+ -+CActiveAEBufferPool::CActiveAEBufferPool(AEAudioFormat format) -+{ -+ m_format = format; -+ if (AE_IS_RAW(m_format.m_dataFormat)) -+ m_format.m_dataFormat = AE_FMT_S16NE; -+} -+ -+CActiveAEBufferPool::~CActiveAEBufferPool() -+{ -+ CSampleBuffer *buffer; -+ while(!m_allSamples.empty()) -+ { -+ buffer = m_allSamples.front(); -+ m_allSamples.pop_front(); -+ delete buffer; -+ } -+} -+ -+CSampleBuffer* CActiveAEBufferPool::GetFreeBuffer() -+{ -+ CSampleBuffer* buf = NULL; -+ -+ if (!m_freeSamples.empty()) -+ { -+ buf = m_freeSamples.front(); -+ m_freeSamples.pop_front(); -+ buf->refCount = 1; -+ } -+ return buf; -+} -+ -+void CActiveAEBufferPool::ReturnBuffer(CSampleBuffer *buffer) -+{ -+ buffer->pkt->nb_samples = 0; -+ m_freeSamples.push_back(buffer); -+} -+ -+bool CActiveAEBufferPool::Create(unsigned int totaltime) -+{ -+ CSampleBuffer *buffer; -+ SampleConfig config; -+ config.fmt = CActiveAEResample::GetAVSampleFormat(m_format.m_dataFormat); -+ config.channels = m_format.m_channelLayout.Count(); -+ config.sample_rate = m_format.m_sampleRate; -+ config.channel_layout = CActiveAEResample::GetAVChannelLayout(m_format.m_channelLayout); -+ -+ unsigned int time = 0; -+ unsigned int buffertime = (m_format.m_frames*1000) / m_format.m_sampleRate; -+ unsigned int n = 0; -+ while (time < totaltime || n < 5) -+ { -+ buffer = new CSampleBuffer(); -+ buffer->pool = this; -+ buffer->pkt = new CSoundPacket(config, m_format.m_frames); -+ -+ m_allSamples.push_back(buffer); -+ m_freeSamples.push_back(buffer); -+ time += buffertime; -+ n++; -+ } -+ -+ return true; -+} -+ -+//----------------------------------------------------------------------------- -+ -+CActiveAEBufferPoolResample::CActiveAEBufferPoolResample(AEAudioFormat inputFormat, AEAudioFormat outputFormat) -+ : CActiveAEBufferPool(outputFormat) -+{ -+ m_inputFormat = inputFormat; -+ if (AE_IS_RAW(m_inputFormat.m_dataFormat)) -+ m_inputFormat.m_dataFormat = AE_FMT_S16NE; -+ m_resampler = NULL; -+ m_fillPackets = false; -+ m_drain = false; -+ m_empty = true; -+ m_procSample = NULL; -+ m_resampleRatio = 1.0; -+ m_changeRatio = false; -+} -+ -+CActiveAEBufferPoolResample::~CActiveAEBufferPoolResample() -+{ -+ if (m_resampler) -+ delete m_resampler; -+} -+ -+bool CActiveAEBufferPoolResample::Create(unsigned int totaltime, bool remap) -+{ -+ CActiveAEBufferPool::Create(totaltime); -+ -+ if (m_inputFormat.m_channelLayout != m_format.m_channelLayout || -+ m_inputFormat.m_sampleRate != m_format.m_sampleRate || -+ m_inputFormat.m_dataFormat != m_format.m_dataFormat) -+ { -+ m_resampler = new CActiveAEResample(); -+ m_resampler->Init(CActiveAEResample::GetAVChannelLayout(m_format.m_channelLayout), -+ m_format.m_channelLayout.Count(), -+ m_format.m_sampleRate, -+ CActiveAEResample::GetAVSampleFormat(m_format.m_dataFormat), -+ CActiveAEResample::GetAVChannelLayout(m_inputFormat.m_channelLayout), -+ m_inputFormat.m_channelLayout.Count(), -+ m_inputFormat.m_sampleRate, -+ CActiveAEResample::GetAVSampleFormat(m_inputFormat.m_dataFormat), -+ remap ? &m_format.m_channelLayout : NULL); -+ } -+ -+ // store output sampling rate, needed when ratio gets changed -+ m_outSampleRate = m_format.m_sampleRate; -+ -+ return true; -+} -+ -+void CActiveAEBufferPoolResample::ChangeRatio() -+{ -+// CLog::Log(LOGNOTICE,"---------- sample rate changed from: %d, to: %d", -+// m_outSampleRate, (int)(m_format.m_sampleRate * m_resampleRatio)); -+ -+ m_outSampleRate = m_format.m_sampleRate * m_resampleRatio; -+ -+ if (m_resampler) -+ delete m_resampler; -+ -+ m_resampler = new CActiveAEResample(); -+ m_resampler->Init(CActiveAEResample::GetAVChannelLayout(m_format.m_channelLayout), -+ m_format.m_channelLayout.Count(), -+ m_outSampleRate, -+ CActiveAEResample::GetAVSampleFormat(m_format.m_dataFormat), -+ CActiveAEResample::GetAVChannelLayout(m_inputFormat.m_channelLayout), -+ m_inputFormat.m_channelLayout.Count(), -+ m_inputFormat.m_sampleRate, -+ CActiveAEResample::GetAVSampleFormat(m_inputFormat.m_dataFormat), -+ NULL); -+ -+ m_changeRatio = false; -+} -+ -+bool CActiveAEBufferPoolResample::ResampleBuffers(unsigned int timestamp) -+{ -+ bool busy = false; -+ CSampleBuffer *in; -+ -+ if (m_changeRatio) -+ { -+ if ((unsigned int)(m_format.m_sampleRate * m_resampleRatio) == m_outSampleRate) -+ m_changeRatio = false; -+ } -+ -+ if (!m_resampler) -+ { -+ if (m_changeRatio) -+ { -+ ChangeRatio(); -+ return true; -+ } -+ while(!m_inputSamples.empty()) -+ { -+ in = m_inputSamples.front(); -+ m_inputSamples.pop_front(); -+ m_outputSamples.push_back(in); -+ busy = true; -+ } -+ } -+ else if (m_procSample || !m_freeSamples.empty()) -+ { -+ // GetBufferedSamples is not accurate because of rounding errors -+ int out_samples = m_resampler->GetBufferedSamples(); -+ int free_samples; -+ if (m_procSample) -+ free_samples = m_procSample->pkt->max_nb_samples - m_procSample->pkt->nb_samples; -+ else -+ free_samples = m_format.m_frames; -+ -+ bool skipInput = false; -+ // avoid that ffmpeg resample buffer grows too large -+ if (out_samples > free_samples * 2 && !m_empty) -+ skipInput = true; -+ -+ bool hasInput = !m_inputSamples.empty(); -+ -+ if (hasInput || skipInput || m_drain || m_changeRatio) -+ { -+ if (!m_procSample) -+ { -+ m_procSample = GetFreeBuffer(); -+ } -+ -+ if (hasInput && !skipInput && !m_changeRatio) -+ { -+ in = m_inputSamples.front(); -+ m_inputSamples.pop_front(); -+ } -+ else -+ in = NULL; -+ -+ int start = m_procSample->pkt->nb_samples * -+ m_procSample->pkt->bytes_per_sample * -+ m_procSample->pkt->config.channels / -+ m_procSample->pkt->planes; -+ -+ for(int i=0; ipkt->planes; i++) -+ { -+ m_planes[i] = m_procSample->pkt->data[i] + start; -+ } -+ -+ out_samples = m_resampler->Resample(m_planes, -+ m_procSample->pkt->max_nb_samples - m_procSample->pkt->nb_samples, -+ in ? in->pkt->data : NULL, -+ in ? in->pkt->nb_samples : 0); -+ m_procSample->pkt->nb_samples += out_samples; -+ busy = true; -+ m_empty = (out_samples == 0); -+ -+ if ((m_drain || m_changeRatio) && m_empty) -+ { -+ if (m_fillPackets && m_procSample->pkt->nb_samples != 0) -+ { -+ // pad with zero -+ start = m_procSample->pkt->nb_samples * -+ m_procSample->pkt->bytes_per_sample * -+ m_procSample->pkt->config.channels / -+ m_procSample->pkt->planes; -+ for(int i=0; ipkt->planes; i++) -+ { -+ memset(m_procSample->pkt->data[i]+start, 0, m_procSample->pkt->linesize-start); -+ } -+ } -+ m_procSample->timestamp = timestamp; -+ -+ // check if draining is finished -+ if (m_drain && m_procSample->pkt->nb_samples == 0) -+ { -+ m_procSample->Return(); -+ busy = false; -+ } -+ else -+ m_outputSamples.push_back(m_procSample); -+ -+ m_procSample = NULL; -+ if (m_changeRatio) -+ ChangeRatio(); -+ } -+ // some methods like encode require completely filled packets -+ else if (!m_fillPackets || (m_procSample->pkt->nb_samples == m_procSample->pkt->max_nb_samples)) -+ { -+ m_procSample->timestamp = timestamp; -+ m_outputSamples.push_back(m_procSample); -+ m_procSample = NULL; -+ } -+ -+ if (in) -+ in->Return(); -+ } -+ } -+ return busy; -+} -+ -+float CActiveAEBufferPoolResample::GetDelay() -+{ -+ float delay = 0; -+ std::deque::iterator itBuf; -+ -+ if (m_procSample) -+ delay += m_procSample->pkt->nb_samples / m_procSample->pkt->config.sample_rate; -+ -+ for(itBuf=m_inputSamples.begin(); itBuf!=m_inputSamples.end(); ++itBuf) -+ { -+ delay += (float)(*itBuf)->pkt->nb_samples / (*itBuf)->pkt->config.sample_rate; -+ } -+ -+ for(itBuf=m_outputSamples.begin(); itBuf!=m_outputSamples.end(); ++itBuf) -+ { -+ delay += (float)(*itBuf)->pkt->nb_samples / (*itBuf)->pkt->config.sample_rate; -+ } -+ -+ if (m_resampler) -+ { -+ int samples = m_resampler->GetBufferedSamples(); -+ delay += (float)samples / m_outSampleRate; -+ } -+ -+ return delay; -+} -+ -+void CActiveAEBufferPoolResample::Flush() -+{ -+ if (m_procSample) -+ { -+ m_procSample->Return(); -+ m_procSample = NULL; -+ } -+ while (!m_inputSamples.empty()) -+ { -+ m_inputSamples.front()->Return(); -+ m_inputSamples.pop_front(); -+ } -+ while (!m_outputSamples.empty()) -+ { -+ m_outputSamples.front()->Return(); -+ m_outputSamples.pop_front(); -+ } -+} -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.h -new file mode 100644 -index 0000000..183c49e ---- /dev/null -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.h -@@ -0,0 +1,110 @@ -+#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 "DllAvUtil.h" -+#include "DllSwResample.h" -+#include "AEAudioFormat.h" -+#include -+ -+namespace ActiveAE -+{ -+ -+struct SampleConfig -+{ -+ AVSampleFormat fmt; -+ uint64_t channel_layout; -+ int channels; -+ int sample_rate; -+}; -+ -+/** -+ * the variables here follow ffmpeg naming -+ */ -+class CSoundPacket -+{ -+public: -+ CSoundPacket(SampleConfig conf, int samples); -+ ~CSoundPacket(); -+ uint8_t **data; // array with pointers to planes of data -+ SampleConfig config; -+ AEDataFormat internal_format; // used when carrying pass through -+ int bytes_per_sample; // bytes per sample and per channel -+ int linesize; // see ffmpeg, required for planar formats -+ int planes; // 1 for non planar formats, #channels for planar -+ int nb_samples; // number of frames used -+ int max_nb_samples; // max number of frames this packet can hold -+}; -+ -+class CActiveAEBufferPool; -+ -+class CSampleBuffer -+{ -+public: -+ CSampleBuffer(); -+ ~CSampleBuffer(); -+ CSampleBuffer *Acquire(); -+ void Return(); -+ CSoundPacket *pkt; -+ CActiveAEBufferPool *pool; -+ unsigned int timestamp; -+ int refCount; -+}; -+ -+class CActiveAEBufferPool -+{ -+public: -+ CActiveAEBufferPool(AEAudioFormat format); -+ virtual ~CActiveAEBufferPool(); -+ virtual bool Create(unsigned int totaltime); -+ CSampleBuffer *GetFreeBuffer(); -+ void ReturnBuffer(CSampleBuffer *buffer); -+ AEAudioFormat m_format; -+ std::deque m_allSamples; -+ std::deque m_freeSamples; -+}; -+ -+class CActiveAEResample; -+ -+class CActiveAEBufferPoolResample : public CActiveAEBufferPool -+{ -+public: -+ CActiveAEBufferPoolResample(AEAudioFormat inputFormat, AEAudioFormat outputFormat); -+ virtual ~CActiveAEBufferPoolResample(); -+ virtual bool Create(unsigned int totaltime, bool remap); -+ void ChangeRatio(); -+ bool ResampleBuffers(unsigned int timestamp = 0); -+ float GetDelay(); -+ void Flush(); -+ AEAudioFormat m_inputFormat; -+ std::deque m_inputSamples; -+ std::deque m_outputSamples; -+ CSampleBuffer *m_procSample; -+ CActiveAEResample *m_resampler; -+ uint8_t *m_planes[16]; -+ bool m_fillPackets; -+ bool m_drain; -+ bool m_empty; -+ bool m_changeRatio; -+ double m_resampleRatio; -+ unsigned int m_outSampleRate; -+}; -+ -+} -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.cpp -new file mode 100644 -index 0000000..63df59c ---- /dev/null -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.cpp -@@ -0,0 +1,251 @@ -+/* -+ * 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 "ActiveAEResample.h" -+ -+using namespace ActiveAE; -+ -+CActiveAEResample::CActiveAEResample() -+{ -+ m_pContext = NULL; -+} -+ -+CActiveAEResample::~CActiveAEResample() -+{ -+ if (m_pContext) -+ m_dllSwResample.swr_free(&m_pContext); -+ -+ m_dllAvUtil.Unload(); -+ m_dllSwResample.Unload(); -+} -+ -+bool CActiveAEResample::Init(uint64_t dst_chan_layout, int dst_channels, int dst_rate, AVSampleFormat dst_fmt, uint64_t src_chan_layout, int src_channels, int src_rate, AVSampleFormat src_fmt, CAEChannelInfo *remapLayout) -+{ -+ if (!m_dllAvUtil.Load() || !m_dllSwResample.Load()) -+ return false; -+ -+ m_dst_chan_layout = dst_chan_layout; -+ m_dst_channels = dst_channels; -+ m_dst_rate = dst_rate; -+ m_dst_fmt = dst_fmt; -+ m_src_chan_layout = src_chan_layout; -+ m_src_channels = src_channels; -+ m_src_rate = src_rate; -+ m_src_fmt = src_fmt; -+ -+ if (m_dst_chan_layout == 0) -+ m_dst_chan_layout = m_dllAvUtil.av_get_default_channel_layout(m_dst_channels); -+ if (m_src_chan_layout == 0) -+ m_src_chan_layout = m_dllAvUtil.av_get_default_channel_layout(m_src_channels); -+ -+ m_pContext = m_dllSwResample.swr_alloc_set_opts(NULL, m_dst_chan_layout, m_dst_fmt, m_dst_rate, -+ m_src_chan_layout, m_src_fmt, m_src_rate, -+ 0, NULL); -+ -+ if(!m_pContext) -+ { -+ CLog::Log(LOGERROR, "CActiveAEResample::Init - create context failed"); -+ return false; -+ } -+ if (remapLayout) -+ { -+ // one-to-one mapping of channels -+ // remapLayout is the layout of the sink, if the channel is in our src layout -+ // the channel is mapped by setting coef 1.0 -+ memset(m_rematrix, 0, sizeof(m_rematrix)); -+ for (unsigned int out=0; outCount(); out++) -+ { -+ int idx = GetAVChannelIndex((*remapLayout)[out], m_src_chan_layout); -+ if (idx >= 0) -+ { -+ m_rematrix[out][idx] = 1.0; -+ } -+ } -+ -+ if (m_dllSwResample.swr_set_matrix(m_pContext, (const double*)m_rematrix, AE_CH_MAX) < 0) -+ { -+ CLog::Log(LOGERROR, "CActiveAEResample::Init - setting channel matrix failed"); -+ return false; -+ } -+ } -+ if(m_dllSwResample.swr_init(m_pContext) < 0) -+ { -+ CLog::Log(LOGERROR, "CActiveAEResample::Init - init resampler failed"); -+ return false; -+ } -+ return true; -+} -+ -+int CActiveAEResample::Resample(uint8_t **dst_buffer, int dst_samples, uint8_t **src_buffer, int src_samples) -+{ -+ int ret = m_dllSwResample.swr_convert(m_pContext, dst_buffer, dst_samples, (const uint8_t**)src_buffer, src_samples); -+ if (ret < 0) -+ { -+ CLog::Log(LOGERROR, "CActiveAEResample::Resample - resample failed"); -+ return 0; -+ } -+ return ret; -+} -+ -+int64_t CActiveAEResample::GetDelay(int64_t base) -+{ -+ return m_dllSwResample.swr_get_delay(m_pContext, base); -+} -+ -+int CActiveAEResample::GetBufferedSamples() -+{ -+ return m_dllAvUtil.av_rescale_rnd(m_dllSwResample.swr_get_delay(m_pContext, m_dst_rate), -+ m_src_rate, m_dst_rate, AV_ROUND_UP); -+} -+ -+int CActiveAEResample::CalcDstSampleCount(int src_samples, int dst_rate, int src_rate) -+{ -+ return m_dllAvUtil.av_rescale_rnd(src_samples, dst_rate, src_rate, AV_ROUND_UP); -+} -+ -+int CActiveAEResample::GetSrcBufferSize(int samples) -+{ -+ return m_dllAvUtil.av_samples_get_buffer_size(NULL, m_src_channels, samples, m_src_fmt, 1); -+} -+ -+int CActiveAEResample::GetDstBufferSize(int samples) -+{ -+ return m_dllAvUtil.av_samples_get_buffer_size(NULL, m_dst_channels, samples, m_dst_fmt, 1); -+} -+ -+uint64_t CActiveAEResample::GetAVChannelLayout(CAEChannelInfo &info) -+{ -+ uint64_t channelLayout = 0; -+ if (info.HasChannel(AE_CH_FL)) channelLayout |= AV_CH_FRONT_LEFT; -+ if (info.HasChannel(AE_CH_FR)) channelLayout |= AV_CH_FRONT_RIGHT; -+ if (info.HasChannel(AE_CH_FC)) channelLayout |= AV_CH_FRONT_CENTER; -+ if (info.HasChannel(AE_CH_LFE)) channelLayout |= AV_CH_LOW_FREQUENCY; -+ if (info.HasChannel(AE_CH_BL)) channelLayout |= AV_CH_BACK_LEFT; -+ if (info.HasChannel(AE_CH_BR)) channelLayout |= AV_CH_BACK_RIGHT; -+ if (info.HasChannel(AE_CH_FLOC)) channelLayout |= AV_CH_FRONT_LEFT_OF_CENTER; -+ if (info.HasChannel(AE_CH_FROC)) channelLayout |= AV_CH_FRONT_RIGHT_OF_CENTER; -+ if (info.HasChannel(AE_CH_BC)) channelLayout |= AV_CH_BACK_CENTER; -+ if (info.HasChannel(AE_CH_SL)) channelLayout |= AV_CH_SIDE_LEFT; -+ if (info.HasChannel(AE_CH_SR)) channelLayout |= AV_CH_SIDE_RIGHT; -+ if (info.HasChannel(AE_CH_TC)) channelLayout |= AV_CH_TOP_CENTER; -+ if (info.HasChannel(AE_CH_TFL)) channelLayout |= AV_CH_TOP_FRONT_LEFT; -+ if (info.HasChannel(AE_CH_TFC)) channelLayout |= AV_CH_TOP_FRONT_CENTER; -+ if (info.HasChannel(AE_CH_TFR)) channelLayout |= AV_CH_TOP_FRONT_RIGHT; -+ if (info.HasChannel(AE_CH_TBL)) channelLayout |= AV_CH_TOP_BACK_LEFT; -+ if (info.HasChannel(AE_CH_TBC)) channelLayout |= AV_CH_TOP_BACK_CENTER; -+ if (info.HasChannel(AE_CH_TBR)) channelLayout |= AV_CH_TOP_BACK_RIGHT; -+ -+ return channelLayout; -+} -+ -+//CAEChannelInfo CActiveAEResample::GetAEChannelLayout(uint64_t layout) -+//{ -+// CAEChannelInfo channelLayout; -+// channelLayout.Reset(); -+// -+// if (layout & AV_CH_FRONT_LEFT ) channelLayout += AE_CH_FL ; -+// if (layout & AV_CH_FRONT_RIGHT ) channelLayout += AE_CH_FR ; -+// if (layout & AV_CH_FRONT_CENTER ) channelLayout += AE_CH_FC ; -+// if (layout & AV_CH_LOW_FREQUENCY ) channelLayout += AE_CH_LFE ; -+// if (layout & AV_CH_BACK_LEFT ) channelLayout += AE_CH_BL ; -+// if (layout & AV_CH_BACK_RIGHT ) channelLayout += AE_CH_BR ; -+// if (layout & AV_CH_FRONT_LEFT_OF_CENTER ) channelLayout += AE_CH_FLOC; -+// if (layout & AV_CH_FRONT_RIGHT_OF_CENTER) channelLayout += AE_CH_FROC; -+// if (layout & AV_CH_BACK_CENTER ) channelLayout += AE_CH_BC ; -+// if (layout & AV_CH_SIDE_LEFT ) channelLayout += AE_CH_SL ; -+// if (layout & AV_CH_SIDE_RIGHT ) channelLayout += AE_CH_SR ; -+// if (layout & AV_CH_TOP_CENTER ) channelLayout += AE_CH_TC ; -+// if (layout & AV_CH_TOP_FRONT_LEFT ) channelLayout += AE_CH_TFL ; -+// if (layout & AV_CH_TOP_FRONT_CENTER ) channelLayout += AE_CH_TFC ; -+// if (layout & AV_CH_TOP_FRONT_RIGHT ) channelLayout += AE_CH_TFR ; -+// if (layout & AV_CH_TOP_BACK_LEFT ) channelLayout += AE_CH_BL ; -+// if (layout & AV_CH_TOP_BACK_CENTER ) channelLayout += AE_CH_BC ; -+// if (layout & AV_CH_TOP_BACK_RIGHT ) channelLayout += AE_CH_BR ; -+// -+// return channelLayout; -+//} -+ -+AVSampleFormat CActiveAEResample::GetAVSampleFormat(AEDataFormat format) -+{ -+ if (format == AE_FMT_U8) return AV_SAMPLE_FMT_U8; -+ else if (format == AE_FMT_S16NE) return AV_SAMPLE_FMT_S16; -+ else if (format == AE_FMT_S32NE) return AV_SAMPLE_FMT_S32; -+ else if (format == AE_FMT_FLOAT) return AV_SAMPLE_FMT_FLT; -+ else if (format == AE_FMT_DOUBLE) return AV_SAMPLE_FMT_DBL; -+ -+ else if (format == AE_FMT_U8P) return AV_SAMPLE_FMT_U8P; -+ else if (format == AE_FMT_S16NEP) return AV_SAMPLE_FMT_S16P; -+ else if (format == AE_FMT_S32NEP) return AV_SAMPLE_FMT_S32P; -+ else if (format == AE_FMT_FLOATP) return AV_SAMPLE_FMT_FLTP; -+ else if (format == AE_FMT_DOUBLEP) return AV_SAMPLE_FMT_DBLP; -+ -+ CLog::Log(LOGDEBUG, "CActiveAEResample::GetAVSampleFormat - format not supported"); -+ return AV_SAMPLE_FMT_FLT; -+} -+ -+AEDataFormat CActiveAEResample::GetAESampleFormat(AVSampleFormat format) -+{ -+ if (format == AV_SAMPLE_FMT_U8) return AE_FMT_U8; -+ else if (format == AV_SAMPLE_FMT_S16) return AE_FMT_S16NE; -+ else if (format == AV_SAMPLE_FMT_S32) return AE_FMT_S32NE; -+ else if (format == AV_SAMPLE_FMT_FLT) return AE_FMT_FLOAT; -+ else if (format == AV_SAMPLE_FMT_DBL) return AE_FMT_DOUBLE; -+ -+ else if (format == AV_SAMPLE_FMT_U8P) return AE_FMT_U8P; -+ else if (format == AV_SAMPLE_FMT_S16P) return AE_FMT_S16NEP; -+ else if (format == AV_SAMPLE_FMT_S32P) return AE_FMT_S32NEP; -+ else if (format == AV_SAMPLE_FMT_FLTP) return AE_FMT_FLOATP; -+ else if (format == AV_SAMPLE_FMT_DBLP) return AE_FMT_DOUBLEP; -+ -+ CLog::Log(LOGERROR, "CActiveAEResample::GetAESampleFormat - format not supported"); -+ return AE_FMT_INVALID; -+} -+ -+uint64_t CActiveAEResample::GetAVChannel(enum AEChannel aechannel) -+{ -+ switch (aechannel) -+ { -+ case AE_CH_FL: return AV_CH_FRONT_LEFT; -+ case AE_CH_FR: return AV_CH_FRONT_RIGHT; -+ case AE_CH_FC: return AV_CH_FRONT_CENTER; -+ case AE_CH_LFE: return AV_CH_LOW_FREQUENCY; -+ case AE_CH_BL: return AV_CH_BACK_LEFT; -+ case AE_CH_BR: return AV_CH_BACK_RIGHT; -+ case AE_CH_FLOC: return AV_CH_FRONT_LEFT_OF_CENTER; -+ case AE_CH_FROC: return AV_CH_FRONT_RIGHT_OF_CENTER; -+ case AE_CH_BC: return AV_CH_BACK_CENTER; -+ case AE_CH_SL: return AV_CH_SIDE_LEFT; -+ case AE_CH_SR: return AV_CH_SIDE_RIGHT; -+ case AE_CH_TC: return AV_CH_TOP_CENTER; -+ case AE_CH_TFL: return AV_CH_TOP_FRONT_LEFT; -+ case AE_CH_TFC: return AV_CH_TOP_FRONT_CENTER; -+ case AE_CH_TFR: return AV_CH_TOP_FRONT_RIGHT; -+ case AE_CH_TBL: return AV_CH_TOP_BACK_LEFT; -+ case AE_CH_TBC: return AV_CH_TOP_BACK_CENTER; -+ case AE_CH_TBR: return AV_CH_TOP_BACK_RIGHT; -+ default: -+ return 0; -+ } -+} -+ -+int CActiveAEResample::GetAVChannelIndex(enum AEChannel aechannel, uint64_t layout) -+{ -+ return m_dllAvUtil.av_get_channel_layout_channel_index(layout, GetAVChannel(aechannel)); -+} -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.h -new file mode 100644 -index 0000000..fa95a1d ---- /dev/null -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResample.h -@@ -0,0 +1,61 @@ -+#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 "DllAvUtil.h" -+#include "DllSwResample.h" -+#include "Utils/AEChannelInfo.h" -+#include "AEAudioFormat.h" -+#include "ActiveAEBuffer.h" -+ -+namespace ActiveAE -+{ -+ -+class CActiveAEResample -+{ -+public: -+ CActiveAEResample(); -+ virtual ~CActiveAEResample(); -+ bool Init(uint64_t dst_chan_layout, int dst_channels, int dst_rate, AVSampleFormat dst_fmt, uint64_t src_chan_layout, int src_channels, int src_rate, AVSampleFormat src_fmt, CAEChannelInfo *remapLayout = NULL); -+ int Resample(uint8_t **dst_buffer, int dst_samples, uint8_t **src_buffer, int src_samples); -+ int64_t GetDelay(int64_t base); -+ int GetBufferedSamples(); -+ int CalcDstSampleCount(int src_samples, int dst_rate, int src_rate); -+ int GetSrcBufferSize(int samples); -+ int GetDstBufferSize(int samples); -+ static uint64_t GetAVChannelLayout(CAEChannelInfo &info); -+// static CAEChannelInfo GetAEChannelLayout(uint64_t layout); -+ static AVSampleFormat GetAVSampleFormat(AEDataFormat format); -+ static AEDataFormat GetAESampleFormat(AVSampleFormat format); -+ static uint64_t GetAVChannel(enum AEChannel aechannel); -+ int GetAVChannelIndex(enum AEChannel aechannel, uint64_t layout); -+ -+protected: -+ DllAvUtil m_dllAvUtil; -+ DllSwResample m_dllSwResample; -+ uint64_t m_src_chan_layout, m_dst_chan_layout; -+ int m_src_rate, m_dst_rate; -+ int m_src_channels, m_dst_channels; -+ AVSampleFormat m_src_fmt, m_dst_fmt; -+ SwrContext *m_pContext; -+ double m_rematrix[AE_CH_MAX][AE_CH_MAX]; -+}; -+ -+} -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp -new file mode 100644 -index 0000000..252f431 ---- /dev/null -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp -@@ -0,0 +1,813 @@ -+/* -+ * 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 "ActiveAESink.h" -+#include "Utils/AEUtil.h" -+#include "utils/EndianSwap.h" -+#include "ActiveAE.h" -+ -+#include "settings/Settings.h" -+#include "settings/AdvancedSettings.h" -+ -+using namespace ActiveAE; -+ -+CActiveAESink::CActiveAESink(CEvent *inMsgEvent) : -+ CThread("AESink"), -+ m_controlPort("SinkControlPort", inMsgEvent, &m_outMsgEvent), -+ m_dataPort("SinkDataPort", inMsgEvent, &m_outMsgEvent) -+{ -+ m_inMsgEvent = inMsgEvent; -+ m_sink = NULL; -+ m_stats = NULL; -+ m_convertBuffer = NULL; -+} -+ -+void CActiveAESink::Start() -+{ -+ if (!IsRunning()) -+ { -+ Create(); -+ SetPriority(THREAD_PRIORITY_ABOVE_NORMAL); -+ } -+} -+ -+void CActiveAESink::Dispose() -+{ -+ m_bStop = true; -+ m_outMsgEvent.Set(); -+ StopThread(); -+ m_controlPort.Purge(); -+ m_dataPort.Purge(); -+ -+ if (m_sink) -+ { -+ m_sink->Drain(); -+ m_sink->Deinitialize(); -+ delete m_sink; -+ m_sink = NULL; -+ } -+ if (m_sampleOfSilence.pkt) -+ { -+ delete m_sampleOfSilence.pkt; -+ m_sampleOfSilence.pkt = NULL; -+ } -+ -+ delete m_sampleOfNoise.pkt; -+ m_sampleOfNoise.pkt = NULL; -+ -+ if (m_convertBuffer) -+ { -+ _aligned_free(m_convertBuffer); -+ m_convertBuffer = NULL; -+ } -+} -+ -+bool CActiveAESink::IsCompatible(const AEAudioFormat format, const std::string &device) -+{ -+ if (!m_sink) -+ return false; -+ return m_sink->IsCompatible(format, device); -+} -+ -+enum SINK_STATES -+{ -+ S_TOP = 0, // 0 -+ S_TOP_UNCONFIGURED, // 1 -+ S_TOP_CONFIGURED, // 2 -+ S_TOP_CONFIGURED_SUSPEND, // 3 -+ S_TOP_CONFIGURED_IDLE, // 4 -+ S_TOP_CONFIGURED_PLAY, // 5 -+ S_TOP_CONFIGURED_SILENCE, // 6 -+ S_TOP_CONFIGURED_WARMUP, // 7 -+}; -+ -+int SINK_parentStates[] = { -+ -1, -+ 0, //TOP_UNCONFIGURED -+ 0, //TOP_CONFIGURED -+ 2, //TOP_CONFIGURED_SUSPEND -+ 2, //TOP_CONFIGURED_IDLE -+ 2, //TOP_CONFIGURED_PLAY -+ 2, //TOP_CONFIGURED_SILENCE -+ 2, //TOP_CONFIGURED_WARMUP -+}; -+ -+void CActiveAESink::StateMachine(int signal, Protocol *port, Message *msg) -+{ -+ for (int state = m_state; ; state = SINK_parentStates[state]) -+ { -+ switch (state) -+ { -+ case S_TOP: // TOP -+ if (port == &m_controlPort) -+ { -+ switch (signal) -+ { -+ case CSinkControlProtocol::CONFIGURE: -+ SinkConfig *data; -+ data = (SinkConfig*)msg->data; -+ if (data) -+ { -+ m_requestedFormat = data->format; -+ m_stats = data->stats; -+ } -+ m_extError = false; -+ m_extSilence = false; -+ ReturnBuffers(); -+ OpenSink(); -+ -+ if (!m_extError) -+ { -+ m_stats->SetSinkCacheTotal(m_sink->GetCacheTotal()); -+ m_state = S_TOP_CONFIGURED_IDLE; -+ m_extTimeout = 10000; -+ msg->Reply(CSinkControlProtocol::ACC, &m_sinkFormat, sizeof(AEAudioFormat)); -+ } -+ else -+ { -+ m_state = S_TOP_UNCONFIGURED; -+ msg->Reply(CSinkControlProtocol::ERR); -+ } -+ return; -+ -+ case CSinkControlProtocol::UNCONFIGURE: -+ ReturnBuffers(); -+ if (m_sink) -+ { -+ m_sink->Drain(); -+ m_sink->Deinitialize(); -+ delete m_sink; -+ m_sink = NULL; -+ } -+ m_state = S_TOP_UNCONFIGURED; -+ msg->Reply(CSinkControlProtocol::ACC); -+ return; -+ -+ default: -+ break; -+ } -+ } -+ else if (port == &m_dataPort) -+ { -+ switch (signal) -+ { -+ case CSinkDataProtocol::DRAIN: -+ msg->Reply(CSinkDataProtocol::ACC); -+ m_state = S_TOP_UNCONFIGURED; -+ m_extTimeout = 0; -+ return; -+ default: -+ break; -+ } -+ } -+ { -+ std::string portName = port == NULL ? "timer" : port->portName; -+ CLog::Log(LOGWARNING, "CActiveAESink::%s - signal: %d form port: %s not handled for state: %d", __FUNCTION__, signal, portName.c_str(), m_state); -+ } -+ return; -+ -+ case S_TOP_UNCONFIGURED: -+ if (port == NULL) // timeout -+ { -+ switch (signal) -+ { -+ case CSinkControlProtocol::TIMEOUT: -+ m_extTimeout = 1000; -+ return; -+ default: -+ break; -+ } -+ } -+ else if (port == &m_dataPort) -+ { -+ switch (signal) -+ { -+ case CSinkDataProtocol::SAMPLE: -+ CSampleBuffer *samples; -+ int timeout; -+ samples = *((CSampleBuffer**)msg->data); -+ timeout = 1000*samples->pkt->nb_samples/samples->pkt->config.sample_rate; -+ Sleep(timeout); -+ msg->Reply(CSinkDataProtocol::RETURNSAMPLE, &samples, sizeof(CSampleBuffer*)); -+ m_extTimeout = 0; -+ return; -+ default: -+ break; -+ } -+ } -+ break; -+ -+ case S_TOP_CONFIGURED: -+ if (port == &m_controlPort) -+ { -+ switch (signal) -+ { -+ case CSinkControlProtocol::SILENCEMODE: -+ m_extSilence = *(bool*)msg->data; -+ if (g_advancedSettings.m_streamSilence) -+ m_extSilence = true; -+ if (m_extSilence) -+ { -+ m_extCycleCounter = 5; -+ m_state = S_TOP_CONFIGURED_WARMUP; -+ m_extTimeout = 0; -+ } -+ return; -+ default: -+ break; -+ } -+ } -+ else if (port == &m_dataPort) -+ { -+ switch (signal) -+ { -+ case CSinkDataProtocol::DRAIN: -+ m_sink->Drain(); -+ msg->Reply(CSinkDataProtocol::ACC); -+ m_state = S_TOP_CONFIGURED_IDLE; -+ m_extTimeout = 10000; -+ return; -+ case CSinkDataProtocol::SAMPLE: -+ CSampleBuffer *samples; -+ unsigned int delay; -+ samples = *((CSampleBuffer**)msg->data); -+ delay = OutputSamples(samples); -+ msg->Reply(CSinkDataProtocol::RETURNSAMPLE, &samples, sizeof(CSampleBuffer*)); -+ if (m_extError) -+ { -+ m_sink->Deinitialize(); -+ delete m_sink; -+ m_sink = NULL; -+ m_state = S_TOP_CONFIGURED_SUSPEND; -+ m_extTimeout = 0; -+ } -+ else -+ { -+ m_state = S_TOP_CONFIGURED_PLAY; -+ m_extTimeout = delay / 2; -+ } -+ return; -+ default: -+ break; -+ } -+ } -+ break; -+ -+ case S_TOP_CONFIGURED_SUSPEND: -+ if (port == &m_dataPort) -+ { -+ switch (signal) -+ { -+ case CSinkDataProtocol::SAMPLE: -+ m_extError = false; -+ OpenSink(); -+ OutputSamples(&m_sampleOfNoise); -+ m_state = S_TOP_CONFIGURED_PLAY; -+ m_extTimeout = 0; -+ m_bStateMachineSelfTrigger = true; -+ return; -+ case CSinkDataProtocol::DRAIN: -+ msg->Reply(CSinkDataProtocol::ACC); -+ return; -+ default: -+ break; -+ } -+ } -+ else if (port == NULL) // timeout -+ { -+ switch (signal) -+ { -+ case CSinkControlProtocol::TIMEOUT: -+ m_extTimeout = 10000; -+ return; -+ default: -+ break; -+ } -+ } -+ break; -+ -+ case S_TOP_CONFIGURED_IDLE: -+ if (port == &m_dataPort) -+ { -+ switch (signal) -+ { -+ case CSinkDataProtocol::SAMPLE: -+ OutputSamples(&m_sampleOfNoise); -+ m_state = S_TOP_CONFIGURED_PLAY; -+ m_extTimeout = 0; -+ m_bStateMachineSelfTrigger = true; -+ return; -+ default: -+ break; -+ } -+ } -+ else if (port == NULL) // timeout -+ { -+ switch (signal) -+ { -+ case CSinkControlProtocol::TIMEOUT: -+ m_sink->Deinitialize(); -+ delete m_sink; -+ m_sink = NULL; -+ m_state = S_TOP_CONFIGURED_SUSPEND; -+ m_extTimeout = 10000; -+ return; -+ default: -+ break; -+ } -+ } -+ break; -+ -+ case S_TOP_CONFIGURED_PLAY: -+ if (port == NULL) // timeout -+ { -+ switch (signal) -+ { -+ case CSinkControlProtocol::TIMEOUT: -+ if (m_extSilence) -+ { -+ m_state = S_TOP_CONFIGURED_SILENCE; -+ m_extTimeout = 0; -+ } -+ else -+ { -+ m_sink->Drain(); -+ m_state = S_TOP_CONFIGURED_IDLE; -+ m_extTimeout = 10000; -+ } -+ return; -+ default: -+ break; -+ } -+ } -+ break; -+ -+ case S_TOP_CONFIGURED_SILENCE: -+ if (port == NULL) // timeout -+ { -+ switch (signal) -+ { -+ case CSinkControlProtocol::TIMEOUT: -+ unsigned int delay; -+ delay = OutputSamples(&m_sampleOfSilence); -+ m_extCycleCounter--; -+ if (m_extError) -+ { -+ m_sink->Deinitialize(); -+ delete m_sink; -+ m_sink = NULL; -+ m_state = S_TOP_CONFIGURED_SUSPEND; -+ } -+ else if(m_extCycleCounter <= 0) -+ { -+ m_extCycleCounter = 2; -+ m_state = S_TOP_CONFIGURED_WARMUP; -+ } -+ m_extTimeout = 0; -+ return; -+ default: -+ break; -+ } -+ } -+ break; -+ -+ case S_TOP_CONFIGURED_WARMUP: -+ if (port == NULL) // timeout -+ { -+ switch (signal) -+ { -+ case CSinkControlProtocol::TIMEOUT: -+ unsigned int delay; -+ delay = OutputSamples(&m_sampleOfNoise); -+ m_extCycleCounter--; -+ if (m_extError) -+ { -+ m_sink->Deinitialize(); -+ delete m_sink; -+ m_sink = NULL; -+ m_state = S_TOP_CONFIGURED_SUSPEND; -+ } -+ else if(m_extCycleCounter <= 0) -+ { -+ m_extCycleCounter = 30; -+ m_state = S_TOP_CONFIGURED_SILENCE; -+ } -+ m_extTimeout = 0; -+ return; -+ default: -+ break; -+ } -+ } -+ break; -+ -+ default: // we are in no state, should not happen -+ CLog::Log(LOGERROR, "CActiveSink::%s - no valid state: %d", __FUNCTION__, m_state); -+ return; -+ } -+ } // for -+} -+ -+void CActiveAESink::Process() -+{ -+ Message *msg = NULL; -+ Protocol *port = NULL; -+ bool gotMsg; -+ -+ m_state = S_TOP_UNCONFIGURED; -+ m_extTimeout = 1000; -+ m_bStateMachineSelfTrigger = false; -+ -+ while (!m_bStop) -+ { -+ gotMsg = false; -+ -+ if (m_bStateMachineSelfTrigger) -+ { -+ m_bStateMachineSelfTrigger = false; -+ // self trigger state machine -+ StateMachine(msg->signal, port, msg); -+ if (!m_bStateMachineSelfTrigger) -+ { -+ msg->Release(); -+ msg = NULL; -+ } -+ continue; -+ } -+ // check control port -+ else if (m_controlPort.ReceiveOutMessage(&msg)) -+ { -+ gotMsg = true; -+ port = &m_controlPort; -+ } -+ // check data port -+ else if (m_dataPort.ReceiveOutMessage(&msg)) -+ { -+ gotMsg = true; -+ port = &m_dataPort; -+ } -+ -+ if (gotMsg) -+ { -+ StateMachine(msg->signal, port, msg); -+ if (!m_bStateMachineSelfTrigger) -+ { -+ msg->Release(); -+ msg = NULL; -+ } -+ continue; -+ } -+ -+ // wait for message -+ else if (m_outMsgEvent.WaitMSec(m_extTimeout)) -+ { -+ continue; -+ } -+ // time out -+ else -+ { -+ msg = m_controlPort.GetMessage(); -+ msg->signal = CSinkControlProtocol::TIMEOUT; -+ port = 0; -+ // signal timeout to state machine -+ StateMachine(msg->signal, port, msg); -+ if (!m_bStateMachineSelfTrigger) -+ { -+ msg->Release(); -+ msg = NULL; -+ } -+ } -+ } -+} -+ -+void CActiveAESink::EnumerateSinkList() -+{ -+ unsigned int c_retry = 5; -+ m_sinkInfoList.clear(); -+ 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(); -+} -+ -+void CActiveAESink::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()); -+ } -+ } -+} -+ -+void CActiveAESink::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 CActiveAESink::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"; -+} -+ -+void CActiveAESink::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 CActiveAESink::OpenSink() -+{ -+ std::string device, driver; -+ bool passthrough = AE_IS_RAW(m_requestedFormat.m_dataFormat); -+ if (passthrough) -+ device = CSettings::Get().GetString("audiooutput.passthroughdevice"); -+ else -+ device = CSettings::Get().GetString("audiooutput.audiodevice"); -+ -+ CAESinkFactory::ParseDevice(device, driver); -+ if (driver.empty() && m_sink) -+ driver = m_sink->GetName(); -+ -+ 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(m_requestedFormat, device)) -+ { -+ CLog::Log(LOGINFO, "CActiveAE::OpenSink - sink incompatible, re-starting"); -+ -+ if (m_sink) -+ { -+ m_sink->Drain(); -+ m_sink->Deinitialize(); -+ delete m_sink; -+ m_sink = NULL; -+ } -+ -+ // 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; -+ -+ // WARNING: this changes format and does not use passthrough -+ m_sinkFormat = m_requestedFormat; -+ m_sink = CAESinkFactory::Create(device, m_sinkFormat, passthrough); -+ -+ if (!m_sink) -+ { -+ m_extError = true; -+ return; -+ } -+ -+ CLog::Log(LOGDEBUG, "CActiveAE::OpenSink - %s Initialized:", m_sink->GetName()); -+ CLog::Log(LOGDEBUG, " Output Device : %s", m_deviceFriendlyName.c_str()); -+ CLog::Log(LOGDEBUG, " Sample Rate : %d", m_sinkFormat.m_sampleRate); -+ CLog::Log(LOGDEBUG, " Sample Format : %s", CAEUtil::DataFormatToStr(m_sinkFormat.m_dataFormat)); -+ CLog::Log(LOGDEBUG, " Channel Count : %d", m_sinkFormat.m_channelLayout.Count()); -+ CLog::Log(LOGDEBUG, " Channel Layout: %s", ((std::string)m_sinkFormat.m_channelLayout).c_str()); -+ CLog::Log(LOGDEBUG, " Frames : %d", m_sinkFormat.m_frames); -+ CLog::Log(LOGDEBUG, " Frame Samples : %d", m_sinkFormat.m_frameSamples); -+ CLog::Log(LOGDEBUG, " Frame Size : %d", m_sinkFormat.m_frameSize); -+ } -+ else -+ CLog::Log(LOGINFO, "CActiveAE::OpenSink - keeping old sink with : %s, %s, %dhz", -+ CAEUtil::DataFormatToStr(m_sinkFormat.m_dataFormat), -+ ((std::string)m_sinkFormat.m_channelLayout).c_str(), -+ m_sinkFormat.m_sampleRate); -+ -+ // init sample of silence -+ SampleConfig config; -+ config.fmt = CActiveAEResample::GetAVSampleFormat(m_sinkFormat.m_dataFormat); -+ config.channel_layout = CActiveAEResample::GetAVChannelLayout(m_sinkFormat.m_channelLayout); -+ config.channels = m_sinkFormat.m_channelLayout.Count(); -+ config.sample_rate = m_sinkFormat.m_sampleRate; -+ if (m_sampleOfSilence.pkt) -+ delete m_sampleOfSilence.pkt; -+ m_sampleOfSilence.pkt = new CSoundPacket(config, m_sinkFormat.m_frames); -+ m_sampleOfSilence.pkt->nb_samples = m_sampleOfSilence.pkt->max_nb_samples; -+ -+ // init sample of noise -+ delete m_sampleOfNoise.pkt; -+ m_sampleOfNoise.pkt = new CSoundPacket(config, m_sinkFormat.m_frames); -+ m_sampleOfNoise.pkt->nb_samples = m_sampleOfNoise.pkt->max_nb_samples; -+ if (!passthrough) -+ GenerateNoise(); -+ -+ if (m_convertBuffer) -+ { -+ _aligned_free(m_convertBuffer); -+ m_convertBuffer = NULL; -+ } -+ m_convertState = CHECK_CONVERT; -+} -+ -+void CActiveAESink::ReturnBuffers() -+{ -+ Message *msg = NULL; -+ CSampleBuffer *samples; -+ while (m_dataPort.ReceiveOutMessage(&msg)) -+ { -+ if (msg->signal == CSinkDataProtocol::SAMPLE) -+ { -+ samples = *((CSampleBuffer**)msg->data); -+ msg->Reply(CSinkDataProtocol::RETURNSAMPLE, &samples, sizeof(CSampleBuffer*)); -+ } -+ } -+} -+ -+unsigned int CActiveAESink::OutputSamples(CSampleBuffer* samples) -+{ -+ uint8_t *buffer = samples->pkt->data[0]; -+ unsigned int frames = samples->pkt->nb_samples; -+ unsigned int maxFrames; -+ int retry = 0; -+ int written = 0; -+ double sinkDelay = 0.0; -+ -+ switch(m_convertState) -+ { -+ case SKIP_CONVERT: -+ break; -+ case NEED_CONVERT: -+ buffer = Convert(samples); -+ break; -+ case NEED_BYTESWAP: -+ Endian_Swap16_buf((uint16_t *)buffer, (uint16_t *)buffer, frames * samples->pkt->config.channels); -+ break; -+ case CHECK_CONVERT: -+ ConvertInit(samples); -+ break; -+ default: -+ break; -+ } -+ -+ while(frames > 0) -+ { -+ maxFrames = std::min(frames, m_sinkFormat.m_frames); -+ written = m_sink->AddPackets(buffer, maxFrames, true, true); -+ if (written == 0) -+ { -+ Sleep(500*m_sinkFormat.m_frames/m_sinkFormat.m_sampleRate); -+ retry++; -+ if (retry > 4) -+ { -+ m_extError = true; -+ CLog::Log(LOGERROR, "CActiveAESink::OutputSamples - failed"); -+ return 0; -+ } -+ else -+ continue; -+ } -+ frames -= written; -+ buffer += written*m_sinkFormat.m_frameSize; -+ sinkDelay = m_sink->GetDelay(); -+ m_stats->UpdateSinkDelay(sinkDelay, samples->pool ? written : 0); -+ } -+ return sinkDelay*1000; -+} -+ -+void CActiveAESink::ConvertInit(CSampleBuffer* samples) -+{ -+ if (CActiveAEResample::GetAESampleFormat(samples->pkt->config.fmt) != m_sinkFormat.m_dataFormat) -+ { -+ m_convertFn = CAEConvert::FrFloat(m_sinkFormat.m_dataFormat); -+ if (m_convertBuffer) -+ _aligned_free(m_convertBuffer); -+ m_convertBuffer = (uint8_t*)_aligned_malloc(m_sinkFormat.m_frames * m_sinkFormat.m_channelLayout.Count() * m_sinkFormat.m_frameSize, 16); -+ memset(m_convertBuffer, 0, m_sinkFormat.m_frames * m_sinkFormat.m_channelLayout.Count() * m_sinkFormat.m_frameSize); -+ m_convertState = NEED_CONVERT; -+ } -+ else if (AE_IS_RAW(m_requestedFormat.m_dataFormat) && CAEUtil::S16NeedsByteSwap(AE_FMT_S16NE, m_sinkFormat.m_dataFormat)) -+ { -+ m_convertState = NEED_BYTESWAP; -+ } -+ else -+ m_convertState = SKIP_CONVERT; -+} -+ -+uint8_t* CActiveAESink::Convert(CSampleBuffer* samples) -+{ -+ unsigned int nb_samples = m_convertFn((float*)samples->pkt->data[0], samples->pkt->nb_samples * samples->pkt->config.channels, m_convertBuffer); -+ return m_convertBuffer; -+} -+ -+#define PI 3.1415926536f -+ -+void CActiveAESink::GenerateNoise() -+{ -+ int nb_floats = m_sinkFormat.m_frames*m_sinkFormat.m_channelLayout.Count(); -+ float *noise = new float[nb_floats]; -+ -+ float R1, R2; -+ for(int i=0; idata[0]); -+ } -+ else -+ { -+ memcpy(m_sampleOfNoise.pkt->data[0], noise, nb_floats*sizeof(float)); -+ } -+ delete [] noise; -+} -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.h -new file mode 100644 -index 0000000..ae19f38 ---- /dev/null -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.h -@@ -0,0 +1,133 @@ -+#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 "threads/Event.h" -+#include "threads/Thread.h" -+#include "utils/ActorProtocol.h" -+#include "Interfaces/AE.h" -+#include "Interfaces/AESink.h" -+#include "AESinkFactory.h" -+#include "ActiveAEResample.h" -+#include "Utils/AEConvert.h" -+ -+namespace ActiveAE -+{ -+using namespace Actor; -+ -+class CEngineStats; -+ -+struct SinkConfig -+{ -+ AEAudioFormat format; -+ CEngineStats *stats; -+}; -+ -+class CSinkControlProtocol : public Protocol -+{ -+public: -+ CSinkControlProtocol(std::string name, CEvent* inEvent, CEvent *outEvent) : Protocol(name, inEvent, outEvent) {}; -+ enum OutSignal -+ { -+ CONFIGURE, -+ UNCONFIGURE, -+ SILENCEMODE, -+ TIMEOUT, -+ }; -+ enum InSignal -+ { -+ ACC, -+ ERR, -+ STATS, -+ }; -+}; -+ -+class CSinkDataProtocol : public Protocol -+{ -+public: -+ CSinkDataProtocol(std::string name, CEvent* inEvent, CEvent *outEvent) : Protocol(name, inEvent, outEvent) {}; -+ enum OutSignal -+ { -+ SAMPLE = 0, -+ DRAIN, -+ }; -+ enum InSignal -+ { -+ RETURNSAMPLE, -+ ACC, -+ }; -+}; -+ -+class CActiveAESink : private CThread -+{ -+public: -+ CActiveAESink(CEvent *inMsgEvent); -+ void EnumerateSinkList(); -+ void EnumerateOutputDevices(AEDeviceList &devices, bool passthrough); -+ std::string GetDefaultDevice(bool passthrough); -+ void Start(); -+ void Dispose(); -+ bool IsCompatible(const AEAudioFormat format, const std::string &device); -+ CSinkControlProtocol m_controlPort; -+ CSinkDataProtocol m_dataPort; -+ -+protected: -+ void Process(); -+ void StateMachine(int signal, Protocol *port, Message *msg); -+ void PrintSinks(); -+ void GetDeviceFriendlyName(std::string &device); -+ void OpenSink(); -+ void ReturnBuffers(); -+ -+ unsigned int OutputSamples(CSampleBuffer* samples); -+ void ConvertInit(CSampleBuffer* samples); -+ inline uint8_t* Convert(CSampleBuffer* samples); -+ -+ void GenerateNoise(); -+ -+ CEvent m_outMsgEvent; -+ CEvent *m_inMsgEvent; -+ int m_state; -+ bool m_bStateMachineSelfTrigger; -+ int m_extTimeout; -+ bool m_extError; -+ bool m_extSilence; -+ int m_extCycleCounter; -+ -+ CSampleBuffer m_sampleOfSilence; -+ CSampleBuffer m_sampleOfNoise; -+ uint8_t *m_convertBuffer; -+ CAEConvert::AEConvertFrFn m_convertFn; -+ enum -+ { -+ CHECK_CONVERT, -+ NEED_CONVERT, -+ NEED_BYTESWAP, -+ SKIP_CONVERT, -+ } m_convertState; -+ -+ std::string m_deviceFriendlyName; -+ AESinkInfoList m_sinkInfoList; -+ IAESink *m_sink; -+ AEAudioFormat m_sinkFormat, m_requestedFormat; -+ CEngineStats *m_stats; -+}; -+ -+} -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.cpp -new file mode 100644 -index 0000000..3d79761 ---- /dev/null -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.cpp -@@ -0,0 +1,164 @@ -+/* -+ * 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 "AEFactory.h" -+#include "AEAudioFormat.h" -+#include "ActiveAE.h" -+#include "ActiveAESound.h" -+#include "utils/log.h" -+#include "DllAvUtil.h" -+ -+using namespace ActiveAE; -+using namespace XFILE; -+ -+/* typecast AE to CActiveAE */ -+#define AE (*((CActiveAE*)CAEFactory::GetEngine())) -+ -+CActiveAESound::CActiveAESound(const std::string &filename) : -+ IAESound (filename), -+ m_filename (filename), -+ m_volume (1.0f ) -+{ -+ m_orig_sound = NULL; -+ m_dst_sound = NULL; -+ m_pFile = NULL; -+} -+ -+CActiveAESound::~CActiveAESound() -+{ -+ if (m_orig_sound) -+ delete m_orig_sound; -+ if (m_dst_sound) -+ delete m_dst_sound; -+ Finish(); -+} -+ -+void CActiveAESound::Play() -+{ -+ AE.PlaySound(this); -+} -+ -+void CActiveAESound::Stop() -+{ -+ AE.StopSound(this); -+} -+ -+bool CActiveAESound::IsPlaying() -+{ -+ // TODO -+ return false; -+} -+ -+uint8_t** CActiveAESound::InitSound(bool orig, SampleConfig config, int nb_samples) -+{ -+ CSoundPacket **info; -+ if (orig) -+ info = &m_orig_sound; -+ else -+ info = &m_dst_sound; -+ -+ if (*info) -+ delete *info; -+ *info = new CSoundPacket(config, nb_samples); -+ -+ (*info)->nb_samples = 0; -+ m_isConverted = false; -+ return (*info)->data; -+} -+ -+bool CActiveAESound::StoreSound(bool orig, uint8_t **buffer, int samples, int linesize) -+{ -+ CSoundPacket **info; -+ if (orig) -+ info = &m_orig_sound; -+ else -+ info = &m_dst_sound; -+ -+ if ((*info)->nb_samples + samples > (*info)->max_nb_samples) -+ { -+ CLog::Log(LOGERROR, "CActiveAESound::StoreSound - exceeded max samples"); -+ return false; -+ } -+ -+ int bytes_to_copy = samples * (*info)->bytes_per_sample * (*info)->config.channels; -+ bytes_to_copy /= (*info)->planes; -+ int start = (*info)->nb_samples * (*info)->bytes_per_sample * (*info)->config.channels; -+ start /= (*info)->planes; -+ -+ for (int i=0; i<(*info)->planes; i++) -+ { -+ memcpy((*info)->data[i]+start, buffer[i], bytes_to_copy); -+ } -+ (*info)->nb_samples += samples; -+ -+ return true; -+} -+ -+CSoundPacket *CActiveAESound::GetSound(bool orig) -+{ -+ if (orig) -+ return m_orig_sound; -+ else -+ return m_dst_sound; -+} -+ -+bool CActiveAESound::Prepare() -+{ -+ unsigned int flags = READ_TRUNCATED | READ_CHUNKED; -+ m_pFile = new CFile(); -+ -+ if (!m_pFile->Open(m_filename, flags)) -+ { -+ delete m_pFile; -+ m_pFile = NULL; -+ return false; -+ } -+ m_isSeekPosible = m_pFile->IoControl(IOCTRL_SEEK_POSSIBLE, NULL) != 0; -+ m_fileSize = m_pFile->GetLength(); -+ return true; -+} -+ -+void CActiveAESound::Finish() -+{ -+ delete m_pFile; -+ m_pFile = NULL; -+} -+ -+int CActiveAESound::GetChunkSize() -+{ -+ return m_pFile->GetChunkSize(); -+} -+ -+int CActiveAESound::Read(void *h, uint8_t* buf, int size) -+{ -+ CFile *pFile = static_cast(h)->m_pFile; -+ return pFile->Read(buf, size); -+} -+ -+offset_t CActiveAESound::Seek(void *h, offset_t pos, int whence) -+{ -+ CFile* pFile = static_cast(h)->m_pFile; -+ if(whence == AVSEEK_SIZE) -+ return pFile->GetLength(); -+ else -+ return pFile->Seek(pos, whence & ~AVSEEK_FORCE); -+} -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.h -new file mode 100644 -index 0000000..7cdf76c ---- /dev/null -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.h -@@ -0,0 +1,73 @@ -+#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 "Interfaces/AESound.h" -+#include "ActiveAEResample.h" -+#include "filesystem/File.h" -+ -+class DllAvUtil; -+ -+namespace ActiveAE -+{ -+ -+class CActiveAESound : public IAESound -+{ -+public: -+ CActiveAESound (const std::string &filename); -+ virtual ~CActiveAESound(); -+ -+ 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; } -+ -+ uint8_t** InitSound(bool orig, SampleConfig config, int nb_samples); -+ bool StoreSound(bool orig, uint8_t **buffer, int samples, int linesize); -+ CSoundPacket *GetSound(bool orig); -+ -+ bool IsConverted() { return m_isConverted; } -+ void SetConverted(bool state) { m_isConverted = state; } -+ -+ bool Prepare(); -+ void Finish(); -+ int GetChunkSize(); -+ int GetFileSize() { return m_fileSize; } -+ bool IsSeekPosible() { return m_isSeekPosible; } -+ -+ static int Read(void *h, uint8_t* buf, int size); -+ static offset_t Seek(void *h, offset_t pos, int whence); -+ -+protected: -+ std::string m_filename; -+ XFILE::CFile *m_pFile; -+ bool m_isSeekPosible; -+ int m_fileSize; -+ float m_volume; -+ -+ CSoundPacket *m_orig_sound; -+ CSoundPacket *m_dst_sound; -+ -+ bool m_isConverted; -+}; -+} -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp -new file mode 100644 -index 0000000..e21b9d5 ---- /dev/null -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp -@@ -0,0 +1,357 @@ -+/* -+ * 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 "ActiveAE.h" -+#include "ActiveAEStream.h" -+ -+using namespace ActiveAE; -+ -+/* typecast AE to CActiveAE */ -+#define AE (*((CActiveAE*)CAEFactory::GetEngine())) -+ -+ -+CActiveAEStream::CActiveAEStream(AEAudioFormat *format) -+{ -+ m_format = *format; -+ m_bufferedTime = 0; -+ m_currentBuffer = NULL; -+ m_drain = false; -+ m_paused = false; -+ m_rgain = 1.0; -+ m_volume = 1.0; -+ m_streamSpace = m_format.m_frameSize * m_format.m_frames; -+ m_streamDraining = false; -+ m_streamDrained = false; -+ m_streamFading = false; -+ m_streamFreeBuffers = 0; -+ m_streamIsBuffering = true; -+ m_streamSlave = NULL; -+} -+ -+CActiveAEStream::~CActiveAEStream() -+{ -+} -+ -+void CActiveAEStream::IncFreeBuffers() -+{ -+ CSingleLock lock(m_streamLock); -+ m_streamFreeBuffers++; -+} -+ -+void CActiveAEStream::DecFreeBuffers() -+{ -+ CSingleLock lock(m_streamLock); -+ m_streamFreeBuffers--; -+} -+ -+void CActiveAEStream::ResetFreeBuffers() -+{ -+ CSingleLock lock(m_streamLock); -+ m_streamFreeBuffers = 0; -+} -+ -+unsigned int CActiveAEStream::GetSpace() -+{ -+ CSingleLock lock(m_streamLock); -+ return m_streamFreeBuffers * m_streamSpace; -+} -+ -+unsigned int CActiveAEStream::AddData(void *data, unsigned int size) -+{ -+ Message *msg; -+ unsigned int copied = 0; -+ int bytesToCopy = size; -+ while(copied < size) -+ { -+ if (m_currentBuffer) -+ { -+ int start = m_currentBuffer->pkt->nb_samples * -+ m_currentBuffer->pkt->bytes_per_sample * -+ m_currentBuffer->pkt->config.channels / -+ m_currentBuffer->pkt->planes; -+ -+ int freeSamples = m_currentBuffer->pkt->max_nb_samples - m_currentBuffer->pkt->nb_samples; -+ int space = freeSamples * m_format.m_frameSize; -+ int bytes = std::min(bytesToCopy, space); -+ int samples = bytes / m_currentBuffer->pkt->bytes_per_sample / m_currentBuffer->pkt->config.channels; -+ //TODO: handle planar formats -+ memcpy(m_currentBuffer->pkt->data[0] + start, (uint8_t*)data+copied, bytes); -+ { -+ CSingleLock lock(*m_statsLock); -+ m_currentBuffer->pkt->nb_samples += samples; -+ m_bufferedTime += (double)samples / m_currentBuffer->pkt->config.sample_rate; -+ } -+ copied += bytes; -+ bytesToCopy -= bytes; -+ if (m_currentBuffer->pkt->nb_samples == m_currentBuffer->pkt->max_nb_samples) -+ { -+ MsgStreamSample msgData; -+ msgData.buffer = m_currentBuffer; -+ msgData.stream = this; -+ m_streamPort->SendOutMessage(CActiveAEDataProtocol::STREAMSAMPLE, &msgData, sizeof(MsgStreamSample)); -+ m_currentBuffer = NULL; -+ } -+ continue; -+ } -+ else if (m_streamPort->ReceiveInMessage(&msg)) -+ { -+ if (msg->signal == CActiveAEDataProtocol::STREAMBUFFER) -+ { -+ m_currentBuffer = *((CSampleBuffer**)msg->data); -+ msg->Release(); -+ DecFreeBuffers(); -+ continue; -+ } -+ else -+ { -+ CLog::Log(LOGERROR, "CActiveAEStream::AddData - unknown signal"); -+ msg->Release(); -+ break; -+ } -+ } -+ if (!m_inMsgEvent.WaitMSec(200)) -+ break; -+ } -+ return copied; -+} -+ -+double CActiveAEStream::GetDelay() -+{ -+ return AE.GetDelay(this); -+} -+ -+bool CActiveAEStream::IsBuffering() -+{ -+ CSingleLock lock(m_streamLock); -+ return m_streamIsBuffering; -+} -+ -+double CActiveAEStream::GetCacheTime() -+{ -+ return AE.GetCacheTime(this); -+} -+ -+double CActiveAEStream::GetCacheTotal() -+{ -+ return AE.GetCacheTotal(this); -+} -+ -+void CActiveAEStream::Pause() -+{ -+ AE.PauseStream(this, true); -+} -+ -+void CActiveAEStream::Resume() -+{ -+ AE.PauseStream(this, false); -+} -+ -+void CActiveAEStream::Drain(bool wait) -+{ -+ Message *msg; -+ CActiveAEStream *stream = this; -+ -+ m_streamDraining = true; -+ m_streamDrained = false; -+ -+ Message *reply; -+ if (m_streamPort->SendOutMessageSync(CActiveAEDataProtocol::DRAINSTREAM, -+ &reply,2000, -+ &stream, sizeof(CActiveAEStream*))) -+ { -+ bool success = reply->signal == CActiveAEDataProtocol::ACC ? true : false; -+ reply->Release(); -+ if (!success) -+ { -+ CLog::Log(LOGERROR, "CActiveAEStream::Drain - no acc"); -+ } -+ } -+ -+ if (m_currentBuffer) -+ { -+ MsgStreamSample msgData; -+ msgData.buffer = m_currentBuffer; -+ msgData.stream = this; -+ m_streamPort->SendOutMessage(CActiveAEDataProtocol::STREAMSAMPLE, &msgData, sizeof(MsgStreamSample)); -+ m_currentBuffer = NULL; -+ } -+ -+ XbmcThreads::EndTime timer(2000); -+ while (!timer.IsTimePast()) -+ { -+ if (m_streamPort->ReceiveInMessage(&msg)) -+ { -+ if (msg->signal == CActiveAEDataProtocol::STREAMBUFFER) -+ { -+ MsgStreamSample msgData; -+ msgData.stream = this; -+ msgData.buffer = *((CSampleBuffer**)msg->data); -+ msg->Reply(CActiveAEDataProtocol::STREAMSAMPLE, &msgData, sizeof(MsgStreamSample)); -+ DecFreeBuffers(); -+ continue; -+ } -+ else if (msg->signal == CActiveAEDataProtocol::STREAMDRAINED) -+ { -+ msg->Release(); -+ return; -+ } -+ } -+ else if (!wait) -+ return; -+ -+ m_inMsgEvent.WaitMSec(timer.MillisLeft()); -+ } -+ CLog::Log(LOGERROR, "CActiveAEStream::Drain - timeout out"); -+} -+ -+bool CActiveAEStream::IsDraining() -+{ -+ CSingleLock lock(m_streamLock); -+ return m_streamDraining; -+} -+ -+bool CActiveAEStream::IsDrained() -+{ -+ CSingleLock lock(m_streamLock); -+ return m_streamDrained; -+} -+ -+void CActiveAEStream::Flush() -+{ -+ if (m_currentBuffer) -+ { -+ MsgStreamSample msgData; -+ m_currentBuffer->pkt->nb_samples = 0; -+ msgData.buffer = m_currentBuffer; -+ msgData.stream = this; -+ m_streamPort->SendOutMessage(CActiveAEDataProtocol::STREAMSAMPLE, &msgData, sizeof(MsgStreamSample)); -+ m_currentBuffer = NULL; -+ } -+ AE.FlushStream(this); -+ ResetFreeBuffers(); -+} -+ -+float CActiveAEStream::GetAmplification() -+{ -+ return m_streamAmplify; -+} -+ -+void CActiveAEStream::SetAmplification(float amplify) -+{ -+ m_streamAmplify = amplify; -+ AE.SetStreamAmplification(this, m_streamAmplify); -+} -+ -+float CActiveAEStream::GetReplayGain() -+{ -+ return m_streamRgain; -+} -+ -+void CActiveAEStream::SetReplayGain(float factor) -+{ -+ m_streamRgain = std::max( 0.0f, factor); -+ AE.SetStreamReplaygain(this, m_streamRgain); -+} -+ -+float CActiveAEStream::GetVolume() -+{ -+ return m_streamVolume; -+} -+ -+void CActiveAEStream::SetVolume(float volume) -+{ -+ m_streamVolume = std::max( 0.0f, std::min(1.0f, volume)); -+ AE.SetStreamVolume(this, m_streamVolume); -+} -+ -+double CActiveAEStream::GetResampleRatio() -+{ -+ return m_streamResampleRatio; -+} -+ -+bool CActiveAEStream::SetResampleRatio(double ratio) -+{ -+ m_streamResampleRatio = ratio; -+ AE.SetStreamResampleRatio(this, m_streamResampleRatio); -+ return true; -+} -+ -+void CActiveAEStream::FadeVolume(float from, float target, unsigned int time) -+{ -+ if (time == 0) -+ return; -+ -+ m_streamFading = true; -+ AE.SetStreamFade(this, from, target, time); -+} -+ -+bool CActiveAEStream::IsFading() -+{ -+ CSingleLock lock(m_streamLock); -+ return m_streamFading; -+} -+ -+const unsigned int CActiveAEStream::GetFrameSize() const -+{ -+ return m_format.m_frameSize; -+} -+ -+const unsigned int CActiveAEStream::GetChannelCount() const -+{ -+ return m_format.m_channelLayout.Count(); -+} -+ -+const unsigned int CActiveAEStream::GetSampleRate() const -+{ -+ return m_format.m_sampleRate; -+} -+ -+const unsigned int CActiveAEStream::GetEncodedSampleRate() const -+{ -+ return m_format.m_encodedRate; -+} -+ -+const enum AEDataFormat CActiveAEStream::GetDataFormat() const -+{ -+ return m_format.m_dataFormat; -+} -+ -+void CActiveAEStream::RegisterAudioCallback(IAudioCallback* pCallback) -+{ -+} -+ -+void CActiveAEStream::UnRegisterAudioCallback() -+{ -+} -+ -+void CActiveAEStream::RegisterSlave(IAEStream *slave) -+{ -+ CSingleLock lock(m_streamLock); -+ m_streamSlave = slave; -+} -+ -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h -new file mode 100644 -index 0000000..b18d0f5 ---- /dev/null -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h -@@ -0,0 +1,115 @@ -+#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 "AEAudioFormat.h" -+#include "Interfaces/AEStream.h" -+#include "Utils/AELimiter.h" -+ -+namespace ActiveAE -+{ -+ -+class CActiveAEStream : public IAEStream -+{ -+protected: -+ friend class CActiveAE; -+ friend class CEngineStats; -+ CActiveAEStream(AEAudioFormat *format); -+ virtual ~CActiveAEStream(); -+ void FadingFinished(); -+ void IncFreeBuffers(); -+ void DecFreeBuffers(); -+ void ResetFreeBuffers(); -+ -+public: -+ virtual unsigned int GetSpace(); -+ virtual unsigned int AddData(void *data, unsigned int size); -+ virtual double GetDelay(); -+ virtual bool IsBuffering(); -+ virtual double GetCacheTime(); -+ virtual double GetCacheTotal(); -+ -+ virtual void Pause(); -+ virtual void Resume(); -+ virtual void Drain(bool wait); -+ virtual bool IsDraining(); -+ virtual bool IsDrained(); -+ virtual void Flush(); -+ -+ virtual float GetVolume(); -+ virtual float GetReplayGain(); -+ virtual float GetAmplification(); -+ virtual void SetVolume(float volume); -+ virtual void SetReplayGain(float factor); -+ virtual void SetAmplification(float amplify); -+ -+ virtual const unsigned int GetFrameSize() const; -+ virtual const unsigned int GetChannelCount() const; -+ -+ virtual const unsigned int GetSampleRate() const ; -+ virtual const unsigned int GetEncodedSampleRate() const; -+ virtual const enum AEDataFormat GetDataFormat() const; -+ -+ 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); -+ -+protected: -+ -+ AEAudioFormat m_format; -+ float m_streamVolume; -+ float m_streamRgain; -+ float m_streamAmplify; -+ double m_streamResampleRatio; -+ unsigned int m_streamSpace; -+ bool m_streamDraining; -+ bool m_streamDrained; -+ bool m_streamFading; -+ int m_streamFreeBuffers; -+ bool m_streamIsBuffering; -+ IAEStream *m_streamSlave; -+ CCriticalSection m_streamLock; -+ -+ // only accessed by engine -+ CActiveAEBufferPool *m_inputBuffers; -+ CActiveAEBufferPoolResample *m_resampleBuffers; -+ std::deque m_processingSamples; -+ CSampleBuffer *m_currentBuffer; -+ CActiveAEDataProtocol *m_streamPort; -+ CEvent m_inMsgEvent; -+ CCriticalSection *m_statsLock; -+ bool m_drain; -+ bool m_paused; -+ bool m_started; -+ CAELimiter m_limiter; -+ float m_volume; -+ float m_rgain; -+ float m_bufferedTime; -+ int m_fadingSamples; -+ float m_fadingBase; -+ float m_fadingTarget; -+ int m_fadingTime; -+}; -+} -+ -diff --git a/xbmc/cores/AudioEngine/Makefile.in b/xbmc/cores/AudioEngine/Makefile.in -index 833dfab..2e1a83d 100644 ---- a/xbmc/cores/AudioEngine/Makefile.in -+++ b/xbmc/cores/AudioEngine/Makefile.in -@@ -43,6 +43,13 @@ 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 -+SRCS += Engines/ActiveAE/ActiveAESound.cpp -+SRCS += Engines/ActiveAE/ActiveAEResample.cpp -+SRCS += Engines/ActiveAE/ActiveAEBuffer.cpp -+ - ifeq (@USE_ANDROID@,1) - SRCS += Sinks/AESinkAUDIOTRACK.cpp - else -diff --git a/xbmc/utils/ActorProtocol.cpp b/xbmc/utils/ActorProtocol.cpp -new file mode 100644 -index 0000000..cf4c26f ---- /dev/null -+++ b/xbmc/utils/ActorProtocol.cpp -@@ -0,0 +1,253 @@ -+/* -+ * Copyright (C) 2005-2013 Team XBMC -+ * http://www.xbmc.org -+ * -+ * This Program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This Program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with XBMC; see the file COPYING. If not, see -+ * . -+ * -+ */ -+ -+#include "ActorProtocol.h" -+ -+using namespace Actor; -+ -+void Message::Release() -+{ -+ bool skip; -+ origin->Lock(); -+ skip = isSync ? !isSyncFini : false; -+ isSyncFini = true; -+ origin->Unlock(); -+ -+ if (skip) -+ return; -+ -+ // free data buffer -+ if (data != buffer) -+ delete [] data; -+ -+ // delete event in case of sync message -+ if (event) -+ delete event; -+ -+ origin->ReturnMessage(this); -+} -+ -+bool Message::Reply(int sig, void *data /* = NULL*/, int size /* = 0 */) -+{ -+ if (!isSync) -+ { -+ if (isOut) -+ return origin->SendInMessage(sig, data, size); -+ else -+ return origin->SendOutMessage(sig, data, size); -+ } -+ -+ origin->Lock(); -+ -+ if (!isSyncTimeout) -+ { -+ Message *msg = origin->GetMessage(); -+ msg->signal = sig; -+ msg->isOut = !isOut; -+ replyMessage = msg; -+ if (data) -+ { -+ if (size > MSG_INTERNAL_BUFFER_SIZE) -+ msg->data = new uint8_t[size]; -+ else -+ msg->data = msg->buffer; -+ memcpy(msg->data, data, size); -+ } -+ } -+ -+ origin->Unlock(); -+ -+ if (event) -+ event->Set(); -+ -+ return true; -+} -+ -+Protocol::~Protocol() -+{ -+ Message *msg; -+ Purge(); -+ while (!freeMessageQueue.empty()) -+ { -+ msg = freeMessageQueue.front(); -+ freeMessageQueue.pop(); -+ delete msg; -+ } -+} -+ -+Message *Protocol::GetMessage() -+{ -+ Message *msg; -+ -+ CSingleLock lock(criticalSection); -+ -+ if (!freeMessageQueue.empty()) -+ { -+ msg = freeMessageQueue.front(); -+ freeMessageQueue.pop(); -+ } -+ else -+ msg = new Message(); -+ -+ msg->isSync = false; -+ msg->isSyncFini = false; -+ msg->isSyncTimeout = false; -+ msg->event = NULL; -+ msg->data = NULL; -+ msg->payloadSize = 0; -+ msg->replyMessage = NULL; -+ msg->origin = this; -+ -+ return msg; -+} -+ -+void Protocol::ReturnMessage(Message *msg) -+{ -+ CSingleLock lock(criticalSection); -+ -+ freeMessageQueue.push(msg); -+} -+ -+bool Protocol::SendOutMessage(int signal, void *data /* = NULL */, int size /* = 0 */, Message *outMsg /* = NULL */) -+{ -+ Message *msg; -+ if (outMsg) -+ msg = outMsg; -+ else -+ msg = GetMessage(); -+ -+ msg->signal = signal; -+ msg->isOut = true; -+ -+ if (data) -+ { -+ if (size > MSG_INTERNAL_BUFFER_SIZE) -+ msg->data = new uint8_t[size]; -+ else -+ msg->data = msg->buffer; -+ memcpy(msg->data, data, size); -+ } -+ -+ { CSingleLock lock(criticalSection); -+ outMessages.push(msg); -+ } -+ containerOutEvent->Set(); -+ -+ return true; -+} -+ -+bool Protocol::SendInMessage(int signal, void *data /* = NULL */, int size /* = 0 */, Message *outMsg /* = NULL */) -+{ -+ Message *msg; -+ if (outMsg) -+ msg = outMsg; -+ else -+ msg = GetMessage(); -+ -+ msg->signal = signal; -+ msg->isOut = false; -+ -+ if (data) -+ { -+ if (size > MSG_INTERNAL_BUFFER_SIZE) -+ msg->data = new uint8_t[size]; -+ else -+ msg->data = msg->buffer; -+ memcpy(msg->data, data, size); -+ } -+ -+ { CSingleLock lock(criticalSection); -+ inMessages.push(msg); -+ } -+ containerInEvent->Set(); -+ -+ return true; -+} -+ -+ -+bool Protocol::SendOutMessageSync(int signal, Message **retMsg, int timeout, void *data /* = NULL */, int size /* = 0 */) -+{ -+ Message *msg = GetMessage(); -+ msg->isOut = true; -+ msg->isSync = true; -+ msg->event = new CEvent; -+ msg->event->Reset(); -+ SendOutMessage(signal, data, size, msg); -+ -+ if (!msg->event->WaitMSec(timeout)) -+ { -+ msg->origin->Lock(); -+ if (msg->replyMessage) -+ *retMsg = msg->replyMessage; -+ else -+ { -+ *retMsg = NULL; -+ msg->isSyncTimeout = true; -+ } -+ msg->origin->Unlock(); -+ } -+ else -+ *retMsg = msg->replyMessage; -+ -+ msg->Release(); -+ -+ if (*retMsg) -+ return true; -+ else -+ return false; -+} -+ -+bool Protocol::ReceiveOutMessage(Message **msg) -+{ -+ CSingleLock lock(criticalSection); -+ -+ if (outMessages.empty() || outDefered) -+ return false; -+ -+ *msg = outMessages.front(); -+ outMessages.pop(); -+ -+ return true; -+} -+ -+bool Protocol::ReceiveInMessage(Message **msg) -+{ -+ CSingleLock lock(criticalSection); -+ -+ if (inMessages.empty() || inDefered) -+ return false; -+ -+ *msg = inMessages.front(); -+ inMessages.pop(); -+ -+ return true; -+} -+ -+ -+void Protocol::Purge() -+{ -+ Message *msg; -+ -+ while (ReceiveInMessage(&msg)) -+ msg->Release(); -+ -+ while (ReceiveOutMessage(&msg)) -+ msg->Release(); -+} -diff --git a/xbmc/utils/ActorProtocol.h b/xbmc/utils/ActorProtocol.h -new file mode 100644 -index 0000000..8ef3359 ---- /dev/null -+++ b/xbmc/utils/ActorProtocol.h -@@ -0,0 +1,87 @@ -+/* -+ * Copyright (C) 2005-2013 Team XBMC -+ * http://www.xbmc.org -+ * -+ * This Program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This Program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with XBMC; see the file COPYING. If not, see -+ * . -+ * -+ */ -+ -+#pragma once -+ -+#include "threads/Thread.h" -+#include "utils/log.h" -+#include -+#include "memory.h" -+ -+#define MSG_INTERNAL_BUFFER_SIZE 32 -+ -+namespace Actor -+{ -+ -+class Protocol; -+ -+class Message -+{ -+ friend class Protocol; -+public: -+ int signal; -+ bool isSync; -+ bool isSyncFini; -+ bool isOut; -+ bool isSyncTimeout; -+ int payloadSize; -+ uint8_t buffer[MSG_INTERNAL_BUFFER_SIZE]; -+ uint8_t *data; -+ Message *replyMessage; -+ Protocol *origin; -+ CEvent *event; -+ -+ void Release(); -+ bool Reply(int sig, void *data = NULL, int size = 0); -+ -+private: -+ Message() {isSync = false; data = NULL; event = NULL; replyMessage = NULL;}; -+}; -+ -+class Protocol -+{ -+public: -+ Protocol(std::string name, CEvent* inEvent, CEvent *outEvent) -+ : portName(name), inDefered(false), outDefered(false) {containerInEvent = inEvent; containerOutEvent = outEvent;}; -+ virtual ~Protocol(); -+ Message *GetMessage(); -+ void ReturnMessage(Message *msg); -+ bool SendOutMessage(int signal, void *data = NULL, int size = 0, Message *outMsg = NULL); -+ bool SendInMessage(int signal, void *data = NULL, int size = 0, Message *outMsg = NULL); -+ bool SendOutMessageSync(int signal, Message **retMsg, int timeout, void *data = NULL, int size = 0); -+ bool ReceiveOutMessage(Message **msg); -+ bool ReceiveInMessage(Message **msg); -+ void Purge(); -+ void DeferIn(bool value) {inDefered = value;}; -+ void DeferOut(bool value) {outDefered = value;}; -+ void Lock() {criticalSection.lock();}; -+ void Unlock() {criticalSection.unlock();}; -+ std::string portName; -+ -+protected: -+ CEvent *containerInEvent, *containerOutEvent; -+ CCriticalSection criticalSection; -+ std::queue outMessages; -+ std::queue inMessages; -+ std::queue freeMessageQueue; -+ bool inDefered, outDefered; -+}; -+ -+} -diff --git a/xbmc/utils/Makefile.in b/xbmc/utils/Makefile.in -index 694a9bd..ca49be2 100644 ---- a/xbmc/utils/Makefile.in -+++ b/xbmc/utils/Makefile.in -@@ -70,6 +70,7 @@ SRCS += Vector.cpp - SRCS += Weather.cpp - SRCS += XBMCTinyXML.cpp - SRCS += XMLUtils.cpp -+SRCS += ActorProtocol.cpp - - ifeq (@USE_OPENGLES@,1) - SRCS += AMLUtils.cpp --- -1.8.1.6 - - -From 5e22d771079269b28d443a869cf9024bf7cfb9c0 Mon Sep 17 00:00:00 2001 -From: fritsch -Date: Sat, 8 Jun 2013 09:39:38 +0200 -Subject: [PATCH 013/123] ActiveAE: Make Factory aware of environment, change - global namespace - ---- - xbmc/cores/AudioEngine/AEFactory.cpp | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/xbmc/cores/AudioEngine/AEFactory.cpp b/xbmc/cores/AudioEngine/AEFactory.cpp -index 4f9f566..5adda5f 100644 ---- a/xbmc/cores/AudioEngine/AEFactory.cpp -+++ b/xbmc/cores/AudioEngine/AEFactory.cpp -@@ -28,7 +28,6 @@ - #else - #include "Engines/SoftAE/SoftAE.h" - #include "Engines/ActiveAE/ActiveAE.h" -- using namespace ActiveAE; - #endif - - #if defined(HAS_PULSEAUDIO) -@@ -69,6 +68,8 @@ bool CAEFactory::LoadEngine() - #endif - if (!loaded && engine == "SOFT" ) - loaded = CAEFactory::LoadEngine(AE_ENGINE_SOFT); -+ if (!loaded && engine == "ACTIVE") -+ loaded = CAEFactory::LoadEngine(AE_ENGINE_ACTIVE); - } - #endif - -@@ -101,7 +102,7 @@ bool CAEFactory::LoadEngine(enum AEEngine engine) - case AE_ENGINE_COREAUDIO: AE = new CCoreAudioAE(); break; - #else - case AE_ENGINE_SOFT : AE = new CSoftAE(); break; -- case AE_ENGINE_ACTIVE : AE = new CActiveAE(); break; -+ case AE_ENGINE_ACTIVE : AE = new ActiveAE::CActiveAE(); break; - #endif - #if defined(HAS_PULSEAUDIO) - case AE_ENGINE_PULSE : AE = new CPulseAE(); break; --- -1.8.1.6 - - -From 89bb54f049db842565fe68698fd8aacc896be229 Mon Sep 17 00:00:00 2001 -From: unknown -Date: Thu, 11 Jul 2013 18:33:34 +0200 -Subject: [PATCH 015/123] AE: allow Windows to use ActiveAE via env - ---- - xbmc/cores/AudioEngine/AEFactory.cpp | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/xbmc/cores/AudioEngine/AEFactory.cpp b/xbmc/cores/AudioEngine/AEFactory.cpp -index 5adda5f..d5517f3 100644 ---- a/xbmc/cores/AudioEngine/AEFactory.cpp -+++ b/xbmc/cores/AudioEngine/AEFactory.cpp -@@ -73,6 +73,20 @@ bool CAEFactory::LoadEngine() - } - #endif - -+#if defined(TARGET_WINDOWS) -+ std::string engine; -+ if (getenv("AE_ENGINE")) -+ { -+ engine = (std::string)getenv("AE_ENGINE"); -+ std::transform(engine.begin(), engine.end(), engine.begin(), ::toupper); -+ -+ if (!loaded && engine == "SOFT" ) -+ loaded = CAEFactory::LoadEngine(AE_ENGINE_SOFT); -+ if (!loaded && engine == "ACTIVE") -+ loaded = CAEFactory::LoadEngine(AE_ENGINE_ACTIVE); -+ } -+#endif -+ - #if defined(HAS_PULSEAUDIO) - if (!loaded) - loaded = CAEFactory::LoadEngine(AE_ENGINE_PULSE); --- -1.8.1.6 - - -From 795bc8558b82484598f4e304a0b0681eaa0b7ec5 Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Sun, 14 Jul 2013 17:28:13 +0200 -Subject: [PATCH 016/123] ActiveAE: convert BE/LE to NE if possible - ---- - xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp -index 252f431..0e003bd 100644 ---- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp -@@ -648,6 +648,18 @@ void CActiveAESink::OpenSink() - return; - } - -+#ifdef WORDS_BIGENDIAN -+ if (m_sinkFormat.m_dataFormat == AE_FMT_S16BE) -+ m_sinkFormat.m_dataFormat = AE_FMT_S16NE; -+ else if (m_sinkFormat.m_dataFormat == AE_FMT_S32BE) -+ m_sinkFormat.m_dataFormat = AE_FMT_S32NE; -+#else -+ if (m_sinkFormat.m_dataFormat == AE_FMT_S16LE) -+ m_sinkFormat.m_dataFormat = AE_FMT_S16NE; -+ else if (m_sinkFormat.m_dataFormat == AE_FMT_S32LE) -+ m_sinkFormat.m_dataFormat = AE_FMT_S32NE; -+#endif -+ - CLog::Log(LOGDEBUG, "CActiveAE::OpenSink - %s Initialized:", m_sink->GetName()); - CLog::Log(LOGDEBUG, " Output Device : %s", m_deviceFriendlyName.c_str()); - CLog::Log(LOGDEBUG, " Sample Rate : %d", m_sinkFormat.m_sampleRate); --- -1.8.1.6 - - -From d3462ff7d97c254cc3f5378421e1507d4a19a29f Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Sun, 14 Jul 2013 17:48:23 +0200 -Subject: [PATCH 017/123] ActiveAE: always request float on sink if not raw - ---- - xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -index dc79da7..c1ec6e5 100644 ---- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -@@ -1087,6 +1087,7 @@ void CActiveAE::ApplySettingsToFormat(AEAudioFormat &format, AudioSettings &sett - } - else - { -+ format.m_dataFormat = AE_FMT_FLOAT; - if ((format.m_channelLayout.Count() > 2) || settings.stereoupmix) - { - switch (settings.channels) --- -1.8.1.6 - - -From 91ab13397e29e13fef220b3b8334f6062b73f63d Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Sun, 14 Jul 2013 18:34:47 +0200 -Subject: [PATCH 018/123] ActiveAE: set volume on sink if supported - ---- - xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 8 +++++++- - xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h | 1 + - xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp | 14 ++++++++++++++ - xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.h | 3 +++ - 4 files changed, 25 insertions(+), 1 deletion(-) - -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -index c1ec6e5..a692d2b 100644 ---- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp -@@ -146,6 +146,7 @@ bool CEngineStats::IsSuspended() - m_encoder = NULL; - m_audioCallback = NULL; - m_vizInitialized = false; -+ m_sinkHasVolume = false; - } - - CActiveAE::~CActiveAE() -@@ -217,6 +218,8 @@ void CActiveAE::StateMachine(int signal, Protocol *port, Message *msg) - return; - case CActiveAEControlProtocol::VOLUME: - m_volume = *(float*)msg->data; -+ if (m_sinkHasVolume) -+ m_sink.m_controlPort.SendOutMessage(CSinkControlProtocol::VOLUME, &m_volume, sizeof(float)); - return; - case CActiveAEControlProtocol::MUTE: - m_muted = *(bool*)msg->data; -@@ -752,6 +755,7 @@ void CActiveAE::Configure() - m_settings.driver = driver; - initSink = true; - m_stats.Reset(m_sinkFormat.m_sampleRate); -+ m_sink.m_controlPort.SendOutMessage(CSinkControlProtocol::VOLUME, &m_volume, sizeof(float)); - } - - if (m_silenceBuffers) -@@ -1181,6 +1185,7 @@ void CActiveAE::InitSink() - { - m_sinkFormat = *data; - } -+ m_sinkHasVolume = m_sink.HasVolume(); - reply->Release(); - } - else -@@ -1461,7 +1466,8 @@ bool CActiveAE::RunStages() - { - // mix gui sounds - MixSounds(*(out->pkt)); -- Deamplify(*(out->pkt)); -+ if (!m_sinkHasVolume) -+ Deamplify(*(out->pkt)); - - // viz - { -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h -index 30da1ac..40a2870 100644 ---- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h -@@ -314,6 +314,7 @@ class CActiveAE : public IAE, private CThread - - float m_volume; - bool m_muted; -+ bool m_sinkHasVolume; - - // viz - IAudioCallback *m_audioCallback; -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp -index 0e003bd..2088cb6 100644 ---- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp -@@ -39,6 +39,7 @@ - m_sink = NULL; - m_stats = NULL; - m_convertBuffer = NULL; -+ m_volume = 0.0; - } - - void CActiveAESink::Start() -@@ -88,6 +89,13 @@ bool CActiveAESink::IsCompatible(const AEAudioFormat format, const std::string & - return m_sink->IsCompatible(format, device); - } - -+bool CActiveAESink::HasVolume() -+{ -+ if (!m_sink) -+ return false; -+ return m_sink->HasVolume(); -+} -+ - enum SINK_STATES - { - S_TOP = 0, // 0 -@@ -232,6 +240,10 @@ void CActiveAESink::StateMachine(int signal, Protocol *port, Message *msg) - m_extTimeout = 0; - } - return; -+ case CSinkControlProtocol::VOLUME: -+ m_volume = *(float*)msg->data; -+ m_sink->SetVolume(m_volume); -+ return; - default: - break; - } -@@ -648,6 +660,8 @@ void CActiveAESink::OpenSink() - return; - } - -+ m_sink->SetVolume(m_volume); -+ - #ifdef WORDS_BIGENDIAN - if (m_sinkFormat.m_dataFormat == AE_FMT_S16BE) - m_sinkFormat.m_dataFormat = AE_FMT_S16NE; -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.h -index ae19f38..d36555d 100644 ---- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.h -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.h -@@ -49,6 +49,7 @@ class CSinkControlProtocol : public Protocol - CONFIGURE, - UNCONFIGURE, - SILENCEMODE, -+ VOLUME, - TIMEOUT, - }; - enum InSignal -@@ -85,6 +86,7 @@ class CActiveAESink : private CThread - void Start(); - void Dispose(); - bool IsCompatible(const AEAudioFormat format, const std::string &device); -+ bool HasVolume(); - CSinkControlProtocol m_controlPort; - CSinkDataProtocol m_dataPort; - -@@ -128,6 +130,7 @@ class CActiveAESink : private CThread - IAESink *m_sink; - AEAudioFormat m_sinkFormat, m_requestedFormat; - CEngineStats *m_stats; -+ float m_volume; - }; - - } --- -1.8.1.6 - - -From 7b58c9ca0373097b89339304035a4a5edb05c1fe Mon Sep 17 00:00:00 2001 -From: fritsch -Date: Sun, 14 Jul 2013 15:42:25 +0200 -Subject: [PATCH 019/123] ActiveAE: Remove special case - not needed anymore - after: 37b8fb75af29c071a47d1557fe7dfff0b0812dc4 - ---- - xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp | 11 ++--------- - 1 file changed, 2 insertions(+), 9 deletions(-) - -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp -index 2088cb6..7812c02 100644 ---- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp -@@ -826,14 +826,7 @@ void CActiveAESink::GenerateNoise() - noise[i] = (float) sqrt( -2.0f * log( R1 )) * cos( 2.0f * PI * R2 ) * 0.00001; - } - -- if (m_sinkFormat.m_dataFormat != AE_FMT_FLOAT) -- { -- CAEConvert::AEConvertFrFn convertFn = CAEConvert::FrFloat(m_sinkFormat.m_dataFormat); -- convertFn(noise, nb_floats, m_sampleOfNoise.pkt->data[0]); -- } -- else -- { -- memcpy(m_sampleOfNoise.pkt->data[0], noise, nb_floats*sizeof(float)); -- } -+ CAEConvert::AEConvertFrFn convertFn = CAEConvert::FrFloat(m_sinkFormat.m_dataFormat); -+ convertFn(noise, nb_floats, m_sampleOfNoise.pkt->data[0]); - delete [] noise; - } --- -1.8.1.6 - - -From e7a30953e4fab54b252fb66f9d48720bf31abe1e Mon Sep 17 00:00:00 2001 +From 6eaedd0e1d1b3bb716ea7458b9782a704bf54f1e Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 30 May 2013 10:56:06 +0200 -Subject: [PATCH 020/123] renderer: use fence for determination when a buffer +Subject: [PATCH 001/110] renderer: use fence for determination when a buffer is ready for reuse --- @@ -7067,7 +12,7 @@ Subject: [PATCH 020/123] renderer: use fence for determination when a buffer 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/xbmc/cores/VideoRenderers/BaseRenderer.h b/xbmc/cores/VideoRenderers/BaseRenderer.h -index 7e503c5..fe1f577 100644 +index a61d3cf..6acf2f3 100644 --- a/xbmc/cores/VideoRenderers/BaseRenderer.h +++ b/xbmc/cores/VideoRenderers/BaseRenderer.h @@ -92,6 +92,7 @@ class CBaseRenderer @@ -7079,7 +24,7 @@ index 7e503c5..fe1f577 100644 virtual bool Supports(ERENDERFEATURE feature) { return false; } diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -index 32b8d22..95e6716 100644 +index d52dead..962680a 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp @@ -128,6 +128,7 @@ @@ -7099,7 +44,7 @@ index 32b8d22..95e6716 100644 #ifdef HAVE_LIBVA delete &vaapi; #endif -@@ -1205,6 +1208,15 @@ void CLinuxRendererGL::Render(DWORD flags, int renderBuffer) +@@ -1228,6 +1231,15 @@ void CLinuxRendererGL::Render(DWORD flags, int renderBuffer) RenderSoftware(renderBuffer, m_currentField); VerifyGLState(); } @@ -7115,7 +60,7 @@ index 32b8d22..95e6716 100644 } void CLinuxRendererGL::RenderSinglePass(int index, int field) -@@ -3395,6 +3407,26 @@ unsigned int CLinuxRendererGL::GetProcessorSize() +@@ -3426,6 +3438,26 @@ unsigned int CLinuxRendererGL::GetProcessorSize() return 0; } @@ -7143,7 +88,7 @@ index 32b8d22..95e6716 100644 void CLinuxRendererGL::AddProcessor(CVDPAU* vdpau, int index) { diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.h b/xbmc/cores/VideoRenderers/LinuxRendererGL.h -index 96b752b..e239b92 100644 +index b986d93..a90a532 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.h +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.h @@ -141,6 +141,7 @@ class CLinuxRendererGL : public CBaseRenderer @@ -7163,7 +108,7 @@ index 96b752b..e239b92 100644 #ifdef HAVE_LIBVDPAU CVDPAU* vdpau; diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp -index 28201a2..595ed8b 100644 +index 0d32715..6a8afff 100644 --- a/xbmc/cores/VideoRenderers/RenderManager.cpp +++ b/xbmc/cores/VideoRenderers/RenderManager.cpp @@ -374,11 +374,16 @@ void CXBMCRenderManager::FrameMove() @@ -7188,10 +133,10 @@ index 28201a2..595ed8b 100644 1.8.1.6 -From be9fc8089a3ab1a44e6d2ec3cc2cd222f20987c6 Mon Sep 17 00:00:00 2001 +From 4e82aa374e215ba627741f7a0a9ea8da770b2672 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:34:39 +0200 -Subject: [PATCH 021/123] videoplayer: adapt lateness detection and dropping to +Subject: [PATCH 002/110] videoplayer: adapt lateness detection and dropping to buffering --- @@ -7205,7 +150,7 @@ Subject: [PATCH 021/123] videoplayer: adapt lateness detection and dropping to 7 files changed, 260 insertions(+), 38 deletions(-) diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp -index 595ed8b..44124a3 100644 +index 6a8afff..deac94b 100644 --- a/xbmc/cores/VideoRenderers/RenderManager.cpp +++ b/xbmc/cores/VideoRenderers/RenderManager.cpp @@ -299,6 +299,8 @@ bool CXBMCRenderManager::Configure(unsigned int width, unsigned int height, unsi @@ -7234,7 +179,7 @@ index 595ed8b..44124a3 100644 requeue(m_queued, m_free); /* signal to any waiters to check state */ -@@ -1071,6 +1074,8 @@ void CXBMCRenderManager::PrepareNextRender() +@@ -1076,6 +1079,8 @@ void CXBMCRenderManager::PrepareNextRender() m_discard.push_back(m_presentsource); m_presentsource = idx; m_queued.pop_front(); @@ -7243,7 +188,7 @@ index 595ed8b..44124a3 100644 m_presentevent.notifyAll(); } } -@@ -1087,3 +1092,12 @@ void CXBMCRenderManager::DiscardBuffer() +@@ -1092,3 +1097,12 @@ void CXBMCRenderManager::DiscardBuffer() m_presentstep = PRESENT_IDLE; m_presentevent.notifyAll(); } @@ -7257,7 +202,7 @@ index 595ed8b..44124a3 100644 + return true; +} diff --git a/xbmc/cores/VideoRenderers/RenderManager.h b/xbmc/cores/VideoRenderers/RenderManager.h -index 764ba07..1d9116e 100644 +index 00fe4c3..52380c1 100644 --- a/xbmc/cores/VideoRenderers/RenderManager.h +++ b/xbmc/cores/VideoRenderers/RenderManager.h @@ -97,10 +97,11 @@ class CXBMCRenderManager @@ -7304,10 +249,10 @@ index 764ba07..1d9116e 100644 double m_presenterr; double m_errorbuff[ERRORBUFFSIZE]; diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h -index 5704704..ee943a0 100644 +index 8fc76b7..7f6d536 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h -@@ -109,6 +109,10 @@ struct DVDVideoUserData +@@ -117,6 +117,10 @@ struct DVDVideoUserData #define DVP_FLAG_NOSKIP 0x00000010 // indicate this picture should never be dropped #define DVP_FLAG_DROPPED 0x00000020 // indicate that this picture has been dropped in decoder stage, will have no data @@ -7318,7 +263,7 @@ index 5704704..ee943a0 100644 // DVP_FLAG 0x00000100 - 0x00000f00 is in use by libmpeg2! #define DVP_QSCALE_UNKNOWN 0 -@@ -126,6 +130,9 @@ struct DVDVideoUserData +@@ -134,6 +138,9 @@ struct DVDVideoUserData #define VC_PICTURE 0x00000004 // the decoder got a picture, call Decode(NULL, 0) again to parse the rest of the data #define VC_USERDATA 0x00000008 // the decoder found some userdata, call Decode(NULL, 0) again to parse the rest of the data #define VC_FLUSHED 0x00000010 // the decoder lost it's state, we need to restart decoding again @@ -7328,7 +273,7 @@ index 5704704..ee943a0 100644 class CDVDVideoCodec { public: -@@ -243,10 +250,16 @@ class CDVDVideoCodec +@@ -251,10 +258,16 @@ class CDVDVideoCodec return 0; } @@ -7347,10 +292,10 @@ index 5704704..ee943a0 100644 + virtual void SetCodecControl(int flags) {} }; diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp -index 0591b1f..f789785 100644 +index 12bad27..530dc9d 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp -@@ -163,6 +163,7 @@ enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx +@@ -167,6 +167,7 @@ enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx m_iLastKeyframe = 0; m_dts = DVD_NOPTS_VALUE; m_started = false; @@ -7358,7 +303,7 @@ index 0591b1f..f789785 100644 } CDVDVideoCodecFFmpeg::~CDVDVideoCodecFFmpeg() -@@ -340,6 +341,14 @@ void CDVDVideoCodecFFmpeg::SetDropState(bool bDrop) +@@ -353,6 +354,14 @@ void CDVDVideoCodecFFmpeg::SetDropState(bool bDrop) { if( m_pCodecContext ) { @@ -7373,7 +318,7 @@ index 0591b1f..f789785 100644 // i don't know exactly how high this should be set // couldn't find any good docs on it. think it varies // from codec to codec on what it does -@@ -541,6 +550,7 @@ int CDVDVideoCodecFFmpeg::Decode(uint8_t* pData, int iSize, double dts, double p +@@ -554,6 +563,7 @@ int CDVDVideoCodecFFmpeg::Decode(uint8_t* pData, int iSize, double dts, double p void CDVDVideoCodecFFmpeg::Reset() { m_started = false; @@ -7381,7 +326,7 @@ index 0591b1f..f789785 100644 m_iLastKeyframe = m_pCodecContext->has_b_frames; m_dllAvCodec.avcodec_flush_buffers(m_pCodecContext); -@@ -643,6 +653,22 @@ bool CDVDVideoCodecFFmpeg::GetPictureCommon(DVDVideoPicture* pDvdVideoPicture) +@@ -667,6 +677,22 @@ bool CDVDVideoCodecFFmpeg::GetPictureCommon(DVDVideoPicture* pDvdVideoPicture) else pDvdVideoPicture->pts = DVD_NOPTS_VALUE; @@ -7404,7 +349,7 @@ index 0591b1f..f789785 100644 if(!m_started) pDvdVideoPicture->iFlags |= DVP_FLAG_DROPPED; -@@ -880,3 +906,8 @@ unsigned CDVDVideoCodecFFmpeg::GetAllowedReferences() +@@ -931,3 +957,8 @@ unsigned CDVDVideoCodecFFmpeg::GetAllowedReferences() else return 0; } @@ -7414,7 +359,7 @@ index 0591b1f..f789785 100644 + m_codecControlFlags = flags; +} diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h -index fe6bbaa..c7ae207 100644 +index c509339..a511806 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h @@ -46,6 +46,7 @@ class CDVDVideoCodecFFmpeg : public CDVDVideoCodec @@ -7434,7 +379,7 @@ index fe6bbaa..c7ae207 100644 bool IsHardwareAllowed() { return !m_bSoftware; } IHardwareDecoder * GetHardware() { return m_pHardware; }; -@@ -124,4 +127,8 @@ class CDVDVideoCodecFFmpeg : public CDVDVideoCodec +@@ -128,4 +131,8 @@ class CDVDVideoCodecFFmpeg : public CDVDVideoCodec double m_dts; bool m_started; std::vector m_formats; @@ -7444,10 +389,10 @@ index fe6bbaa..c7ae207 100644 + int m_codecControlFlags; }; diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 749195f..4c1e9dd 100644 +index 51caa05..3284332 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -322,8 +322,10 @@ void CDVDPlayerVideo::Process() +@@ -323,8 +323,10 @@ void CDVDPlayerVideo::Process() int iDropped = 0; //frames dropped in a row bool bRequestDrop = false; @@ -7458,7 +403,7 @@ index 749195f..4c1e9dd 100644 while (!m_bStop) { -@@ -433,6 +435,7 @@ void CDVDPlayerVideo::Process() +@@ -434,6 +436,7 @@ void CDVDPlayerVideo::Process() picture.iFlags &= ~DVP_FLAG_ALLOCATED; m_packets.clear(); m_started = false; @@ -7466,7 +411,7 @@ index 749195f..4c1e9dd 100644 } else if (pMsg->IsType(CDVDMsg::GENERAL_FLUSH)) // private message sent by (CDVDPlayerVideo::Flush()) { -@@ -445,6 +448,7 @@ void CDVDPlayerVideo::Process() +@@ -446,6 +449,7 @@ void CDVDPlayerVideo::Process() //we need to recalculate the framerate //TODO: this needs to be set on a streamchange instead ResetFrameRateCalc(); @@ -7474,7 +419,7 @@ index 749195f..4c1e9dd 100644 m_stalled = true; m_started = false; -@@ -462,8 +466,10 @@ void CDVDPlayerVideo::Process() +@@ -463,8 +467,10 @@ void CDVDPlayerVideo::Process() m_speed = static_cast(pMsg)->m_value; if(m_speed == DVD_PLAYSPEED_PAUSE) m_iNrOfPicturesNotToSkip = 0; @@ -7485,7 +430,7 @@ index 749195f..4c1e9dd 100644 } else if (pMsg->IsType(CDVDMsg::PLAYER_STARTED)) { -@@ -509,6 +515,28 @@ void CDVDPlayerVideo::Process() +@@ -510,6 +516,28 @@ void CDVDPlayerVideo::Process() m_iNrOfPicturesNotToSkip = 1; } @@ -7514,7 +459,7 @@ index 749195f..4c1e9dd 100644 if (m_messageQueue.GetDataSize() == 0 || m_speed < 0) { -@@ -561,15 +589,8 @@ void CDVDPlayerVideo::Process() +@@ -562,15 +590,8 @@ void CDVDPlayerVideo::Process() } m_videoStats.AddSampleBytes(pPacket->iSize); @@ -7532,7 +477,7 @@ index 749195f..4c1e9dd 100644 // loop while no error while (!m_bStop) -@@ -1207,33 +1228,12 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) +@@ -1178,33 +1199,12 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) m_FlipTimeStamp += max(0.0, iSleepTime); m_FlipTimeStamp += iFrameDuration; @@ -7570,7 +515,7 @@ index 749195f..4c1e9dd 100644 // set fieldsync if picture is interlaced EFIELDSYNC mDisplayField = FS_NONE; -@@ -1266,7 +1266,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) +@@ -1237,7 +1237,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) if (index < 0) return EOS_DROPPED; @@ -7579,7 +524,7 @@ index 749195f..4c1e9dd 100644 return result; #else -@@ -1566,3 +1566,127 @@ void CDVDPlayerVideo::CalcFrameRate() +@@ -1537,3 +1537,127 @@ void CDVDPlayerVideo::CalcFrameRate() m_iFrameRateCount = 0; } } @@ -7708,7 +653,7 @@ index 749195f..4c1e9dd 100644 + m_totalGain += frametime; +} diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.h b/xbmc/cores/dvdplayer/DVDPlayerVideo.h -index 5f763c0..9be23fb 100644 +index f8ad541..186e271 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.h +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.h @@ -36,6 +36,25 @@ @@ -7737,7 +682,7 @@ index 5f763c0..9be23fb 100644 class CDVDPlayerVideo : public CThread { public: -@@ -103,6 +122,7 @@ class CDVDPlayerVideo : public CThread +@@ -104,6 +123,7 @@ class CDVDPlayerVideo : public CThread #define EOS_ABORT 1 #define EOS_DROPPED 2 #define EOS_VERYLATE 4 @@ -7745,7 +690,7 @@ index 5f763c0..9be23fb 100644 void AutoCrop(DVDVideoPicture* pPicture); void AutoCrop(DVDVideoPicture *pPicture, RECT &crop); -@@ -128,6 +148,7 @@ class CDVDPlayerVideo : public CThread +@@ -129,6 +149,7 @@ class CDVDPlayerVideo : public CThread void ResetFrameRateCalc(); void CalcFrameRate(); @@ -7753,7 +698,7 @@ index 5f763c0..9be23fb 100644 double m_fFrameRate; //framerate of the video currently playing bool m_bCalcFrameRate; //if we should calculate the framerate from the timestamps -@@ -180,5 +201,7 @@ class CDVDPlayerVideo : public CThread +@@ -182,5 +203,7 @@ class CDVDPlayerVideo : public CThread CPullupCorrection m_pullupCorrection; std::list m_packets; @@ -7765,10 +710,10 @@ index 5f763c0..9be23fb 100644 1.8.1.6 -From 4b56e80e90f4d673cbca7fa91e740216444d6586 Mon Sep 17 00:00:00 2001 +From 33ea71cda1fc4767c047865112f2e2a245bcdb50 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 2 Sep 2012 16:05:21 +0200 -Subject: [PATCH 022/123] video player: present correct pts to user for a/v +Subject: [PATCH 003/110] video player: present correct pts to user for a/v sync (after buffering in renderer) --- @@ -7777,10 +722,10 @@ Subject: [PATCH 022/123] video player: present correct pts to user for a/v 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 4c1e9dd..ba99804 100644 +index 3284332..4970675 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -1486,6 +1486,22 @@ void CDVDPlayerVideo::ResetFrameRateCalc() +@@ -1457,6 +1457,22 @@ void CDVDPlayerVideo::ResetFrameRateCalc() g_advancedSettings.m_videoFpsDetect == 0; } @@ -7803,7 +748,7 @@ index 4c1e9dd..ba99804 100644 #define MAXFRAMERATEDIFF 0.01 #define MAXFRAMESERR 1000 -@@ -1604,6 +1620,15 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts) +@@ -1575,6 +1591,15 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts) else iInterval = 1/m_fFrameRate*(double)DVD_TIME_BASE; @@ -7820,7 +765,7 @@ index 4c1e9dd..ba99804 100644 && bNewFrame && m_bAllowDrop diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.h b/xbmc/cores/dvdplayer/DVDPlayerVideo.h -index 9be23fb..3c3e007 100644 +index 186e271..59c7f09 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.h +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.h @@ -100,7 +100,7 @@ class CDVDPlayerVideo : public CThread @@ -7836,10 +781,10 @@ index 9be23fb..3c3e007 100644 1.8.1.6 -From 3be868f44191d3437f2ccf053e2c964ed5b3ffd4 Mon Sep 17 00:00:00 2001 +From 10a7f371c9c49afcbdbc302380c406bdbb126308 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 16 Feb 2013 18:25:53 +0100 -Subject: [PATCH 023/123] videoplayer: some rework and documentation +Subject: [PATCH 004/110] videoplayer: some rework and documentation --- .../dvdplayer/DVDCodecs/Video/DVDVideoCodec.h | 29 ++++++++++++++++++++-- @@ -7849,10 +794,10 @@ Subject: [PATCH 023/123] videoplayer: some rework and documentation 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h -index ee943a0..7abbd7e 100644 +index 7f6d536..2ccae41 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h -@@ -131,7 +131,6 @@ struct DVDVideoUserData +@@ -139,7 +139,6 @@ struct DVDVideoUserData #define VC_USERDATA 0x00000008 // the decoder found some userdata, call Decode(NULL, 0) again to parse the rest of the data #define VC_FLUSHED 0x00000010 // the decoder lost it's state, we need to restart decoding again #define VC_DROPPED 0x00000020 // needed to identify if a picture was dropped @@ -7860,7 +805,7 @@ index ee943a0..7abbd7e 100644 class CDVDVideoCodec { -@@ -256,10 +255,36 @@ class CDVDVideoCodec +@@ -264,10 +263,36 @@ class CDVDVideoCodec */ virtual unsigned GetAllowedReferences() { return 0; } @@ -7899,10 +844,10 @@ index ee943a0..7abbd7e 100644 virtual void SetCodecControl(int flags) {} }; diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp -index f789785..43c133c 100644 +index 530dc9d..e5748df 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp -@@ -907,6 +907,17 @@ unsigned CDVDVideoCodecFFmpeg::GetAllowedReferences() +@@ -958,6 +958,17 @@ unsigned CDVDVideoCodecFFmpeg::GetAllowedReferences() return 0; } @@ -7921,7 +866,7 @@ index f789785..43c133c 100644 { m_codecControlFlags = flags; diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h -index c7ae207..81b9af9 100644 +index a511806..0436108 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h @@ -64,7 +64,7 @@ class CDVDVideoCodecFFmpeg : public CDVDVideoCodec @@ -7934,10 +879,10 @@ index c7ae207..81b9af9 100644 bool IsHardwareAllowed() { return !m_bSoftware; } diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index ba99804..56b32b9 100644 +index 4970675..2e76ff5 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -1597,7 +1597,7 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts) +@@ -1568,7 +1568,7 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts) int iBufferLevel; // get decoder stats @@ -7950,16 +895,16 @@ index ba99804..56b32b9 100644 1.8.1.6 -From 4dd137d05f8e2fe7f36736395a9650139b7f21cb Mon Sep 17 00:00:00 2001 +From 5dd41a12cb592e81866245da375541f97d77b861 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 7 Apr 2012 09:19:00 +0200 -Subject: [PATCH 024/123] vdpau: redesign +Subject: [PATCH 005/110] vdpau: redesign --- - language/English/strings.po | 12 +- + language/English/strings.po | 14 +- system/settings/settings.xml | 10 + system/shaders/yuv2rgb_basic.glsl | 12 + - xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 200 +- + xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 225 +- xbmc/cores/VideoRenderers/LinuxRendererGL.h | 13 +- xbmc/cores/VideoRenderers/RenderFormats.h | 1 + xbmc/cores/VideoRenderers/RenderManager.cpp | 3 +- @@ -7973,34 +918,34 @@ Subject: [PATCH 024/123] vdpau: redesign xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 1 + xbmc/settings/AdvancedSettings.cpp | 8 +- xbmc/settings/AdvancedSettings.h | 4 +- - xbmc/utils/ActorProtocol.cpp | 4 + - xbmc/utils/ActorProtocol.h | 4 + xbmc/video/dialogs/GUIDialogVideoSettings.cpp | 2 +- xbmc/windowing/X11/WinSystemX11.h | 1 + - 21 files changed, 3578 insertions(+), 1230 deletions(-) + 19 files changed, 3597 insertions(+), 1230 deletions(-) diff --git a/language/English/strings.po b/language/English/strings.po -index bb2272d..f2a0572 100644 +index ec3ee5f..a6b0297 100644 --- a/language/English/strings.po +++ b/language/English/strings.po -@@ -5767,7 +5767,15 @@ msgctxt "#13435" - msgid "Enable HQ Scalers for scalings above" +@@ -5775,7 +5775,17 @@ msgctxt "#13436" + msgid "Allow hardware acceleration (libstagefright)" msgstr "" --#empty strings from id 13436 to 13499 -+msgctxt "#13436" +-#empty strings from id 13437 to 13499 ++#: system/settings/settings.xml ++msgctxt "#13437" +msgid "Allow Vdpau OpenGL interop" +msgstr "" + -+msgctxt "#13437" ++#: system/settings/settings.xml ++msgctxt "#13438" +msgid "Allow Vdpau OpenGL interop YUV" +msgstr "" + -+#empty strings from id 13438 to 13499 ++#empty strings from id 13439 to 13499 #: system/settings/settings.xml msgctxt "#13500" -@@ -6842,7 +6850,7 @@ msgid "Software Blend" +@@ -6850,7 +6860,7 @@ msgid "Software Blend" msgstr "" msgctxt "#16325" @@ -8010,14 +955,14 @@ index bb2272d..f2a0572 100644 #empty strings from id 16326 to 16399 diff --git a/system/settings/settings.xml b/system/settings/settings.xml -index 6e32551..15e9a75 100644 +index d1e5eff..56d637d 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -375,6 +375,16 @@ 2 true -+ ++ + HAVE_LIBVDPAU + 2 + true @@ -8054,10 +999,10 @@ index c8c8a2e..0799a4b 100644 #if(XBMC_texture_rectangle) diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -index 95e6716..88c7e5f 100644 +index 962680a..388d778 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -@@ -679,6 +679,18 @@ void CLinuxRendererGL::RenderUpdate(bool clear, DWORD flags, DWORD alpha) +@@ -702,6 +702,18 @@ void CLinuxRendererGL::RenderUpdate(bool clear, DWORD flags, DWORD alpha) glDisable(GL_POLYGON_STIPPLE); } @@ -8076,7 +1021,7 @@ index 95e6716..88c7e5f 100644 else Render(flags, index); -@@ -759,11 +771,6 @@ void CLinuxRendererGL::FlipPage(int source) +@@ -782,11 +794,6 @@ void CLinuxRendererGL::FlipPage(int source) m_buffers[m_iYV12RenderBuffer].flipindex = ++m_flipindex; @@ -8088,7 +1033,7 @@ index 95e6716..88c7e5f 100644 return; } -@@ -1090,6 +1097,12 @@ void CLinuxRendererGL::LoadShaders(int field) +@@ -1113,6 +1120,12 @@ void CLinuxRendererGL::LoadShaders(int field) m_textureCreate = &CLinuxRendererGL::CreateVDPAUTexture; m_textureDelete = &CLinuxRendererGL::DeleteVDPAUTexture; } @@ -8101,7 +1046,7 @@ index 95e6716..88c7e5f 100644 else if (m_format == RENDER_FMT_VAAPI) { m_textureUpload = &CLinuxRendererGL::UploadVAAPITexture; -@@ -1165,7 +1178,10 @@ void CLinuxRendererGL::Render(DWORD flags, int renderBuffer) +@@ -1188,7 +1201,10 @@ void CLinuxRendererGL::Render(DWORD flags, int renderBuffer) m_currentField = FIELD_FULL; // call texture load function @@ -8112,7 +1057,7 @@ index 95e6716..88c7e5f 100644 if (m_renderMethod & RENDER_GLSL) { -@@ -1540,17 +1556,12 @@ void CLinuxRendererGL::RenderFromFBO() +@@ -1563,17 +1579,12 @@ void CLinuxRendererGL::RenderFromFBO() void CLinuxRendererGL::RenderVDPAU(int index, int field) { #ifdef HAVE_LIBVDPAU @@ -8130,9 +1075,9 @@ index 95e6716..88c7e5f 100644 - vdpau->BindPixmap(); + glBindTexture(m_textureTarget, plane.id); - // Try some clamping or wrapping - glTexParameteri(m_textureTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); -@@ -1608,8 +1619,6 @@ void CLinuxRendererGL::RenderVDPAU(int index, int field) + // make sure we know the correct texture size + GetPlaneTextureSize(plane); +@@ -1635,8 +1646,6 @@ void CLinuxRendererGL::RenderVDPAU(int index, int field) if (m_pVideoFilterShader) m_pVideoFilterShader->Disable(); @@ -8141,7 +1086,7 @@ index 95e6716..88c7e5f 100644 glBindTexture (m_textureTarget, 0); glDisable(m_textureTarget); #endif -@@ -2286,12 +2295,14 @@ void CLinuxRendererGL::DeleteVDPAUTexture(int index) +@@ -2317,12 +2326,14 @@ void CLinuxRendererGL::DeleteVDPAUTexture(int index) { #ifdef HAVE_LIBVDPAU YUVPLANE &plane = m_buffers[index].fields[0][0]; @@ -8156,7 +1101,7 @@ index 95e6716..88c7e5f 100644 #endif } -@@ -2324,10 +2335,147 @@ bool CLinuxRendererGL::CreateVDPAUTexture(int index) +@@ -2355,10 +2366,172 @@ bool CLinuxRendererGL::CreateVDPAUTexture(int index) void CLinuxRendererGL::UploadVDPAUTexture(int index) { #ifdef HAVE_LIBVDPAU @@ -8164,8 +1109,9 @@ index 95e6716..88c7e5f 100644 + VDPAU::CVdpauRenderPicture *vdpau = m_buffers[index].vdpau; + + unsigned int flipindex = m_buffers[index].flipindex; ++ YV12Image &im = m_buffers[index].image; + YUVFIELDS &fields = m_buffers[index].fields; -+ YUVPLANE &plane = fields[0][0]; ++ YUVPLANE &plane = fields[0][1]; + + if (!vdpau || !vdpau->valid) + { @@ -8173,7 +1119,31 @@ index 95e6716..88c7e5f 100644 + return; + } + -+ fields[0][1].id = vdpau->texture[0]; ++ plane.id = vdpau->texture[0]; ++ ++ plane.pixpertex_x = 1; ++ plane.pixpertex_y = 1; ++ ++ plane.rect = m_sourceRect; ++ plane.width = im.width; ++ plane.height = im.height; ++ ++ plane.height /= plane.pixpertex_y; ++ plane.rect.y1 /= plane.pixpertex_y; ++ plane.rect.y2 /= plane.pixpertex_y; ++ plane.width /= plane.pixpertex_x; ++ plane.rect.x1 /= plane.pixpertex_x; ++ plane.rect.x2 /= plane.pixpertex_x; ++ ++ if (m_textureTarget == GL_TEXTURE_2D) ++ { ++ plane.height /= plane.texheight; ++ plane.rect.y1 /= plane.texheight; ++ plane.rect.y2 /= plane.texheight; ++ plane.width /= plane.texwidth; ++ plane.rect.x1 /= plane.texwidth; ++ plane.rect.x2 /= plane.texwidth; ++ } + +#endif +} @@ -8305,7 +1275,7 @@ index 95e6716..88c7e5f 100644 void CLinuxRendererGL::DeleteVAAPITexture(int index) { -@@ -3250,12 +3398,13 @@ bool CLinuxRendererGL::Supports(EINTERLACEMETHOD method) +@@ -3281,12 +3454,13 @@ bool CLinuxRendererGL::Supports(EINTERLACEMETHOD method) if(method == VS_INTERLACEMETHOD_AUTO) return true; @@ -8323,7 +1293,7 @@ index 95e6716..88c7e5f 100644 #endif return false; } -@@ -3348,14 +3497,7 @@ EINTERLACEMETHOD CLinuxRendererGL::AutoInterlaceMethod() +@@ -3379,14 +3553,7 @@ EINTERLACEMETHOD CLinuxRendererGL::AutoInterlaceMethod() return VS_INTERLACEMETHOD_NONE; if(m_renderMethod & RENDER_VDPAU) @@ -8338,7 +1308,7 @@ index 95e6716..88c7e5f 100644 if(Supports(VS_INTERLACEMETHOD_RENDER_BOB)) return VS_INTERLACEMETHOD_RENDER_BOB; -@@ -3400,6 +3542,7 @@ void CLinuxRendererGL::UnBindPbo(YUVBUFFER& buff) +@@ -3431,6 +3598,7 @@ void CLinuxRendererGL::UnBindPbo(YUVBUFFER& buff) unsigned int CLinuxRendererGL::GetProcessorSize() { if(m_format == RENDER_FMT_VDPAU @@ -8346,7 +1316,7 @@ index 95e6716..88c7e5f 100644 || m_format == RENDER_FMT_VAAPI || m_format == RENDER_FMT_CVBREF) return 1; -@@ -3428,11 +3571,12 @@ bool CLinuxRendererGL::IsProcessed(int idx) +@@ -3459,11 +3627,12 @@ bool CLinuxRendererGL::IsProcessed(int idx) } #ifdef HAVE_LIBVDPAU @@ -8362,7 +1332,7 @@ index 95e6716..88c7e5f 100644 #endif diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.h b/xbmc/cores/VideoRenderers/LinuxRendererGL.h -index e239b92..d72eb64 100644 +index a90a532..fdda2ed 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.h +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.h @@ -39,12 +39,11 @@ @@ -8416,7 +1386,7 @@ index e239b92..d72eb64 100644 #endif #ifdef HAVE_LIBVA VAAPI::CHolder& vaapi; -@@ -326,6 +330,7 @@ class CLinuxRendererGL : public CBaseRenderer +@@ -327,6 +331,7 @@ class CLinuxRendererGL : public CBaseRenderer bool m_nonLinStretch; bool m_nonLinStretchGui; float m_pixelRatio; @@ -8425,7 +1395,7 @@ index e239b92..d72eb64 100644 diff --git a/xbmc/cores/VideoRenderers/RenderFormats.h b/xbmc/cores/VideoRenderers/RenderFormats.h -index 4e8d7e9..6ed62be 100644 +index 29d45e0..3b09194 100644 --- a/xbmc/cores/VideoRenderers/RenderFormats.h +++ b/xbmc/cores/VideoRenderers/RenderFormats.h @@ -26,6 +26,7 @@ enum ERenderFormat { @@ -8437,7 +1407,7 @@ index 4e8d7e9..6ed62be 100644 RENDER_FMT_UYVY422, RENDER_FMT_YUYV422, diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp -index 44124a3..a59ee4d 100644 +index deac94b..a1c2fc7 100644 --- a/xbmc/cores/VideoRenderers/RenderManager.cpp +++ b/xbmc/cores/VideoRenderers/RenderManager.cpp @@ -925,7 +925,8 @@ int CXBMCRenderManager::AddVideoPicture(DVDVideoPicture& pic) @@ -8451,7 +1421,7 @@ index 44124a3..a59ee4d 100644 #endif #ifdef HAVE_LIBOPENMAX diff --git a/xbmc/cores/VideoRenderers/RenderManager.h b/xbmc/cores/VideoRenderers/RenderManager.h -index 1d9116e..7a3a530 100644 +index 52380c1..befd851 100644 --- a/xbmc/cores/VideoRenderers/RenderManager.h +++ b/xbmc/cores/VideoRenderers/RenderManager.h @@ -35,7 +35,7 @@ @@ -8464,7 +1434,7 @@ index 1d9116e..7a3a530 100644 #define ERRORBUFFSIZE 30 diff --git a/xbmc/cores/VideoRenderers/VideoShaders/YUV2RGBShader.cpp b/xbmc/cores/VideoRenderers/VideoShaders/YUV2RGBShader.cpp -index 5b58f61..95f4a1e 100644 +index ad1940c..48302ff 100644 --- a/xbmc/cores/VideoRenderers/VideoShaders/YUV2RGBShader.cpp +++ b/xbmc/cores/VideoRenderers/VideoShaders/YUV2RGBShader.cpp @@ -214,6 +214,8 @@ static void CalculateYUVMatrixGL(GLfloat res[4][4] @@ -8477,7 +1447,7 @@ index 5b58f61..95f4a1e 100644 CLog::Log(LOGERROR, "GL: BaseYUV2RGBGLSLShader - unsupported format %d", m_format); diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h -index 7abbd7e..13a2648 100644 +index 2ccae41..0dd29c3 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h @@ -34,7 +34,7 @@ @@ -8489,7 +1459,7 @@ index 7abbd7e..13a2648 100644 class COpenMax; class COpenMaxVideo; struct OpenMaxVideoBuffer; -@@ -55,7 +55,7 @@ struct DVDVideoPicture +@@ -57,7 +57,7 @@ struct DVDVideoPicture DXVA::CSurfaceContext* context; }; struct { @@ -8499,7 +1469,7 @@ index 7abbd7e..13a2648 100644 struct { VAAPI::CHolder* vaapi; diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp -index 43c133c..ec93844 100644 +index e5748df..aa2d1e4 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp @@ -75,11 +75,11 @@ enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx @@ -8518,7 +1488,7 @@ index 43c133c..ec93844 100644 ctx->SetHardware(vdp); return *cur; diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h -index 81b9af9..fd8b863 100644 +index 0436108..c0ce198 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h @@ -29,7 +29,6 @@ @@ -8530,7 +1500,7 @@ index 81b9af9..fd8b863 100644 class CDVDVideoCodecFFmpeg : public CDVDVideoCodec diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 4e00208..89ac10e 100644 +index 5ca0803..4844469 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -33,11 +33,16 @@ @@ -12890,7 +5860,7 @@ index 4e00208..89ac10e 100644 + #endif diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -index 87e8797..5bee48b 100644 +index e760f28..1c21535 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h @@ -1,5 +1,3 @@ @@ -12898,7 +5868,7 @@ index 87e8797..5bee48b 100644 -#pragma once /* * Copyright (C) 2005-2013 Team XBMC - * http://www.xbmc.org + * http://xbmc.org @@ -20,9 +18,32 @@ * */ @@ -13636,10 +6606,10 @@ index 87e8797..5bee48b 100644 + +} diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 56b32b9..3c30d0b 100644 +index 2e76ff5..8ed34f9 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -1009,6 +1009,7 @@ static std::string GetRenderFormatName(ERenderFormat format) +@@ -1010,6 +1010,7 @@ static std::string GetRenderFormatName(ERenderFormat format) case RENDER_FMT_UYVY422: return "UYVY"; case RENDER_FMT_YUYV422: return "YUY2"; case RENDER_FMT_VDPAU: return "VDPAU"; @@ -13648,7 +6618,7 @@ index 56b32b9..3c30d0b 100644 case RENDER_FMT_VAAPI: return "VAAPI"; case RENDER_FMT_OMXEGL: return "OMXEGL"; diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp -index de3a418..c156b90 100644 +index 3ec25c1..6541f65 100644 --- a/xbmc/settings/AdvancedSettings.cpp +++ b/xbmc/settings/AdvancedSettings.cpp @@ -161,7 +161,7 @@ void CAdvancedSettings::Initialize() @@ -13669,7 +6639,7 @@ index de3a418..c156b90 100644 m_DXVACheckCompatibility = false; m_DXVACheckCompatibilityPresent = false; m_DXVAForceProcessorRenderer = true; -@@ -572,7 +574,7 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file) +@@ -590,7 +592,7 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file) XMLUtils::GetString(pElement,"cleandatetime", m_videoCleanDateTimeRegExp); XMLUtils::GetString(pElement,"ppffmpegdeinterlacing",m_videoPPFFmpegDeint); XMLUtils::GetString(pElement,"ppffmpegpostprocessing",m_videoPPFFmpegPostProc); @@ -13678,20 +6648,20 @@ index de3a418..c156b90 100644 XMLUtils::GetFloat(pElement, "nonlinearstretchratio", m_videoNonLinStretchRatio, 0.01f, 1.0f); XMLUtils::GetBoolean(pElement,"enablehighqualityhwscalers", m_videoEnableHighQualityHwScalers); XMLUtils::GetFloat(pElement,"autoscalemaxfps",m_videoAutoScaleMaxFps, 0.0f, 1000.0f); -@@ -581,6 +583,8 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file) +@@ -599,6 +601,8 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file) XMLUtils::GetBoolean(pElement,"allowmpeg4vaapi",m_videoAllowMpeg4VAAPI); XMLUtils::GetBoolean(pElement, "disablebackgrounddeinterlace", m_videoDisableBackgroundDeinterlace); XMLUtils::GetInt(pElement, "useocclusionquery", m_videoCaptureUseOcclusionQuery, -1, 1); + XMLUtils::GetBoolean(pElement,"vdpauInvTelecine",m_videoVDPAUtelecine); + XMLUtils::GetBoolean(pElement,"vdpauHDdeintSkipChroma",m_videoVDPAUdeintSkipChromaHD); - TiXmlElement* pAdjustRefreshrate = pElement->FirstChildElement("adjustrefreshrate"); - if (pAdjustRefreshrate) + TiXmlElement* pStagefrightElem = pElement->FirstChildElement("stagefright"); + if (pStagefrightElem) diff --git a/xbmc/settings/AdvancedSettings.h b/xbmc/settings/AdvancedSettings.h -index 084fe8b..3a52878 100644 +index 224268a..310db76 100644 --- a/xbmc/settings/AdvancedSettings.h +++ b/xbmc/settings/AdvancedSettings.h -@@ -147,6 +147,8 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler +@@ -158,6 +158,8 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler int m_videoPercentSeekBackwardBig; CStdString m_videoPPFFmpegDeint; CStdString m_videoPPFFmpegPostProc; @@ -13700,7 +6670,7 @@ index 084fe8b..3a52878 100644 bool m_musicUseTimeSeeking; int m_musicTimeSeekForward; int m_musicTimeSeekBackward; -@@ -162,7 +164,7 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler +@@ -173,7 +175,7 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler CStdString m_audioHost; bool m_audioApplyDrc; @@ -13709,39 +6679,11 @@ index 084fe8b..3a52878 100644 float m_videoNonLinStretchRatio; bool m_videoEnableHighQualityHwScalers; float m_videoAutoScaleMaxFps; -diff --git a/xbmc/utils/ActorProtocol.cpp b/xbmc/utils/ActorProtocol.cpp -index cf4c26f..e3090c3 100644 ---- a/xbmc/utils/ActorProtocol.cpp -+++ b/xbmc/utils/ActorProtocol.cpp -@@ -1,5 +1,9 @@ - /* -+<<<<<<< HEAD - * Copyright (C) 2005-2013 Team XBMC -+======= -+ * Copyright (C) 2005-2012 Team XBMC -+>>>>>>> b5471a2... vdpau: redesign - * http://www.xbmc.org - * - * This Program is free software; you can redistribute it and/or modify -diff --git a/xbmc/utils/ActorProtocol.h b/xbmc/utils/ActorProtocol.h -index 8ef3359..8c4038a 100644 ---- a/xbmc/utils/ActorProtocol.h -+++ b/xbmc/utils/ActorProtocol.h -@@ -1,5 +1,9 @@ - /* -+<<<<<<< HEAD - * Copyright (C) 2005-2013 Team XBMC -+======= -+ * Copyright (C) 2005-2012 Team XBMC -+>>>>>>> b5471a2... vdpau: redesign - * http://www.xbmc.org - * - * This Program is free software; you can redistribute it and/or modify diff --git a/xbmc/video/dialogs/GUIDialogVideoSettings.cpp b/xbmc/video/dialogs/GUIDialogVideoSettings.cpp -index bd80082..27ed5ee 100644 +index a27aed3..8f30248 100644 --- a/xbmc/video/dialogs/GUIDialogVideoSettings.cpp +++ b/xbmc/video/dialogs/GUIDialogVideoSettings.cpp -@@ -104,7 +104,7 @@ void CGUIDialogVideoSettings::CreateSettings() +@@ -108,7 +108,7 @@ void CGUIDialogVideoSettings::CreateSettings() entries.push_back(make_pair(VS_INTERLACEMETHOD_INVERSE_TELECINE , 16314)); entries.push_back(make_pair(VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL , 16311)); entries.push_back(make_pair(VS_INTERLACEMETHOD_VDPAU_TEMPORAL , 16310)); @@ -13751,7 +6693,7 @@ index bd80082..27ed5ee 100644 entries.push_back(make_pair(VS_INTERLACEMETHOD_VDPAU_TEMPORAL_HALF , 16317)); entries.push_back(make_pair(VS_INTERLACEMETHOD_VDPAU_INVERSE_TELECINE , 16314)); diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index e425327..3dae22c 100644 +index a0f7bba..b6b6ec4 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -63,6 +63,7 @@ class CWinSystemX11 : public CWinSystemBase @@ -13766,40 +6708,41 @@ index e425327..3dae22c 100644 1.8.1.6 -From 2c65b5bb8caabbe3ed88861ebda5a0392d06cd2e Mon Sep 17 00:00:00 2001 +From 64a3764653d8021becc1ba27cb1b9900ab581ff5 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 12 Dec 2012 09:52:17 +0100 -Subject: [PATCH 025/123] vdpau: make interop gl default and remove setting, +Subject: [PATCH 006/110] vdpau: make interop gl default and remove setting, rename and intvert interop yuv --- - language/English/strings.po | 8 ++------ + language/English/strings.po | 9 ++------- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 17 ++++++++++------- - 2 files changed, 12 insertions(+), 13 deletions(-) + 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/language/English/strings.po b/language/English/strings.po -index f2a0572..eace353 100644 +index a6b0297..fae2505 100644 --- a/language/English/strings.po +++ b/language/English/strings.po -@@ -5768,14 +5768,10 @@ msgid "Enable HQ Scalers for scalings above" - msgstr "" +@@ -5777,15 +5777,10 @@ msgstr "" - msgctxt "#13436" + #: system/settings/settings.xml + msgctxt "#13437" -msgid "Allow Vdpau OpenGL interop" +msgid "Prefer VDPAU Video Mixer" msgstr "" --msgctxt "#13437" +-#: system/settings/settings.xml +-msgctxt "#13438" -msgid "Allow Vdpau OpenGL interop YUV" -msgstr "" - --#empty strings from id 13438 to 13499 -+#empty strings from id 13437 to 13499 +-#empty strings from id 13439 to 13499 ++#empty strings from id 13438 to 13499 #: system/settings/settings.xml msgctxt "#13500" diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 89ac10e..c4d1a53 100644 +index 4844469..fc95760 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -384,12 +384,15 @@ bool CDecoder::Supports(EINTERLACEMETHOD method) @@ -13874,10 +6817,10 @@ index 89ac10e..c4d1a53 100644 1.8.1.6 -From 5625fb3f23df0575518af5db59bc0ac6d0b204dc Mon Sep 17 00:00:00 2001 +From 9288e2009b64f9ceebda4c27a98a412c07ee8cbf Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 12 Dec 2012 18:34:47 +0100 -Subject: [PATCH 026/123] vdpau: drop studio level conversion +Subject: [PATCH 007/110] vdpau: drop studio level conversion --- xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 4 +- @@ -13885,10 +6828,10 @@ Subject: [PATCH 026/123] vdpau: drop studio level conversion 2 files changed, 6 insertions(+), 92 deletions(-) diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -index 88c7e5f..a904572 100644 +index 388d778..2de63b8 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -@@ -3314,7 +3314,7 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature) +@@ -3370,7 +3370,7 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature) { if(feature == RENDERFEATURE_BRIGHTNESS) { @@ -13897,7 +6840,7 @@ index 88c7e5f..a904572 100644 return true; if (m_renderMethod & RENDER_VAAPI) -@@ -3327,7 +3327,7 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature) +@@ -3383,7 +3383,7 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature) if(feature == RENDERFEATURE_CONTRAST) { @@ -13907,7 +6850,7 @@ index 88c7e5f..a904572 100644 if (m_renderMethod & RENDER_VAAPI) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index c4d1a53..399da83 100644 +index fc95760..07af62a 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -58,15 +58,6 @@ @@ -14029,10 +6972,10 @@ index c4d1a53..399da83 100644 1.8.1.6 -From 335ae083e1dcc89cfaa8351b4ff3136b78c432be Mon Sep 17 00:00:00 2001 +From 471ec30394381baccd0d7c6fe24efc834a1e9d25 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 12 Dec 2012 20:28:49 +0100 -Subject: [PATCH 027/123] vdpau: observe ffmpeg tags for color space +Subject: [PATCH 008/110] vdpau: observe ffmpeg tags for color space --- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 38 ++++++++++++++++++-------- @@ -14040,7 +6983,7 @@ Subject: [PATCH 027/123] vdpau: observe ffmpeg tags for color space 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 399da83..4b2b4e8 100644 +index 07af62a..7ecc2cf 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -929,6 +929,7 @@ int CDecoder::Decode(AVCodecContext *avctx, AVFrame *pFrame) @@ -14121,7 +7064,7 @@ index 399da83..4b2b4e8 100644 m_vdpError = false; diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -index 5bee48b..ef99383 100644 +index 1c21535..674571b 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h @@ -334,6 +334,7 @@ class CMixer : private CThread @@ -14136,17 +7079,17 @@ index 5bee48b..ef99383 100644 1.8.1.6 -From 28f7a60727380f8bef98393e8ed5162ecf4b20a0 Mon Sep 17 00:00:00 2001 +From 0d627c2dfe93bc9cbde2f0c45b209b24ae3afcf6 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 27 Jan 2013 12:10:19 +0100 -Subject: [PATCH 028/123] vdpau: switch off de-interlacing on ff +Subject: [PATCH 009/110] vdpau: switch off de-interlacing on ff --- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 4b2b4e8..c56dc9c 100644 +index 7ecc2cf..3cc02ee 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -2065,8 +2065,9 @@ void CMixer::InitCycle() @@ -14165,10 +7108,10 @@ index 4b2b4e8..c56dc9c 100644 1.8.1.6 -From a04827ef0ca9a5a659ed2063d7076fb5db016134 Mon Sep 17 00:00:00 2001 +From 9bd37f8dce8f15c2b7db6d998b7637645345f432 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 2 Feb 2013 13:17:09 +0100 -Subject: [PATCH 029/123] vdpau: fix mp4 part2 decoding, activate by default +Subject: [PATCH 010/110] vdpau: fix mp4 part2 decoding, activate by default --- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 3 +-- @@ -14176,7 +7119,7 @@ Subject: [PATCH 029/123] vdpau: fix mp4 part2 decoding, activate by default 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index c56dc9c..4ffeeb5 100644 +index 3cc02ee..d90df12 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -131,10 +131,9 @@ bool CDecoder::Open(AVCodecContext* avctx, const enum PixelFormat, unsigned int @@ -14192,7 +7135,7 @@ index c56dc9c..4ffeeb5 100644 { if (!CDVDCodecUtils::IsVP3CompatibleWidth(avctx->coded_width)) diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp -index c156b90..bd08884 100644 +index 6541f65..8287651 100644 --- a/xbmc/settings/AdvancedSettings.cpp +++ b/xbmc/settings/AdvancedSettings.cpp @@ -165,7 +165,7 @@ void CAdvancedSettings::Initialize() @@ -14208,10 +7151,10 @@ index c156b90..bd08884 100644 1.8.1.6 -From 29f7a999fbf40b3228553a655b9b5713cd572e66 Mon Sep 17 00:00:00 2001 +From 084d9ac176408dd4240edb14b144f67a884eda5e Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 2 Mar 2013 15:19:19 +0100 -Subject: [PATCH 030/123] vdpau: re-add limited range conversion +Subject: [PATCH 011/110] vdpau: re-add limited range conversion --- xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 4 +- @@ -14219,10 +7162,10 @@ Subject: [PATCH 030/123] vdpau: re-add limited range conversion 2 files changed, 85 insertions(+), 5 deletions(-) diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -index a904572..88c7e5f 100644 +index 2de63b8..388d778 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -@@ -3314,7 +3314,7 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature) +@@ -3370,7 +3370,7 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature) { if(feature == RENDERFEATURE_BRIGHTNESS) { @@ -14231,7 +7174,7 @@ index a904572..88c7e5f 100644 return true; if (m_renderMethod & RENDER_VAAPI) -@@ -3327,7 +3327,7 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature) +@@ -3383,7 +3383,7 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature) if(feature == RENDERFEATURE_CONTRAST) { @@ -14241,7 +7184,7 @@ index a904572..88c7e5f 100644 if (m_renderMethod & RENDER_VAAPI) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 4ffeeb5..f913a97 100644 +index d90df12..62cd72e 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -71,6 +71,9 @@ @@ -14355,10 +7298,10 @@ index 4ffeeb5..f913a97 100644 1.8.1.6 -From 1ec0508b83dde208260e6574139ea0d1e8ecfe01 Mon Sep 17 00:00:00 2001 +From 4b7e68462033d60522677cb8abd3472ffe0734f0 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 25 Sep 2012 12:14:15 +0200 -Subject: [PATCH 031/123] linuxrenderer: drop method RenderMultiPass +Subject: [PATCH 012/110] linuxrenderer: drop method RenderMultiPass --- xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 9 ++------- @@ -14366,10 +7309,10 @@ Subject: [PATCH 031/123] linuxrenderer: drop method RenderMultiPass 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -index 88c7e5f..3a2278d 100644 +index 388d778..e8ae9df 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -@@ -1195,7 +1195,8 @@ void CLinuxRendererGL::Render(DWORD flags, int renderBuffer) +@@ -1218,7 +1218,8 @@ void CLinuxRendererGL::Render(DWORD flags, int renderBuffer) break; case RQ_MULTIPASS: @@ -14379,7 +7322,7 @@ index 88c7e5f..3a2278d 100644 VerifyGLState(); break; } -@@ -1327,12 +1328,6 @@ void CLinuxRendererGL::RenderSinglePass(int index, int field) +@@ -1350,12 +1351,6 @@ void CLinuxRendererGL::RenderSinglePass(int index, int field) VerifyGLState(); } @@ -14393,7 +7336,7 @@ index 88c7e5f..3a2278d 100644 { YUVPLANES &planes = m_buffers[index].fields[field]; diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.h b/xbmc/cores/VideoRenderers/LinuxRendererGL.h -index d72eb64..6b9046d 100644 +index fdda2ed..1a3a6cf 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.h +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.h @@ -218,7 +218,6 @@ class CLinuxRendererGL : public CBaseRenderer @@ -14408,10 +7351,10 @@ index d72eb64..6b9046d 100644 1.8.1.6 -From 84d3b7a85900519c4ebc246db4e83cfaba4197b9 Mon Sep 17 00:00:00 2001 +From b92169b126e26347156b617be5c7c7ac7a9ed191 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 25 Sep 2012 13:20:47 +0200 -Subject: [PATCH 032/123] linuxrenderer: implement progressive weave for vdpau +Subject: [PATCH 013/110] linuxrenderer: implement progressive weave for vdpau --- xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 55 +++++++++++++++++++-------- @@ -14419,10 +7362,10 @@ Subject: [PATCH 032/123] linuxrenderer: implement progressive weave for vdpau 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -index 3a2278d..3d9f22a 100644 +index e8ae9df..6807df7 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -@@ -679,18 +679,6 @@ void CLinuxRendererGL::RenderUpdate(bool clear, DWORD flags, DWORD alpha) +@@ -702,18 +702,6 @@ void CLinuxRendererGL::RenderUpdate(bool clear, DWORD flags, DWORD alpha) glDisable(GL_POLYGON_STIPPLE); } @@ -14441,7 +7384,7 @@ index 3a2278d..3d9f22a 100644 else Render(flags, index); -@@ -1190,13 +1178,21 @@ void CLinuxRendererGL::Render(DWORD flags, int renderBuffer) +@@ -1213,13 +1201,21 @@ void CLinuxRendererGL::Render(DWORD flags, int renderBuffer) { case RQ_LOW: case RQ_SINGLEPASS: @@ -14466,7 +7409,7 @@ index 3a2278d..3d9f22a 100644 VerifyGLState(); break; } -@@ -1328,7 +1324,7 @@ void CLinuxRendererGL::RenderSinglePass(int index, int field) +@@ -1351,7 +1347,7 @@ void CLinuxRendererGL::RenderSinglePass(int index, int field) VerifyGLState(); } @@ -14475,7 +7418,7 @@ index 3a2278d..3d9f22a 100644 { YUVPLANES &planes = m_buffers[index].fields[field]; -@@ -1430,6 +1426,8 @@ void CLinuxRendererGL::RenderToFBO(int index, int field) +@@ -1453,6 +1449,8 @@ void CLinuxRendererGL::RenderToFBO(int index, int field) } m_fbo.width *= planes[0].pixpertex_x; m_fbo.height *= planes[0].pixpertex_y; @@ -14484,7 +7427,7 @@ index 3a2278d..3d9f22a 100644 // 1st Pass to video frame size glBegin(GL_QUADS); -@@ -1548,6 +1546,31 @@ void CLinuxRendererGL::RenderFromFBO() +@@ -1571,6 +1569,31 @@ void CLinuxRendererGL::RenderFromFBO() VerifyGLState(); } @@ -14517,7 +7460,7 @@ index 3a2278d..3d9f22a 100644 { #ifdef HAVE_LIBVDPAU diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.h b/xbmc/cores/VideoRenderers/LinuxRendererGL.h -index 6b9046d..4494eca 100644 +index 1a3a6cf..258a598 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.h +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.h @@ -218,12 +218,12 @@ class CLinuxRendererGL : public CBaseRenderer @@ -14539,17 +7482,17 @@ index 6b9046d..4494eca 100644 1.8.1.6 -From ec7254bd6dabe50dfaa382840b585004c1c8c883 Mon Sep 17 00:00:00 2001 +From 43a1ea8a43bc950f3f60bdeb02adf0d2a117273f Mon Sep 17 00:00:00 2001 From: fritsch Date: Thu, 28 Mar 2013 10:38:37 +0100 -Subject: [PATCH 033/123] VDPAU: silence compiler warnings +Subject: [PATCH 014/110] VDPAU: silence compiler warnings --- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index f913a97..e9ec3d2 100644 +index 62cd72e..a0ccd9f 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -252,7 +252,7 @@ long CDecoder::Release() @@ -14638,10 +7581,10 @@ index f913a97..e9ec3d2 100644 1.8.1.6 -From 3bc3adc2abf37a0edeb829c89559b71d314c40ca Mon Sep 17 00:00:00 2001 +From 6e2414da30e6a874fa7ac6a56930e42b737eeac8 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 25 Feb 2013 08:47:10 +0100 -Subject: [PATCH 034/123] vdpau: release more resources on pre-cleanup +Subject: [PATCH 015/110] vdpau: release more resources on pre-cleanup --- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 72 +++++++++++++++++++++++--- @@ -14649,7 +7592,7 @@ Subject: [PATCH 034/123] vdpau: release more resources on pre-cleanup 2 files changed, 68 insertions(+), 6 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index e9ec3d2..9850cf0 100644 +index a0ccd9f..89ffc6e 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -1170,6 +1170,11 @@ void CMixer::Dispose() @@ -14756,7 +7699,7 @@ index e9ec3d2..9850cf0 100644 { for (unsigned int i = 0; i < m_bufferPool.outputSurfaces.size(); ++i) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -index ef99383..39047b5 100644 +index 674571b..c0835cf 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h @@ -286,6 +286,7 @@ class CMixer : private CThread @@ -14779,10 +7722,10 @@ index ef99383..39047b5 100644 1.8.1.6 -From d35ccb80581844bbca3333347f00e6fcb93a71d0 Mon Sep 17 00:00:00 2001 +From dd49526d8216e4544ec56101f62f85a5b92ee2e0 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 6 Mar 2013 07:35:10 +0100 -Subject: [PATCH 035/123] vdpau: set deinterlacing method to auto, if default +Subject: [PATCH 016/110] vdpau: set deinterlacing method to auto, if default method not supported --- @@ -14790,7 +7733,7 @@ Subject: [PATCH 035/123] vdpau: set deinterlacing method to auto, if default 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 9850cf0..0a6a1dc 100644 +index 89ffc6e..b23f530 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -2195,13 +2195,15 @@ void CMixer::InitCycle() @@ -14814,10 +7757,10 @@ index 9850cf0..0a6a1dc 100644 1.8.1.6 -From c3e2ffae7ea03c7f97534d5232c7d85fa15e89fc Mon Sep 17 00:00:00 2001 +From c5785dcbd029102df0e3bcd0e3ef071105ed6954 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 21 Apr 2013 09:19:34 +0200 -Subject: [PATCH 036/123] vdpau: fix deadlock if decoder is closed while +Subject: [PATCH 017/110] vdpau: fix deadlock if decoder is closed while refresh rate changes --- @@ -14825,7 +7768,7 @@ Subject: [PATCH 036/123] vdpau: fix deadlock if decoder is closed while 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 0a6a1dc..4b4b3c3 100644 +index b23f530..2fdcf37 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -183,6 +183,8 @@ void CDecoder::Close() @@ -14855,17 +7798,17 @@ index 0a6a1dc..4b4b3c3 100644 1.8.1.6 -From a8be3fdeb938bbaafb2ed203f3603df659fbeab2 Mon Sep 17 00:00:00 2001 +From a8f89679a150db3f6d9e11dbe214de888b373546 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sat, 1 Jun 2013 11:21:19 +0200 -Subject: [PATCH 037/123] renderer: bump buffers to 5 +Subject: [PATCH 018/110] renderer: bump buffers to 5 --- xbmc/cores/VideoRenderers/BaseRenderer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/cores/VideoRenderers/BaseRenderer.h b/xbmc/cores/VideoRenderers/BaseRenderer.h -index fe1f577..527ecf1 100644 +index 6acf2f3..f44024c 100644 --- a/xbmc/cores/VideoRenderers/BaseRenderer.h +++ b/xbmc/cores/VideoRenderers/BaseRenderer.h @@ -29,7 +29,7 @@ @@ -14881,10 +7824,10 @@ index fe1f577..527ecf1 100644 1.8.1.6 -From b0470afab151c7b6f40ef522a34971915eaf6a01 Mon Sep 17 00:00:00 2001 +From 152844f66eeca185da6982d9e7e66a2ae5a502da Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:41:31 +0200 -Subject: [PATCH 038/123] videoplayer: update frametime, it might change due to +Subject: [PATCH 019/110] videoplayer: update frametime, it might change due to fps detection --- @@ -14892,10 +7835,10 @@ Subject: [PATCH 038/123] videoplayer: update frametime, it might change due to 1 file changed, 2 insertions(+) diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 3c30d0b..347e888 100644 +index 8ed34f9..bc049bd 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -707,6 +707,8 @@ void CDVDPlayerVideo::Process() +@@ -708,6 +708,8 @@ void CDVDPlayerVideo::Process() int iResult = OutputPicture(&picture, pts); @@ -14908,10 +7851,10 @@ index 3c30d0b..347e888 100644 1.8.1.6 -From 3b2c4035e621d28160dc432159b61df047c6b879 Mon Sep 17 00:00:00 2001 +From 4375b9a0c7e7e12f5f7d5d7dfd8319b26c4f1490 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:43:06 +0200 -Subject: [PATCH 039/123] videoplayer: give streams with invalid fps a chance +Subject: [PATCH 020/110] videoplayer: give streams with invalid fps a chance for fps detection --- @@ -14919,10 +7862,10 @@ Subject: [PATCH 039/123] videoplayer: give streams with invalid fps a chance 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 347e888..1a17145 100644 +index bc049bd..21d023e 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -1529,7 +1529,7 @@ void CDVDPlayerVideo::CalcFrameRate() +@@ -1500,7 +1500,7 @@ void CDVDPlayerVideo::CalcFrameRate() double frameduration = m_pullupCorrection.GetFrameDuration(); if (frameduration == DVD_NOPTS_VALUE || @@ -14935,10 +7878,10 @@ index 347e888..1a17145 100644 1.8.1.6 -From 122cde177d428fc91114be2fb57318a6aa69ba5b Mon Sep 17 00:00:00 2001 +From a217254277fdd441c31713bcdad816d72263da4e Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:49:05 +0200 -Subject: [PATCH 040/123] dvdplayer: allow rewinding at end of stream, do a +Subject: [PATCH 021/110] dvdplayer: allow rewinding at end of stream, do a seek after rewind --- @@ -14946,10 +7889,10 @@ Subject: [PATCH 040/123] dvdplayer: allow rewinding at end of stream, do a 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp -index 974ebd1..b56423b 100644 +index 27e9ff1..1bd122b 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp -@@ -1555,7 +1555,7 @@ void CDVDPlayer::HandlePlaySpeed() +@@ -1556,7 +1556,7 @@ void CDVDPlayer::HandlePlaySpeed() } else if (m_CurrentVideo.id >= 0 @@ -14958,7 +7901,7 @@ index 974ebd1..b56423b 100644 && m_SpeedState.lastpts != m_dvdPlayerVideo.GetCurrentPts() && m_SpeedState.lasttime != GetTime()) { -@@ -2221,6 +2221,12 @@ void CDVDPlayer::HandleMessages() +@@ -2222,6 +2222,12 @@ void CDVDPlayer::HandleMessages() pvrinputstream->Pause( speed == 0 ); } @@ -14975,10 +7918,10 @@ index 974ebd1..b56423b 100644 1.8.1.6 -From a308b831bd2e6e7a74589987a4ea805e3f10b2ae Mon Sep 17 00:00:00 2001 +From 1e02fb0d7f844b722743ea37f2984f5595b38e3a Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 15:22:05 +0200 -Subject: [PATCH 041/123] X11: ditch SDL for video and window events +Subject: [PATCH 022/110] X11: ditch SDL for video and window events --- xbmc/Application.cpp | 2 +- @@ -14994,10 +7937,10 @@ Subject: [PATCH 041/123] X11: ditch SDL for video and window events create mode 100644 xbmc/windowing/WinEventsX11.h diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp -index 3937ce8..a5603a2 100644 +index b4fa73b..55a2685 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp -@@ -833,7 +833,7 @@ bool CApplication::CreateGUI() +@@ -845,7 +845,7 @@ bool CApplication::CreateGUI() uint32_t sdlFlags = 0; @@ -15007,7 +7950,7 @@ index 3937ce8..a5603a2 100644 #endif diff --git a/xbmc/system.h b/xbmc/system.h -index 7ccda52..bb6b72e 100644 +index 1f4e15f..075e44a 100644 --- a/xbmc/system.h +++ b/xbmc/system.h @@ -171,16 +171,21 @@ @@ -15045,7 +7988,7 @@ index f109bec..f981642 100644 LIB=windowing.a diff --git a/xbmc/windowing/WinEvents.h b/xbmc/windowing/WinEvents.h -index 5feb800..49adcdf 100644 +index 9e09b54..87bf855 100644 --- a/xbmc/windowing/WinEvents.h +++ b/xbmc/windowing/WinEvents.h @@ -56,6 +56,10 @@ class CWinEventsBase @@ -15894,7 +8837,7 @@ index 0000000..e9b7553 + bool m_structureChanged; +}; diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index e28b712..68e482e 100644 +index 31f5304..265e05e 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -22,7 +22,6 @@ @@ -16422,7 +9365,7 @@ index e28b712..68e482e 100644 + #endif diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index 3dae22c..25faaef 100644 +index b6b6ec4..448a1bb 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -52,6 +52,7 @@ class CWinSystemX11 : public CWinSystemBase @@ -16462,10 +9405,10 @@ index 3dae22c..25faaef 100644 1.8.1.6 -From 9f772616412e5bc3a72e2d56ed5ae6ccc7264693 Mon Sep 17 00:00:00 2001 +From 629aa294a77faa2a9165909ee7750039d997396e Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 15:24:22 +0200 -Subject: [PATCH 042/123] X11: Add xbmc icon +Subject: [PATCH 023/110] X11: Add xbmc icon --- xbmc/windowing/X11/WinSystemX11.cpp | 126 +++++++++++++++++++++++++++++++++++- @@ -16473,7 +9416,7 @@ Subject: [PATCH 042/123] X11: Add xbmc icon 2 files changed, 127 insertions(+), 1 deletion(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 68e482e..9ee8d18 100644 +index 265e05e..f3ff34d 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -136,6 +136,9 @@ bool CWinSystemX11::DestroyWindow() @@ -16631,7 +9574,7 @@ index 68e482e..9ee8d18 100644 + #endif diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index 25faaef..c1e6cf1 100644 +index 448a1bb..e618268 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -77,6 +77,7 @@ class CWinSystemX11 : public CWinSystemBase @@ -16654,10 +9597,10 @@ index 25faaef..c1e6cf1 100644 1.8.1.6 -From c3a5e18e21191c785d31fecd9013f25bdada062d Mon Sep 17 00:00:00 2001 +From aa580c081b65e5697123a70c128c35a32701ec0b Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 20 May 2012 14:11:26 +0200 -Subject: [PATCH 043/123] X11: add SDL joystick until we have a better solution +Subject: [PATCH 024/110] X11: add SDL joystick until we have a better solution --- xbmc/windowing/WinEventsX11.cpp | 26 ++++++++++++++++++++++++++ @@ -16711,10 +9654,10 @@ index 5a8bbb8..5bc1de0 100644 1.8.1.6 -From cedafa3581d7893778c46473b32c90cde9306e9f Mon Sep 17 00:00:00 2001 +From d7ec27990c479ef980236e7a20a40bb8f7be791a Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 5 Jul 2012 12:35:55 +0200 -Subject: [PATCH 044/123] X11: factor out code handling device reset +Subject: [PATCH 025/110] X11: factor out code handling device reset notification --- @@ -16723,7 +9666,7 @@ Subject: [PATCH 044/123] X11: factor out code handling device reset 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 9ee8d18..fd51dc0 100644 +index f3ff34d..c5938af 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -532,14 +532,7 @@ void CWinSystemX11::CheckDisplayEvents() @@ -16763,7 +9706,7 @@ index 9ee8d18..fd51dc0 100644 { CLog::Log(LOGDEBUG, "%s - notify display change event", __FUNCTION__); diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index c1e6cf1..041ea55 100644 +index e618268..c4d4b76 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -66,6 +66,7 @@ class CWinSystemX11 : public CWinSystemBase @@ -16778,10 +9721,10 @@ index c1e6cf1..041ea55 100644 1.8.1.6 -From a6d829d266bc04a52e8340aa2e2ea79e2e258070 Mon Sep 17 00:00:00 2001 +From 7a15d6da19afaa671225156f8364b289a78ad677 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 15:02:00 +0200 -Subject: [PATCH 045/123] X11: move xrandr events to WinEventsX11 +Subject: [PATCH 026/110] X11: move xrandr events to WinEventsX11 --- xbmc/windowing/WinEventsX11.cpp | 42 +++++++++++++++++++++++++++++++++++++ @@ -16896,7 +9839,7 @@ index e9b7553..6100933 100644 + bool m_xrrEventPending; }; diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index fd51dc0..d495443 100644 +index c5938af..9f74dd5 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -509,7 +509,7 @@ bool CWinSystemX11::Show(bool raise) @@ -16925,10 +9868,10 @@ index fd51dc0..d495443 100644 1.8.1.6 -From b8c92d9d5a2c7cbf6315d9a04be99d6501de7fe9 Mon Sep 17 00:00:00 2001 +From c3f7dcc65a38d830f80937011e03aa936ab459a8 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 12 Apr 2012 15:43:56 +0200 -Subject: [PATCH 046/123] xrandr: remove method RestoreState +Subject: [PATCH 027/110] xrandr: remove method RestoreState --- xbmc/windowing/X11/WinSystemX11.cpp | 13 +++++++++++-- @@ -16937,7 +9880,7 @@ Subject: [PATCH 046/123] xrandr: remove method RestoreState 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index d495443..d7afc3f 100644 +index 9f74dd5..05a1d60 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -79,9 +79,18 @@ bool CWinSystemX11::InitWindowSystem() @@ -16962,7 +9905,7 @@ index d495443..d7afc3f 100644 if (m_dpy) diff --git a/xbmc/windowing/X11/XRandR.cpp b/xbmc/windowing/X11/XRandR.cpp -index 30c1909..b4c95f8 100644 +index bd22dbf..df2b5fb 100644 --- a/xbmc/windowing/X11/XRandR.cpp +++ b/xbmc/windowing/X11/XRandR.cpp @@ -139,25 +139,6 @@ void CXRandR::SaveState() @@ -16992,7 +9935,7 @@ index 30c1909..b4c95f8 100644 { if ((output.name == m_currentOutput && mode.id == m_currentMode) || (output.name == "" && mode.id == "")) diff --git a/xbmc/windowing/X11/XRandR.h b/xbmc/windowing/X11/XRandR.h -index e3450fe..cf22fbf 100644 +index 0aec487..00b49dc 100644 --- a/xbmc/windowing/X11/XRandR.h +++ b/xbmc/windowing/X11/XRandR.h @@ -99,7 +99,6 @@ class CXRandR @@ -17007,10 +9950,10 @@ index e3450fe..cf22fbf 100644 1.8.1.6 -From 3715129c3cbfcf14b49f28e1721b4d869a370de3 Mon Sep 17 00:00:00 2001 +From 15e2791c6a56f086182134662fca12e2b6ce7bcc Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 20 May 2012 13:17:10 +0200 -Subject: [PATCH 047/123] xrandr: observe orientation +Subject: [PATCH 028/110] xrandr: observe orientation --- xbmc/windowing/X11/WinSystemX11.cpp | 89 ++++++++++++++++++++++++++++++------- @@ -17020,7 +9963,7 @@ Subject: [PATCH 047/123] xrandr: observe orientation 4 files changed, 82 insertions(+), 17 deletions(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index d7afc3f..6b320f2 100644 +index 05a1d60..c5ccbc4 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -84,11 +84,11 @@ bool CWinSystemX11::DestroyWindowSystem() @@ -17173,7 +10116,7 @@ index d7afc3f..6b320f2 100644 { int value; diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index 041ea55..0d4436b 100644 +index c4d4b76..0727bb9 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -73,12 +73,14 @@ class CWinSystemX11 : public CWinSystemBase @@ -17192,7 +10135,7 @@ index 041ea55..0d4436b 100644 bool m_minimized; bool m_bIgnoreNextFocusMessage; diff --git a/xbmc/windowing/X11/XRandR.cpp b/xbmc/windowing/X11/XRandR.cpp -index b4c95f8..e2576b2 100644 +index df2b5fb..29715c7 100644 --- a/xbmc/windowing/X11/XRandR.cpp +++ b/xbmc/windowing/X11/XRandR.cpp @@ -98,6 +98,13 @@ bool CXRandR::Query(bool force) @@ -17210,7 +10153,7 @@ index b4c95f8..e2576b2 100644 if (!xoutput.isConnected) continue; diff --git a/xbmc/windowing/X11/XRandR.h b/xbmc/windowing/X11/XRandR.h -index cf22fbf..71ffab4 100644 +index 00b49dc..508604d 100644 --- a/xbmc/windowing/X11/XRandR.h +++ b/xbmc/windowing/X11/XRandR.h @@ -86,6 +86,7 @@ class XOutput @@ -17225,10 +10168,10 @@ index cf22fbf..71ffab4 100644 1.8.1.6 -From 74087bc15aafee00399f86ce4387e07bcdc852b6 Mon Sep 17 00:00:00 2001 +From 4211de0e0358648ef50f9449c496757081b7671a Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:54:15 +0200 -Subject: [PATCH 048/123] xrandr: allow getting info for multiple screen's +Subject: [PATCH 029/110] xrandr: allow getting info for multiple screen's Refactored by: Joakim Plate --- @@ -17237,7 +10180,7 @@ Refactored by: Joakim Plate 2 files changed, 57 insertions(+), 16 deletions(-) diff --git a/xbmc/windowing/X11/XRandR.cpp b/xbmc/windowing/X11/XRandR.cpp -index e2576b2..97b1e32 100644 +index 29715c7..9e181f2 100644 --- a/xbmc/windowing/X11/XRandR.cpp +++ b/xbmc/windowing/X11/XRandR.cpp @@ -39,6 +39,7 @@ @@ -17359,7 +10302,7 @@ index e2576b2..97b1e32 100644 #endif // HAS_XRANDR diff --git a/xbmc/windowing/X11/XRandR.h b/xbmc/windowing/X11/XRandR.h -index 71ffab4..26c2653 100644 +index 508604d..d37838a 100644 --- a/xbmc/windowing/X11/XRandR.h +++ b/xbmc/windowing/X11/XRandR.h @@ -79,6 +79,7 @@ class XOutput @@ -17403,10 +10346,10 @@ index 71ffab4..26c2653 100644 1.8.1.6 -From 962e8baf6d19fb165988939a07e350b55e7b379e Mon Sep 17 00:00:00 2001 +From 752269938c1f15620b39d7473236252eaf8a9ebf Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:44:00 +0200 -Subject: [PATCH 049/123] X11: fix multi-head setups +Subject: [PATCH 030/110] X11: fix multi-head setups --- language/English/strings.po | 4 +- @@ -17421,7 +10364,7 @@ Subject: [PATCH 049/123] 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 eace353..10568ca 100644 +index fae2505..ce56914 100644 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -999,7 +999,9 @@ msgctxt "#245" @@ -17436,10 +10379,10 @@ index eace353..10568ca 100644 msgctxt "#247" msgid "Scripts" diff --git a/system/settings/settings.xml b/system/settings/settings.xml -index 15e9a75..9c63476 100644 +index 56d637d..f99ba9c 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml -@@ -1841,6 +1841,15 @@ +@@ -1863,6 +1863,15 @@
@@ -17455,7 +10398,7 @@ index 15e9a75..9c63476 100644 0 0 -@@ -1862,6 +1871,7 @@ +@@ -1884,6 +1893,7 @@ -1 @@ -17463,7 +10406,7 @@ index 15e9a75..9c63476 100644 -@@ -1879,6 +1889,7 @@ +@@ -1901,6 +1911,7 @@ -1 @@ -17472,7 +10415,7 @@ index 15e9a75..9c63476 100644 diff --git a/xbmc/rendering/gl/RenderSystemGL.h b/xbmc/rendering/gl/RenderSystemGL.h -index 5c7a288..f3fd4fb 100644 +index 4bd540b..f1e2c50 100644 --- a/xbmc/rendering/gl/RenderSystemGL.h +++ b/xbmc/rendering/gl/RenderSystemGL.h @@ -44,6 +44,7 @@ class CRenderSystemGL : public CRenderSystemBase @@ -17484,10 +10427,10 @@ index 5c7a288..f3fd4fb 100644 virtual void SetViewPort(CRect& viewPort); virtual void GetViewPort(CRect& viewPort); diff --git a/xbmc/settings/DisplaySettings.cpp b/xbmc/settings/DisplaySettings.cpp -index 49b50f4..203c0f1 100644 +index bf307f6..1a85651 100644 --- a/xbmc/settings/DisplaySettings.cpp +++ b/xbmc/settings/DisplaySettings.cpp -@@ -198,13 +198,19 @@ bool CDisplaySettings::OnSettingChanging(const CSetting *setting) +@@ -219,13 +219,19 @@ bool CDisplaySettings::OnSettingChanging(const CSetting *setting) const std::string &settingId = setting->GetId(); if (settingId == "videoscreen.resolution" || @@ -17508,7 +10451,7 @@ index 49b50f4..203c0f1 100644 string screenmode = GetStringFromResolution(newRes); CSettings::Get().SetString("videoscreen.screenmode", screenmode); -@@ -215,7 +221,11 @@ bool CDisplaySettings::OnSettingChanging(const CSetting *setting) +@@ -236,7 +242,11 @@ bool CDisplaySettings::OnSettingChanging(const CSetting *setting) RESOLUTION newRes = GetResolutionFromString(((CSettingString*)setting)->GetValue()); SetCurrentResolution(newRes, false); @@ -17521,7 +10464,7 @@ index 49b50f4..203c0f1 100644 // check if the old or the new resolution was/is windowed // in which case we don't show any prompt to the user -@@ -571,6 +581,10 @@ void CDisplaySettings::SettingOptionsScreensFiller(const CSetting *setting, std: +@@ -622,6 +632,10 @@ void CDisplaySettings::SettingOptionsScreensFiller(const CSetting *setting, std: if (g_advancedSettings.m_canWindowed) list.push_back(make_pair(g_localizeStrings.Get(242), DM_WINDOWED)); @@ -17532,7 +10475,7 @@ index 49b50f4..203c0f1 100644 for (int idx = 0; idx < g_Windowing.GetNumScreens(); idx++) { int screen = CDisplaySettings::Get().GetResolutionInfo(RES_DESKTOP + idx).iScreen; -@@ -585,6 +599,7 @@ void CDisplaySettings::SettingOptionsScreensFiller(const CSetting *setting, std: +@@ -636,6 +650,7 @@ void CDisplaySettings::SettingOptionsScreensFiller(const CSetting *setting, std: RESOLUTION_INFO resInfo = CDisplaySettings::Get().GetResolutionInfo(res); current = resInfo.iScreen; } @@ -17540,9 +10483,9 @@ index 49b50f4..203c0f1 100644 } void CDisplaySettings::SettingOptionsVerticalSyncsFiller(const CSetting *setting, std::vector< std::pair > &list, int ¤t) -@@ -596,3 +611,28 @@ void CDisplaySettings::SettingOptionsVerticalSyncsFiller(const CSetting *setting - list.push_back(make_pair(g_localizeStrings.Get(13107), VSYNC_VIDEO)); - list.push_back(make_pair(g_localizeStrings.Get(13108), VSYNC_ALWAYS)); +@@ -663,3 +678,28 @@ void CDisplaySettings::SettingOptionsPreferredStereoscopicViewModesFiller(const + SettingOptionsStereoscopicModesFiller(setting, list, current); + list.push_back(make_pair(g_localizeStrings.Get(36525), RENDER_STEREO_MODE_AUTO)); // option for autodetect } + +void CDisplaySettings::SettingOptionsMonitorsFiller(const CSetting *setting, std::vector< std::pair > &list, std::string ¤t) @@ -17570,7 +10513,7 @@ index 49b50f4..203c0f1 100644 + } +} diff --git a/xbmc/settings/DisplaySettings.h b/xbmc/settings/DisplaySettings.h -index 056fc07..fe91a74 100644 +index cc4002b..d80f1dc 100644 --- a/xbmc/settings/DisplaySettings.h +++ b/xbmc/settings/DisplaySettings.h @@ -78,6 +78,7 @@ class CDisplaySettings : public ISettingCallback, public ISubSettings, @@ -17581,35 +10524,35 @@ index 056fc07..fe91a74 100644 float GetZoomAmount() const { return m_zoomAmount; } void SetZoomAmount(float zoomAmount) { m_zoomAmount = zoomAmount; } -@@ -93,6 +94,7 @@ class CDisplaySettings : public ISettingCallback, public ISubSettings, - static void SettingOptionsResolutionsFiller(const CSetting *setting, std::vector< std::pair > &list, int ¤t); - static void SettingOptionsScreensFiller(const CSetting *setting, std::vector< std::pair > &list, int ¤t); +@@ -95,6 +96,7 @@ class CDisplaySettings : public ISettingCallback, public ISubSettings, static void SettingOptionsVerticalSyncsFiller(const CSetting *setting, std::vector< std::pair > &list, int ¤t); + static void SettingOptionsStereoscopicModesFiller(const CSetting *setting, std::vector< std::pair > &list, int ¤t); + static void SettingOptionsPreferredStereoscopicViewModesFiller(const CSetting *setting, std::vector< std::pair > &list, int ¤t); + static void SettingOptionsMonitorsFiller(const CSetting *setting, std::vector< std::pair > &list, std::string ¤t); protected: CDisplaySettings(); diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp -index ee97753..63cdf0e 100644 +index c1d6443..1de1ac6 100644 --- a/xbmc/settings/Settings.cpp +++ b/xbmc/settings/Settings.cpp -@@ -374,6 +374,7 @@ void CSettings::Uninitialize() - m_settingsManager->UnregisterSettingOptionsFiller("rendermethods"); - m_settingsManager->UnregisterSettingOptionsFiller("resolutions"); +@@ -381,6 +381,7 @@ void CSettings::Uninitialize() m_settingsManager->UnregisterSettingOptionsFiller("screens"); + m_settingsManager->UnregisterSettingOptionsFiller("stereoscopicmodes"); + m_settingsManager->UnregisterSettingOptionsFiller("preferedstereoscopicviewmodes"); + m_settingsManager->UnregisterSettingOptionsFiller("monitors"); m_settingsManager->UnregisterSettingOptionsFiller("shutdownstates"); m_settingsManager->UnregisterSettingOptionsFiller("startupwindows"); m_settingsManager->UnregisterSettingOptionsFiller("streamlanguages"); -@@ -677,6 +678,7 @@ void CSettings::InitializeOptionFillers() - m_settingsManager->RegisterSettingOptionsFiller("rendermethods", CBaseRenderer::SettingOptionsRenderMethodsFiller); - m_settingsManager->RegisterSettingOptionsFiller("resolutions", CDisplaySettings::SettingOptionsResolutionsFiller); +@@ -688,6 +689,7 @@ void CSettings::InitializeOptionFillers() m_settingsManager->RegisterSettingOptionsFiller("screens", CDisplaySettings::SettingOptionsScreensFiller); + m_settingsManager->RegisterSettingOptionsFiller("stereoscopicmodes", CDisplaySettings::SettingOptionsStereoscopicModesFiller); + m_settingsManager->RegisterSettingOptionsFiller("preferedstereoscopicviewmodes", CDisplaySettings::SettingOptionsPreferredStereoscopicViewModesFiller); + m_settingsManager->RegisterSettingOptionsFiller("monitors", CDisplaySettings::SettingOptionsMonitorsFiller); m_settingsManager->RegisterSettingOptionsFiller("shutdownstates", CPowerManager::SettingOptionsShutdownStatesFiller); m_settingsManager->RegisterSettingOptionsFiller("startupwindows", ADDON::CSkinInfo::SettingOptionsStartupWindowsFiller); m_settingsManager->RegisterSettingOptionsFiller("streamlanguages", CLangInfo::SettingOptionsStreamLanguagesFiller); -@@ -704,6 +706,9 @@ void CSettings::InitializeConditions() +@@ -715,6 +717,9 @@ void CSettings::InitializeConditions() #ifdef HAS_GL m_settingsManager->AddCondition("has_gl"); #endif @@ -17619,7 +10562,7 @@ index ee97753..63cdf0e 100644 #ifdef HAS_GLES m_settingsManager->AddCondition("has_gles"); #endif -@@ -837,6 +842,7 @@ void CSettings::InitializeISettingCallbacks() +@@ -857,6 +862,7 @@ void CSettings::InitializeISettingCallbacks() settingSet.insert("videoscreen.screen"); settingSet.insert("videoscreen.resolution"); settingSet.insert("videoscreen.screenmode"); @@ -17649,7 +10592,7 @@ index d9dc911..c58067b 100644 break; } diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 6b320f2..41e7d6e 100644 +index c5ccbc4..d9654b9 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -34,7 +34,8 @@ @@ -18138,7 +11081,7 @@ index 6b320f2..41e7d6e 100644 return true; } diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index 0d4436b..0336b3b 100644 +index 0727bb9..b1eb278 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -65,15 +65,16 @@ class CWinSystemX11 : public CWinSystemBase @@ -18175,10 +11118,10 @@ index 0d4436b..0336b3b 100644 1.8.1.6 -From 1b9d4812607e358873e2a8868edf53b41c67cd15 Mon Sep 17 00:00:00 2001 +From 9626121cde1743a8d2ef2d51cf92592523ab8b7b Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:36:32 +0200 -Subject: [PATCH 050/123] X11: remove all DefaultScreen and RootWindow macros +Subject: [PATCH 031/110] X11: remove all DefaultScreen and RootWindow macros --- xbmc/windowing/X11/WinSystemX11.cpp | 6 +++--- @@ -18187,7 +11130,7 @@ Subject: [PATCH 050/123] X11: remove all DefaultScreen and RootWindow macros 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 41e7d6e..fd07a80 100644 +index d9654b9..e2580a4 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -269,7 +269,7 @@ void CWinSystemX11::UpdateResolutions() @@ -18218,7 +11161,7 @@ index 41e7d6e..fd07a80 100644 m_minimized = true; return true; diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index 0336b3b..393399f 100644 +index b1eb278..b9154ab 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -47,6 +47,7 @@ class CWinSystemX11 : public CWinSystemBase @@ -18230,7 +11173,7 @@ index 0336b3b..393399f 100644 virtual void ResetOSScreensaver(); virtual bool EnableFrameLimiter(); diff --git a/xbmc/windowing/X11/WinSystemX11GL.cpp b/xbmc/windowing/X11/WinSystemX11GL.cpp -index 1bea366..cc39720 100644 +index 095012f..60a6878 100644 --- a/xbmc/windowing/X11/WinSystemX11GL.cpp +++ b/xbmc/windowing/X11/WinSystemX11GL.cpp @@ -203,7 +203,7 @@ bool CWinSystemX11GL::CreateNewWindow(const CStdString& name, bool fullScreen, R @@ -18246,10 +11189,10 @@ index 1bea366..cc39720 100644 1.8.1.6 -From 25cb8d56c21407abe41750eb4ac03a6a72cc005d Mon Sep 17 00:00:00 2001 +From 5d281408e8eb37184e44c1f6aebf3dea09c9b952 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:45:22 +0200 -Subject: [PATCH 051/123] X11: remove all DefaultScreen and RootWindow macros +Subject: [PATCH 032/110] X11: remove all DefaultScreen and RootWindow macros (VideoRefClock) Note this is on a separate display connection. @@ -18258,7 +11201,7 @@ Note this is on a separate display connection. 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xbmc/video/VideoReferenceClock.cpp b/xbmc/video/VideoReferenceClock.cpp -index ca239cf..687e3ff 100644 +index 5bf3656..0b9e7b3 100644 --- a/xbmc/video/VideoReferenceClock.cpp +++ b/xbmc/video/VideoReferenceClock.cpp @@ -270,7 +270,7 @@ bool CVideoReferenceClock::SetupGLX() @@ -18321,10 +11264,10 @@ index ca239cf..687e3ff 100644 1.8.1.6 -From dde7b8a4d232d927c23b3d101687df45dba94886 Mon Sep 17 00:00:00 2001 +From 583087348aa3e019f13df994090cadc7dd1bfbf3 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 20 Jun 2012 17:37:11 +0200 -Subject: [PATCH 052/123] X11: recreate gl context after output has changed +Subject: [PATCH 033/110] X11: recreate gl context after output has changed --- xbmc/windowing/X11/WinSystemX11.cpp | 24 ++++++++++++++---------- @@ -18333,7 +11276,7 @@ Subject: [PATCH 052/123] X11: recreate gl context after output has changed 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index fd07a80..8f56cec 100644 +index e2580a4..dce0433 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -170,7 +170,6 @@ bool CWinSystemX11::ResizeWindow(int newWidth, int newHeight, int newLeft, int n @@ -18422,7 +11365,7 @@ index fd07a80..8f56cec 100644 } diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index 393399f..2227320 100644 +index b9154ab..05aa60e 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -93,6 +93,7 @@ class CWinSystemX11 : public CWinSystemBase @@ -18434,7 +11377,7 @@ index 393399f..2227320 100644 private: bool IsSuitableVisual(XVisualInfo *vInfo); diff --git a/xbmc/windowing/X11/WinSystemX11GL.cpp b/xbmc/windowing/X11/WinSystemX11GL.cpp -index cc39720..dda7b14 100644 +index 60a6878..d6ba80a 100644 --- a/xbmc/windowing/X11/WinSystemX11GL.cpp +++ b/xbmc/windowing/X11/WinSystemX11GL.cpp @@ -23,6 +23,7 @@ @@ -18475,10 +11418,10 @@ index cc39720..dda7b14 100644 1.8.1.6 -From 04b267d0ada69b62e07d05dd840fde3ff2e8d72c Mon Sep 17 00:00:00 2001 +From fe9ee4c66e08f11d514b94d61b0fc0585626796e Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 12:06:25 +0200 -Subject: [PATCH 053/123] X11: hook video reference clock in windowing +Subject: [PATCH 034/110] X11: hook video reference clock in windowing --- xbmc/video/VideoReferenceClock.cpp | 71 +++++++++++++++++++++++++++----------- @@ -18486,7 +11429,7 @@ Subject: [PATCH 053/123] X11: hook video reference clock in windowing 2 files changed, 63 insertions(+), 21 deletions(-) diff --git a/xbmc/video/VideoReferenceClock.cpp b/xbmc/video/VideoReferenceClock.cpp -index 687e3ff..4287e8f 100644 +index 0b9e7b3..3bd8133 100644 --- a/xbmc/video/VideoReferenceClock.cpp +++ b/xbmc/video/VideoReferenceClock.cpp @@ -135,12 +135,23 @@ @@ -18632,7 +11575,7 @@ index 687e3ff..4287e8f 100644 //the refreshrate can be wrong on nvidia drivers, so read it from nvidia-settings when it's available diff --git a/xbmc/video/VideoReferenceClock.h b/xbmc/video/VideoReferenceClock.h -index 1791570..bcabc9f 100644 +index dd65a1b..afd71fc 100644 --- a/xbmc/video/VideoReferenceClock.h +++ b/xbmc/video/VideoReferenceClock.h @@ -30,6 +30,7 @@ @@ -18683,10 +11626,10 @@ index 1791570..bcabc9f 100644 1.8.1.6 -From ec444ec34ecb704349dc4e82417a8014e4252e3c Mon Sep 17 00:00:00 2001 +From 7cd90575e2e7ba0cba25f8882828a03eedd3fa9a Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 21 Jun 2012 17:26:51 +0200 -Subject: [PATCH 054/123] X11: fix video calibrations +Subject: [PATCH 035/110] X11: fix video calibrations --- xbmc/windowing/WinSystem.h | 1 + @@ -18695,7 +11638,7 @@ Subject: [PATCH 054/123] X11: fix video calibrations 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/xbmc/windowing/WinSystem.h b/xbmc/windowing/WinSystem.h -index f1a9d6f..7a812b2 100644 +index fc467f1..608b1e1 100644 --- a/xbmc/windowing/WinSystem.h +++ b/xbmc/windowing/WinSystem.h @@ -103,6 +103,7 @@ class CWinSystemBase @@ -18707,7 +11650,7 @@ index f1a9d6f..7a812b2 100644 // text input interface virtual void EnableTextInput(bool bEnable) {} diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 8f56cec..0ead0e8 100644 +index dce0433..e7f4f61 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -318,7 +318,7 @@ void CWinSystemX11::UpdateResolutions() @@ -18763,7 +11706,7 @@ index 8f56cec..0ead0e8 100644 void CWinSystemX11::GetConnectedOutputs(std::vector *outputs) diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index 2227320..630c0e2 100644 +index 05aa60e..95672d1 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -61,6 +61,7 @@ class CWinSystemX11 : public CWinSystemBase @@ -18778,10 +11721,10 @@ index 2227320..630c0e2 100644 1.8.1.6 -From d29b764e4396e21d57260832012ec8d05ca0f3f8 Mon Sep 17 00:00:00 2001 +From 53d7b5b81553e08dd98c6bd8b7fa47b2407e3eb6 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 12:00:26 +0200 -Subject: [PATCH 055/123] X11: deactivate screen saver on startup +Subject: [PATCH 036/110] X11: deactivate screen saver on startup --- xbmc/windowing/X11/WinSystemX11.cpp | 29 +++++++++++++++++++++++++++++ @@ -18789,7 +11732,7 @@ Subject: [PATCH 055/123] X11: deactivate screen saver on startup 2 files changed, 30 insertions(+) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 0ead0e8..c643177 100644 +index e7f4f61..14a4307 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -519,6 +519,33 @@ void CWinSystemX11::ResetOSScreensaver() @@ -18836,7 +11779,7 @@ index 0ead0e8..c643177 100644 { GLX_RGBA, diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index 630c0e2..f78f613 100644 +index 95672d1..51ac314 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -51,6 +51,7 @@ class CWinSystemX11 : public CWinSystemBase @@ -18851,17 +11794,17 @@ index 630c0e2..f78f613 100644 1.8.1.6 -From 8fc2d01d984fa1dcba0b6a135d085f70e02516f8 Mon Sep 17 00:00:00 2001 +From b5864a4dc3b1c84fddb4d9f2bbaf51fc365c51af Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 12:10:09 +0200 -Subject: [PATCH 056/123] X11: change method of going full-screen +Subject: [PATCH 037/110] X11: change method of going full-screen --- xbmc/windowing/X11/WinSystemX11.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index c643177..e1e1096 100644 +index 14a4307..66b91fd 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -36,6 +36,7 @@ @@ -18898,10 +11841,10 @@ index c643177..e1e1096 100644 1.8.1.6 -From c0ef76639af991ea31bd9188c431692f3a3c526d Mon Sep 17 00:00:00 2001 +From c815c5039786c0edfb5a008346f6400be5e8ec29 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 28 Jun 2012 19:12:39 +0200 -Subject: [PATCH 057/123] X11: reset key repeat and key modifier on focus lost +Subject: [PATCH 038/110] X11: reset key repeat and key modifier on focus lost and gain --- @@ -18933,10 +11876,10 @@ index c58067b..c9f8a20 100644 1.8.1.6 -From c7a3b7a4ce52000bbdb260e9f2142297bb531617 Mon Sep 17 00:00:00 2001 +From 18d3da75416f79bb9482c79d00a8449105690bea Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 5 Jul 2012 14:18:46 +0200 -Subject: [PATCH 058/123] X11: replace custom utf8 to unicode with charset +Subject: [PATCH 039/110] X11: replace custom utf8 to unicode with charset convertor (squash to x11 events) --- @@ -19153,10 +12096,10 @@ index 6100933..72955ad 100644 1.8.1.6 -From b99781ba1c13380f8c98414fd2b0e7735da27046 Mon Sep 17 00:00:00 2001 +From 7de91f91cb2686e468206bd646d303ce65fe8b98 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 5 Jul 2012 14:23:54 +0200 -Subject: [PATCH 059/123] X11: fixed invalid usage of sizeof() (squash into x11 +Subject: [PATCH 040/110] X11: fixed invalid usage of sizeof() (squash into x11 changes) --- @@ -19220,17 +12163,17 @@ index 72955ad..102a076 100644 1.8.1.6 -From b279aabe373a8a7e2bfc65e2a7f5c9f539b2d86e Mon Sep 17 00:00:00 2001 +From 81b0fe7a671d9c366eae577e4be00f52d3d9c435 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 9 Jun 2012 18:23:53 +0200 -Subject: [PATCH 060/123] add missing keys to xbmc keytable +Subject: [PATCH 041/110] add missing keys to xbmc keytable --- xbmc/input/XBMC_keytable.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xbmc/input/XBMC_keytable.cpp b/xbmc/input/XBMC_keytable.cpp -index f18e9b1..066cd77 100644 +index b430f55..246164b 100644 --- a/xbmc/input/XBMC_keytable.cpp +++ b/xbmc/input/XBMC_keytable.cpp @@ -179,6 +179,8 @@ @@ -19246,17 +12189,17 @@ index f18e9b1..066cd77 100644 1.8.1.6 -From 156e9d1e3b67b4444366009b19b47410fd4ee60a Mon Sep 17 00:00:00 2001 +From a610a6c24039fb885956894fbcfd19b3b35df3db Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 16 Mar 2012 15:57:51 +0100 -Subject: [PATCH 061/123] videorefclock: temp deactivate of nv settings +Subject: [PATCH 042/110] videorefclock: temp deactivate of nv settings --- xbmc/video/VideoReferenceClock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/video/VideoReferenceClock.cpp b/xbmc/video/VideoReferenceClock.cpp -index 4287e8f..21f59b8 100644 +index 3bd8133..59f924c 100644 --- a/xbmc/video/VideoReferenceClock.cpp +++ b/xbmc/video/VideoReferenceClock.cpp @@ -135,7 +135,7 @@ @@ -19272,17 +12215,17 @@ index 4287e8f..21f59b8 100644 1.8.1.6 -From 0a143d6a5ea9581125f476c892ab9deb93730d4b Mon Sep 17 00:00:00 2001 +From 1492ea88c9b9659d8e0345fd8d18580cb9ceb259 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 20 Aug 2012 09:09:09 +0200 -Subject: [PATCH 062/123] videorefclock: ask graphics context for refresh rate +Subject: [PATCH 043/110] videorefclock: ask graphics context for refresh rate --- xbmc/video/VideoReferenceClock.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xbmc/video/VideoReferenceClock.cpp b/xbmc/video/VideoReferenceClock.cpp -index 21f59b8..0156b2c 100644 +index 59f924c..2f8bc69 100644 --- a/xbmc/video/VideoReferenceClock.cpp +++ b/xbmc/video/VideoReferenceClock.cpp @@ -30,6 +30,7 @@ @@ -19306,10 +12249,10 @@ index 21f59b8..0156b2c 100644 1.8.1.6 -From 224633df916fd15c03b9042ce8ac4d23912ce4cc Mon Sep 17 00:00:00 2001 +From df1cfeff10a2e8e766925da2f60bf06f635da404 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 9 Jul 2012 14:00:18 +0200 -Subject: [PATCH 063/123] X11: fix icon texture after +Subject: [PATCH 044/110] X11: fix icon texture after cc5ed3c2474084ebc0373a3046410e6f766e03f4 --- @@ -19317,7 +12260,7 @@ Subject: [PATCH 063/123] X11: fix icon texture after 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index e1e1096..ace57ff 100644 +index 66b91fd..b00eddc 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -872,22 +872,24 @@ bool CWinSystemX11::SetWindow(int width, int height, bool fullscreen, const CStd @@ -19417,10 +12360,10 @@ index e1e1096..ace57ff 100644 1.8.1.6 -From e5eac0a49cf2bf417683ea22d185424473b846b8 Mon Sep 17 00:00:00 2001 +From 33a8571e84fb01fd33a6cb3ae72b6feaf23d6776 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 10 Jul 2012 11:14:12 +0200 -Subject: [PATCH 064/123] X11: check for window manager +Subject: [PATCH 045/110] X11: check for window manager --- xbmc/windowing/X11/WinSystemX11.cpp | 74 ++++++++++++++++++++++++++++++++++++- @@ -19428,7 +12371,7 @@ Subject: [PATCH 064/123] X11: check for window manager 2 files changed, 73 insertions(+), 2 deletions(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index ace57ff..188864b 100644 +index b00eddc..05279ad 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -814,8 +814,10 @@ bool CWinSystemX11::SetWindow(int width, int height, bool fullscreen, const CStd @@ -19526,7 +12469,7 @@ index ace57ff..188864b 100644 + #endif diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index f78f613..f479c27 100644 +index 51ac314..ce3c289 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -101,6 +101,7 @@ class CWinSystemX11 : public CWinSystemBase @@ -19541,17 +12484,17 @@ index f78f613..f479c27 100644 1.8.1.6 -From 1e0e335c33da59271313f587d14bec4fcda1db15 Mon Sep 17 00:00:00 2001 +From 12c401980ef933b8f8c1cba6b7eee11118ca48d3 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 12 Jul 2012 11:11:47 +0200 -Subject: [PATCH 065/123] X11: dont set window on xrandr if no mode available +Subject: [PATCH 046/110] X11: dont set window on xrandr if no mode available --- xbmc/windowing/X11/WinSystemX11.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 188864b..076ed82 100644 +index 05279ad..9697cbb 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -663,16 +663,17 @@ void CWinSystemX11::NotifyXRREvent() @@ -19581,17 +12524,17 @@ index 188864b..076ed82 100644 1.8.1.6 -From 8a637a5c920ad2491e1f45c36ada25fd675fe8e3 Mon Sep 17 00:00:00 2001 +From ca53c5cdd2b3b9067f750cd47f1789e00f1436c6 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 26 Jul 2012 09:34:28 +0200 -Subject: [PATCH 066/123] X11: fix crash after a resolution change on startup +Subject: [PATCH 047/110] X11: fix crash after a resolution change on startup --- xbmc/windowing/X11/WinSystemX11.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 076ed82..ee339d9 100644 +index 9697cbb..868071c 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -221,7 +221,8 @@ bool CWinSystemX11::SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool bl @@ -19608,17 +12551,17 @@ index 076ed82..ee339d9 100644 1.8.1.6 -From 6fdb9269d58e784b1ffe846707732faadf505974 Mon Sep 17 00:00:00 2001 +From a2a2730899584fdfe5c8eb9888076941cb9502e8 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 15 Sep 2012 18:27:29 +0200 -Subject: [PATCH 067/123] X11: lock graphics context in NotifyXRREvent +Subject: [PATCH 048/110] X11: lock graphics context in NotifyXRREvent --- xbmc/windowing/X11/WinSystemX11.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index ee339d9..d2dcccd 100644 +index 868071c..9ff947c 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -664,6 +664,8 @@ void CWinSystemX11::NotifyXRREvent() @@ -19634,10 +12577,10 @@ index ee339d9..d2dcccd 100644 1.8.1.6 -From cf823969dd79b155ccf6e797312ec447da8c80a9 Mon Sep 17 00:00:00 2001 +From 8b0a7d7533a3b77e5673b31f5b0493aeb0718b0a Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sat, 8 Oct 2011 16:45:13 +0200 -Subject: [PATCH 068/123] ffmpeg: add xvba hwaccel +Subject: [PATCH 049/110] ffmpeg: add xvba hwaccel --- lib/ffmpeg/configure | 11 ++ @@ -19809,7 +12752,7 @@ index 584446f..7a8f61c 100644 /* video codecs */ REGISTER_ENCODER(A64MULTI, a64multi); diff --git a/lib/ffmpeg/libavcodec/h264.c b/lib/ffmpeg/libavcodec/h264.c -index 937ad7a..299039f 100644 +index 85f2372..02d0a26 100644 --- a/lib/ffmpeg/libavcodec/h264.c +++ b/lib/ffmpeg/libavcodec/h264.c @@ -81,6 +81,9 @@ @@ -20486,33 +13429,33 @@ index 1c00ac4..6437e29 100644 1.8.1.6 -From 93c92af6eceb08981a57ddd5b082118cffeb81ba Mon Sep 17 00:00:00 2001 +From 6e42c0d587b54da3ea6af2afab48f8b5d50457c8 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 12 Apr 2012 12:09:31 +0200 -Subject: [PATCH 069/123] xvba: add decoder +Subject: [PATCH 050/110] xvba: add decoder --- configure.in | 47 + - language/English/strings.po | 12 +- + language/English/strings.po | 13 +- system/settings/settings.xml | 5 + - xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 216 +- + xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 218 +- xbmc/cores/VideoRenderers/LinuxRendererGL.h | 15 +- xbmc/cores/VideoRenderers/RenderFormats.h | 1 + - xbmc/cores/VideoRenderers/RenderManager.cpp | 4 + + xbmc/cores/VideoRenderers/RenderManager.cpp | 8 +- .../dvdplayer/DVDCodecs/Video/DVDVideoCodec.h | 4 + .../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 16 + - xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in | 3 + + xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in | 4 + xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.cpp | 2367 ++++++++++++++++++++ xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.h | 383 ++++ xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 1 + xbmc/settings/VideoSettings.h | 2 + xbmc/video/dialogs/GUIDialogVideoSettings.cpp | 1 + - 15 files changed, 3070 insertions(+), 7 deletions(-) + 15 files changed, 3076 insertions(+), 9 deletions(-) create mode 100644 xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.cpp create mode 100644 xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.h diff --git a/configure.in b/configure.in -index bd2934d..94f6455 100644 +index d63d13d..e145d43 100644 --- a/configure.in +++ b/configure.in @@ -143,6 +143,8 @@ vaapi_not_found="== Could not find libva. VAAPI support disabled. ==" @@ -20575,7 +13518,7 @@ index bd2934d..94f6455 100644 # VTBDecoder if test "x$use_vtbdecoder" != "xno"; then if test "$host_vendor" = "apple" ; then -@@ -1977,6 +2016,12 @@ else +@@ -1982,6 +2021,12 @@ else final_message="$final_message\n CrystalHD:\tNo" fi @@ -20588,7 +13531,7 @@ index bd2934d..94f6455 100644 if test "x$use_vtbdecoder" != "xno"; then final_message="$final_message\n VTBDecoder:\tYes" else -@@ -2447,6 +2492,7 @@ AC_SUBST(USE_OPENGLES) +@@ -2452,6 +2497,7 @@ AC_SUBST(USE_OPENGLES) AC_SUBST(USE_VDPAU) AC_SUBST(USE_VAAPI) AC_SUBST(USE_CRYSTALHD) @@ -20596,7 +13539,7 @@ index bd2934d..94f6455 100644 AC_SUBST(USE_LIBSMBCLIENT) AC_SUBST(USE_LIBNFS) AC_SUBST(USE_LIBAFPCLIENT) -@@ -2631,6 +2677,7 @@ XB_CONFIG_MODULE([lib/ffmpeg], [ +@@ -2636,6 +2682,7 @@ XB_CONFIG_MODULE([lib/ffmpeg], [ `if test "x$use_vdpau" != "xno"; then echo --enable-vdpau; else echo --disable-vdpau; fi` \ `if test "x$use_vaapi" != "xno"; then echo --enable-vaapi; else echo --disable-vaapi; fi` \ `if test "$use_optimizations" != "no"; then echo --enable-optimizations; else echo --disable-optimizations; fi` \ @@ -20605,23 +13548,24 @@ index bd2934d..94f6455 100644 --enable-pthreads \ --enable-runtime-cpudetect \ diff --git a/language/English/strings.po b/language/English/strings.po -index 10568ca..d603702 100644 +index ce56914..fc1f5ec4d 100644 --- a/language/English/strings.po +++ b/language/English/strings.po -@@ -5773,7 +5773,11 @@ msgctxt "#13436" +@@ -5782,7 +5782,12 @@ msgctxt "#13437" msgid "Prefer VDPAU Video Mixer" msgstr "" --#empty strings from id 13437 to 13499 -+msgctxt "#13437" +-#empty strings from id 13438 to 13499 ++#: system/settings/settings.xml ++msgctxt "#13438" +msgid "Allow hardware acceleration (XVBA)" +msgstr "" + -+#empty strings from id 13438 to 13499 ++#empty strings from id 13439 to 13499 #: system/settings/settings.xml msgctxt "#13500" -@@ -6851,7 +6855,11 @@ msgctxt "#16325" +@@ -6860,7 +6865,11 @@ msgctxt "#16325" msgid "VDPAU - Bob" msgstr "" @@ -20635,23 +13579,23 @@ index 10568ca..d603702 100644 msgctxt "#16400" msgid "Post-processing" diff --git a/system/settings/settings.xml b/system/settings/settings.xml -index 9c63476..a863dae 100644 +index f99ba9c..ac87a69 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -410,6 +410,11 @@ 2 true -+ ++ + HAVE_LIBXVBA + 2 + true -+ - - HAS_GL - 4 ++ + + HAVE_LIBSTAGEFRIGHTDECODER + 2 diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -index 3d9f22a..c663423 100644 +index 6807df7..b2beb2e 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp @@ -65,6 +65,9 @@ @@ -20674,7 +13618,14 @@ index 3d9f22a..c663423 100644 } CLinuxRendererGL::YUVBUFFER::~YUVBUFFER() -@@ -604,6 +610,9 @@ void CLinuxRendererGL::ReleaseBuffer(int idx) +@@ -621,12 +627,15 @@ void CLinuxRendererGL::Flush() + + void CLinuxRendererGL::ReleaseBuffer(int idx) + { +-#if defined(HAVE_LIBVDPAU) || defined(HAVE_LIBVA) || defined(TARGET_DARWIN) ++#if defined(HAVE_LIBVDPAU) || defined(HAVE_LIBVA) || defined(TARGET_DARWIN) || defined(HAVE_LIBXVBA) + YUVBUFFER &buf = m_buffers[idx]; + #endif #ifdef HAVE_LIBVDPAU SAFE_RELEASE(buf.vdpau); #endif @@ -20684,7 +13635,7 @@ index 3d9f22a..c663423 100644 #ifdef HAVE_LIBVA buf.vaapi.surface.reset(); #endif -@@ -869,7 +878,7 @@ void CLinuxRendererGL::UpdateVideoFilter() +@@ -892,7 +901,7 @@ void CLinuxRendererGL::UpdateVideoFilter() case VS_SCALINGMETHOD_LINEAR: SetTextureFilter(m_scalingMethod == VS_SCALINGMETHOD_NEAREST ? GL_NEAREST : GL_LINEAR); m_renderQuality = RQ_SINGLEPASS; @@ -20693,7 +13644,7 @@ index 3d9f22a..c663423 100644 { m_pVideoFilterShader = new StretchFilterShader(); if (!m_pVideoFilterShader->CompileAndLink()) -@@ -955,6 +964,11 @@ void CLinuxRendererGL::LoadShaders(int field) +@@ -978,6 +987,11 @@ void CLinuxRendererGL::LoadShaders(int field) CLog::Log(LOGNOTICE, "GL: Using CVBREF render method"); m_renderMethod = RENDER_CVREF; } @@ -20705,7 +13656,7 @@ index 3d9f22a..c663423 100644 else { int requestedMethod = CSettings::Get().GetInt("videoplayer.rendermethod"); -@@ -1103,6 +1117,12 @@ void CLinuxRendererGL::LoadShaders(int field) +@@ -1126,6 +1140,12 @@ void CLinuxRendererGL::LoadShaders(int field) m_textureCreate = &CLinuxRendererGL::CreateCVRefTexture; m_textureDelete = &CLinuxRendererGL::DeleteCVRefTexture; } @@ -20718,7 +13669,7 @@ index 3d9f22a..c663423 100644 else { // setup default YV12 texture handlers -@@ -1215,6 +1235,13 @@ void CLinuxRendererGL::Render(DWORD flags, int renderBuffer) +@@ -1238,6 +1258,13 @@ void CLinuxRendererGL::Render(DWORD flags, int renderBuffer) RenderVAAPI(renderBuffer, m_currentField); } #endif @@ -20732,7 +13683,7 @@ index 3d9f22a..c663423 100644 else { // RENDER_CVREF uses the same render as the default case -@@ -1731,6 +1758,77 @@ void CLinuxRendererGL::RenderVAAPI(int index, int field) +@@ -1762,6 +1789,77 @@ void CLinuxRendererGL::RenderVAAPI(int index, int field) #endif } @@ -20784,17 +13735,17 @@ index 3d9f22a..c663423 100644 + glBegin(GL_QUADS); + if (m_textureTarget==GL_TEXTURE_2D) + { -+ glTexCoord2f(plane.rect.x1, plane.rect.y1); glVertex2f(m_destRect.x1, m_destRect.y1); -+ glTexCoord2f(plane.rect.x2, plane.rect.y1); glVertex2f(m_destRect.x2, m_destRect.y1); -+ glTexCoord2f(plane.rect.x2, plane.rect.y2); glVertex2f(m_destRect.x2, m_destRect.y2); -+ glTexCoord2f(plane.rect.x1, plane.rect.y2); glVertex2f(m_destRect.x1, m_destRect.y2); ++ glTexCoord2f(plane.rect.x1, plane.rect.y1); glVertex2f(m_rotatedDestCoords[0].x, m_rotatedDestCoords[0].y); ++ glTexCoord2f(plane.rect.x2, plane.rect.y1); glVertex2f(m_rotatedDestCoords[1].x, m_rotatedDestCoords[1].y); ++ glTexCoord2f(plane.rect.x2, plane.rect.y2); glVertex2f(m_rotatedDestCoords[2].x, m_rotatedDestCoords[2].y); ++ glTexCoord2f(plane.rect.x1, plane.rect.y2); glVertex2f(m_rotatedDestCoords[3].x, m_rotatedDestCoords[3].y); + } + else + { -+ glTexCoord2f(m_destRect.x1, m_destRect.y1); glVertex4f(m_destRect.x1, m_destRect.y1, 0.0f, 0.0f); -+ glTexCoord2f(m_destRect.x2, m_destRect.y1); glVertex4f(m_destRect.x2, m_destRect.y1, 1.0f, 0.0f); -+ glTexCoord2f(m_destRect.x2, m_destRect.y2); glVertex4f(m_destRect.x2, m_destRect.y2, 1.0f, 1.0f); -+ glTexCoord2f(m_destRect.x1, m_destRect.y2); glVertex4f(m_destRect.x1, m_destRect.y2, 0.0f, 1.0f); ++ glTexCoord2f(m_rotatedDestCoords[0].x, m_rotatedDestCoords[0].y); glVertex4f(m_rotatedDestCoords[0].x, m_rotatedDestCoords[0].y, 0.0f, 0.0f); ++ glTexCoord2f(m_rotatedDestCoords[1].x, m_rotatedDestCoords[1].y); glVertex4f(m_rotatedDestCoords[1].x, m_rotatedDestCoords[1].y, 1.0f, 0.0f); ++ glTexCoord2f(m_rotatedDestCoords[2].x, m_rotatedDestCoords[2].y); glVertex4f(m_rotatedDestCoords[2].x, m_rotatedDestCoords[2].y, 1.0f, 1.0f); ++ glTexCoord2f(m_rotatedDestCoords[3].x, m_rotatedDestCoords[3].y); glVertex4f(m_rotatedDestCoords[3].x, m_rotatedDestCoords[3].y, 0.0f, 1.0f); + } + glEnd(); + VerifyGLState(); @@ -20810,7 +13761,7 @@ index 3d9f22a..c663423 100644 void CLinuxRendererGL::RenderSoftware(int index, int field) { // used for textues uploaded from rgba or CVPixelBuffers. -@@ -2764,6 +2862,88 @@ bool CLinuxRendererGL::CreateCVRefTexture(int index) +@@ -2820,6 +2918,88 @@ bool CLinuxRendererGL::CreateCVRefTexture(int index) return true; } @@ -20899,7 +13850,7 @@ index 3d9f22a..c663423 100644 void CLinuxRendererGL::UploadYUV422PackedTexture(int source) { YUVBUFFER& buf = m_buffers[source]; -@@ -3338,6 +3518,9 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature) +@@ -3394,6 +3574,9 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature) if (m_renderMethod & RENDER_VAAPI) return false; @@ -20909,7 +13860,7 @@ index 3d9f22a..c663423 100644 return (m_renderMethod & RENDER_GLSL) || (m_renderMethod & RENDER_ARB) || ((m_renderMethod & RENDER_SW) && glewIsSupported("GL_ARB_imaging") == GL_TRUE); -@@ -3351,6 +3534,9 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature) +@@ -3407,6 +3590,9 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature) if (m_renderMethod & RENDER_VAAPI) return false; @@ -20919,7 +13870,7 @@ index 3d9f22a..c663423 100644 return (m_renderMethod & RENDER_GLSL) || (m_renderMethod & RENDER_ARB) || ((m_renderMethod & RENDER_SW) && glewIsSupported("GL_ARB_imaging") == GL_TRUE); -@@ -3374,7 +3560,8 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature) +@@ -3430,7 +3616,8 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature) if (feature == RENDERFEATURE_NONLINSTRETCH) { if (((m_renderMethod & RENDER_GLSL) && !(m_renderMethod & RENDER_POT)) || @@ -20929,7 +13880,7 @@ index 3d9f22a..c663423 100644 return true; } -@@ -3446,6 +3633,16 @@ bool CLinuxRendererGL::Supports(EINTERLACEMETHOD method) +@@ -3502,6 +3689,16 @@ bool CLinuxRendererGL::Supports(EINTERLACEMETHOD method) return false; } @@ -20946,7 +13897,7 @@ index 3d9f22a..c663423 100644 #ifdef TARGET_DARWIN // YADIF too slow for HD but we have no methods to fall back // to something that works so just turn it off. -@@ -3495,7 +3692,7 @@ bool CLinuxRendererGL::Supports(ESCALINGMETHOD method) +@@ -3551,7 +3748,7 @@ bool CLinuxRendererGL::Supports(ESCALINGMETHOD method) return false; if ((glewIsSupported("GL_EXT_framebuffer_object") && (m_renderMethod & RENDER_GLSL)) || @@ -20955,7 +13906,7 @@ index 3d9f22a..c663423 100644 { // spline36 and lanczos3 are only allowed through advancedsettings.xml if(method != VS_SCALINGMETHOD_SPLINE36 -@@ -3562,7 +3759,8 @@ unsigned int CLinuxRendererGL::GetProcessorSize() +@@ -3618,7 +3815,8 @@ unsigned int CLinuxRendererGL::GetProcessorSize() if(m_format == RENDER_FMT_VDPAU || m_format == RENDER_FMT_VDPAU_420 || m_format == RENDER_FMT_VAAPI @@ -20965,7 +13916,7 @@ index 3d9f22a..c663423 100644 return 1; else return 0; -@@ -3618,4 +3816,14 @@ void CLinuxRendererGL::AddProcessor(struct __CVBuffer *cvBufferRef, int index) +@@ -3674,4 +3872,14 @@ void CLinuxRendererGL::AddProcessor(struct __CVBuffer *cvBufferRef, int index) } #endif @@ -20981,7 +13932,7 @@ index 3d9f22a..c663423 100644 + #endif diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.h b/xbmc/cores/VideoRenderers/LinuxRendererGL.h -index 4494eca..161c43f 100644 +index 258a598..6fa1dbc 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.h +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.h @@ -44,6 +44,8 @@ @@ -21042,34 +13993,42 @@ index 4494eca..161c43f 100644 typedef YUVBUFFER YUVBUFFERS[NUM_BUFFERS]; diff --git a/xbmc/cores/VideoRenderers/RenderFormats.h b/xbmc/cores/VideoRenderers/RenderFormats.h -index 6ed62be..70ae9bf 100644 +index 3b09194..b193c24 100644 --- a/xbmc/cores/VideoRenderers/RenderFormats.h +++ b/xbmc/cores/VideoRenderers/RenderFormats.h -@@ -35,6 +35,7 @@ enum ERenderFormat { - RENDER_FMT_OMXEGL, +@@ -36,6 +36,7 @@ enum ERenderFormat { RENDER_FMT_CVBREF, RENDER_FMT_BYPASS, + RENDER_FMT_EGLIMG, + RENDER_FMT_XVBA, }; #endif diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp -index a59ee4d..f94760c 100644 +index a1c2fc7..5056100 100644 --- a/xbmc/cores/VideoRenderers/RenderManager.cpp +++ b/xbmc/cores/VideoRenderers/RenderManager.cpp -@@ -941,6 +941,10 @@ int CXBMCRenderManager::AddVideoPicture(DVDVideoPicture& pic) +@@ -941,11 +941,17 @@ int CXBMCRenderManager::AddVideoPicture(DVDVideoPicture& pic) else if(pic.format == RENDER_FMT_VAAPI) m_pRenderer->AddProcessor(*pic.vaapi, index); #endif +-#ifdef HAS_LIBSTAGEFRIGHT ++ ++ #ifdef HAS_LIBSTAGEFRIGHT + else if(pic.format == RENDER_FMT_EGLIMG) + m_pRenderer->AddProcessor(pic.stf, pic.eglimg, index); + #endif + +#ifdef HAVE_LIBXVBA + else if(pic.format == RENDER_FMT_XVBA) + m_pRenderer->AddProcessor(pic.xvba, index); +#endif ++ m_pRenderer->ReleaseImage(index, false); return index; diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h -index 13a2648..347f09b 100644 +index 0dd29c3..b346d26 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h @@ -35,6 +35,7 @@ @@ -21080,7 +14039,7 @@ index 13a2648..347f09b 100644 class COpenMax; class COpenMaxVideo; struct OpenMaxVideoBuffer; -@@ -60,6 +61,9 @@ struct DVDVideoPicture +@@ -62,6 +63,9 @@ struct DVDVideoPicture struct { VAAPI::CHolder* vaapi; }; @@ -21091,7 +14050,7 @@ index 13a2648..347f09b 100644 struct { COpenMax *openMax; diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp -index ec93844..9d4a6b4 100644 +index aa2d1e4..cd48f4e 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp @@ -60,6 +60,9 @@ @@ -21125,19 +14084,20 @@ index ec93844..9d4a6b4 100644 // mpeg4 vaapi decoding is disabled if(*cur == PIX_FMT_VAAPI_VLD && CSettings::Get().GetBool("videoplayer.usevaapi") diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in b/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in -index 979e3ce..cacc876 100644 +index 86b0a89..7bc4065 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in -@@ -22,6 +22,9 @@ SRCS += OpenMax.cpp - SRCS += OpenMaxVideo.cpp - SRCS += DVDVideoCodecOpenMax.cpp +@@ -34,6 +34,10 @@ INCLUDES += -I${prefix}/opt/android-source/system/core/include + INCLUDES += -I${prefix}/opt/android-source/libhardware/include endif + +ifeq (@USE_XVBA@,1) +SRCS += XVBA.cpp +endif - ++ ifeq (@USE_LIBAMCODEC@,1) SRCS += AMLCodec.cpp + SRCS += DVDVideoCodecAmlogic.cpp diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.cpp new file mode 100644 index 0000000..43a331f @@ -23901,19 +16861,19 @@ index 0000000..3bd0cea + +} diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 1a17145..41e64a5 100644 +index 21d023e..f35419f 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -1017,6 +1017,7 @@ static std::string GetRenderFormatName(ERenderFormat format) - case RENDER_FMT_OMXEGL: return "OMXEGL"; +@@ -1019,6 +1019,7 @@ static std::string GetRenderFormatName(ERenderFormat format) case RENDER_FMT_CVBREF: return "BGRA"; + case RENDER_FMT_EGLIMG: return "EGLIMG"; case RENDER_FMT_BYPASS: return "BYPASS"; + case RENDER_FMT_XVBA: return "XVBA"; case RENDER_FMT_NONE: return "NONE"; } return "UNKNOWN"; diff --git a/xbmc/settings/VideoSettings.h b/xbmc/settings/VideoSettings.h -index b7c4116..a370bd8 100644 +index 293f363..3db70fb 100644 --- a/xbmc/settings/VideoSettings.h +++ b/xbmc/settings/VideoSettings.h @@ -63,6 +63,8 @@ enum EINTERLACEMETHOD @@ -23926,10 +16886,10 @@ index b7c4116..a370bd8 100644 }; diff --git a/xbmc/video/dialogs/GUIDialogVideoSettings.cpp b/xbmc/video/dialogs/GUIDialogVideoSettings.cpp -index 27ed5ee..007ad74 100644 +index 8f30248..db58075 100644 --- a/xbmc/video/dialogs/GUIDialogVideoSettings.cpp +++ b/xbmc/video/dialogs/GUIDialogVideoSettings.cpp -@@ -111,6 +111,7 @@ void CGUIDialogVideoSettings::CreateSettings() +@@ -115,6 +115,7 @@ void CGUIDialogVideoSettings::CreateSettings() entries.push_back(make_pair(VS_INTERLACEMETHOD_DXVA_BOB , 16320)); entries.push_back(make_pair(VS_INTERLACEMETHOD_DXVA_BEST , 16321)); entries.push_back(make_pair(VS_INTERLACEMETHOD_AUTO_ION , 16325)); @@ -23941,10 +16901,10 @@ index 27ed5ee..007ad74 100644 1.8.1.6 -From a1d6b330e8316cb52b0b9f97c3be92269760a878 Mon Sep 17 00:00:00 2001 +From 21b33a37ba677c4b62a15cb02182b44c542b7613 Mon Sep 17 00:00:00 2001 From: fritsch Date: Sun, 4 Nov 2012 16:24:10 +0100 -Subject: [PATCH 070/123] xvba: add string for available decoders - we are +Subject: [PATCH 051/110] xvba: add string for available decoders - we are important so make sure we are there --- @@ -23952,10 +16912,10 @@ Subject: [PATCH 070/123] xvba: add string for available decoders - we are 1 file changed, 5 insertions(+) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp -index 1477264..37a5994 100644 +index ab3696e..329b6f0 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp -@@ -177,6 +177,11 @@ CDVDVideoCodec* CDVDFactoryCodec::CreateVideoCodec(CDVDStreamInfo &hint, unsigne +@@ -183,6 +183,11 @@ CDVDVideoCodec* CDVDFactoryCodec::CreateVideoCodec(CDVDStreamInfo &hint, unsigne #elif defined(TARGET_POSIX) && !defined(TARGET_DARWIN) hwSupport += "VAAPI:no "; #endif @@ -23971,17 +16931,17 @@ index 1477264..37a5994 100644 1.8.1.6 -From 033dbfbc37f33a1670357c39e6f82dd36e457ab0 Mon Sep 17 00:00:00 2001 +From 6bbda006ed9e8b2503d69908e571391fbff90532 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 16 Jun 2012 12:46:30 +0200 -Subject: [PATCH 071/123] xvba: do not use vaapi if xvba is present +Subject: [PATCH 052/110] xvba: do not use vaapi if xvba is present --- xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp -index 2343b11..f102cba 100644 +index 52b356d..6ed0fc5 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp @@ -261,6 +261,15 @@ void CDecoder::Close() @@ -24004,10 +16964,10 @@ index 2343b11..f102cba 100644 1.8.1.6 -From 4115edbecd5b2dd346f1ea727191737a5d7cfe74 Mon Sep 17 00:00:00 2001 +From c6d9d1aeaa7905066d354d6182df6da8dcee58b6 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 23 Aug 2012 19:39:49 +0200 -Subject: [PATCH 072/123] ffmpeg: add av_find_default_stream_index to interface +Subject: [PATCH 053/110] ffmpeg: add av_find_default_stream_index to interface --- lib/DllAvFormat.h | 4 ++++ @@ -24053,10 +17013,10 @@ index ee41fa8..56605cb 100644 1.8.1.6 -From 8ffb30c17bd7e2547d8f9822ea3c7ba79ddd5d85 Mon Sep 17 00:00:00 2001 +From 17456e4ad8737d27ae084dfae0045ed3eb9da577 Mon Sep 17 00:00:00 2001 From: fritsch Date: Sat, 13 Apr 2013 11:30:39 +0200 -Subject: [PATCH 073/123] XVBA: revisit draw functions +Subject: [PATCH 054/110] XVBA: revisit draw functions --- lib/ffmpeg/libavcodec/xvba_h264.c | 2 +- @@ -24093,10 +17053,10 @@ index bf3d9c2..ff35a28 100644 1.8.1.6 -From 79d420cd213211980405eaec3985973c5747ec20 Mon Sep 17 00:00:00 2001 +From 898c52bb46e3ad80cf64d7db7c60d5b2d338563b Mon Sep 17 00:00:00 2001 From: fritsch Date: Sat, 13 Apr 2013 12:06:02 +0200 -Subject: [PATCH 074/123] (ffmpeg): Make XVBA codec available +Subject: [PATCH 055/110] (ffmpeg): Make XVBA codec available --- lib/ffmpeg/libavcodec/vc1dec.c | 3 +++ @@ -24120,10 +17080,10 @@ index 2130c74..4d611f9 100644 1.8.1.6 -From ac4379b9aae918e85751a5dfcf9be58387696da8 Mon Sep 17 00:00:00 2001 +From 3b952bf28abbd43949c303b858be9a27ebf864d2 Mon Sep 17 00:00:00 2001 From: fritsch Date: Sat, 13 Apr 2013 16:38:50 +0200 -Subject: [PATCH 075/123] ffmpeg: XVBA-VC1 use v->second_field instead of +Subject: [PATCH 056/110] ffmpeg: XVBA-VC1 use v->second_field instead of !s->first_field to make VC1 interlaced working --- @@ -24147,10 +17107,10 @@ index ff35a28..04e7983 100644 1.8.1.6 -From 7f1f427783474710997c79fc53a087c1bf23537d Mon Sep 17 00:00:00 2001 +From 80e05a1fdafc66ab25364cd661f4839df4d16a1a Mon Sep 17 00:00:00 2001 From: fritsch Date: Sat, 27 Apr 2013 17:36:15 +0200 -Subject: [PATCH 076/123] XVBA: Only set second_field when we are interlaced +Subject: [PATCH 057/110] XVBA: Only set second_field when we are interlaced and an interlaced field --- @@ -24174,10 +17134,10 @@ index 04e7983..eb90c12 100644 1.8.1.6 -From b58048413f9b77a3cb6495607743ee5cb6e8b452 Mon Sep 17 00:00:00 2001 +From fdd88b6e39dd8ec7cf5899276dc583b7eb4237fd Mon Sep 17 00:00:00 2001 From: fritsch Date: Sat, 27 Apr 2013 22:08:50 +0200 -Subject: [PATCH 077/123] xvba: translate picture_structure to a value xvba +Subject: [PATCH 058/110] xvba: translate picture_structure to a value xvba understands --- @@ -24260,10 +17220,10 @@ index eb90c12..c98dba5 100644 1.8.1.6 -From 50a161f1bc214ad3383ec0c089bc4c92d8e2df4b Mon Sep 17 00:00:00 2001 +From 98b0def969e92f7c8075f8401cd2bb107b0e79b1 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 30 Apr 2013 21:18:55 +0200 -Subject: [PATCH 078/123] ffmpeg xvba: fix vc1 field interlace +Subject: [PATCH 059/110] ffmpeg xvba: fix vc1 field interlace --- lib/ffmpeg/libavcodec/xvba.c | 4 ++-- @@ -24315,10 +17275,10 @@ index c98dba5..e7a85a7 100644 1.8.1.6 -From 53256575a97d81b9fcedd1438c34323dc0b27824 Mon Sep 17 00:00:00 2001 +From a2d3dec001d3876d74a8838744050648eff45724 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 30 Apr 2013 21:19:07 +0200 -Subject: [PATCH 079/123] xvba: fix vc1 field interlace +Subject: [PATCH 060/110] xvba: fix vc1 field interlace --- xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.cpp | 3 +++ @@ -24342,10 +17302,10 @@ index 43a331f..568632f 100644 1.8.1.6 -From 66f7bfd6bdf9f765fc2a6eecfb58d69883e7a059 Mon Sep 17 00:00:00 2001 +From 0199079932e05c87a5166d190bd9f414a85eada3 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 30 Apr 2013 21:40:55 +0200 -Subject: [PATCH 080/123] xvba: vc1 - honor psf +Subject: [PATCH 061/110] xvba: vc1 - honor psf --- xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.cpp | 3 +++ @@ -24376,20 +17336,20 @@ index 568632f..1db9363 100644 1.8.1.6 -From 5b328a69f54b582ba3987cb218233bbe587e91f9 Mon Sep 17 00:00:00 2001 +From 5903b207c8fd52c5bee549612c0c35d86ebef1eb Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 4 May 2013 10:31:32 +0200 -Subject: [PATCH 081/123] xvba: squash me, settings +Subject: [PATCH 062/110] xvba: squash me, settings --- xbmc/settings/Settings.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp -index 63cdf0e..02eef76 100644 +index 1de1ac6..1174659 100644 --- a/xbmc/settings/Settings.cpp +++ b/xbmc/settings/Settings.cpp -@@ -747,6 +747,9 @@ void CSettings::InitializeConditions() +@@ -758,6 +758,9 @@ void CSettings::InitializeConditions() #ifdef HAVE_LIBVDPAU m_settingsManager->AddCondition("have_libvdpau"); #endif @@ -24403,10 +17363,10 @@ index 63cdf0e..02eef76 100644 1.8.1.6 -From 0aaeb0a6313953818000e7203d527dfee8906f83 Mon Sep 17 00:00:00 2001 +From 03a51a564d6a80f53c67d1204737bb61b3265c2f Mon Sep 17 00:00:00 2001 From: fritsch Date: Fri, 24 May 2013 12:02:02 +0200 -Subject: [PATCH 082/123] XVBA: Limit video to 2048x1152 as this is the max all +Subject: [PATCH 063/110] XVBA: Limit video to 2048x1152 as this is the max all blocks can handle --- @@ -24436,10 +17396,10 @@ index 1db9363..54d7aea 100644 1.8.1.6 -From f4f97fb0313df385610d2d3d2164cbb2f4390773 Mon Sep 17 00:00:00 2001 +From bc55f265667c12b21f24f443f434a9541d8871fc Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 20 Aug 2012 16:06:39 +0200 -Subject: [PATCH 083/123] dvdplayer: observe pts counter overflow +Subject: [PATCH 064/110] dvdplayer: observe pts counter overflow --- .../cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 198 ++++++++++++++++++++- @@ -24447,7 +17407,7 @@ Subject: [PATCH 083/123] dvdplayer: observe pts counter overflow 2 files changed, 201 insertions(+), 1 deletion(-) diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp -index 18c1c4b..0e25041 100644 +index 4e7ca89..4a21438 100644 --- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp +++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp @@ -18,7 +18,6 @@ @@ -24702,7 +17662,7 @@ index 18c1c4b..0e25041 100644 { CSingleLock lock(m_critSection); diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.h b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.h -index b78094e..17d2f7a 100644 +index aef5ab1..35abbdf 100644 --- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.h +++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.h @@ -100,6 +100,7 @@ class CDVDDemuxFFmpeg : public CDVDDemux @@ -24726,10 +17686,10 @@ index b78094e..17d2f7a 100644 1.8.1.6 -From 1936aa6817db5c98cd21a2ab7a9656f183ac9509 Mon Sep 17 00:00:00 2001 +From 1ef2e98ecd3c9f22c66c7b0abb2def18559fd114 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 2 Oct 2012 13:02:10 +0200 -Subject: [PATCH 084/123] dvdplayer: avoid short screen flicker caused by +Subject: [PATCH 065/110] dvdplayer: avoid short screen flicker caused by unnecessary reconfigure of renderer --- @@ -24737,10 +17697,10 @@ Subject: [PATCH 084/123] dvdplayer: avoid short screen flicker caused by 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 41e64a5..74b4391 100644 +index f35419f..61aa709 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -1095,7 +1095,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) +@@ -1062,7 +1062,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) || ( m_output.height != pPicture->iHeight ) || ( m_output.dwidth != pPicture->iDisplayWidth ) || ( m_output.dheight != pPicture->iDisplayHeight ) @@ -24749,7 +17709,7 @@ index 41e64a5..74b4391 100644 || ( m_output.color_format != (unsigned int)pPicture->format ) || ( m_output.extended_format != pPicture->extended_format ) || ( m_output.color_matrix != pPicture->color_matrix && pPicture->color_matrix != 0 ) // don't reconfigure on unspecified -@@ -1148,7 +1148,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) +@@ -1118,7 +1118,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) m_output.height = pPicture->iHeight; m_output.dwidth = pPicture->iDisplayWidth; m_output.dheight = pPicture->iDisplayHeight; @@ -24762,10 +17722,10 @@ index 41e64a5..74b4391 100644 1.8.1.6 -From 869811cf0359978019c5edc2277610d9a58a47e1 Mon Sep 17 00:00:00 2001 +From d54a67b705e0cb0febdb7acb7cee45b77975c2a2 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 11 Oct 2012 12:05:50 +0200 -Subject: [PATCH 085/123] vdpau: advanced settings for auto deinterlacing +Subject: [PATCH 066/110] vdpau: advanced settings for auto deinterlacing --- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 8 ++++---- @@ -24774,7 +17734,7 @@ Subject: [PATCH 085/123] vdpau: advanced settings for auto deinterlacing 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 4b4b3c3..fc4c030 100644 +index 2fdcf37..2805613 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -1800,10 +1800,10 @@ EINTERLACEMETHOD CMixer::GetDeinterlacingMethod(bool log /* = false */) @@ -24793,7 +17753,7 @@ index 4b4b3c3..fc4c030 100644 if (deint != -1) { diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp -index bd08884..a7a7233 100644 +index 8287651..79d4f90 100644 --- a/xbmc/settings/AdvancedSettings.cpp +++ b/xbmc/settings/AdvancedSettings.cpp @@ -169,6 +169,8 @@ void CAdvancedSettings::Initialize() @@ -24805,7 +17765,7 @@ index bd08884..a7a7233 100644 m_videoVDPAUtelecine = false; m_videoVDPAUdeintSkipChromaHD = false; m_DXVACheckCompatibility = false; -@@ -583,6 +585,8 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file) +@@ -601,6 +603,8 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file) XMLUtils::GetBoolean(pElement,"allowmpeg4vaapi",m_videoAllowMpeg4VAAPI); XMLUtils::GetBoolean(pElement, "disablebackgrounddeinterlace", m_videoDisableBackgroundDeinterlace); XMLUtils::GetInt(pElement, "useocclusionquery", m_videoCaptureUseOcclusionQuery, -1, 1); @@ -24815,10 +17775,10 @@ index bd08884..a7a7233 100644 XMLUtils::GetBoolean(pElement,"vdpauHDdeintSkipChroma",m_videoVDPAUdeintSkipChromaHD); diff --git a/xbmc/settings/AdvancedSettings.h b/xbmc/settings/AdvancedSettings.h -index 3a52878..3e6901b 100644 +index 310db76..830a241 100644 --- a/xbmc/settings/AdvancedSettings.h +++ b/xbmc/settings/AdvancedSettings.h -@@ -147,6 +147,8 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler +@@ -158,6 +158,8 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler int m_videoPercentSeekBackwardBig; CStdString m_videoPPFFmpegDeint; CStdString m_videoPPFFmpegPostProc; @@ -24831,10 +17791,10 @@ index 3a52878..3e6901b 100644 1.8.1.6 -From ad793502d0586581120666555f6b6d231c1b249d Mon Sep 17 00:00:00 2001 +From 46d6b77751fa93a9868bba4086250e8841d939db Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 2 Nov 2012 13:20:03 +0100 -Subject: [PATCH 086/123] player: fix rewind +Subject: [PATCH 067/110] player: fix rewind --- xbmc/cores/dvdplayer/DVDMessage.h | 5 ++++- @@ -24845,7 +17805,7 @@ Subject: [PATCH 086/123] player: fix rewind 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDMessage.h b/xbmc/cores/dvdplayer/DVDMessage.h -index 3f65ced..ad434d2 100644 +index 2ea8b8f..e8274f9 100644 --- a/xbmc/cores/dvdplayer/DVDMessage.h +++ b/xbmc/cores/dvdplayer/DVDMessage.h @@ -220,7 +220,7 @@ class CDVDMsgPlayerSetState : public CDVDMsg @@ -24882,10 +17842,10 @@ index 3f65ced..ad434d2 100644 class CDVDMsgPlayerSeekChapter : public CDVDMsg diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp -index b56423b..cdc4b95 100644 +index 1bd122b..99f0042 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp -@@ -1556,11 +1556,13 @@ void CDVDPlayer::HandlePlaySpeed() +@@ -1557,11 +1557,13 @@ void CDVDPlayer::HandlePlaySpeed() } else if (m_CurrentVideo.id >= 0 && (m_CurrentVideo.inited == true || GetPlaySpeed() < 0) // allow rewind at end of file @@ -24900,7 +17860,7 @@ index b56423b..cdc4b95 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 -@@ -1579,7 +1581,7 @@ void CDVDPlayer::HandlePlaySpeed() +@@ -1580,7 +1582,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); @@ -24909,7 +17869,7 @@ index b56423b..cdc4b95 100644 } } } -@@ -2067,7 +2069,7 @@ void CDVDPlayer::HandleMessages() +@@ -2068,7 +2070,7 @@ void CDVDPlayer::HandleMessages() else m_StateInput.dts = start; @@ -24918,7 +17878,7 @@ index b56423b..cdc4b95 100644 } else CLog::Log(LOGWARNING, "error while seeking"); -@@ -2206,9 +2208,10 @@ void CDVDPlayer::HandleMessages() +@@ -2207,9 +2209,10 @@ void CDVDPlayer::HandleMessages() double offset; offset = CDVDClock::GetAbsoluteClock() - m_State.timestamp; offset *= m_playSpeed / DVD_PLAYSPEED_NORMAL; @@ -24930,7 +17890,7 @@ index b56423b..cdc4b95 100644 m_State.timestamp = CDVDClock::GetAbsoluteClock(); } -@@ -2224,7 +2227,8 @@ void CDVDPlayer::HandleMessages() +@@ -2225,7 +2228,8 @@ void CDVDPlayer::HandleMessages() // do a seek after rewind, clock is not in sync with current pts if (m_playSpeed < 0 && speed >= 0) { @@ -24940,7 +17900,7 @@ index b56423b..cdc4b95 100644 } // if playspeed is different then DVD_PLAYSPEED_NORMAL or DVD_PLAYSPEED_PAUSE -@@ -3173,7 +3177,7 @@ bool CDVDPlayer::CloseTeletextStream(bool bWaitForBuffers) +@@ -3177,7 +3181,7 @@ bool CDVDPlayer::CloseTeletextStream(bool bWaitForBuffers) return true; } @@ -24949,7 +17909,7 @@ index b56423b..cdc4b95 100644 { double startpts; if(accurate) -@@ -3185,19 +3189,23 @@ void CDVDPlayer::FlushBuffers(bool queued, double pts, bool accurate) +@@ -3189,19 +3193,23 @@ void CDVDPlayer::FlushBuffers(bool queued, double pts, bool accurate) if(startpts != DVD_NOPTS_VALUE) startpts -= m_offset_pts; @@ -24977,7 +17937,7 @@ index b56423b..cdc4b95 100644 m_CurrentTeletext.dts = DVD_NOPTS_VALUE; m_CurrentTeletext.startpts = startpts; -@@ -3241,7 +3249,7 @@ void CDVDPlayer::FlushBuffers(bool queued, double pts, bool accurate) +@@ -3245,7 +3253,7 @@ void CDVDPlayer::FlushBuffers(bool queued, double pts, bool accurate) m_CurrentTeletext.started = false; } @@ -24987,10 +17947,10 @@ index b56423b..cdc4b95 100644 UpdatePlayState(0); diff --git a/xbmc/cores/dvdplayer/DVDPlayer.h b/xbmc/cores/dvdplayer/DVDPlayer.h -index 6da30eb..69b659b 100644 +index 237aba4d..9e54bc8 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 +@@ -303,7 +303,7 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer bool GetCachingTimes(double& play_left, double& cache_left, double& file_offset); @@ -24999,7 +17959,7 @@ index 6da30eb..69b659b 100644 void HandleMessages(); void HandlePlaySpeed(); -@@ -353,8 +353,9 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer +@@ -352,8 +352,9 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer int m_playSpeed; struct SSpeedState { @@ -25012,10 +17972,10 @@ index 6da30eb..69b659b 100644 int m_errorCount; diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 74b4391..11e0b26 100644 +index 61aa709..e668d29 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -1500,7 +1500,7 @@ double CDVDPlayerVideo::GetCurrentPts() +@@ -1471,7 +1471,7 @@ double CDVDPlayerVideo::GetCurrentPts() if( m_stalled ) iRenderPts = DVD_NOPTS_VALUE; @@ -25024,7 +17984,7 @@ index 74b4391..11e0b26 100644 iRenderPts = iRenderPts - max(0.0, iSleepTime); return iRenderPts; -@@ -1600,6 +1600,8 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts) +@@ -1571,6 +1571,8 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts) int iSkippedDeint = 0; int iBufferLevel; @@ -25034,7 +17994,7 @@ index 74b4391..11e0b26 100644 if (!m_pVideoCodec->GetCodecStats(iDecoderPts, iSkippedDeint, interlaced)) iDecoderPts = pts; diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.h b/xbmc/cores/dvdplayer/DVDPlayerVideo.h -index 3c3e007..6ae3860 100644 +index 59c7f09..65dea76 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.h +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.h @@ -50,6 +50,7 @@ class CDroppingStats @@ -25049,17 +18009,17 @@ index 3c3e007..6ae3860 100644 1.8.1.6 -From 13a147ecc9caadc5933691d90af691b4878303f1 Mon Sep 17 00:00:00 2001 +From 9dd0b7d5f46e62f4868f414a599bc8c7bbc7a8b8 Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 23 Nov 2012 17:41:12 +0100 -Subject: [PATCH 087/123] xrandr: fix query for multiple screens +Subject: [PATCH 068/110] xrandr: fix query for multiple screens --- xbmc/windowing/X11/XRandR.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xbmc/windowing/X11/XRandR.cpp b/xbmc/windowing/X11/XRandR.cpp -index 97b1e32..a3d3543 100644 +index 9e181f2..ce0a02b 100644 --- a/xbmc/windowing/X11/XRandR.cpp +++ b/xbmc/windowing/X11/XRandR.cpp @@ -57,12 +57,14 @@ bool CXRandR::Query(bool force) @@ -25093,10 +18053,10 @@ index 97b1e32..a3d3543 100644 1.8.1.6 -From 0925b7658bf2ed75cea29963c2a535e7829e5b1a Mon Sep 17 00:00:00 2001 +From 8e619e069765d3ee80e17c92d5e4f9ef395046ee Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 2 Dec 2012 15:46:55 +0100 -Subject: [PATCH 088/123] X11: add debug log to print out refresh after xrr +Subject: [PATCH 069/110] X11: add debug log to print out refresh after xrr event --- @@ -25104,7 +18064,7 @@ Subject: [PATCH 088/123] X11: add debug log to print out refresh after xrr 1 file changed, 6 insertions(+) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index d2dcccd..7403785 100644 +index 9ff947c..a3394e6 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -683,6 +683,12 @@ void CWinSystemX11::NotifyXRREvent() @@ -25124,10 +18084,10 @@ index d2dcccd..7403785 100644 1.8.1.6 -From 9f1759a1b344dbc1b038ce14336381de5dc9dbc1 Mon Sep 17 00:00:00 2001 +From e9039e88331e391396b445120472b15f8e782cb3 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 11 Dec 2012 11:08:13 +0100 -Subject: [PATCH 089/123] X11: dont call XCloseDisplay on shutdown, it crashes +Subject: [PATCH 070/110] X11: dont call XCloseDisplay on shutdown, it crashes when powered doen by cec on ATI --- @@ -25135,7 +18095,7 @@ Subject: [PATCH 089/123] X11: dont call XCloseDisplay on shutdown, it crashes 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 7403785..0e39867 100644 +index a3394e6..b941c14 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -110,7 +110,8 @@ bool CWinSystemX11::DestroyWindowSystem() @@ -25152,17 +18112,17 @@ index 7403785..0e39867 100644 1.8.1.6 -From 6e7a31afeb0107b9636ffb0790ce348ef50cad5e Mon Sep 17 00:00:00 2001 +From 1e2b5a08eac009b3972c62c58a7f9ed92ce827a0 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 090/123] x11: support for multiple x screens +Subject: [PATCH 071/110] x11: support for multiple x screens --- xbmc/windowing/X11/XRandR.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/windowing/X11/XRandR.cpp b/xbmc/windowing/X11/XRandR.cpp -index a3d3543..8846bc6 100644 +index ce0a02b..aa27d2b 100644 --- a/xbmc/windowing/X11/XRandR.cpp +++ b/xbmc/windowing/X11/XRandR.cpp @@ -92,7 +92,7 @@ bool CXRandR::Query(bool force, int screennum) @@ -25178,10 +18138,10 @@ index a3d3543..8846bc6 100644 1.8.1.6 -From 7876a7ae280e920cf6978e4afa48f4ebdedc3910 Mon Sep 17 00:00:00 2001 +From 55e7a139566a3d3d00ba6119deffb0f39c4ef911 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 24 Dec 2012 16:02:42 +0100 -Subject: [PATCH 091/123] pvr: increase changes counter of stream on stream +Subject: [PATCH 072/110] pvr: increase changes counter of stream on stream change, cosmetics after dd307930d39d92f145a01a16600cd00e01ec39be --- @@ -25189,7 +18149,7 @@ Subject: [PATCH 091/123] pvr: increase changes counter of stream on stream 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp -index 305ba07..3ad9792 100644 +index 7e35581..7adfa27 100644 --- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp +++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp @@ -339,9 +339,7 @@ void CDVDDemuxPVRClient::RequestStreams() @@ -25209,16 +18169,16 @@ index 305ba07..3ad9792 100644 st->m_parser_split = true; + st->changes++; } - else if (props.stream[i].iCodecType == AVMEDIA_TYPE_VIDEO) + else if (props.stream[i].iCodecType == XBMC_CODEC_TYPE_VIDEO) { -- 1.8.1.6 -From 7bef6de9b9afa5d67b467fa06612e2eafef9b81e Mon Sep 17 00:00:00 2001 +From 3897839d0a960e56b0fb2428fac1b6b984c8aa33 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 17 Jan 2013 16:03:22 +0100 -Subject: [PATCH 092/123] X11: add keymapping for XF86XK_Sleep +Subject: [PATCH 073/110] X11: add keymapping for XF86XK_Sleep --- xbmc/windowing/WinEventsX11.cpp | 1 + @@ -25240,17 +18200,17 @@ index 4a5aab4..da5d412 100644 1.8.1.6 -From 8511f31601ff6970648ed51204cc55102dafbf1c Mon Sep 17 00:00:00 2001 +From 05b4672c598d37ff47e07839e3329fcbe2756c14 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 21 Jan 2013 09:00:19 +0100 -Subject: [PATCH 093/123] X11: remove toggle full screen after resume +Subject: [PATCH 074/110] X11: remove toggle full screen after resume --- xbmc/powermanagement/PowerManager.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp -index f2a063f..f1e3c4f 100644 +index d658a97..7f12a5d 100644 --- a/xbmc/powermanagement/PowerManager.cpp +++ b/xbmc/powermanagement/PowerManager.cpp @@ -260,11 +260,6 @@ void CPowerManager::OnWake() @@ -25269,17 +18229,17 @@ index f2a063f..f1e3c4f 100644 1.8.1.6 -From a0368631b8ed581ae1fa54bd7b51a3cc4323e8c5 Mon Sep 17 00:00:00 2001 +From fcab0158f441c5f7ee06bb360a2d56a14ab79b77 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 23 Jan 2013 17:03:02 +0100 -Subject: [PATCH 094/123] xrandr: set screen on mode change command +Subject: [PATCH 075/110] xrandr: set screen on mode change command --- xbmc/windowing/X11/XRandR.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/windowing/X11/XRandR.cpp b/xbmc/windowing/X11/XRandR.cpp -index 8846bc6..e6d6240 100644 +index aa27d2b..67bf6ca 100644 --- a/xbmc/windowing/X11/XRandR.cpp +++ b/xbmc/windowing/X11/XRandR.cpp @@ -246,7 +246,7 @@ bool CXRandR::SetMode(XOutput output, XMode mode) @@ -25295,10 +18255,10 @@ index 8846bc6..e6d6240 100644 1.8.1.6 -From 9071be89472ecbcc05ffa4bb967883a0b53e3a07 Mon Sep 17 00:00:00 2001 +From 3c978a401c2624ec0391b25cc66633e247255cd5 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 23 Jan 2013 17:03:39 +0100 -Subject: [PATCH 095/123] X11: recreate glx context when output changes +Subject: [PATCH 076/110] X11: recreate glx context when output changes --- xbmc/windowing/X11/WinSystemX11.cpp | 6 +++--- @@ -25306,7 +18266,7 @@ Subject: [PATCH 095/123] X11: recreate glx context when output changes 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 0e39867..d865cd7 100644 +index b941c14..c84e793 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -407,11 +407,11 @@ bool CWinSystemX11::IsSuitableVisual(XVisualInfo *vInfo) @@ -25333,7 +18293,7 @@ index 0e39867..d865cd7 100644 g_graphicsContext.Clear(0); g_graphicsContext.Flip(dr); diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index f479c27..7345c06 100644 +index ce3c289..311e4cc 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -74,7 +74,7 @@ class CWinSystemX11 : public CWinSystemBase @@ -25349,56 +18309,51 @@ index f479c27..7345c06 100644 1.8.1.6 -From 76daa1b4fa31511125dc2d3532fc510fcd6a1697 Mon Sep 17 00:00:00 2001 +From 6cddfccd77d365c81a384512a5cfee3b00f9b15c Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 14 Dec 2012 14:19:15 +0100 -Subject: [PATCH 096/123] pvr: do not show selection dialog for a single menu +Subject: [PATCH 077/110] pvr: do not show selection dialog for a single menu hook --- - xbmc/pvr/addons/PVRClients.cpp | 19 +++++++++++-------- - 1 file changed, 11 insertions(+), 8 deletions(-) + xbmc/pvr/addons/PVRClients.cpp | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xbmc/pvr/addons/PVRClients.cpp b/xbmc/pvr/addons/PVRClients.cpp -index 2b43bcb..d07f23d 100644 +index c84bd4d..a39584b 100644 --- a/xbmc/pvr/addons/PVRClients.cpp +++ b/xbmc/pvr/addons/PVRClients.cpp -@@ -728,16 +728,19 @@ void CPVRClients::ProcessMenuHooks(int iClientID, PVR_MENUHOOK_CAT cat, const CF - if (GetConnectedClient(iClientID, client) && client->HaveMenuHooks(cat)) +@@ -729,6 +729,7 @@ void CPVRClients::ProcessMenuHooks(int iClientID, PVR_MENUHOOK_CAT cat, const CF { hooks = client->GetMenuHooks(); -- std::vector hookIDs; + std::vector hookIDs; + int selection = 0; -- CGUIDialogSelect* pDialog = (CGUIDialogSelect*)g_windowManager.GetWindow(WINDOW_DIALOG_SELECT); -- pDialog->Reset(); -- pDialog->SetHeading(19196); -- for (unsigned int i = 0; i < hooks->size(); i++) -- pDialog->Add(client->GetString(hooks->at(i).iLocalizedStringId)); + CGUIDialogSelect* pDialog = (CGUIDialogSelect*)g_windowManager.GetWindow(WINDOW_DIALOG_SELECT); + pDialog->Reset(); +@@ -739,9 +740,11 @@ void CPVRClients::ProcessMenuHooks(int iClientID, PVR_MENUHOOK_CAT cat, const CF + pDialog->Add(client->GetString(hooks->at(i).iLocalizedStringId)); + hookIDs.push_back(i); + } - pDialog->DoModal(); -+ if (hooks->size() > 1) +- +- int selection = pDialog->GetSelectedLabel(); ++ if (hookIDs.size() > 1) + { -+ CGUIDialogSelect* pDialog = (CGUIDialogSelect*)g_windowManager.GetWindow(WINDOW_DIALOG_SELECT); -+ pDialog->Reset(); -+ pDialog->SetHeading(19196); -+ for (unsigned int i = 0; i < hooks->size(); i++) -+ pDialog->Add(client->GetString(hooks->at(i).iLocalizedStringId)); + pDialog->DoModal(); + selection = pDialog->GetSelectedLabel(); + } - -- int selection = pDialog->GetSelectedLabel(); if (selection >= 0) - client->CallMenuHook(hooks->at(selection), item); + client->CallMenuHook(hooks->at(hookIDs.at(selection)), item); } -- 1.8.1.6 -From 79107721f0b07baa19fcc25931de6fc5d6c0fecf Mon Sep 17 00:00:00 2001 +From 2f7e8b17ab53a312588d4895cae2fa678760e069 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 3 Feb 2013 08:17:16 +0100 -Subject: [PATCH 097/123] X11: use default screen parameters if no output +Subject: [PATCH 078/110] X11: use default screen parameters if no output connected --- @@ -25406,7 +18361,7 @@ Subject: [PATCH 097/123] X11: use default screen parameters if no output 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index d865cd7..97975dd 100644 +index c84e793..5215f4d 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -205,25 +205,27 @@ bool CWinSystemX11::SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool bl @@ -25502,10 +18457,10 @@ index d865cd7..97975dd 100644 1.8.1.6 -From a8e44a830153163fd330b0ceb4dcb5b9554c5a73 Mon Sep 17 00:00:00 2001 +From f15251c6dabb64a50cec28eb745534be103437db Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 23 Mar 2013 15:13:32 +0100 -Subject: [PATCH 098/123] X11: create parent window +Subject: [PATCH 079/110] X11: create parent window --- xbmc/windowing/X11/WinSystemX11.cpp | 69 +++++++++++++++++++++++-------------- @@ -25513,7 +18468,7 @@ Subject: [PATCH 098/123] X11: create parent window 2 files changed, 44 insertions(+), 27 deletions(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 97975dd..0a3efff 100644 +index 5215f4d..e49fa98 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -53,6 +53,7 @@ @@ -25755,7 +18710,7 @@ index 97975dd..0a3efff 100644 CDirtyRegionList dr; diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index 7345c06..770ae84 100644 +index 311e4cc..49365a8 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -79,7 +79,7 @@ class CWinSystemX11 : public CWinSystemBase @@ -25771,10 +18726,10 @@ index 7345c06..770ae84 100644 1.8.1.6 -From 106ab1d2c77591f37d915727cf0f3ab8c876b523 Mon Sep 17 00:00:00 2001 +From fdbc56ee223bb0ab998470b5ceb897ac82519530 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 24 Mar 2013 12:30:12 +0100 -Subject: [PATCH 099/123] X11: use system key repeat rate instead of hardcoded +Subject: [PATCH 080/110] X11: use system key repeat rate instead of hardcoded one, taken from 58fd64b194e38b73b5f3132744bab35e994e7441 --- @@ -25976,10 +18931,10 @@ index 102a076..5b1f3fa 100644 1.8.1.6 -From a647eace0d91644e7216187dcb4608df7d2bfa69 Mon Sep 17 00:00:00 2001 +From a70c2e4a776c5be440a1b6c65824d4b36402574f Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 24 Mar 2013 16:04:48 +0100 -Subject: [PATCH 100/123] linux: use CLOCK_MONOTONIC_RAW as this is not subject +Subject: [PATCH 081/110] linux: use CLOCK_MONOTONIC_RAW as this is not subject to NTP --- @@ -25988,7 +18943,7 @@ Subject: [PATCH 100/123] 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 5a1c3ea..6dea6bf 100644 +index 5bb749c..2f995d0 100644 --- a/xbmc/threads/SystemClock.cpp +++ b/xbmc/threads/SystemClock.cpp @@ -42,7 +42,7 @@ @@ -26001,7 +18956,7 @@ index 5a1c3ea..6dea6bf 100644 #endif if (!start_time_set) diff --git a/xbmc/utils/TimeUtils.cpp b/xbmc/utils/TimeUtils.cpp -index 8304ef6..ba27257 100644 +index c06b8c5..4390d2e 100644 --- a/xbmc/utils/TimeUtils.cpp +++ b/xbmc/utils/TimeUtils.cpp @@ -43,7 +43,7 @@ int64_t CurrentHostCounter(void) @@ -26017,20 +18972,20 @@ index 8304ef6..ba27257 100644 1.8.1.6 -From 2cef9ccf704ba1e9144a318044e4cd622a2a4fde Mon Sep 17 00:00:00 2001 +From a79350b43a1c60dc162868475da99421863c74bc Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 28 Mar 2013 15:18:53 +0100 -Subject: [PATCH 101/123] OMXPlayer: some caching fixes for pvr +Subject: [PATCH 082/110] 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 f20c399..c096f32 100644 +index 31b690c..9d24622 100644 --- a/xbmc/cores/omxplayer/OMXPlayer.cpp +++ b/xbmc/cores/omxplayer/OMXPlayer.cpp -@@ -2459,7 +2459,8 @@ void COMXPlayer::HandleMessages() +@@ -2460,7 +2460,8 @@ void COMXPlayer::HandleMessages() m_messenger.Put(new CDVDMsgPlayerSeek(DVD_TIME_TO_MSEC(m_clock.GetClock()), (speed < 0), true, false, false, true)); m_playSpeed = speed; @@ -26044,20 +18999,20 @@ index f20c399..c096f32 100644 1.8.1.6 -From 4ed5d6875bd066d4d1ab8518facd02ecb166829c Mon Sep 17 00:00:00 2001 +From c36206ab65b88bee3d9216d09382f523f470635c Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 28 Mar 2013 20:50:59 +0100 -Subject: [PATCH 102/123] fix incorrect display of fps when dr kicks in +Subject: [PATCH 083/110] 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 a5603a2..ce0a147 100644 +index 55a2685..c864770 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp -@@ -2142,10 +2142,11 @@ void CApplication::Render() +@@ -2174,10 +2174,11 @@ void CApplication::Render() if (frameTime < singleFrameTime) Sleep(singleFrameTime - frameTime); } @@ -26074,17 +19029,17 @@ index a5603a2..ce0a147 100644 1.8.1.6 -From 9d33e9711b3ff21d18832c2db087e6d5cd04f3c4 Mon Sep 17 00:00:00 2001 +From 26f9d7c84392476cd83eb25fae0cd467478d5300 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 8 Apr 2013 11:18:31 +0200 -Subject: [PATCH 103/123] squash to dropping control +Subject: [PATCH 084/110] squash to dropping control --- xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 11e0b26..3f915ce 100644 +index e668d29..3474fe6 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp @@ -39,6 +39,7 @@ @@ -26099,10 +19054,10 @@ index 11e0b26..3f915ce 100644 1.8.1.6 -From 9fa7033fc9da50c54ad133e7ea016eaab89967c9 Mon Sep 17 00:00:00 2001 +From be88e4fbe0b07c5604e1e8a548b09f55b67f02ae Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 11 Apr 2013 12:33:46 +0200 -Subject: [PATCH 104/123] pvr: try SwtichChannel when selecting a channel via +Subject: [PATCH 085/110] pvr: try SwtichChannel when selecting a channel via EPG --- @@ -26110,7 +19065,7 @@ Subject: [PATCH 104/123] pvr: try SwtichChannel when selecting a channel via 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xbmc/pvr/windows/GUIWindowPVRGuide.cpp b/xbmc/pvr/windows/GUIWindowPVRGuide.cpp -index 6b999e4..256a295 100644 +index 8616980..198b074 100644 --- a/xbmc/pvr/windows/GUIWindowPVRGuide.cpp +++ b/xbmc/pvr/windows/GUIWindowPVRGuide.cpp @@ -427,15 +427,16 @@ bool CGUIWindowPVRGuide::PlayEpgItem(CFileItem *item) @@ -26137,10 +19092,10 @@ index 6b999e4..256a295 100644 1.8.1.6 -From b807258fddaca8f65a6552633ada3e75412271d4 Mon Sep 17 00:00:00 2001 +From 51814a1e2c8a562395544a5424fb514a3cda8883 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 13 Apr 2013 08:32:06 +0200 -Subject: [PATCH 105/123] X11: fix mouse coverage +Subject: [PATCH 086/110] X11: fix mouse coverage --- xbmc/windowing/X11/WinSystemX11.cpp | 11 ++++++++--- @@ -26148,7 +19103,7 @@ Subject: [PATCH 105/123] X11: fix mouse coverage 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 0a3efff..bf95bc7 100644 +index e49fa98..186a28e 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -581,10 +581,10 @@ void CWinSystemX11::NotifyAppFocusChange(bool bGaining) @@ -26191,7 +19146,7 @@ index 0a3efff..bf95bc7 100644 CDirtyRegionList dr; RefreshGlxContext(!m_currentOutput.Equals(output)); diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index 770ae84..084f546 100644 +index 49365a8..924af1d 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -88,6 +88,7 @@ class CWinSystemX11 : public CWinSystemBase @@ -26206,10 +19161,10 @@ index 770ae84..084f546 100644 1.8.1.6 -From 59d09d7e25cc8654a1d89d4e1f55596c8ad3cd16 Mon Sep 17 00:00:00 2001 +From 72e48eb8dbcd4e9d6463a5bfaf32bb8eb03aa8c3 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Wed, 8 May 2013 13:14:58 +0200 -Subject: [PATCH 106/123] X11: fix incorrectly used screen num in desktop +Subject: [PATCH 087/110] X11: fix incorrectly used screen num in desktop resolution --- @@ -26217,7 +19172,7 @@ Subject: [PATCH 106/123] X11: fix incorrectly used screen num in desktop 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index bf95bc7..0221036 100644 +index 186a28e..66955b8 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -266,9 +266,9 @@ void CWinSystemX11::UpdateResolutions() @@ -26244,10 +19199,10 @@ index bf95bc7..0221036 100644 1.8.1.6 -From f2fecf3c39f9939bd4504f1148a8d93b9e67eabe Mon Sep 17 00:00:00 2001 +From 5f7c989345a0bc874dab7985e5b1dd7f524b743d Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 9 May 2013 12:07:09 +0200 -Subject: [PATCH 107/123] X11: do not overwrite user selected monitor with +Subject: [PATCH 088/110] X11: do not overwrite user selected monitor with fallback --- @@ -26256,7 +19211,7 @@ Subject: [PATCH 107/123] X11: do not overwrite user selected monitor with 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 0221036..e768c44 100644 +index 66955b8..2ce64af 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -170,7 +170,7 @@ bool CWinSystemX11::ResizeWindow(int newWidth, int newHeight, int newLeft, int n @@ -26357,7 +19312,7 @@ index 0221036..e768c44 100644 if (out) CLog::Log(LOGDEBUG, "%s - current output: %s, mode: %s, refresh: %.3f", __FUNCTION__ diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index 084f546..30f5fa0 100644 +index 924af1d..2fb9e0f 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -94,6 +94,7 @@ class CWinSystemX11 : public CWinSystemBase @@ -26372,10 +19327,10 @@ index 084f546..30f5fa0 100644 1.8.1.6 -From 80fa9e33ccd53aa00bae4c6750cb91483eab4a70 Mon Sep 17 00:00:00 2001 +From 4df886974f2671a5879f43f5154d7204f8b4f11b Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sun, 12 May 2013 10:50:30 +0200 -Subject: [PATCH 108/123] xrandr: add turn on/off to wrapper +Subject: [PATCH 089/110] xrandr: add turn on/off to wrapper --- xbmc/windowing/X11/XRandR.cpp | 78 +++++++++++++++++++++++++++++++++++++++---- @@ -26383,7 +19338,7 @@ Subject: [PATCH 108/123] xrandr: add turn on/off to wrapper 2 files changed, 75 insertions(+), 9 deletions(-) diff --git a/xbmc/windowing/X11/XRandR.cpp b/xbmc/windowing/X11/XRandR.cpp -index e6d6240..b76c4f6 100644 +index 67bf6ca..4e480bf 100644 --- a/xbmc/windowing/X11/XRandR.cpp +++ b/xbmc/windowing/X11/XRandR.cpp @@ -28,6 +28,7 @@ @@ -26514,7 +19469,7 @@ index e6d6240..b76c4f6 100644 Query(); diff --git a/xbmc/windowing/X11/XRandR.h b/xbmc/windowing/X11/XRandR.h -index 26c2653..2741879 100644 +index d37838a..059062f 100644 --- a/xbmc/windowing/X11/XRandR.h +++ b/xbmc/windowing/X11/XRandR.h @@ -94,8 +94,8 @@ class CXRandR @@ -26541,10 +19496,10 @@ index 26c2653..2741879 100644 1.8.1.6 -From 658f7678d3c10cebffeafd04979a6f66929f0a43 Mon Sep 17 00:00:00 2001 +From 48754be0ac3f25931cef14a72090a775536d1443 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sun, 19 May 2013 12:55:35 +0200 -Subject: [PATCH 109/123] xrandr: add GetPreferredMode to wrapper +Subject: [PATCH 090/110] xrandr: add GetPreferredMode to wrapper --- xbmc/windowing/X11/XRandR.cpp | 23 +++++++++++++++++++++++ @@ -26552,7 +19507,7 @@ Subject: [PATCH 109/123] xrandr: add GetPreferredMode to wrapper 2 files changed, 24 insertions(+) diff --git a/xbmc/windowing/X11/XRandR.cpp b/xbmc/windowing/X11/XRandR.cpp -index b76c4f6..380a194 100644 +index 4e480bf..4809821 100644 --- a/xbmc/windowing/X11/XRandR.cpp +++ b/xbmc/windowing/X11/XRandR.cpp @@ -347,6 +347,29 @@ XMode CXRandR::GetCurrentMode(CStdString outputName) @@ -26586,7 +19541,7 @@ index b76c4f6..380a194 100644 { Query(); diff --git a/xbmc/windowing/X11/XRandR.h b/xbmc/windowing/X11/XRandR.h -index 2741879..24ad1d0 100644 +index 059062f..ab7cc63 100644 --- a/xbmc/windowing/X11/XRandR.h +++ b/xbmc/windowing/X11/XRandR.h @@ -98,6 +98,7 @@ class CXRandR @@ -26601,10 +19556,10 @@ index 2741879..24ad1d0 100644 1.8.1.6 -From c2d9632a75a8f659f58bd0ad1367242639840b07 Mon Sep 17 00:00:00 2001 +From 667eb31e549880a80aaf1ccd983e010ddc833eae Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sat, 11 May 2013 17:12:12 +0200 -Subject: [PATCH 110/123] X11: multi-head improvement - poll for desired output +Subject: [PATCH 091/110] X11: multi-head improvement - poll for desired output if we do not get an xrr event --- @@ -26619,10 +19574,10 @@ Subject: [PATCH 110/123] 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 d603702..79a3996 100644 +index fc1f5ec4d..645d7be 100644 --- a/language/English/strings.po +++ b/language/English/strings.po -@@ -6232,7 +6232,7 @@ msgctxt "#14071" +@@ -6242,7 +6242,7 @@ msgctxt "#14071" msgid "Allow file renaming and deletion" msgstr "" @@ -26631,7 +19586,7 @@ index d603702..79a3996 100644 msgctxt "#14074" msgid "Set timezone" -@@ -6364,7 +6364,12 @@ msgctxt "#14100" +@@ -6374,7 +6374,12 @@ msgctxt "#14100" msgid "Stop ripping CD" msgstr "" @@ -26646,10 +19601,10 @@ index d603702..79a3996 100644 #: xbmc/dialogs/GUIDialogFavourites.cpp msgctxt "#15015" diff --git a/system/settings/settings.xml b/system/settings/settings.xml -index a863dae..1102691 100644 +index ac87a69..688964e 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml -@@ -1855,6 +1855,11 @@ +@@ -1877,6 +1877,11 @@ @@ -26661,7 +19616,7 @@ index a863dae..1102691 100644 0 0 -@@ -1906,6 +1911,7 @@ +@@ -1928,6 +1933,7 @@ @@ -26670,10 +19625,10 @@ index a863dae..1102691 100644 false diff --git a/xbmc/settings/DisplaySettings.cpp b/xbmc/settings/DisplaySettings.cpp -index 203c0f1..dfc1ab8 100644 +index 1a85651..46895d2 100644 --- a/xbmc/settings/DisplaySettings.cpp +++ b/xbmc/settings/DisplaySettings.cpp -@@ -244,6 +244,10 @@ bool CDisplaySettings::OnSettingChanging(const CSetting *setting) +@@ -265,6 +265,10 @@ bool CDisplaySettings::OnSettingChanging(const CSetting *setting) m_resolutionChangeAborted = false; } } @@ -26720,7 +19675,7 @@ index 5b1f3fa..d4a4b47 100644 bool m_xrrEventPending; }; diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index e768c44..6b1ed87 100644 +index 2ce64af..7e4b637 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -250,18 +250,62 @@ void CWinSystemX11::UpdateResolutions() @@ -26849,7 +19804,7 @@ index e768c44..6b1ed87 100644 found = true; break; diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index 30f5fa0..9c7ecdd 100644 +index 2fb9e0f..ec01bf7 100644 --- a/xbmc/windowing/X11/WinSystemX11.h +++ b/xbmc/windowing/X11/WinSystemX11.h @@ -68,7 +68,7 @@ class CWinSystemX11 : public CWinSystemBase @@ -26862,7 +19817,7 @@ index 30f5fa0..9c7ecdd 100644 bool IsCurrentOutput(CStdString output); void NotifyMouseCoverage(bool covered); diff --git a/xbmc/windowing/X11/XRandR.cpp b/xbmc/windowing/X11/XRandR.cpp -index 380a194..650a6ef 100644 +index 4809821..1ad26b2 100644 --- a/xbmc/windowing/X11/XRandR.cpp +++ b/xbmc/windowing/X11/XRandR.cpp @@ -149,10 +149,14 @@ bool CXRandR::Query(bool force, int screennum, bool ignoreoff) @@ -26885,10 +19840,10 @@ index 380a194..650a6ef 100644 1.8.1.6 -From e3f99b95970e08f6e36867152534378b3e064e1d Mon Sep 17 00:00:00 2001 +From b83db2b42b1f940544e4c353439a97d43379cd73 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Wed, 15 May 2013 09:14:34 +0200 -Subject: [PATCH 111/123] X11: ignore mouse move event form other windows +Subject: [PATCH 092/110] X11: ignore mouse move event form other windows --- xbmc/windowing/WinEventsX11.cpp | 4 +++- @@ -26920,17 +19875,17 @@ index 879d8f2..2ec9b6f 100644 1.8.1.6 -From b3ec49babe443c5c1e0156e86992dcc39ac29dec Mon Sep 17 00:00:00 2001 +From f8633b3687ef65d4467e0779854ba2f6b6a853b1 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sun, 2 Jun 2013 14:53:45 +0200 -Subject: [PATCH 112/123] vdpau: fix segfault caused by uninitialized member +Subject: [PATCH 093/110] vdpau: fix segfault caused by uninitialized member --- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index fc4c030..9bafdd7 100644 +index 2805613..cdfceb7 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -90,6 +90,7 @@ @@ -26945,17 +19900,17 @@ index fc4c030..9bafdd7 100644 1.8.1.6 -From 4ffa47f4352b8ddc59242615c86115781e5412ea Mon Sep 17 00:00:00 2001 +From d1884a4dade9ce7e7e6a90a15fdcc13b789f23b0 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Tue, 11 Jun 2013 16:13:45 +0200 -Subject: [PATCH 113/123] vdpau: sync video mixer +Subject: [PATCH 094/110] vdpau: sync video mixer --- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 9bafdd7..55ef4dc 100644 +index cdfceb7..75ac6f0 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -2350,6 +2350,21 @@ void CMixer::ProcessPicture() @@ -26984,10 +19939,10 @@ index 9bafdd7..55ef4dc 100644 1.8.1.6 -From 890c33ae9afbca2659b1244aa7c039279f454ea1 Mon Sep 17 00:00:00 2001 +From 01311ab34796feff00c771a3ac357b650ef340e6 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Tue, 11 Jun 2013 16:20:29 +0200 -Subject: [PATCH 114/123] renderer: allow some lateness within vblank interval +Subject: [PATCH 095/110] renderer: allow some lateness within vblank interval --- xbmc/cores/VideoRenderers/RenderManager.cpp | 12 ++++++++++-- @@ -26995,7 +19950,7 @@ Subject: [PATCH 114/123] renderer: allow some lateness within vblank interval 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp -index f94760c..83a824a 100644 +index 5056100..97fed9a 100644 --- a/xbmc/cores/VideoRenderers/RenderManager.cpp +++ b/xbmc/cores/VideoRenderers/RenderManager.cpp @@ -398,6 +398,8 @@ void CXBMCRenderManager::FrameFinish() @@ -27007,7 +19962,7 @@ index f94760c..83a824a 100644 { CSingleLock lock(m_presentlock); if(m_presentstep == PRESENT_FRAME) -@@ -1043,6 +1045,12 @@ void CXBMCRenderManager::PrepareNextRender() +@@ -1050,6 +1052,12 @@ void CXBMCRenderManager::PrepareNextRender() double clocktime = GetPresentTime(); double frametime = 1.0 / GetMaximumFPS(); @@ -27020,7 +19975,7 @@ index f94760c..83a824a 100644 /* see if any future queued frames are already due */ std::deque::reverse_iterator curr, prev; -@@ -1051,8 +1059,8 @@ void CXBMCRenderManager::PrepareNextRender() +@@ -1058,8 +1066,8 @@ void CXBMCRenderManager::PrepareNextRender() ++prev; while (prev != m_queued.rend()) { @@ -27032,7 +19987,7 @@ index f94760c..83a824a 100644 ++curr; ++prev; diff --git a/xbmc/cores/VideoRenderers/RenderManager.h b/xbmc/cores/VideoRenderers/RenderManager.h -index 7a3a530..480e4dc 100644 +index befd851..27283ec 100644 --- a/xbmc/cores/VideoRenderers/RenderManager.h +++ b/xbmc/cores/VideoRenderers/RenderManager.h @@ -251,6 +251,7 @@ class CXBMCRenderManager @@ -27047,10 +20002,10 @@ index 7a3a530..480e4dc 100644 1.8.1.6 -From 28912445572715df8588111eba8848d283f12233 Mon Sep 17 00:00:00 2001 +From caa6819211e3709d0b07a243769efd98713abf7d Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Fri, 14 Jun 2013 09:23:22 +0200 -Subject: [PATCH 115/123] vdpau: calculate timestamp of second field when doing +Subject: [PATCH 096/110] vdpau: calculate timestamp of second field when doing deinterlacing --- @@ -27058,7 +20013,7 @@ Subject: [PATCH 115/123] vdpau: calculate timestamp of second field when doing 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 55ef4dc..27d63f5 100644 +index 75ac6f0..67b6cf2 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -2314,7 +2314,9 @@ void CMixer::ProcessPicture() @@ -27076,17 +20031,17 @@ index 55ef4dc..27d63f5 100644 1.8.1.6 -From 2eb311f322f2b671218447472a89ca1125707801 Mon Sep 17 00:00:00 2001 +From e25ff6fc6ca096549e9a8be0d87b63d4dd9bc45c Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Fri, 14 Jun 2013 10:46:58 +0200 -Subject: [PATCH 116/123] vdpau: comment debug log: long decoding time +Subject: [PATCH 097/110] vdpau: comment debug log: long decoding time --- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 27d63f5..593f96c 100644 +index 67b6cf2..55430a6 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -874,7 +874,7 @@ void CDecoder::FFDrawSlice(struct AVCodecContext *s, @@ -27115,10 +20070,10 @@ index 27d63f5..593f96c 100644 1.8.1.6 -From 686e6da18cec2138c1543fa402296eb92c7daadc Mon Sep 17 00:00:00 2001 +From 9fe7fd83414c3963a10fe333c439203d6b34873e Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 16 Jun 2013 13:22:58 +0200 -Subject: [PATCH 117/123] X11: another fix for mouse coverage +Subject: [PATCH 098/110] X11: another fix for mouse coverage --- xbmc/windowing/WinEventsX11.cpp | 6 ++++-- @@ -27151,20 +20106,20 @@ index 2ec9b6f..4ed978c 100644 1.8.1.6 -From 1814ed1f05d82067956c1eaec459f7eeace006c9 Mon Sep 17 00:00:00 2001 +From cb8babb62b2adb4ec05722d67a23982516a5c3f0 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 16 Jun 2013 13:23:19 +0200 -Subject: [PATCH 118/123] renderer: delete fence on uninit +Subject: [PATCH 099/110] renderer: delete fence on uninit --- xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -index c663423..858d39d 100644 +index b2beb2e..2613083 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -@@ -1164,7 +1164,12 @@ void CLinuxRendererGL::UnInit() +@@ -1187,7 +1187,12 @@ void CLinuxRendererGL::UnInit() // YV12 textures for (int i = 0; i < NUM_BUFFERS; ++i) @@ -27181,20 +20136,20 @@ index c663423..858d39d 100644 1.8.1.6 -From 90727fe2c507dccd7dfc308a094a492a301ef763 Mon Sep 17 00:00:00 2001 +From adc3b53ae2357465184d38409c9dc5f2d61dc007 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sun, 16 Jun 2013 14:28:01 +0200 -Subject: [PATCH 119/123] renderer: limit fence to vdpau +Subject: [PATCH 100/110] renderer: limit fence to vdpau --- xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -index 858d39d..bb198f3 100644 +index 2613083..9337ee6 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -@@ -1254,14 +1254,17 @@ void CLinuxRendererGL::Render(DWORD flags, int renderBuffer) +@@ -1277,14 +1277,17 @@ void CLinuxRendererGL::Render(DWORD flags, int renderBuffer) VerifyGLState(); } @@ -27222,10 +20177,10 @@ index 858d39d..bb198f3 100644 1.8.1.6 -From 6d8df3121b0e0b4f8e70ef454b04dd36783fbbf7 Mon Sep 17 00:00:00 2001 +From 69b3991f1c8f45295dbd62f42f3af0e153337980 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Thu, 4 Jul 2013 16:38:26 +0200 -Subject: [PATCH 120/123] XVBA: replace CODEC_IS with AV_CODEC_ID +Subject: [PATCH 101/110] XVBA: replace CODEC_IS with AV_CODEC_ID --- xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.cpp | 14 +++++++------- @@ -27300,17 +20255,17 @@ index 54d7aea..5845dbf 100644 1.8.1.6 -From aca51d06f3589e934dbb49d44b45a81a08e29d52 Mon Sep 17 00:00:00 2001 +From 07d82699f9aff83d4228e1cea4a5da05460f8717 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Fri, 5 Jul 2013 12:14:00 +0200 -Subject: [PATCH 121/123] X11: set windows class name +Subject: [PATCH 102/110] X11: set windows class name --- xbmc/windowing/X11/WinSystemX11.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 6b1ed87..30eff67 100644 +index 7e4b637..44e40a3 100644 --- a/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp @@ -980,8 +980,10 @@ bool CWinSystemX11::SetWindow(int width, int height, bool fullscreen, const CStd @@ -27345,17 +20300,17 @@ index 6b1ed87..30eff67 100644 1.8.1.6 -From 18f918782577c79e8cb1cef6ad0650c2668baa92 Mon Sep 17 00:00:00 2001 +From 4a6c2229447b4dfbbadaa0fa8005d2278ee52353 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sat, 13 Jul 2013 20:00:45 +0200 -Subject: [PATCH 122/123] VDPAU: revert sync mixer, does a busy wait +Subject: [PATCH 103/110] VDPAU: revert sync mixer, does a busy wait --- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 31 +++++++++++++------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 593f96c..f630bcb 100644 +index 55430a6..aac0646 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -1139,7 +1139,7 @@ void CVdpauRenderPicture::ReturnUnused() @@ -27414,10 +20369,10 @@ index 593f96c..f630bcb 100644 1.8.1.6 -From da1ff12885a9aec8e6cc1eb7a060e9a3f6dcc2e4 Mon Sep 17 00:00:00 2001 +From 810827650de3ad9c682d6c40bb275c8549c093f7 Mon Sep 17 00:00:00 2001 From: fritsch Date: Sun, 14 Jul 2013 14:21:52 +0200 -Subject: [PATCH 123/123] ActiveAE: Make ActiveAE default Audio Engine to get +Subject: [PATCH 104/110] ActiveAE: Make ActiveAE default Audio Engine to get it tested via ppa --- @@ -27425,7 +20380,7 @@ Subject: [PATCH 123/123] ActiveAE: Make ActiveAE default Audio Engine to get 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/cores/AudioEngine/AEFactory.cpp b/xbmc/cores/AudioEngine/AEFactory.cpp -index d5517f3..07b4095 100644 +index 50a309c..8ce02d7 100644 --- a/xbmc/cores/AudioEngine/AEFactory.cpp +++ b/xbmc/cores/AudioEngine/AEFactory.cpp @@ -97,7 +97,7 @@ bool CAEFactory::LoadEngine() @@ -27440,3 +20395,98 @@ index d5517f3..07b4095 100644 -- 1.8.1.6 + +From 13d61226017eede4aae9e48edcbb6c8fa90dc42a Mon Sep 17 00:00:00 2001 +From: xbmc +Date: Sun, 21 Jul 2013 13:03:45 +0200 +Subject: [PATCH 105/110] ffmpeg: xvba - add missing pix formats for xvba + +--- + lib/ffmpeg/libavcodec/h263dec.c | 3 +++ + lib/ffmpeg/libavcodec/h264.c | 3 +++ + 2 files changed, 6 insertions(+) + +diff --git a/lib/ffmpeg/libavcodec/h263dec.c b/lib/ffmpeg/libavcodec/h263dec.c +index e231b08..6fcd2a0 100644 +--- a/lib/ffmpeg/libavcodec/h263dec.c ++++ b/lib/ffmpeg/libavcodec/h263dec.c +@@ -769,6 +769,9 @@ int ff_h263_decode_frame(AVCodecContext *avctx, + #if CONFIG_VDPAU + AV_PIX_FMT_VDPAU, + #endif ++#if CONFIG_XVBA ++ AV_PIX_FMT_XVBA_VLD, ++#endif + AV_PIX_FMT_YUV420P, + AV_PIX_FMT_NONE + }; +diff --git a/lib/ffmpeg/libavcodec/h264.c b/lib/ffmpeg/libavcodec/h264.c +index 02d0a26..4f09c67 100644 +--- a/lib/ffmpeg/libavcodec/h264.c ++++ b/lib/ffmpeg/libavcodec/h264.c +@@ -101,6 +101,9 @@ + #if CONFIG_H264_VDPAU_HWACCEL + AV_PIX_FMT_VDPAU, + #endif ++#if CONFIG_H264_XVBA_HWACCEL ++ AV_PIX_FMT_XVBA_VLD, ++#endif + AV_PIX_FMT_YUVJ420P, + AV_PIX_FMT_NONE + }; +-- +1.8.1.6 + + +From db09e815ec42cca91d13ef48479f05d4abed9c24 Mon Sep 17 00:00:00 2001 +From: spiff +Date: Tue, 16 Jul 2013 14:34:04 +0200 +Subject: [PATCH 106/110] 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 645d7be..7cc5c3b 100644 +--- a/language/English/strings.po ++++ b/language/English/strings.po +@@ -6376,7 +6376,7 @@ msgstr "" + + #: xbmc/settings/settings.xml + msgctxt "#14101" +-msgid "Swtich off other Monitor" ++msgid "Switch off other Monitor" + msgstr "" + + #empty strings from id 14102 to 15014 +-- +1.8.1.6 + + +From e0368f17203eda08ea68b6c4665ced323c37852a Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Thu, 25 Jul 2013 17:18:13 +0200 +Subject: [PATCH 107/110] 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 31aa3c0..fd4d7c5 100644 +--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp ++++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +@@ -30,8 +30,8 @@ + #include "settings/AdvancedSettings.h" + #include "windowing/WindowingFactory.h" + +-#define MAX_CACHE_LEVEL 0.5 // total cache time of stream in seconds +-#define MAX_WATER_LEVEL 0.25 // buffered time after stream stages in seconds ++#define MAX_CACHE_LEVEL 0.4 // total cache time of stream in seconds ++#define MAX_WATER_LEVEL 0.2 // buffered time after stream stages in seconds + + void CEngineStats::Reset(unsigned int sampleRate) + { +-- +1.8.1.6 diff --git a/packages/mediacenter/xbmc/patches/c218d5c/xbmc-995.10-disable-alt-tab.patch b/packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-995.10-disable-alt-tab.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/c218d5c/xbmc-995.10-disable-alt-tab.patch rename to packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-995.10-disable-alt-tab.patch diff --git a/packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-999.02-rpipower.patch b/packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-999.02-rpipower.patch new file mode 100644 index 0000000000..5153c26caa --- /dev/null +++ b/packages/mediacenter/xbmc/patches/13.alpha-df91888/xbmc-999.02-rpipower.patch @@ -0,0 +1,113 @@ +From 3c27e947a2c52c7b124b1bcf32f554b82b60f690 Mon Sep 17 00:00:00 2001 +From: Stephan Raue +Date: Fri, 2 Aug 2013 01:32:03 +0200 +Subject: [PATCH] Disable Hibernate and Suspend related power options for + Raspberry & Co. without (working) Upower/HAL/CK/Systemd support. Usually this + devices dont support Suspend & Hibernate. + +--- + xbmc/powermanagement/PowerManager.cpp | 21 ++++++++---- + xbmc/powermanagement/linux/FallbackPowerSyscall.h | 39 +++++++++++++++++++++++ + 2 files changed, 53 insertions(+), 7 deletions(-) + create mode 100644 xbmc/powermanagement/linux/FallbackPowerSyscall.h + +diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp +index d658a97..993477e 100644 +--- a/xbmc/powermanagement/PowerManager.cpp ++++ b/xbmc/powermanagement/PowerManager.cpp +@@ -40,14 +40,17 @@ + #include "osx/CocoaPowerSyscall.h" + #elif defined(TARGET_ANDROID) + #include "android/AndroidPowerSyscall.h" +-#elif defined(TARGET_POSIX) && defined(HAS_DBUS) ++#elif defined(TARGET_POSIX) ++#include "linux/FallbackPowerSyscall.h" ++#if defined(HAS_DBUS) + #include "linux/ConsoleUPowerSyscall.h" + #include "linux/ConsoleDeviceKitPowerSyscall.h" + #include "linux/LogindUPowerSyscall.h" + #include "linux/UPowerSyscall.h" +-#ifdef HAS_HAL ++#if defined(HAS_HAL) + #include "linux/HALPowerSyscall.h" +-#endif ++#endif // HAS_HAL ++#endif // HAS_DBUS + #elif defined(TARGET_WINDOWS) + #include "powermanagement/windows/Win32PowerSyscall.h" + extern HWND g_hWnd; +@@ -73,7 +76,8 @@ void CPowerManager::Initialize() + m_instance = new CCocoaPowerSyscall(); + #elif defined(TARGET_ANDROID) + m_instance = new CAndroidPowerSyscall(); +-#elif defined(TARGET_POSIX) && defined(HAS_DBUS) ++#elif defined(TARGET_POSIX) ++#if defined(HAS_DBUS) + if (CConsoleUPowerSyscall::HasConsoleKitAndUPower()) + m_instance = new CConsoleUPowerSyscall(); + else if (CConsoleDeviceKitPowerSyscall::HasDeviceConsoleKit()) +@@ -82,10 +86,13 @@ void CPowerManager::Initialize() + m_instance = new CLogindUPowerSyscall(); + else if (CUPowerSyscall::HasUPower()) + m_instance = new CUPowerSyscall(); +-#ifdef HAS_HAL +- else ++#if defined(HAS_HAL) ++ else if(1) + m_instance = new CHALPowerSyscall(); +-#endif ++#endif // HAS_HAL ++ else ++#endif // HAS_DBUS ++ m_instance = new CFallbackPowerSyscall(); + #elif defined(TARGET_WINDOWS) + m_instance = new CWin32PowerSyscall(); + #endif +diff --git a/xbmc/powermanagement/linux/FallbackPowerSyscall.h b/xbmc/powermanagement/linux/FallbackPowerSyscall.h +new file mode 100644 +index 0000000..a6ed27b +--- /dev/null ++++ b/xbmc/powermanagement/linux/FallbackPowerSyscall.h +@@ -0,0 +1,39 @@ ++/* ++ * Copyright (C) 2005-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 ++ * . ++ * ++ */ ++#pragma once ++#include "powermanagement/IPowerSyscall.h" ++#include "system.h" ++#if defined(TARGET_POSIX) ++ ++class CFallbackPowerSyscall : public CPowerSyscallWithoutEvents ++{ ++public: ++ virtual bool Powerdown() {return true; } ++ virtual bool Suspend() {return false; } ++ virtual bool Hibernate() {return false; } ++ virtual bool Reboot() {return true; } ++ ++ virtual bool CanPowerdown() {return true; } ++ virtual bool CanSuspend() {return false; } ++ virtual bool CanHibernate() {return false; } ++ virtual bool CanReboot() {return true; } ++ virtual int BatteryLevel() {return 0; } ++}; ++#endif +-- +1.8.1.6 + diff --git a/packages/mediacenter/xbmc/patches/c218d5c/xbmc-602-add_as.xml_busy_dialog_delay_control.patch b/packages/mediacenter/xbmc/patches/c218d5c/xbmc-602-add_as.xml_busy_dialog_delay_control.patch deleted file mode 100644 index 8300e13296..0000000000 --- a/packages/mediacenter/xbmc/patches/c218d5c/xbmc-602-add_as.xml_busy_dialog_delay_control.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff -Naur xbmc-12.1.8/xbmc/cores/dvdplayer/DVDPlayer.cpp xbmc-12.1.8.patch/xbmc/cores/dvdplayer/DVDPlayer.cpp ---- xbmc-12.1.8/xbmc/cores/dvdplayer/DVDPlayer.cpp 2013-04-24 23:38:36.000000000 +0200 -+++ xbmc-12.1.8.patch/xbmc/cores/dvdplayer/DVDPlayer.cpp 2013-04-26 00:49:07.732011721 +0200 -@@ -470,7 +470,7 @@ - #endif - - Create(); -- if(!m_ready.WaitMSec(100)) -+ if(!m_ready.WaitMSec(g_advancedSettings.m_videoBusyDialogDelay_ms)) - { - CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY); - if(dialog) -diff -Naur xbmc-12.1.8/xbmc/cores/omxplayer/OMXPlayer.cpp xbmc-12.1.8.patch/xbmc/cores/omxplayer/OMXPlayer.cpp ---- xbmc-12.1.8/xbmc/cores/omxplayer/OMXPlayer.cpp 2013-04-24 23:38:36.000000000 +0200 -+++ xbmc-12.1.8.patch/xbmc/cores/omxplayer/OMXPlayer.cpp 2013-04-26 00:50:56.974691417 +0200 -@@ -474,7 +474,7 @@ - g_renderManager.PreInit(); - - Create(); -- if(!m_ready.WaitMSec(100)) -+ if(!m_ready.WaitMSec(g_advancedSettings.m_videoBusyDialogDelay_ms)) - { - CGUIDialogBusy* dialog = (CGUIDialogBusy*)g_windowManager.GetWindow(WINDOW_DIALOG_BUSY); - if(dialog) -diff -Naur xbmc-12.1.8/xbmc/settings/AdvancedSettings.cpp xbmc-12.1.8.patch/xbmc/settings/AdvancedSettings.cpp ---- xbmc-12.1.8/xbmc/settings/AdvancedSettings.cpp 2013-04-26 00:48:59.375036542 +0200 -+++ xbmc-12.1.8.patch/xbmc/settings/AdvancedSettings.cpp 2013-04-26 00:49:07.732011721 +0200 -@@ -111,6 +111,7 @@ - m_DXVAForceProcessorRenderer = true; - m_DXVANoDeintProcForProgressive = false; - m_videoFpsDetect = 1; -+ m_videoBusyDialogDelay_ms = 100; - m_videoDefaultLatency = 0.0; - m_videoDisableHi10pMultithreading = false; - -@@ -592,6 +593,10 @@ - //0 = disable fps detect, 1 = only detect on timestamps with uniform spacing, 2 detect on all timestamps - XMLUtils::GetInt(pElement, "fpsdetect", m_videoFpsDetect, 0, 2); - -+ // controls the delay, in milliseconds, until -+ // the busy dialog is shown when starting video playback. -+ XMLUtils::GetInt(pElement, "busydialogdelayms", m_videoBusyDialogDelay_ms, 0, 1000); -+ - // Store global display latency settings - TiXmlElement* pVideoLatency = pElement->FirstChildElement("latency"); - if (pVideoLatency) -diff -Naur xbmc-12.1.8/xbmc/settings/AdvancedSettings.h xbmc-12.1.8.patch/xbmc/settings/AdvancedSettings.h ---- xbmc-12.1.8/xbmc/settings/AdvancedSettings.h 2013-04-26 00:48:59.383036518 +0200 -+++ xbmc-12.1.8.patch/xbmc/settings/AdvancedSettings.h 2013-04-26 00:49:07.732011721 +0200 -@@ -165,6 +165,7 @@ - bool m_DXVANoDeintProcForProgressive; - int m_videoFpsDetect; - bool m_videoDisableHi10pMultithreading; -+ int m_videoBusyDialogDelay_ms; - - CStdString m_videoDefaultPlayer; - CStdString m_videoDefaultDVDPlayer; diff --git a/packages/mediacenter/xbmc/patches/c218d5c/xbmc-999.01-automake-1.13.patch b/packages/mediacenter/xbmc/patches/c218d5c/xbmc-999.01-automake-1.13.patch deleted file mode 100644 index a4703491b5..0000000000 --- a/packages/mediacenter/xbmc/patches/c218d5c/xbmc-999.01-automake-1.13.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur xbmc-8ad691a/lib/libdvd/libdvdcss/configure.ac xbmc-8ad691a.patch/lib/libdvd/libdvdcss/configure.ac ---- xbmc-8ad691a/lib/libdvd/libdvdcss/configure.ac 2013-04-08 12:03:51.000000000 +0200 -+++ xbmc-8ad691a.patch/lib/libdvd/libdvdcss/configure.ac 2013-04-08 14:20:14.793113682 +0200 -@@ -5,7 +5,7 @@ - AC_CANONICAL_SYSTEM - - AM_INIT_AUTOMAKE(libdvdcss, 1.2.12) --AM_CONFIG_HEADER(config.h) -+AC_CONFIG_HEADERS(config.h) - - AC_PROG_CC - AC_STDC_HEADERS diff --git a/packages/multimedia/ffmpeg/patches/1.2.1/ffmpeg-0039-h264-expose-h264-frame-packing-as-stereo_mode-metada.patch b/packages/multimedia/ffmpeg/patches/1.2.1/ffmpeg-0039-h264-expose-h264-frame-packing-as-stereo_mode-metada.patch new file mode 100644 index 0000000000..5c6384f87c --- /dev/null +++ b/packages/multimedia/ffmpeg/patches/1.2.1/ffmpeg-0039-h264-expose-h264-frame-packing-as-stereo_mode-metada.patch @@ -0,0 +1,236 @@ +From 3a6ea59e122d5bc981a2a5c8f9bafcba0f9f8754 Mon Sep 17 00:00:00 2001 +From: Joakim Plate +Date: Wed, 26 Jun 2013 22:07:28 +0200 +Subject: [PATCH 1/1] h264: expose h264 frame packing as stereo_mode metadata + +--- + libavcodec/h264.c | 3 ++ + libavcodec/h264.h | 35 ++++++++++++++- + libavcodec/h264_parser.c | 1 + + libavcodec/h264_sei.c | 85 +++++++++++++++++++++++++++++++++++++ + 4 files changed, 123 insertions(+), 1 deletion(-) + +diff --git a/libavcodec/h264.c b/libavcodec/h264.c +index 937ad7a..85f2372 100644 +--- a/libavcodec/h264.c ++++ b/libavcodec/h264.c +@@ -1437,6 +1437,7 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) + h->prev_poc_msb = 1 << 16; + h->prev_frame_num = -1; + h->x264_build = -1; ++ h->sei_fpa.frame_packing_arrangement_cancel_flag = -1; + ff_h264_reset_sei(h); + if (avctx->codec_id == AV_CODEC_ID_H264) { + if (avctx->ticks_per_frame == 1) { +@@ -4783,6 +4784,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, + out->f.reference &= ~DELAYED_PIC_REF; + *got_frame = 1; + *pict = out->f; ++ av_dict_set(&pict->metadata, "stereo_mode", ff_h264_sei_stereo_mode(h), 0); + } + + return buf_index; +@@ -4839,6 +4841,7 @@ not_extra: + if (h->next_output_pic && (h->next_output_pic->sync || h->sync>1)) { + *got_frame = 1; + *pict = h->next_output_pic->f; ++ av_dict_set(&pict->metadata, "stereo_mode", ff_h264_sei_stereo_mode(h), 0); + } + } + +diff --git a/libavcodec/h264.h b/libavcodec/h264.h +index 7ea613c..15a0b21 100644 +--- a/libavcodec/h264.h ++++ b/libavcodec/h264.h +@@ -126,7 +126,8 @@ typedef enum { + SEI_TYPE_PIC_TIMING = 1, ///< picture timing + SEI_TYPE_USER_DATA_ITU_T_T35 = 4, ///< user data registered by ITU-T Recommendation T.35 + SEI_TYPE_USER_DATA_UNREGISTERED = 5, ///< unregistered user data +- SEI_TYPE_RECOVERY_POINT = 6 ///< recovery point (frame # to decoder sync) ++ SEI_TYPE_RECOVERY_POINT = 6, ///< recovery point (frame # to decoder sync) ++ SEI_TYPE_FRAME_PACKING = 45, ///< frame packing arrangement + } SEI_Type; + + /** +@@ -145,6 +146,19 @@ typedef enum { + } SEI_PicStructType; + + /** ++ * frame_packing_arrangement types ++ */ ++typedef enum { ++ SEI_FPA_TYPE_CHECKERBOARD = 0, ++ SEI_FPA_TYPE_INTERLEAVE_COLUMN = 1, ++ SEI_FPA_TYPE_INTERLEAVE_ROW = 2, ++ SEI_FPA_TYPE_SIDE_BY_SIDE = 3, ++ SEI_FPA_TYPE_TOP_BOTTOM = 4, ++ SEI_FPA_TYPE_INTERLEAVE_TEMPORAL = 5, ++ SEI_FPA_TYPE_2D = 6, ++} SEI_FpaType; ++ ++/** + * Sequence parameter set + */ + typedef struct SPS { +@@ -230,6 +244,17 @@ typedef struct PPS { + } PPS; + + /** ++ * Frame Packing Arrangement Type ++ */ ++typedef struct FPA { ++ int frame_packing_arrangement_id; ++ int frame_packing_arrangement_cancel_flag; ///< is previous arrangement canceled, -1 if never received ++ SEI_FpaType frame_packing_arrangement_type; ++ int content_interpretation_type; ++ int quincunx_sampling_flag; ++} FPA; ++ ++/** + * Memory management control operation opcode. + */ + typedef enum MMCOOpcode { +@@ -626,6 +651,8 @@ typedef struct H264Context { + */ + int valid_recovery_point; + ++ FPA sei_fpa; ++ + int luma_weight_flag[2]; ///< 7.4.3.2 luma_weight_lX_flag + int chroma_weight_flag[2]; ///< 7.4.3.2 chroma_weight_lX_flag + +@@ -771,6 +798,12 @@ void ff_h264_filter_mb(H264Context *h, int mb_x, int mb_y, + */ + void ff_h264_reset_sei(H264Context *h); + ++/** ++ * Get stereo_mode string from the h264 frame_packing_arrangement ++ * @param h H.264 context. ++ */ ++const char* ff_h264_sei_stereo_mode(H264Context *h); ++ + /* + * o-o o-o + * / / / +diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c +index 44b92b7..aff9ba1 100644 +--- a/libavcodec/h264_parser.c ++++ b/libavcodec/h264_parser.c +@@ -158,6 +158,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, + h->sei_dpb_output_delay = 0; + h->sei_cpb_removal_delay = -1; + h->sei_buffering_period_present = 0; ++ h->sei_fpa.frame_packing_arrangement_cancel_flag = -1; + + if (!buf_size) + return 0; +diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c +index ece54f1..fc9b96f 100644 +--- a/libavcodec/h264_sei.c ++++ b/libavcodec/h264_sei.c +@@ -194,6 +194,43 @@ static int decode_buffering_period(H264Context *h){ + return 0; + } + ++static int decode_frame_packing(H264Context *h, int size){ ++ int bits = get_bits_left(&h->gb); ++ ++ h->sei_fpa.frame_packing_arrangement_id = get_ue_golomb(&h->gb); ++ h->sei_fpa.frame_packing_arrangement_cancel_flag = get_bits(&h->gb, 1); ++ if (!h->sei_fpa.frame_packing_arrangement_cancel_flag) { ++ h->sei_fpa.frame_packing_arrangement_type = get_bits(&h->gb, 7); ++ h->sei_fpa.quincunx_sampling_flag = get_bits(&h->gb, 1); ++ h->sei_fpa.content_interpretation_type = get_bits(&h->gb, 6); ++ skip_bits(&h->gb, 1); /* spatial_flipping_flag */ ++ skip_bits(&h->gb, 1); /* frame0_flipped_flag */ ++ skip_bits(&h->gb, 1); /* field_views_flag */ ++ skip_bits(&h->gb, 1); /* current_frame_is_frame0_flag */ ++ skip_bits(&h->gb, 1); /* frame0_self_contained_flag */ ++ skip_bits(&h->gb, 1); /* frame1_self_contained_flag */ ++ if (!h->sei_fpa.quincunx_sampling_flag && h->sei_fpa.frame_packing_arrangement_type != 5) { ++ skip_bits(&h->gb, 4); /* frame0_grid_position_x */ ++ skip_bits(&h->gb, 4); /* frame0_grid_position_y */ ++ skip_bits(&h->gb, 4); /* frame1_grid_position_x */ ++ skip_bits(&h->gb, 4); /* frame1_grid_position_y */ ++ } ++ skip_bits(&h->gb, 8); /* frame_packing_arrangement_reserved_byte */ ++ get_ue_golomb(&h->gb) /* frame_packing_arrangement_repetition_period */; ++ } ++ skip_bits(&h->gb, 1); /* frame_packing_arrangement_extension_flag */ ++ ++ if (h->avctx->debug & FF_DEBUG_PICT_INFO) ++ av_log(h->avctx, AV_LOG_DEBUG, "SEI FPA %d %d %d %d %d\n", ++ h->sei_fpa.frame_packing_arrangement_id, ++ h->sei_fpa.frame_packing_arrangement_cancel_flag, ++ h->sei_fpa.frame_packing_arrangement_type, ++ h->sei_fpa.quincunx_sampling_flag, ++ h->sei_fpa.content_interpretation_type); ++ skip_bits(&h->gb, 8*size - (bits - get_bits_left(&h->gb))); ++ return 0; ++} ++ + int ff_h264_decode_sei(H264Context *h){ + while (get_bits_left(&h->gb) > 16) { + int size, type; +@@ -236,6 +273,9 @@ int ff_h264_decode_sei(H264Context *h){ + if(decode_buffering_period(h) < 0) + return -1; + break; ++ case SEI_TYPE_FRAME_PACKING: ++ if(decode_frame_packing(h, size) < 0) ++ return -1; + default: + skip_bits(&h->gb, 8*size); + } +@@ -246,3 +286,48 @@ int ff_h264_decode_sei(H264Context *h){ + + return 0; + } ++ ++const char* ff_h264_sei_stereo_mode(H264Context *h) ++{ ++ if (h->sei_fpa.frame_packing_arrangement_cancel_flag == 0) { ++ switch (h->sei_fpa.frame_packing_arrangement_type) { ++ case SEI_FPA_TYPE_CHECKERBOARD: ++ if (h->sei_fpa.content_interpretation_type == 2) ++ return "checkerboard_rl"; ++ else ++ return "checkerboard_lr"; ++ case SEI_FPA_TYPE_INTERLEAVE_COLUMN: ++ if (h->sei_fpa.content_interpretation_type == 2) ++ return "col_interleaved_rl"; ++ else ++ return "col_interleaved_lr"; ++ case SEI_FPA_TYPE_INTERLEAVE_ROW: ++ if (h->sei_fpa.content_interpretation_type == 2) ++ return "row_interleaved_rl"; ++ else ++ return "row_interleaved_lr"; ++ case SEI_FPA_TYPE_SIDE_BY_SIDE: ++ if (h->sei_fpa.content_interpretation_type == 2) ++ return "right_left"; ++ else ++ return "left_right"; ++ case SEI_FPA_TYPE_TOP_BOTTOM: ++ if (h->sei_fpa.content_interpretation_type == 2) ++ return "bottom_top"; ++ else ++ return "top_bottom"; ++ case SEI_FPA_TYPE_INTERLEAVE_TEMPORAL: ++ if (h->sei_fpa.content_interpretation_type == 2) ++ return "block_rl"; ++ else ++ return "block_lr"; ++ case SEI_FPA_TYPE_2D: ++ default: ++ return "mono"; ++ } ++ } else if (h->sei_fpa.frame_packing_arrangement_cancel_flag == 1) { ++ return "mono"; ++ } else { ++ return NULL; ++ } ++} +-- +1.8.2 + diff --git a/packages/network/avahi/build b/packages/network/avahi/build deleted file mode 100755 index 8cf3b6d60c..0000000000 --- a/packages/network/avahi/build +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -py_cv_mod_gtk_=yes \ -py_cv_mod_dbus_=yes \ -ac_cv_func_chroot=no \ -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --enable-static \ - --disable-shared \ - --with-distro=none \ - --disable-glib \ - --disable-gobject \ - --disable-qt3 \ - --disable-qt4 \ - --disable-gtk \ - --disable-gtk3 \ - --enable-dbus \ - --disable-dbm \ - --disable-gdbm \ - --enable-libdaemon \ - --enable-python \ - --disable-pygtk \ - --enable-python-dbus \ - --disable-mono \ - --disable-monodoc \ - --enable-autoipd \ - --disable-doxygen-doc \ - --disable-doxygen-dot \ - --disable-doxygen-man \ - --disable-doxygen-rtf \ - --disable-doxygen-xml \ - --disable-doxygen-chm \ - --disable-doxygen-chi \ - --disable-doxygen-html \ - --disable-doxygen-ps \ - --disable-doxygen-pdf \ - --disable-core-docs \ - --disable-manpages \ - --disable-xmltoman \ - --disable-tests \ - --enable-compat-libdns_sd \ - --disable-compat-howl \ - --with-xml=expat \ - --with-avahi-user=avahi \ - --with-avahi-group=avahi \ - --with-autoipd-user=avahiautoipd \ - --with-autoipd-group=avahiautoipd \ - --disable-nls - -make V=1 - -$MAKEINSTALL diff --git a/packages/network/avahi/install b/packages/network/avahi/install deleted file mode 100755 index ec2ca0432b..0000000000 --- a/packages/network/avahi/install +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -PYTHON_LIB_DIR=`ls -d $INSTALL/usr/lib/python*` - -add_user avahi x 495 495 "avahi-daemon" "/var/run/avahi-daemon" "/bin/sh" -add_group avahi 495 - -add_user avahiautoipd x 496 496 "avahi-autoipd" "/var/lib/avahi-autoipd" "/bin/sh" -add_group avahiautoipd 496 - -mkdir -p $INSTALL/etc/avahi - cp $PKG_BUILD/avahi-daemon/avahi-daemon.conf $INSTALL/etc/avahi - # for some reason avai can fail to start see: http://forums.gentoo.org/viewtopic-p-7322172.html#7322172 - sed -e "s,^.*disallow-other-stacks=.*$,disallow-other-stacks=yes,g" -i $INSTALL/etc/avahi/avahi-daemon.conf - # disable wide-area - sed -e "s,^.*enable-wide-area=.*$,enable-wide-area=no,g" -i $INSTALL/etc/avahi/avahi-daemon.conf - cp $PKG_BUILD/avahi-daemon/hosts $INSTALL/etc/avahi - -mkdir -p $INSTALL/etc/avahi/services -# cp $PKG_BUILD/avahi-daemon/ssh.service $INSTALL/etc/avahi/services - - if [ $SAMBA_SERVER = "yes" ]; then - if [ -f $PROJECT_DIR/$PROJECT/avahi/samba.service ]; then - cp $PROJECT_DIR/$PROJECT/avahi/samba.service $INSTALL/etc/avahi/services - else - cp $PKG_DIR/config/samba.service $INSTALL/etc/avahi/services - fi - fi - - if [ $SFTP_SERVER = "yes" ]; then - cp $PKG_BUILD/avahi-daemon/sftp-ssh.service $INSTALL/etc/avahi/services - fi - -mkdir -p $INSTALL/etc/dbus-1/system.d - cp $PKG_BUILD/avahi-daemon/avahi-dbus.conf $INSTALL/etc/dbus-1/system.d - -mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/avahi-utils/avahi-browse $INSTALL/usr/bin - ln -sf avahi-browse $INSTALL/usr/bin/avahi-browse-domains - cp $PKG_BUILD/avahi-utils/avahi-publish $INSTALL/usr/bin - ln -sf avahi-publish $INSTALL/usr/bin/avahi-publish-address - ln -sf avahi-publish $INSTALL/usr/bin/avahi-publish-service - cp $PKG_BUILD/avahi-utils/avahi-resolve $INSTALL/usr/bin - ln -sf avahi-resolve $INSTALL/usr/bin/avahi-resolve-address - ln -sf avahi-resolve $INSTALL/usr/bin/avahi-resolve-host-name - cp $PKG_BUILD/avahi-utils/avahi-set-host-name $INSTALL/usr/bin - -mkdir -p $INSTALL/usr/sbin - cp $PKG_BUILD/avahi-autoipd/avahi-autoipd $INSTALL/usr/sbin - cp $PKG_BUILD/avahi-daemon/avahi-daemon $INSTALL/usr/sbin - cp $PKG_BUILD/avahi-dnsconfd/avahi-dnsconfd $INSTALL/usr/sbin - -mkdir -p $PYTHON_LIB_DIR/site-packages/avahi - cp -P $PKG_BUILD/avahi-python/avahi/*.py $PYTHON_LIB_DIR/site-packages/avahi - -mkdir -p $INSTALL/usr/share/avahi - cp $PKG_BUILD/service-type-database/service-types $INSTALL/usr/share/avahi - cp $PKG_BUILD/avahi-daemon/avahi-service.dtd $INSTALL/usr/share/avahi - -mkdir -p $INSTALL/usr/share/dbus-1/interfaces - cp $PKG_BUILD/avahi-daemon/org.freedesktop.Avahi.*.xml $INSTALL/usr/share/dbus-1/interfaces - diff --git a/packages/network/avahi/meta b/packages/network/avahi/meta deleted file mode 100644 index 69ccc412cf..0000000000 --- a/packages/network/avahi/meta +++ /dev/null @@ -1,36 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -PKG_NAME="avahi" -PKG_VERSION="0.6.31" -PKG_REV="1" -PKG_ARCH="any" -PKG_LICENSE="GPL" -PKG_SITE="http://avahi.org/" -PKG_URL="http://www.avahi.org/download/$PKG_NAME-$PKG_VERSION.tar.gz" -PKG_DEPENDS="Python expat dbus connman dbus-python" -PKG_BUILD_DEPENDS="toolchain Python expat libdaemon dbus dbus-python" -PKG_PRIORITY="optional" -PKG_SECTION="network" -PKG_SHORTDESC="avahi: A Zeroconf mDNS/DNS-SD responder" -PKG_LONGDESC="Avahi is a framework for Multicast DNS Service Discovery (mDNS/DNS-SD a.k.a. Zeroconf) on Linux. It allows programs to publish and discover services running on a local network with no specific configuration. For example, you can plug into a network and instantly find printers to print to, files to look at, and people to talk to." -PKG_IS_ADDON="no" - -PKG_AUTORECONF="yes" diff --git a/packages/network/avahi/package.mk b/packages/network/avahi/package.mk new file mode 100644 index 0000000000..c7e04fb006 --- /dev/null +++ b/packages/network/avahi/package.mk @@ -0,0 +1,104 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="avahi" +PKG_VERSION="0.6.31" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://avahi.org/" +PKG_URL="http://www.avahi.org/download/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="Python expat dbus connman dbus-python" +PKG_BUILD_DEPENDS_TARGET="toolchain Python expat libdaemon dbus dbus-python" +PKG_PRIORITY="optional" +PKG_SECTION="network" +PKG_SHORTDESC="avahi: A Zeroconf mDNS/DNS-SD responder" +PKG_LONGDESC="Avahi is a framework for Multicast DNS Service Discovery (mDNS/DNS-SD a.k.a. Zeroconf) on Linux. It allows programs to publish and discover services running on a local network with no specific configuration. For example, you can plug into a network and instantly find printers to print to, files to look at, and people to talk to." + +PKG_IS_ADDON="no" +PKG_AUTORECONF="yes" + +MAKEFLAGS="-j1" + +PKG_CONFIGURE_OPTS_TARGET="py_cv_mod_gtk_=yes \ + py_cv_mod_dbus_=yes \ + ac_cv_func_chroot=no \ + --with-distro=none \ + --disable-glib \ + --disable-gobject \ + --disable-qt3 \ + --disable-qt4 \ + --disable-gtk \ + --disable-gtk3 \ + --enable-dbus \ + --disable-dbm \ + --disable-gdbm \ + --enable-libdaemon \ + --enable-python \ + --disable-pygtk \ + --enable-python-dbus \ + --disable-mono \ + --disable-monodoc \ + --enable-autoipd \ + --disable-doxygen-doc \ + --disable-doxygen-dot \ + --disable-doxygen-man \ + --disable-doxygen-rtf \ + --disable-doxygen-xml \ + --disable-doxygen-chm \ + --disable-doxygen-chi \ + --disable-doxygen-html \ + --disable-doxygen-ps \ + --disable-doxygen-pdf \ + --disable-core-docs \ + --disable-manpages \ + --disable-xmltoman \ + --disable-tests \ + --enable-compat-libdns_sd \ + --disable-compat-howl \ + --with-xml=expat \ + --with-avahi-user=avahi \ + --with-avahi-group=avahi \ + --with-autoipd-user=avahiautoipd \ + --with-autoipd-group=avahiautoipd \ + --disable-nls" + +post_makeinstall_target() { +# for some reason avai can fail to start see: http://forums.gentoo.org/viewtopic-p-7322172.html#7322172 + sed -e "s,^.*disallow-other-stacks=.*$,disallow-other-stacks=yes,g" -i $INSTALL/etc/avahi/avahi-daemon.conf +# disable wide-area + sed -e "s,^.*enable-wide-area=.*$,enable-wide-area=no,g" -i $INSTALL/etc/avahi/avahi-daemon.conf + + rm -rf $INSTALL/etc/avahi/avahi-autoipd.action + rm -rf $INSTALL/etc/avahi/avahi-dnsconfd.action + rm -rf $INSTALL/etc/avahi/services/ssh.service + if [ ! $SFTP_SERVER = "yes" ]; then + rm -rf $INSTALL/etc/avahi/services/sftp-ssh.service + fi + rm -rf $INSTALL/lib/systemd +} + +post_install() { + add_user avahi x 495 495 "avahi-daemon" "/var/run/avahi-daemon" "/bin/sh" + add_group avahi 495 + + add_user avahiautoipd x 496 496 "avahi-autoipd" "/var/lib/avahi-autoipd" "/bin/sh" + add_group avahiautoipd 496 +} diff --git a/packages/network/bluez/build b/packages/network/bluez/build deleted file mode 100755 index e91eec2ab7..0000000000 --- a/packages/network/bluez/build +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options - -if [ "$DEBUG" = "yes" ]; then - DEBUG_CONFIG="--enable-debug" -else - DEBUG_CONFIG="--disable-debug" -fi - -if [ "$DEVTOOLS" = "yes" ]; then - DEVTOOLS_CONFIG="--enable-monitor --enable-test --enable-tools" -else - DEVTOOLS_CONFIG="--disable-monitor --disable-test --enable-tools" -fi - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --disable-dependency-tracking \ - --disable-silent-rules \ - --disable-shared \ - --enable-static \ - --enable-library \ - --enable-usb \ - --disable-udev \ - --disable-cups \ - --disable-obex \ - --enable-client \ - --disable-systemd \ - --enable-datafiles \ - --disable-experimental \ - --with-gnu-ld \ - $DEBUG_CONFIG \ - $DEVTOOLS_CONFIG \ - storagedir=/storage/.cache/bluetooth - -make -$MAKEINSTALL diff --git a/packages/network/wpa_supplicant/build b/packages/network/bluez/init.d/55_obexd old mode 100755 new mode 100644 similarity index 65% rename from packages/network/wpa_supplicant/build rename to packages/network/bluez/init.d/55_obexd index 3111eda243..cd1995c6ce --- a/packages/network/wpa_supplicant/build +++ b/packages/network/bluez/init.d/55_obexd @@ -1,5 +1,3 @@ -#!/bin/sh - ################################################################################ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) @@ -20,18 +18,29 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -. config/options $1 +# +# start obexd +# +# runlevels: openelec, textmode -# wpa_supplicant fails to build with LTO - strip_lto +( + # can be called from openelec addon. + # ensure that environment is sane + . /etc/profile -LDFLAGS="$LDFLAGS -lpthread" + if [ "$DEBUG" = "yes" ]; then + OBEXD_DEBUG="-d" + fi -cd $PKG_BUILD/$1 + OBEXD_ENABLED=true + OBEXD_ROOT=/storage/downloads + if [ -f $CONFIG_CACHE/service_bluez.conf ]; then + . $CONFIG_CACHE/service_bluez.conf + fi -cp $PKG_DIR/config/makefile.config .config - -# echo "CONFIG_TLS=gnutls" >> .config -# echo "CONFIG_GNUTLS_EXTRA=y" >> .config - -make V=1 LIBDIR=/usr/lib BINDIR=/usr/bin + if [ "$BLUEZ_ENABLED" == "true" -a "$OBEXD_ENABLED" == "true" ]; then + progress "Starting obexd" + wait_for_dbus + /usr/lib/bluetooth/obexd $OBEXD_DEBUG -r "$OBEXD_ROOT" &>/dev/null + fi +)& diff --git a/packages/network/bluez/install b/packages/network/bluez/install deleted file mode 100755 index a274eda245..0000000000 --- a/packages/network/bluez/install +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options - -mkdir -p $INSTALL/etc/dbus-1/system.d - cp $PKG_BUILD/src/bluetooth.conf $INSTALL/etc/dbus-1/system.d - -mkdir -p $INSTALL/usr/lib/bluetooth - cp $PKG_BUILD/src/bluetoothd $INSTALL/usr/lib/bluetooth - cp $PKG_BUILD/obexd/src/obexd $INSTALL/usr/lib/bluetooth - -# client - mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/client/bluetoothctl $INSTALL/usr/bin - -# tools -# mkdir -p $INSTALL/lib/udev -# cp $PKG_BUILD/tools/hid2hci $INSTALL/lib/udev - -# mkdir -p $INSTALL/lib/udev/rules.d -# cp $PKG_BUILD/tools/97-hid2hci.rules $INSTALL/lib/udev/rules.d - -if [ "$DEVTOOLS" = "yes" ]; then -# tools - mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/tools/bccmd $INSTALL/usr/bin - cp $PKG_BUILD/tools/ciptool $INSTALL/usr/bin - cp $PKG_BUILD/tools/hciattach $INSTALL/usr/bin - cp $PKG_BUILD/tools/hciconfig $INSTALL/usr/bin - cp $PKG_BUILD/tools/hcidump $INSTALL/usr/bin - cp $PKG_BUILD/tools/hcitool $INSTALL/usr/bin - cp $PKG_BUILD/tools/l2ping $INSTALL/usr/bin - cp $PKG_BUILD/tools/l2test $INSTALL/usr/bin - cp $PKG_BUILD/tools/rctest $INSTALL/usr/bin - cp $PKG_BUILD/tools/rfcomm $INSTALL/usr/bin - cp $PKG_BUILD/tools/sdptool $INSTALL/usr/bin - -# monitor - mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/monitor/btmon $INSTALL/usr/bin - -# test - mkdir -p $INSTALL/usr/lib/bluez/test - cp -P $PKG_BUILD/test/* $INSTALL/usr/lib/bluez/test - chmod +x $INSTALL/usr/lib/bluez/test/* -fi diff --git a/packages/network/bluez/meta b/packages/network/bluez/package.mk similarity index 52% rename from packages/network/bluez/meta rename to packages/network/bluez/package.mk index 8ae04883a2..4f8f0d0430 100644 --- a/packages/network/bluez/meta +++ b/packages/network/bluez/package.mk @@ -25,17 +25,48 @@ PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.bluez.org/" PKG_URL="http://www.kernel.org/pub/linux/bluetooth/$PKG_NAME-$PKG_VERSION.tar.xz" -PKG_DEPENDS="libusb-compat dbus glib" -PKG_BUILD_DEPENDS="toolchain libusb-compat dbus glib readline" +PKG_DEPENDS="libusb-compat dbus glib systemd" +PKG_BUILD_DEPENDS_TARGET="toolchain libusb-compat dbus glib readline systemd" PKG_PRIORITY="optional" PKG_SECTION="network" PKG_SHORTDESC="bluez: Bluetooth Tools and System Daemons for Linux." PKG_LONGDESC="Bluetooth Tools and System Daemons for Linux." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" -if [ "$ALSA_SUPPORT" = yes ]; then - PKG_DEPENDS="$PKG_DEPENDS alsa-lib" - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS alsa-lib" +if [ "$DEBUG" = "yes" ]; then + BLUEZ_CONFIG="--enable-debug" +else + BLUEZ_CONFIG="--disable-debug" fi + +if [ "$DEVTOOLS" = "yes" ]; then + BLUEZ_CONFIG="$BLUEZ_CONFIG --enable-monitor --enable-test --enable-tools" +else + BLUEZ_CONFIG="$BLUEZ_CONFIG --disable-monitor --disable-test --disable-tools" +fi + +PKG_CONFIGURE_OPTS_TARGET="--disable-dependency-tracking \ + --disable-silent-rules \ + --disable-shared \ + --enable-static \ + --enable-library \ + --enable-usb \ + --enable-udev \ + --disable-cups \ + --disable-obex \ + --enable-client \ + --disable-systemd \ + --enable-datafiles \ + --disable-experimental \ + --with-gnu-ld \ + $BLUEZ_CONFIG \ + storagedir=/storage/.cache/bluetooth" + +pre_configure_target() { +# bluez fails to build in subdirs + cd $ROOT/$PKG_BUILD + rm -rf .$TARGET_NAME +} + diff --git a/packages/network/bluez/patches/bluez-add-obexd-policy.patch b/packages/network/bluez/patches/bluez-add-obexd-policy.patch new file mode 100644 index 0000000000..f8080a0f32 --- /dev/null +++ b/packages/network/bluez/patches/bluez-add-obexd-policy.patch @@ -0,0 +1,53 @@ +From ef19c237a2578bd78cd75b4be636207c06e34c11 Mon Sep 17 00:00:00 2001 +From: Stefan Saraev +Date: Tue, 6 Aug 2013 12:35:27 +0300 +Subject: [PATCH] add obexd policy + +--- + src/bluetooth.conf | 16 ++++++++++++++++ + 1 files changed, 16 insertions(+), 0 deletions(-) + +diff --git a/src/bluetooth.conf b/src/bluetooth.conf +index 0495200..38020d7 100644 +--- a/src/bluetooth.conf ++++ b/src/bluetooth.conf +@@ -18,20 +18,36 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + + ++ + + + + + ++ + + + + ++ + + + +-- +1.7.2.5 + diff --git a/packages/network/bluez/patches/bluez-obexd-use-system-bus.patch b/packages/network/bluez/patches/bluez-obexd-use-system-bus.patch new file mode 100644 index 0000000000..dd52a299ea --- /dev/null +++ b/packages/network/bluez/patches/bluez-obexd-use-system-bus.patch @@ -0,0 +1,25 @@ +From 20dfa1079c088236bcd63f1a986956b488177ebf Mon Sep 17 00:00:00 2001 +From: Stefan Saraev +Date: Tue, 6 Aug 2013 11:18:09 +0300 +Subject: [PATCH] obexd: use system bus + +--- + obexd/src/manager.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/obexd/src/manager.c b/obexd/src/manager.c +index dbfbef8..9a29f8c 100644 +--- a/obexd/src/manager.c ++++ b/obexd/src/manager.c +@@ -569,7 +569,7 @@ gboolean manager_init(void) + + dbus_error_init(&err); + +- connection = g_dbus_setup_bus(DBUS_BUS_SESSION, OBEXD_SERVICE, &err); ++ connection = g_dbus_setup_bus(DBUS_BUS_SYSTEM, OBEXD_SERVICE, &err); + if (connection == NULL) { + if (dbus_error_is_set(&err) == TRUE) { + fprintf(stderr, "%s\n", err.message); +-- +1.7.2.5 + diff --git a/packages/network/connman/build b/packages/network/connman/build deleted file mode 100755 index 5c550d32d3..0000000000 --- a/packages/network/connman/build +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -if [ "$PPTP_SUPPORT" = yes ]; then - CONNMAN_PPTP="--enable-pptp" - export PPPD="/usr/sbin/pppd" - export PPTP="/usr/sbin/pptp" -else - CONNMAN_PPTP="--disable-pptp" -fi - -if [ "$OPENVPN_SUPPORT" = yes ]; then - CONNMAN_OPENVPN="--enable-openvpn --with-openvpn=/usr/sbin/openvpn" -else - CONNMAN_OPENVPN="--disable-openvpn" -fi - -export WPASUPPLICANT="/usr/bin/wpa_supplicant" - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --disable-static \ - --enable-shared \ - --disable-gtk-doc \ - --disable-debug \ - --disable-hh2serial-gps \ - --disable-openconnect \ - $CONNMAN_OPENVPN \ - --disable-vpnc \ - --disable-l2tp \ - $CONNMAN_PPTP \ - --disable-iospm \ - --disable-tist \ - --disable-session-policy-local \ - --disable-test \ - --disable-nmcompat \ - --disable-polkit \ - --disable-selinux \ - --enable-loopback=builtin \ - --enable-ethernet=builtin \ - --enable-wifi=builtin \ - --disable-bluetooth \ - --disable-ofono \ - --disable-dundee \ - --disable-pacrunner \ - --disable-neard \ - --disable-wispr \ - --disable-tools \ - --enable-client \ - --enable-datafiles \ - --disable-silent-rules \ - -make storagedir=/storage/.cache/connman vpn_storagedir=/storage/.config/vpn-config statedir=/run/connman diff --git a/packages/network/connman/install b/packages/network/connman/install deleted file mode 100755 index 3f64248b57..0000000000 --- a/packages/network/connman/install +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -add_user system x 430 430 "service" "/var/run/connman" "/bin/sh" -add_group system 430 - -mkdir -p $INSTALL/etc - ln -sf /var/cache/resolv.conf $INSTALL/etc/resolv.conf - -mkdir -p $INSTALL/etc/connman - cp $PKG_BUILD/src/main.conf $INSTALL/etc/connman - sed -i $INSTALL/etc/connman/main.conf \ - -e "s|^# BackgroundScanning.*|BackgroundScanning = true|g" \ - -e "s|^# FallbackNameservers.*|FallbackNameservers = 8.8.8.8,8.8.4.4|g" \ - -e "s|^# PreferredTechnologies.*|PreferredTechnologies = ethernet,wifi,cellular|g" \ - -e "s|^# TetheringTechnologies.*|TetheringTechnologies = wifi|g" \ - -e "s|^# PersistentTetheringMode.*|PersistentTetheringMode = true|g" - -mkdir -p $INSTALL/etc/dbus-1/system.d - cp $PKG_BUILD/src/connman.conf $INSTALL/etc/dbus-1/system.d - -mkdir -p $INSTALL/usr/bin - cp -P $PKG_BUILD/client/connmanctl $INSTALL/usr/bin - -mkdir -p $INSTALL/usr/lib/connman - cp -P $PKG_BUILD/test/* $INSTALL/usr/lib/connman - -mkdir -p $INSTALL/usr/lib/connman/plugins - cp -P $PKG_BUILD/plugins/.libs/*.so* $INSTALL/usr/lib/connman/plugins || true - -mkdir -p $INSTALL/usr/lib/connman/scripts - cp -P $PKG_BUILD/scripts/.libs/*.so* $INSTALL/usr/lib/connman/scripts || true - -mkdir -p $INSTALL/usr/sbin - cp -P $PKG_BUILD/src/connmand $INSTALL/usr/sbin - -mkdir -p $INSTALL/usr/config - cp $PKG_DIR/config/hosts.conf $INSTALL/usr/config - -mkdir -p $INSTALL/usr/share/connman/ - cp $PKG_DIR/config/settings $INSTALL/usr/share/connman/ - -if [ "$PPTP_SUPPORT" = yes -o "$OPENVPN_SUPPORT" = yes ]; then - mkdir -p $INSTALL/etc/dbus-1/system.d - cp $PKG_BUILD/vpn/connman-vpn-dbus.conf $INSTALL/etc/dbus-1/system.d - - mkdir -p $INSTALL/usr/lib/connman/plugins-vpn - cp -P $PKG_BUILD/vpn/plugins/.libs/*.so $INSTALL/usr/lib/connman/plugins-vpn || true - - mkdir -p $INSTALL/usr/sbin - cp -P $PKG_BUILD/vpn/connman-vpnd $INSTALL/usr/sbin - - mkdir -p $INSTALL/usr/share/dbus-1/system-services - cp -P $PKG_BUILD/vpn/net.connman.vpn.service $INSTALL/usr/share/dbus-1/system-services -fi - -if [ "$OPENVPN_SUPPORT" = yes ]; then - mkdir -p $INSTALL/usr/lib/connman/scripts - cp -P $PKG_BUILD/scripts/openvpn-script $INSTALL/usr/lib/connman/scripts -fi diff --git a/packages/network/connman/meta b/packages/network/connman/meta deleted file mode 100644 index 143f46db64..0000000000 --- a/packages/network/connman/meta +++ /dev/null @@ -1,48 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -PKG_NAME="connman" -PKG_VERSION="d052eb3" -PKG_REV="1" -PKG_ARCH="any" -PKG_LICENSE="GPL" -PKG_SITE="http://www.connman.net" -#PKG_URL="http://www.kernel.org/pub/linux/network/connman/$PKG_NAME-$PKG_VERSION.tar.xz" -PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" -PKG_DEPENDS="glib readline dbus iptables wpa_supplicant ntp Python pygobject dbus-python" -PKG_BUILD_DEPENDS="toolchain glib readline dbus iptables" -PKG_PRIORITY="optional" -PKG_SECTION="network" -PKG_SHORTDESC="connman: Network manager daemon" -PKG_LONGDESC="The ConnMan project provides a daemon for managing internet connections within embedded devices running the Linux operating system. The Connection Manager is designed to be slim and to use as few resources as possible, so it can be easily integrated. It is a fully modular system that can be extended, through plug-ins, to support all kinds of wired or wireless technologies. Also, configuration methods, like DHCP and domain name resolving, are implemented using plug-ins. The plug-in approach allows for easy adaption and modification for various use cases." -PKG_IS_ADDON="no" - -PKG_AUTORECONF="yes" - -if [ "$PPTP_SUPPORT" = yes ]; then - PKG_DEPENDS="$PKG_DEPENDS ppp pptp" - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS ppp pptp" -fi - -if [ "$OPENVPN_SUPPORT" = yes ]; then - PKG_DEPENDS="$PKG_DEPENDS openvpn" - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS openvpn" -fi - diff --git a/packages/network/connman/package.mk b/packages/network/connman/package.mk new file mode 100644 index 0000000000..1a6f1724e3 --- /dev/null +++ b/packages/network/connman/package.mk @@ -0,0 +1,118 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="connman" +PKG_VERSION="d052eb3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.connman.net" +#PKG_URL="http://www.kernel.org/pub/linux/network/connman/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS="glib readline dbus iptables wpa_supplicant ntp Python pygobject dbus-python" +PKG_BUILD_DEPENDS_TARGET="toolchain glib readline dbus iptables" +PKG_PRIORITY="optional" +PKG_SECTION="network" +PKG_SHORTDESC="connman: Network manager daemon" +PKG_LONGDESC="The ConnMan project provides a daemon for managing internet connections within embedded devices running the Linux operating system. The Connection Manager is designed to be slim and to use as few resources as possible, so it can be easily integrated. It is a fully modular system that can be extended, through plug-ins, to support all kinds of wired or wireless technologies. Also, configuration methods, like DHCP and domain name resolving, are implemented using plug-ins. The plug-in approach allows for easy adaption and modification for various use cases." + +PKG_IS_ADDON="no" +PKG_AUTORECONF="yes" + +if [ "$PPTP_SUPPORT" = yes ]; then + PKG_DEPENDS="$PKG_DEPENDS ppp pptp" + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET ppp pptp" + CONNMAN_PPTP="--enable-pptp PPPD=/usr/sbin/pppd PPTP=/usr/sbin/pptp" +else + CONNMAN_PPTP="--disable-pptp" +fi + +if [ "$OPENVPN_SUPPORT" = yes ]; then + PKG_DEPENDS="$PKG_DEPENDS openvpn" + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET openvpn" + CONNMAN_OPENVPN="--enable-openvpn --with-openvpn=/usr/sbin/openvpn" +else + CONNMAN_OPENVPN="--disable-openvpn" +fi + +PKG_CONFIGURE_OPTS_TARGET="WPASUPPLICANT=/usr/bin/wpa_supplicant \ + --disable-gtk-doc \ + --disable-debug \ + --disable-hh2serial-gps \ + --disable-openconnect \ + $CONNMAN_OPENVPN \ + --disable-vpnc \ + --disable-l2tp \ + $CONNMAN_PPTP \ + --disable-iospm \ + --disable-tist \ + --disable-session-policy-local \ + --disable-test \ + --disable-nmcompat \ + --disable-polkit \ + --disable-selinux \ + --enable-loopback=builtin \ + --enable-ethernet=builtin \ + --enable-wifi=builtin \ + --disable-bluetooth \ + --disable-ofono \ + --disable-dundee \ + --disable-pacrunner \ + --disable-neard \ + --disable-wispr \ + --disable-tools \ + --enable-client \ + --enable-datafiles \ + --disable-silent-rules" + + +PKG_MAKE_OPTS_TARGET="storagedir=/storage/.cache/connman \ + vpn_storagedir=/storage/.config/vpn-config \ + statedir=/run/connman" + +post_makeinstall_target() { + rm -rf $INSTALL/lib/systemd + + mkdir -p $INSTALL/usr/bin + cp -P client/connmanctl $INSTALL/usr/bin + + mkdir -p $INSTALL/etc + ln -sf /var/cache/resolv.conf $INSTALL/etc/resolv.conf + + mkdir -p $INSTALL/etc/connman + cp ../src/main.conf $INSTALL/etc/connman + sed -i $INSTALL/etc/connman/main.conf \ + -e "s|^# BackgroundScanning.*|BackgroundScanning = true|g" \ + -e "s|^# FallbackNameservers.*|FallbackNameservers = 8.8.8.8,8.8.4.4|g" \ + -e "s|^# PreferredTechnologies.*|PreferredTechnologies = ethernet,wifi,cellular|g" \ + -e "s|^# TetheringTechnologies.*|TetheringTechnologies = wifi|g" \ + -e "s|^# PersistentTetheringMode.*|PersistentTetheringMode = true|g" + + mkdir -p $INSTALL/usr/config + cp $PKG_DIR/config/hosts.conf $INSTALL/usr/config + + mkdir -p $INSTALL/usr/share/connman/ + cp $PKG_DIR/config/settings $INSTALL/usr/share/connman/ +} + +post_install() { + add_user system x 430 430 "service" "/var/run/connman" "/bin/sh" + add_group system 430 +} diff --git a/packages/network/connman/tmpfiles.d/21_connman.conf b/packages/network/connman/tmpfiles.d/21_connman.conf index 7383b3da93..a5d25d97e8 100644 --- a/packages/network/connman/tmpfiles.d/21_connman.conf +++ b/packages/network/connman/tmpfiles.d/21_connman.conf @@ -18,6 +18,6 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -d /run/connman 0755 root root 10d - -d /storage/.cache/connman 0755 root root 10d - -d /storage/.config/vpn-config 0755 root root 10d - +d /run/connman 0755 root root - - +d /storage/.cache/connman 0755 root root - - +d /storage/.config/vpn-config 0755 root root - - diff --git a/packages/network/openssh/build b/packages/network/openssh/build deleted file mode 100755 index b8e3dcd726..0000000000 --- a/packages/network/openssh/build +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -export LD="$TARGET_CC" -export LDFLAGS="$TARGET_CFLAGS $TARGET_LDFLAGS" - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --disable-strip \ - --disable-lastlog \ - --with-sandbox=no \ - --disable-utmp \ - --disable-utmpx \ - --disable-wtmp \ - --disable-wtmpx \ - --without-rpath \ - --with-ssl-engine \ - --without-pam - -make diff --git a/packages/network/openssh/meta b/packages/network/openssh/package.mk similarity index 64% rename from packages/network/openssh/meta rename to packages/network/openssh/package.mk index 9c51c715a6..fd71bff90e 100644 --- a/packages/network/openssh/meta +++ b/packages/network/openssh/package.mk @@ -26,12 +26,45 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.openssh.com/" PKG_URL="ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="zlib openssl" -PKG_BUILD_DEPENDS="toolchain zlib openssl" +PKG_BUILD_DEPENDS_TARGET="toolchain zlib openssl" PKG_PRIORITY="optional" PKG_SECTION="network" PKG_SHORTDESC="openssh: An open re-implementation of the SSH package" PKG_LONGDESC="This is a Linux port of OpenBSD's excellent OpenSSH. OpenSSH is based on the last free version of Tatu Ylonen's SSH with all patent-encumbered algorithms removed, all known security bugs fixed, new features reintroduced, and many other clean-ups. SSH (Secure Shell) is a program to log into another computer over a network, to execute commands in a remote machine, and to move files from one machine to another. It provides strong authentication and secure communications over insecure channels. It is intended as a replacement for rlogin, rsh, rcp, and rdist." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" +PKG_CONFIGURE_OPTS_TARGET="--libexecdir=/usr/lib/openssh \ + --disable-strip \ + --disable-lastlog \ + --with-sandbox=no \ + --disable-utmp \ + --disable-utmpx \ + --disable-wtmp \ + --disable-wtmpx \ + --without-rpath \ + --with-ssl-engine \ + --without-pam" + +pre_configure_target() { + export LD="$TARGET_CC" + export LDFLAGS="$TARGET_CFLAGS $TARGET_LDFLAGS" +} + +post_makeinstall_target() { + mkdir -p $INSTALL/etc + cp $PKG_DIR/config/ssh_config $INSTALL/etc + cp $PKG_DIR/config/sshd_config $INSTALL/etc + + rm -rf $INSTALL/usr/lib/openssh/ssh-keysign + rm -rf $INSTALL/usr/lib/openssh/ssh-pkcs11-helper + if [ ! $SFTP_SERVER = "yes" ]; then + rm -rf $INSTALL/usr/lib/openssh/sftp-server + fi +} + +post_install() { + add_user sshd x 74 74 "Privilege-separated SSH" "/var/empty/sshd" "/bin/sh" + add_group sshd 74 +} diff --git a/packages/network/openssh/tmpfiles.d/51_sshd.conf b/packages/network/openssh/tmpfiles.d/51_sshd.conf index 22664d4584..2a208a7829 100644 --- a/packages/network/openssh/tmpfiles.d/51_sshd.conf +++ b/packages/network/openssh/tmpfiles.d/51_sshd.conf @@ -18,6 +18,6 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -d /var/empty 0600 root root 10d - +d /var/empty 0600 root root - - d /storage/.cache/ssh 0755 root root - - d /storage/.ssh 0700 root root - - diff --git a/packages/network/rpcbind/build b/packages/network/rpcbind/build deleted file mode 100755 index c8b26811ca..0000000000 --- a/packages/network/rpcbind/build +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --enable-warmstarts \ - --disable-libwrap \ - --with-statedir=/tmp \ - --with-rpcuser=root \ - -make -$MAKEINSTALL diff --git a/packages/network/rpcbind/install b/packages/network/rpcbind/install deleted file mode 100755 index 62d7f24c1e..0000000000 --- a/packages/network/rpcbind/install +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/rpcbind $INSTALL/usr/bin - cp $PKG_BUILD/rpcinfo $INSTALL/usr/bin diff --git a/packages/network/rpcbind/meta b/packages/network/rpcbind/package.mk similarity index 86% rename from packages/network/rpcbind/meta rename to packages/network/rpcbind/package.mk index 65edef95fb..09c71e4673 100644 --- a/packages/network/rpcbind/meta +++ b/packages/network/rpcbind/package.mk @@ -26,11 +26,16 @@ PKG_LICENSE="OSS" PKG_SITE="http://rpcbind.sourceforge.net/" PKG_URL="$SOURCEFORGE_SRC/rpcbind/rpcbind/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="libtirpc" -PKG_BUILD_DEPENDS="toolchain libtirpc" +PKG_BUILD_DEPENDS_TARGET="toolchain libtirpc" PKG_PRIORITY="optional" PKG_SECTION="network" PKG_SHORTDESC="rpcbind: a server that converts RPC program numbers into universal addresses." PKG_LONGDESC="The rpcbind utility is a server that converts RPC program numbers into universal addresses." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--enable-warmstarts \ + --disable-libwrap \ + --with-statedir=/tmp \ + --with-rpcuser=root" diff --git a/packages/network/samba/build b/packages/network/samba/build deleted file mode 100755 index c909fb180b..0000000000 --- a/packages/network/samba/build +++ /dev/null @@ -1,136 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -CFLAGS="$CFLAGS -fPIC -DPIC" - -cd $PKG_BUILD/source3 - -sh autogen.sh - -ac_cv_file__proc_sys_kernel_core_pattern=yes \ -libreplace_cv_HAVE_C99_VSNPRINTF=yes \ -libreplace_cv_HAVE_GETADDRINFO=yes \ -libreplace_cv_HAVE_IFACE_IFCONF=yes \ -LINUX_LFS_SUPPORT=yes \ -samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \ -samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \ -samba_cv_HAVE_IFACE_IFCONF=yes \ -samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \ -samba_cv_HAVE_SECURE_MKSTEMP=yes \ -samba_cv_HAVE_WRFILE_KEYTAB=no \ -samba_cv_USE_SETREUID=yes \ -samba_cv_USE_SETRESUID=yes \ -samba_cv_have_setreuid=yes \ -samba_cv_have_setresuid=yes \ -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --localstatedir=/var \ - --sysconfdir=/etc \ - --with-configdir=/etc/samba \ - --with-privatedir=/var/run \ - --with-codepagedir=/etc/samba \ - --with-lockdir=/var/lock \ - --with-logfilebase=/var/log \ - --with-nmbdsocketdir=/var/nmbd \ - --with-piddir=/var/run \ - --enable-shared \ - --disable-static \ - --disable-shared-libs \ - --disable-debug \ - --with-libiconv="$SYSROOT_PREFIX/usr" \ - --disable-krb5developer \ - --disable-picky-developer \ - --enable-largefile \ - --with-pthreads \ - --disable-socket-wrapper \ - --disable-nss-wrapper \ - --disable-swat \ - --disable-cups \ - --disable-iprint \ - --disable-pie \ - --disable-relro \ - --disable-fam \ - --disable-dnssd \ - --disable-avahi \ - --disable-pthreadpool \ - --enable-gnutls \ - --disable-netapi \ - --disable-dmalloc \ - --with-fhs \ - --without-libtalloc \ - --disable-external-libtalloc \ - --without-libtdb \ - --disable-external-libtdb \ - --without-libnetapi \ - --with-libsmbclient \ - --without-libsmbsharemodes \ - --without-libaddns \ - --without-afs \ - --without-fake-kaserver \ - --without-vfs-afsacl \ - --without-dce-dfs \ - --without-ldap \ - --without-ads \ - --without-dnsupdate \ - --without-automount \ - --without-cifsmount \ - --without-cifsumount \ - --without-cifsupcall \ - --without-krb5 \ - --without-pam \ - --without-pam_smbpass \ - --without-nisplus-home \ - --with-syslog \ - --without-quotas \ - --without-sys-quotas \ - --without-utmp \ - --without-cluster-support \ - --without-acl-support \ - --without-aio-support \ - --with-sendfile-support \ - --without-wbclient \ - --without-winbind \ - --with-included-popt \ - --with-included-iniparser \ - --without-sqlite3 \ - --without-setproctitle \ - -make bin/libtalloc.a -make bin/libwbclient.a -make bin/libtdb.a -make bin/libsmbclient.a - -if [ "$SAMBA_SERVER" = "yes" ]; then - make bin/samba_multicall -fi - -mkdir -p $SYSROOT_PREFIX/usr/lib - cp -P bin/*.a $SYSROOT_PREFIX/usr/lib - -mkdir -p $SYSROOT_PREFIX/usr/include - cp include/libsmbclient.h $SYSROOT_PREFIX/usr/include - -mkdir -p $SYSROOT_PREFIX/usr/lib/pkgconfig - cp pkgconfig/smbclient.pc $SYSROOT_PREFIX/usr/lib/pkgconfig diff --git a/packages/network/samba/install b/packages/network/samba/install deleted file mode 100755 index ca9d740cf9..0000000000 --- a/packages/network/samba/install +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -if [ "$SAMBA_SERVER" = "yes" ]; then - mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/source3/bin/samba_multicall $INSTALL/usr/bin - ln -sf samba_multicall $INSTALL/usr/bin/smbd - ln -sf samba_multicall $INSTALL/usr/bin/nmbd - ln -sf samba_multicall $INSTALL/usr/bin/smbpasswd - - mkdir -p $INSTALL/etc/samba - cp $PKG_BUILD/codepages/lowcase.dat $INSTALL/etc/samba - cp $PKG_BUILD/codepages/upcase.dat $INSTALL/etc/samba - cp $PKG_BUILD/codepages/valid.dat $INSTALL/etc/samba - - if [ -f $PROJECT_DIR/$PROJECT/config/smb.conf ]; then - mkdir -p $INSTALL/etc/samba - cp $PROJECT_DIR/$PROJECT/config/smb.conf $INSTALL/etc/samba - else - mkdir -p $INSTALL/etc/samba - cp $PKG_DIR/config/smb.conf $INSTALL/etc/samba - mkdir -p $INSTALL/usr/config - cp $PKG_DIR/config/smb.conf $INSTALL/usr/config/samba.conf.sample - fi -fi diff --git a/packages/network/samba/meta b/packages/network/samba/meta deleted file mode 100644 index 43abf77b17..0000000000 --- a/packages/network/samba/meta +++ /dev/null @@ -1,36 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -PKG_NAME="samba" -PKG_VERSION="3.6.15" -PKG_REV="1" -PKG_ARCH="any" -PKG_LICENSE="GPL" -PKG_SITE="http://www.samba.org" -PKG_URL="http://samba.org/samba/ftp/stable/$PKG_NAME-$PKG_VERSION.tar.gz" -PKG_DEPENDS="zlib connman" -PKG_BUILD_DEPENDS="toolchain zlib attr" -PKG_PRIORITY="optional" -PKG_SECTION="network" -PKG_SHORTDESC="samba: The free SMB / CIFS fileserver and client" -PKG_LONGDESC="Samba is a SMB server that runs on Unix and other operating systems. It allows these operating systems (currently Unix, Netware, OS/2 and AmigaDOS) to act as a file and print server for SMB and CIFS clients. There are many Lan-Manager compatible clients such as LanManager for DOS, Windows for Workgroups, Windows NT, Windows 95, Linux smbfs, OS/2, Pathworks and more." -PKG_IS_ADDON="no" - -PKG_AUTORECONF="no" diff --git a/packages/network/samba/package.mk b/packages/network/samba/package.mk new file mode 100644 index 0000000000..95d22882da --- /dev/null +++ b/packages/network/samba/package.mk @@ -0,0 +1,188 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="samba" +PKG_VERSION="3.6.16" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.samba.org" +PKG_URL="http://samba.org/samba/ftp/stable/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="zlib connman" +PKG_BUILD_DEPENDS_TARGET="toolchain zlib attr" +PKG_PRIORITY="optional" +PKG_SECTION="network" +PKG_SHORTDESC="samba: The free SMB / CIFS fileserver and client" +PKG_LONGDESC="Samba is a SMB server that runs on Unix and other operating systems. It allows these operating systems (currently Unix, Netware, OS/2 and AmigaDOS) to act as a file and print server for SMB and CIFS clients. There are many Lan-Manager compatible clients such as LanManager for DOS, Windows for Workgroups, Windows NT, Windows 95, Linux smbfs, OS/2, Pathworks and more." + +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + +if [ "$AVAHI_DAEMON" = yes ]; then + PKG_DEPENDS="$PKG_DEPENDS avahi" + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET avahi" + SMB_AVAHI="--enable-avahi" +else + SMB_AVAHI="--disable-avahi" +fi + +PKG_CONFIGURE_SCRIPT="source3/configure" +PKG_CONFIGURE_OPTS_TARGET="ac_cv_file__proc_sys_kernel_core_pattern=yes \ + libreplace_cv_HAVE_C99_VSNPRINTF=yes \ + libreplace_cv_HAVE_GETADDRINFO=yes \ + libreplace_cv_HAVE_IFACE_IFCONF=yes \ + LINUX_LFS_SUPPORT=yes \ + samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \ + samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \ + samba_cv_HAVE_IFACE_IFCONF=yes \ + samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \ + samba_cv_HAVE_SECURE_MKSTEMP=yes \ + samba_cv_HAVE_WRFILE_KEYTAB=no \ + samba_cv_USE_SETREUID=yes \ + samba_cv_USE_SETRESUID=yes \ + samba_cv_have_setreuid=yes \ + samba_cv_have_setresuid=yes \ + --with-configdir=/etc/samba \ + --with-privatedir=/var/run \ + --with-codepagedir=/etc/samba \ + --with-lockdir=/var/lock \ + --with-logfilebase=/var/log \ + --with-nmbdsocketdir=/var/nmbd \ + --with-piddir=/var/run \ + --disable-shared-libs \ + --disable-debug \ + --with-libiconv="$SYSROOT_PREFIX/usr" \ + --disable-krb5developer \ + --disable-picky-developer \ + --enable-largefile \ + --with-pthreads \ + --disable-socket-wrapper \ + --disable-nss-wrapper \ + --disable-swat \ + --disable-cups \ + --disable-iprint \ + --disable-pie \ + --disable-relro \ + --disable-fam \ + --disable-dnssd \ + $SMB_AVAHI \ + --disable-pthreadpool \ + --enable-gnutls \ + --disable-netapi \ + --disable-dmalloc \ + --with-fhs \ + --without-libtalloc \ + --disable-external-libtalloc \ + --without-libtdb \ + --disable-external-libtdb \ + --without-libnetapi \ + --with-libsmbclient \ + --without-libsmbsharemodes \ + --without-libaddns \ + --without-afs \ + --without-fake-kaserver \ + --without-vfs-afsacl \ + --without-dce-dfs \ + --without-ldap \ + --without-ads \ + --without-dnsupdate \ + --without-automount \ + --without-cifsmount \ + --without-cifsumount \ + --without-cifsupcall \ + --without-krb5 \ + --without-pam \ + --without-pam_smbpass \ + --without-nisplus-home \ + --with-syslog \ + --without-quotas \ + --without-sys-quotas \ + --without-utmp \ + --without-cluster-support \ + --without-acl-support \ + --without-aio-support \ + --with-sendfile-support \ + --without-libtevent \ + --without-wbclient \ + --without-winbind \ + --with-included-popt \ + --with-included-iniparser \ + --without-sqlite3 \ + --without-setproctitle" + +pre_configure_target() { + ( cd ../source3 + sh autogen.sh + ) + + CFLAGS="$CFLAGS -fPIC -DPIC" +} + +make_target() { + make bin/libtalloc.a + make bin/libwbclient.a + make bin/libtdb.a + make bin/libtevent.a + make bin/libsmbclient.a + + if [ "$SAMBA_SERVER" = "yes" ]; then + make bin/samba_multicall + fi +} + +post_make_target() { + mkdir -p $SYSROOT_PREFIX/usr/lib + cp -P bin/*.a $SYSROOT_PREFIX/usr/lib + + mkdir -p $SYSROOT_PREFIX/usr/include + cp ../source3/include/libsmbclient.h $SYSROOT_PREFIX/usr/include + + mkdir -p $SYSROOT_PREFIX/usr/lib/pkgconfig + cp pkgconfig/smbclient.pc $SYSROOT_PREFIX/usr/lib/pkgconfig +} + +makeinstall_target() { + if [ "$SAMBA_SERVER" = "yes" ]; then + mkdir -p $INSTALL/usr/bin + cp bin/samba_multicall $INSTALL/usr/bin + ln -sf samba_multicall $INSTALL/usr/bin/smbd + ln -sf samba_multicall $INSTALL/usr/bin/nmbd + ln -sf samba_multicall $INSTALL/usr/bin/smbpasswd + + mkdir -p $INSTALL/etc/samba + cp ../codepages/lowcase.dat $INSTALL/etc/samba + cp ../codepages/upcase.dat $INSTALL/etc/samba + cp ../codepages/valid.dat $INSTALL/etc/samba + + mkdir -p $INSTALL/etc/init.d + cp $PKG_DIR/scripts/52_samba $INSTALL/etc/init.d + + if [ -f $PROJECT_DIR/$PROJECT/config/smb.conf ]; then + mkdir -p $INSTALL/etc/samba + cp $PROJECT_DIR/$PROJECT/config/smb.conf $INSTALL/etc/samba + else + mkdir -p $INSTALL/etc/samba + cp $PKG_DIR/config/smb.conf $INSTALL/etc/samba + mkdir -p $INSTALL/usr/config + cp $PKG_DIR/config/smb.conf $INSTALL/usr/config/samba.conf.sample + fi + fi +} + diff --git a/packages/network/samba/patches/samba-110-multicall.patch b/packages/network/samba/patches/samba-110-multicall.patch index e667f06a69..e4681a2e85 100644 --- a/packages/network/samba/patches/samba-110-multicall.patch +++ b/packages/network/samba/patches/samba-110-multicall.patch @@ -1,6 +1,7 @@ ---- a/source3/Makefile.in -+++ b/source3/Makefile.in -@@ -73,20 +73,20 @@ LDAP_LIBS=@LDAP_LIBS@ +diff -Naur samba-3.6.16/source3/Makefile.in samba-3.6.16.patch/source3/Makefile.in +--- samba-3.6.16/source3/Makefile.in 2013-06-19 09:35:24.000000000 +0200 ++++ samba-3.6.16.patch/source3/Makefile.in 2013-08-01 01:53:43.264428180 +0200 +@@ -73,22 +73,22 @@ NSCD_LIBS=@NSCD_LIBS@ UUID_LIBS=@UUID_LIBS@ LIBWBCLIENT=@LIBWBCLIENT_STATIC@ @LIBWBCLIENT_SHARED@ @@ -14,6 +15,9 @@ LIBTALLOC=@LIBTALLOC_STATIC@ @LIBTALLOC_SHARED@ -LIBTALLOC_LIBS=@LIBTALLOC_LIBS@ +LIBTALLOC_LIBS=@LIBTALLOC_STATIC@ + LIBTEVENT=@LIBTEVENT_STATIC@ @LIBTEVENT_SHARED@ +-LIBTEVENT_LIBS=@LIBTEVENT_LIBS@ ++LIBTEVENT_LIBS=@LIBTEVENT_STATIC@ LIBREPLACE_LIBS=@LIBREPLACE_LIBS@ LIBTDB=@LIBTDB_STATIC@ @LIBTDB_SHARED@ -LIBTDB_LIBS=@LIBTDB_LIBS@ @@ -25,7 +29,7 @@ LIBSMBCLIENT_LIBS=@LIBSMBCLIENT_LIBS@ LIBSMBSHAREMODES_LIBS=@LIBSMBSHAREMODES_LIBS@ -@@ -214,7 +214,7 @@ PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_P +@@ -216,7 +216,7 @@ # Note that all executable programs now provide for an optional executable suffix. @@ -34,7 +38,7 @@ BIN_PROGS1 = bin/smbclient@EXEEXT@ bin/net@EXEEXT@ bin/smbspool@EXEEXT@ \ bin/testparm@EXEEXT@ bin/smbstatus@EXEEXT@ bin/smbget@EXEEXT@ \ -@@ -1774,6 +1774,42 @@ bin/.dummy: +@@ -1777,6 +1777,42 @@ dir=bin $(MAKEDIR); fi @: >> $@ || : > $@ # what a fancy emoticon! @@ -66,19 +70,20 @@ + +MULTICALL_O = $(sort $(SMBD_MULTI_O) $(NMBD_MULTI_O) $(SMBPASSWD_MULTI_O) $(MULTI_O)) + -+bin/samba_multicall@EXEEXT@: $(BINARY_PREREQS) $(MULTICALL_O) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) @BUILD_POPT@ ++bin/samba_multicall@EXEEXT@: $(BINARY_PREREQS) $(MULTICALL_O) $(LIBTALLOC) $(LIBTEVENT) $(LIBTDB) $(LIBWBCLIENT) @BUILD_POPT@ + @echo Linking $@ + @$(CC) -o $@ $(MULTICALL_O) $(LDFLAGS) $(LDAP_LIBS) @SMBD_FAM_LIBS@ \ + $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \ + $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) $(AVAHI_LIBS) \ -+ $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \ ++ $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTEVENT_LIBS) $(LIBTDB_LIBS) \ + $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) + - bin/smbd@EXEEXT@: $(BINARY_PREREQS) $(SMBD_OBJ) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) @BUILD_POPT@ + bin/smbd@EXEEXT@: $(BINARY_PREREQS) $(SMBD_OBJ) $(LIBTALLOC) $(LIBTEVENT) $(LIBTDB) $(LIBWBCLIENT) @BUILD_POPT@ @echo Linking $@ @$(CC) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LDAP_LIBS) @SMBD_FAM_LIBS@ \ ---- /dev/null -+++ b/source3/multi.c +diff -Naur samba-3.6.16/source3/multi.c samba-3.6.16.patch/source3/multi.c +--- samba-3.6.16/source3/multi.c 1970-01-01 01:00:00.000000000 +0100 ++++ samba-3.6.16.patch/source3/multi.c 2013-08-01 01:24:51.794393962 +0200 @@ -0,0 +1,35 @@ +#include +#include diff --git a/packages/network/samba/init.d/52_samba b/packages/network/samba/scripts/52_samba similarity index 100% rename from packages/network/samba/init.d/52_samba rename to packages/network/samba/scripts/52_samba diff --git a/packages/network/wpa_supplicant/install b/packages/network/wpa_supplicant/install deleted file mode 100755 index 0bc3f95840..0000000000 --- a/packages/network/wpa_supplicant/install +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/etc/dbus-1/system.d - cp $PKG_BUILD/wpa_supplicant/dbus/dbus-wpa_supplicant.conf $INSTALL/etc/dbus-1/system.d - -mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/wpa_supplicant/wpa_supplicant $INSTALL/usr/bin - cp $PKG_BUILD/wpa_supplicant/wpa_passphrase $INSTALL/usr/bin - -mkdir -p $INSTALL/usr/share/dbus-1/system-services - cp $PKG_BUILD/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service $INSTALL/usr/share/dbus-1/system-services - cp $PKG_BUILD/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service $INSTALL/usr/share/dbus-1/system-services diff --git a/packages/network/wpa_supplicant/meta b/packages/network/wpa_supplicant/package.mk similarity index 64% rename from packages/network/wpa_supplicant/meta rename to packages/network/wpa_supplicant/package.mk index 07d28be926..2b8b8f9ffd 100644 --- a/packages/network/wpa_supplicant/meta +++ b/packages/network/wpa_supplicant/package.mk @@ -26,11 +26,37 @@ PKG_LICENSE="GPL" PKG_SITE="http://hostap.epitest.fi/wpa_supplicant/" PKG_URL="http://hostap.epitest.fi/releases/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="dbus openssl" -PKG_BUILD_DEPENDS="toolchain dbus libnl openssl" +PKG_BUILD_DEPENDS_TARGET="toolchain dbus libnl openssl" PKG_PRIORITY="optional" PKG_SECTION="network" PKG_SHORTDESC="wpa_supplicant: An IEEE 802.11i supplicant implementation" PKG_LONGDESC="The wpa_supplicant is a free software implementation of an IEEE 802.11i supplicant. In addition to being a full-featured WPA2 supplicant, it also has support for WPA and older wireless LAN security protocols." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="no" + +PKG_MAKE_OPTS_TARGET="-C wpa_supplicant V=1 LIBDIR=/usr/lib BINDIR=/usr/bin" +PKG_MAKEINSTALL_OPTS_TARGET="-C wpa_supplicant V=1 LIBDIR=/usr/lib BINDIR=/usr/bin" + +configure_target() { +# wpa_supplicant fails to build with LTO + strip_lto + + LDFLAGS="$LDFLAGS -lpthread" + + cp $PKG_DIR/config/makefile.config wpa_supplicant/.config + +# echo "CONFIG_TLS=gnutls" >> .config +# echo "CONFIG_GNUTLS_EXTRA=y" >> .config +} + +post_makeinstall_target() { + rm -r $INSTALL/usr/bin/wpa_cli + +mkdir -p $INSTALL/etc/dbus-1/system.d + cp wpa_supplicant/dbus/dbus-wpa_supplicant.conf $INSTALL/etc/dbus-1/system.d + +mkdir -p $INSTALL/usr/share/dbus-1/system-services + cp wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service $INSTALL/usr/share/dbus-1/system-services + cp wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service $INSTALL/usr/share/dbus-1/system-services +} diff --git a/packages/security/polkit/build b/packages/security/polkit/build deleted file mode 100755 index 0da741cf88..0000000000 --- a/packages/security/polkit/build +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --libexecdir=/usr/lib/polkit-1 \ - --localstatedir=/var \ - --disable-static \ - --enable-shared \ - --disable-man-pages \ - --disable-gtk-doc \ - --disable-nls \ - --disable-introspection \ - --disable-systemd \ - --with-authfw=shadow \ - --with-os-type=redhat \ - --with-expat=$SYSROOT_PREFIX/usr \ - -make - -$MAKEINSTALL diff --git a/packages/security/polkit/install b/packages/security/polkit/install deleted file mode 100755 index 4d99cb6561..0000000000 --- a/packages/security/polkit/install +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/etc/dbus-1/system.d - cp -P $PKG_BUILD/data/org.freedesktop.PolicyKit1.conf $INSTALL/etc/dbus-1/system.d - -mkdir -p $INSTALL/etc/polkit-1/localauthority - echo "chmod 700 $INSTALL/etc/polkit-1/localauthority" >> $FAKEROOT_SCRIPT - -mkdir -p $INSTALL/etc/polkit-1/localauthority/10-vendor.d -mkdir -p $INSTALL/etc/polkit-1/localauthority/20-org.d -mkdir -p $INSTALL/etc/polkit-1/localauthority/30-site.d -mkdir -p $INSTALL/etc/polkit-1/localauthority/50-local.d -mkdir -p $INSTALL/etc/polkit-1/localauthority/90-mandatory.d - -mkdir -p $INSTALL/etc/polkit-1/localauthority.conf.d - cp -P $PKG_BUILD/src/polkitbackend/50-localauthority.conf $INSTALL/etc/polkit-1/localauthority.conf.d - -mkdir -p $INSTALL/etc/polkit-1/nullbackend.conf.d - cp -P $PKG_BUILD/src/nullbackend/50-nullbackend.conf $INSTALL/etc/polkit-1/nullbackend.conf.d - -mkdir -p $INSTALL/usr/bin - cp -P $PKG_BUILD/src/programs/.libs/pkaction $INSTALL/usr/bin - cp -P $PKG_BUILD/src/programs/.libs/pkcheck $INSTALL/usr/bin - cp -P $PKG_BUILD/src/programs/.libs/pkexec $INSTALL/usr/bin - echo "chmod 4755 $INSTALL/usr/bin/pkexec" >> $FAKEROOT_SCRIPT - -mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/src/polkitagent/.libs/libpolkit-agent-1.so* $INSTALL/usr/lib - rm -rf $INSTALL/usr/lib/libpolkit-agent-1.so*T - cp -P $PKG_BUILD/src/polkitbackend/.libs/libpolkit-backend-1.so* $INSTALL/usr/lib - rm -rf $INSTALL/usr/lib/libpolkit-backend-1.so*T - cp -P $PKG_BUILD/src/polkit/.libs/libpolkit-gobject-1.so* $INSTALL/usr/lib - -mkdir -p $INSTALL/usr/lib/polkit-1/extensions - cp -P $PKG_BUILD/src/nullbackend/.libs/*.so $INSTALL/usr/lib/polkit-1/extensions - -mkdir -p $INSTALL/usr/lib/polkit-1 - cp -P $PKG_BUILD/src/polkitagent/.libs/polkit-agent-helper-1 $INSTALL/usr/lib/polkit-1 - echo "chmod 4755 $INSTALL/usr/lib/polkit-1/polkit-agent-helper-1" >> $FAKEROOT_SCRIPT - cp -P $PKG_BUILD/src/polkitd/.libs/polkitd $INSTALL/usr/lib/polkit-1 - -mkdir -p $INSTALL/usr/share/dbus-1/system-services - cp -P $PKG_BUILD/data/org.freedesktop.PolicyKit1.service $INSTALL/usr/share/dbus-1/system-services - -mkdir -p $INSTALL/usr/share/polkit-1/actions - cp -P $PKG_BUILD/actions/org.freedesktop.policykit.policy $INSTALL/usr/share/polkit-1/actions diff --git a/packages/security/polkit/meta b/packages/security/polkit/package.mk similarity index 64% rename from packages/security/polkit/meta rename to packages/security/polkit/package.mk index e8932328f2..48b4a69c60 100644 --- a/packages/security/polkit/meta +++ b/packages/security/polkit/package.mk @@ -26,11 +26,31 @@ PKG_LICENSE="MIT" PKG_SITE="http://gitweb.freedesktop.org/?p=PolicyKit.git;a=summary" PKG_URL="http://hal.freedesktop.org/releases/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="zlib glib expat" -PKG_BUILD_DEPENDS="toolchain zlib sg3_utils glib expat" +PKG_BUILD_DEPENDS_TARGET="toolchain zlib sg3_utils glib expat" PKG_PRIORITY="optional" PKG_SECTION="security" PKG_SHORTDESC="polkit: Authorization Toolkit" PKG_LONGDESC="PolicyKit is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged processes." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--libexecdir=/usr/lib/polkit-1 \ + --disable-man-pages \ + --disable-gtk-doc \ + --disable-nls \ + --disable-introspection \ + --disable-systemd \ + --with-authfw=shadow \ + --with-os-type=redhat \ + --with-expat=$SYSROOT_PREFIX/usr" + +post_makeinstall_target() { + rm -rf $INSTALL/usr/bin/pk-example-frobnicate + rm -rf $INSTALL/usr/share/polkit-1/actions/org.freedesktop.policykit.examples.pkexec.policy +} + +post_install() { + echo "chmod 4755 $INSTALL/usr/bin/pkexec" >> $FAKEROOT_SCRIPT + echo "chmod 4755 $INSTALL/usr/lib/polkit-1/polkit-agent-helper-1" >> $FAKEROOT_SCRIPT +} diff --git a/packages/security/polkit/tmpfiles.d/34_polkit.conf b/packages/security/polkit/tmpfiles.d/34_polkit.conf index 127a9bcb83..c006a7ce4c 100644 --- a/packages/security/polkit/tmpfiles.d/34_polkit.conf +++ b/packages/security/polkit/tmpfiles.d/34_polkit.conf @@ -18,9 +18,9 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -d /var/lib/polkit-1 0700 root root 10d - -d /var/lib/polkit-1/localauthority/10-vendor.d 0755 root root 10d - -d /var/lib/polkit-1/localauthority/20-org.d 0755 root root 10d - -d /var/lib/polkit-1/localauthority/30-site.d 0755 root root 10d - -d /var/lib/polkit-1/localauthority/50-local.d 0755 root root 10d - -d /var/lib/polkit-1/localauthority/90-mandatory.d 0755 root root 10d - +d /var/lib/polkit-1 0700 root root - - +d /var/lib/polkit-1/localauthority/10-vendor.d 0755 root root - - +d /var/lib/polkit-1/localauthority/20-org.d 0755 root root - - +d /var/lib/polkit-1/localauthority/30-site.d 0755 root root - - +d /var/lib/polkit-1/localauthority/50-local.d 0755 root root - - +d /var/lib/polkit-1/localauthority/90-mandatory.d 0755 root root - - diff --git a/packages/sysutils/busybox/init.d/05_syslogd b/packages/sysutils/busybox/init.d/05_syslogd index d7f7989dcb..2c7b6974a6 100644 --- a/packages/sysutils/busybox/init.d/05_syslogd +++ b/packages/sysutils/busybox/init.d/05_syslogd @@ -42,6 +42,11 @@ SYSLOGD_OPTIONS="$SYSLOGD_OPTIONS -f /storage/.config/syslog.conf" fi + if [ "$DEBUG" = yes ]; then + SYSLOGD_OPTIONS="$SYSLOGD_OPTIONS -b 99 -s 1024" + fi + + rm /var/run/syslogd.pid &>/dev/null syslogd $SYSLOGD_OPTIONS diff --git a/packages/sysutils/busybox/tmpfiles.d/02_busybox.conf b/packages/sysutils/busybox/tmpfiles.d/02_busybox.conf index 2d1b051c58..281eb319be 100644 --- a/packages/sysutils/busybox/tmpfiles.d/02_busybox.conf +++ b/packages/sysutils/busybox/tmpfiles.d/02_busybox.conf @@ -18,12 +18,12 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -d /var/cache 0755 root root 10d - -d /var/lib 0755 root root 10d - -d /var/lock 0755 root root 10d - -d /var/media 0755 root root 10d - -d /var/run 1777 root root 10d - -d /var/tmp 1777 root root 10d - +d /var/cache 0755 root root - - +d /var/lib 0755 root root - - +d /var/lock 0755 root root - - +d /var/media 0755 root root - - +d /var/run 1777 root root - - +d /var/tmp 1777 root root - - -f /var/run/utmp 1777 root root 10d - -f /var/log/wtmp 1777 root root 10d - +f /var/run/utmp 1777 root root - - +f /var/log/wtmp 1777 root root - - diff --git a/packages/sysutils/dbus-host/build b/packages/sysutils/dbus-host/build deleted file mode 100755 index 1c9f9c32f3..0000000000 --- a/packages/sysutils/dbus-host/build +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -$SCRIPTS/unpack dbus - -DBUS_DIR=`ls -d $BUILD/dbus-[0-9]*` - -setup_toolchain host - -cd $DBUS_DIR - -do_autoreconf - -mkdir -p .build-host && cd .build-host -../configure --host=$HOST_NAME \ - --build=$HOST_NAME \ - --prefix=$ROOT/$TOOLCHAIN \ - --sysconfdir=$ROOT/$TOOLCHAIN/etc \ - --enable-verbose-mode \ - --enable-asserts \ - --enable-checks \ - --disable-tests \ - --disable-xml-docs \ - --disable-doxygen-docs \ - -make -make install - -$ROOT/$TOOLCHAIN/bin/dbus-daemon --introspect > introspect.xml diff --git a/packages/sysutils/dbus-host/meta b/packages/sysutils/dbus-host/meta deleted file mode 100644 index c2a814d55a..0000000000 --- a/packages/sysutils/dbus-host/meta +++ /dev/null @@ -1,36 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -PKG_NAME="dbus-host" -PKG_VERSION="" -PKG_REV="1" -PKG_ARCH="any" -PKG_LICENSE="GPL" -PKG_SITE="http://dbus.freedesktop.org" -PKG_URL="" -PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain expat:host" -PKG_PRIORITY="optional" -PKG_SECTION="system" -PKG_SHORTDESC="dbus: simple interprocess messaging system" -PKG_LONGDESC="D-Bus is a message bus, used for sending messages between applications. This package contains the D-Bus daemon and related utilities and the dbus shared library." -PKG_IS_ADDON="no" - -PKG_AUTORECONF="no" diff --git a/packages/sysutils/dbus/build b/packages/sysutils/dbus/build deleted file mode 100755 index a769e20805..0000000000 --- a/packages/sysutils/dbus/build +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -export ac_cv_have_abstract_sockets=yes - -cd $PKG_BUILD -mkdir -p .build-target && cd .build-target -../configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --libexecdir=/usr/lib/dbus \ - --localstatedir=/var \ - --disable-static \ - --enable-shared \ - --enable-verbose-mode \ - --enable-asserts \ - --enable-checks \ - --disable-tests \ - --disable-ansi \ - --disable-xml-docs \ - --disable-doxygen-docs \ - --enable-abstract-sockets \ - --disable-x11-autolaunch \ - --disable-selinux \ - --disable-libaudit \ - --enable-dnotify \ - --enable-inotify \ - --with-xml=expat \ - --without-x \ - --with-dbus-user=dbus \ - -make - -$MAKEINSTALL diff --git a/packages/sysutils/dbus/install b/packages/sysutils/dbus/install deleted file mode 100755 index 7cc5f5c8fc..0000000000 --- a/packages/sysutils/dbus/install +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -add_user dbus x 81 81 "System message bus" "/" "/bin/sh" -add_group dbus 81 -add_group netdev 497 - -mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/.build-target/tools/dbus-cleanup-sockets $INSTALL/usr/bin - cp $PKG_BUILD/.build-target/bus/dbus-daemon $INSTALL/usr/bin - cp $PKG_BUILD/.build-target/tools/.libs/dbus-monitor $INSTALL/usr/bin - cp $PKG_BUILD/.build-target/tools/.libs/dbus-uuidgen $INSTALL/usr/bin - cp $PKG_BUILD/.build-target/tools/.libs/dbus-send $INSTALL/usr/bin -# cp $PKG_BUILD/.build-target/tools/dbus-launch $INSTALL/usr/bin - -mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/.build-target/dbus/.libs/libdbus-1.so* $INSTALL/usr/lib - -mkdir -p $INSTALL/usr/lib/dbus - cp $PKG_BUILD/.build-target/bus/dbus-daemon-launch-helper $INSTALL/usr/lib/dbus - echo "chmod 4750 $INSTALL/usr/lib/dbus/dbus-daemon-launch-helper" >> $FAKEROOT_SCRIPT - echo "chown 0:81 $INSTALL/usr/lib/dbus/dbus-daemon-launch-helper" >> $FAKEROOT_SCRIPT - -mkdir -p $INSTALL/etc/dbus-1 - cp $PKG_BUILD/.build-target/bus/session.conf $INSTALL/etc/dbus-1 - cp $PKG_BUILD/.build-target/bus/system.conf $INSTALL/etc/dbus-1 - -mkdir -p $INSTALL/etc/dbus-1/system.d -mkdir -p $INSTALL/etc/dbus-1/session.d -mkdir -p $INSTALL/usr/share/dbus-1/services -mkdir -p $INSTALL/usr/share/dbus-1/system-services diff --git a/packages/sysutils/dbus/meta b/packages/sysutils/dbus/meta deleted file mode 100644 index 8a3feb1ef2..0000000000 --- a/packages/sysutils/dbus/meta +++ /dev/null @@ -1,36 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -PKG_NAME="dbus" -PKG_VERSION="1.6.12" -PKG_REV="1" -PKG_ARCH="any" -PKG_LICENSE="GPL" -PKG_SITE="http://dbus.freedesktop.org" -PKG_URL="http://dbus.freedesktop.org/releases/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz" -PKG_DEPENDS="expat" -PKG_BUILD_DEPENDS="toolchain expat" -PKG_PRIORITY="required" -PKG_SECTION="system" -PKG_SHORTDESC="dbus: simple interprocess messaging system" -PKG_LONGDESC="D-Bus is a message bus, used for sending messages between applications. This package contains the D-Bus daemon and related utilities and the dbus shared library." -PKG_IS_ADDON="no" - -PKG_AUTORECONF="yes" diff --git a/packages/sysutils/dbus/package.mk b/packages/sysutils/dbus/package.mk new file mode 100644 index 0000000000..b877a41fae --- /dev/null +++ b/packages/sysutils/dbus/package.mk @@ -0,0 +1,83 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="dbus" +PKG_VERSION="1.6.12" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://dbus.freedesktop.org" +PKG_URL="http://dbus.freedesktop.org/releases/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="expat" +PKG_BUILD_DEPENDS_TARGET="toolchain expat" +PKG_BUILD_DEPENDS_HOST="toolchain expat:host" +PKG_PRIORITY="required" +PKG_SECTION="system" +PKG_SHORTDESC="dbus: simple interprocess messaging system" +PKG_LONGDESC="D-Bus is a message bus, used for sending messages between applications. This package contains the D-Bus daemon and related utilities and the dbus shared library." + +PKG_IS_ADDON="no" +PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="export ac_cv_have_abstract_sockets=yes \ + --libexecdir=/usr/lib/dbus \ + --enable-verbose-mode \ + --enable-asserts \ + --enable-checks \ + --disable-tests \ + --disable-ansi \ + --disable-xml-docs \ + --disable-doxygen-docs \ + --enable-abstract-sockets \ + --disable-x11-autolaunch \ + --disable-selinux \ + --disable-libaudit \ + --disable-systemd \ + --enable-dnotify \ + --enable-inotify \ + --with-xml=expat \ + --without-x \ + --with-dbus-user=dbus" + +PKG_CONFIGURE_OPTS_HOST="--enable-verbose-mode \ + --enable-asserts \ + --enable-checks \ + --disable-tests \ + --disable-xml-docs \ + --disable-doxygen-docs" + +post_makeinstall_host() { + $ROOT/$TOOLCHAIN/bin/dbus-daemon --introspect > introspect.xml +} + +post_makeinstall_target() { + rm -rf $INSTALL/lib/systemd + rm -rf $INSTALL/etc/rc.d + rm -rf $INSTALL/usr/lib/dbus-1.0/include +} + +post_install() { + add_user dbus x 81 81 "System message bus" "/" "/bin/sh" + add_group dbus 81 + add_group netdev 497 + + echo "chmod 4750 $INSTALL/usr/lib/dbus/dbus-daemon-launch-helper" >> $FAKEROOT_SCRIPT + echo "chown 0:81 $INSTALL/usr/lib/dbus/dbus-daemon-launch-helper" >> $FAKEROOT_SCRIPT +} diff --git a/packages/sysutils/dbus/tmpfiles.d/14_dbus.conf b/packages/sysutils/dbus/tmpfiles.d/14_dbus.conf index 3a620aec44..1bd1272f5a 100644 --- a/packages/sysutils/dbus/tmpfiles.d/14_dbus.conf +++ b/packages/sysutils/dbus/tmpfiles.d/14_dbus.conf @@ -18,7 +18,7 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -d /var/lib/dbus 0755 root root 10d - -d /var/run/dbus 0755 root root 10d - +d /var/lib/dbus 0755 root root - - +d /var/run/dbus 0755 root root - - L /var/lib/dbus/machine-id - - - - /etc/machine-id diff --git a/packages/sysutils/diskdev_cmds/udev.d/62-fsck-hfsplus.rules b/packages/sysutils/diskdev_cmds/udev.d/62-fsck-hfsplus.rules index e6bd5147d1..3aa2170d88 100644 --- a/packages/sysutils/diskdev_cmds/udev.d/62-fsck-hfsplus.rules +++ b/packages/sysutils/diskdev_cmds/udev.d/62-fsck-hfsplus.rules @@ -21,7 +21,7 @@ SUBSYSTEM!="block", GOTO="end" ACTION!="add", GOTO="end" -ACTION=="add", IMPORT{program}="/usr/bin/blkid -o udev -p %N" +ACTION=="add", IMPORT{program}="/usr/sbin/blkid -o udev -p %N" ACTION=="add", ENV{ID_FS_TYPE}=="hfsplus", ENV{mount_options}="rw,nosuid,nodev,uhelper=udisks", RUN+="/bin/fsck.hfsplus -r -y /dev/%k" # exit diff --git a/packages/sysutils/dosfstools/install b/packages/sysutils/dosfstools/install deleted file mode 100755 index e1e9fe26d0..0000000000 --- a/packages/sysutils/dosfstools/install +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/usr/sbin - cp $PKG_BUILD/mkdosfs $INSTALL/usr/sbin - ln -sf mkdosfs $INSTALL/usr/sbin/mkfs.vfat - ln -sf mkdosfs $INSTALL/usr/sbin/mkfs.msdos - cp $PKG_BUILD/dosfsck $INSTALL/usr/sbin - ln -sf dosfsck $INSTALL/usr/sbin/fsck.vfat - ln -sf dosfsck $INSTALL/usr/sbin/fsck.msdos - cp $PKG_BUILD/dosfslabel $INSTALL/usr/sbin diff --git a/packages/sysutils/dosfstools/meta b/packages/sysutils/dosfstools/package.mk similarity index 91% rename from packages/sysutils/dosfstools/meta rename to packages/sysutils/dosfstools/package.mk index ae73100562..869fedf439 100644 --- a/packages/sysutils/dosfstools/meta +++ b/packages/sysutils/dosfstools/package.mk @@ -19,18 +19,22 @@ ################################################################################ PKG_NAME="dosfstools" -PKG_VERSION="3.0.16" +PKG_VERSION="3.0.22" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://daniel-baumann.ch/software/dosfstools/" PKG_URL="http://daniel-baumann.ch/files/software/dosfstools/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_BUILD_DEPENDS_TARGET="toolchain" PKG_PRIORITY="optional" PKG_SECTION="tools" PKG_SHORTDESC="dosfstools: utilities for making and checking MS-DOS FAT filesystems." PKG_LONGDESC="dosfstools contains utilities for making and checking MS-DOS FAT filesystems." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="no" + +PKG_MAKE_OPTS_TARGET="PREFIX=/usr" +PKG_MAKEINSTALL_OPTS_TARGET="PREFIX=/usr" + diff --git a/packages/sysutils/fuse/build b/packages/sysutils/fuse/build deleted file mode 100755 index fce5a85a99..0000000000 --- a/packages/sysutils/fuse/build +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --enable-shared \ - --disable-static \ - --with-libiconv-prefix="$SYSROOT_PREFIX/usr" \ - --enable-lib \ - --enable-util \ - --disable-example \ - --enable-mtab \ - --disable-rpath \ - --with-gnu-ld \ - -make -$MAKEINSTALL diff --git a/packages/sysutils/fuse/config/fuse.conf b/packages/sysutils/fuse/config/fuse.conf deleted file mode 100644 index cd4c6bdaf3..0000000000 --- a/packages/sysutils/fuse/config/fuse.conf +++ /dev/null @@ -1,2 +0,0 @@ -# mount_max = 1000 -# user_allow_other diff --git a/packages/sysutils/fuse/install b/packages/sysutils/fuse/install deleted file mode 100755 index 6686442ffe..0000000000 --- a/packages/sysutils/fuse/install +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/etc - cp $PKG_DIR/config/fuse.conf $INSTALL/etc - -mkdir -p $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/util/udev.rules $INSTALL/lib/udev/rules.d/99-fuse.rules - -mkdir -p $INSTALL/sbin - cp $PKG_BUILD/util/mount.fuse $INSTALL/sbin - -mkdir -p $INSTALL/bin - cp $PKG_BUILD/util/fusermount $INSTALL/bin - cp $PKG_BUILD/util/ulockmgr_server $INSTALL/bin - -mkdir -p $INSTALL/lib - cp -P $PKG_BUILD/lib/.libs/*.so* $INSTALL/lib - diff --git a/packages/sysutils/fuse/meta b/packages/sysutils/fuse/package.mk similarity index 80% rename from packages/sysutils/fuse/meta rename to packages/sysutils/fuse/package.mk index 97262b8660..c1640f5e89 100644 --- a/packages/sysutils/fuse/meta +++ b/packages/sysutils/fuse/package.mk @@ -19,18 +19,30 @@ ################################################################################ PKG_NAME="fuse" -PKG_VERSION="2.9.2" +PKG_VERSION="2.9.3" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://sourceforge.net/projects/fuse/" PKG_URL="$SOURCEFORGE_SRC/fuse/fuse-2.X/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_BUILD_DEPENDS_TARGET="toolchain" PKG_PRIORITY="optional" PKG_SECTION="system" PKG_SHORTDESC="fuse: A simple user-space filesystem interface for Linux" PKG_LONGDESC="FUSE provides a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. FUSE also aims to provide a secure method for non privileged users to create and mount their own filesystem implementations." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--enable-lib \ + --enable-util \ + --disable-example \ + --enable-mtab \ + --disable-rpath \ + --with-gnu-ld" + +post_makeinstall_target() { + rm -rf $INSTALL/etc/init.d + rm -rf $INSTALL/etc/udev +} diff --git a/packages/sysutils/fuse/patches/fuse-2.9.2-001-Fix-udev-rules-Fedora-specific.patch b/packages/sysutils/fuse/patches/fuse-2.9.2-001-Fix-udev-rules-Fedora-specific.patch deleted file mode 100644 index d4bb54481c..0000000000 --- a/packages/sysutils/fuse/patches/fuse-2.9.2-001-Fix-udev-rules-Fedora-specific.patch +++ /dev/null @@ -1,20 +0,0 @@ -From ba47031f3557b81e732d41593c95e7b984b54b78 Mon Sep 17 00:00:00 2001 -From: Peter Lemenkov -Date: Mon, 9 Aug 2010 12:09:00 +0400 -Subject: [PATCH 1/3] Fix udev rules (Fedora-specific) - -Signed-off-by: Peter Lemenkov ---- - util/udev.rules | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/util/udev.rules b/util/udev.rules -index 9585111..bb8033f 100644 ---- a/util/udev.rules -+++ b/util/udev.rules -@@ -1 +1 @@ --KERNEL=="fuse", MODE="0666" -+KERNEL=="fuse", MODE="0666",OWNER="root",GROUP="root" --- -1.7.3.1 - diff --git a/packages/sysutils/fuse/patches/fuse-2.9.2-automake-1.13.patch b/packages/sysutils/fuse/patches/fuse-2.9.2-automake-1.13.patch deleted file mode 100644 index 80f3527a17..0000000000 --- a/packages/sysutils/fuse/patches/fuse-2.9.2-automake-1.13.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur fuse-2.9.2/configure.in fuse-2.9.2.patch/configure.in ---- fuse-2.9.2/configure.in 2012-10-01 17:58:00.000000000 +0200 -+++ fuse-2.9.2.patch/configure.in 2013-01-12 16:56:37.469681997 +0100 -@@ -4,7 +4,7 @@ - AC_CANONICAL_TARGET - AM_INIT_AUTOMAKE - m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)]) --AM_CONFIG_HEADER(include/config.h) -+AC_CONFIG_HEADERS(include/config.h) - - AC_PROG_LIBTOOL - AC_PROG_CC diff --git a/packages/sysutils/fuse/rules.d/99-fuse.rules b/packages/sysutils/fuse/rules.d/99-fuse.rules new file mode 100644 index 0000000000..bb8033fee4 --- /dev/null +++ b/packages/sysutils/fuse/rules.d/99-fuse.rules @@ -0,0 +1 @@ +KERNEL=="fuse", MODE="0666",OWNER="root",GROUP="root" diff --git a/packages/sysutils/remote/atvclient/tmpfiles.d/63_atvclient.conf b/packages/sysutils/remote/atvclient/tmpfiles.d/63_atvclient.conf index 66ef20dd4a..363e7605f1 100644 --- a/packages/sysutils/remote/atvclient/tmpfiles.d/63_atvclient.conf +++ b/packages/sysutils/remote/atvclient/tmpfiles.d/63_atvclient.conf @@ -18,4 +18,4 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -d /storage/.cache 0755 root root 10d - +d /storage/.cache 0755 root root - - diff --git a/packages/sysutils/remote/eventlircd/build b/packages/sysutils/remote/eventlircd/build deleted file mode 100755 index 0cc8c47eb4..0000000000 --- a/packages/sysutils/remote/eventlircd/build +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sbindir=/usr/sbin \ - --exec-prefix=/usr \ - --localstatedir=/var \ - --sysconfdir=/etc \ - -make diff --git a/packages/sysutils/remote/eventlircd/install b/packages/sysutils/remote/eventlircd/install deleted file mode 100755 index bf92e2d891..0000000000 --- a/packages/sysutils/remote/eventlircd/install +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/usr/sbin - cp $PKG_BUILD/src/eventlircd $INSTALL/usr/sbin - -mkdir -p $INSTALL/lib/udev - cp $PKG_BUILD/udev/lircd_helper $INSTALL/lib/udev - chmod +x $INSTALL/lib/udev/lircd_helper - cp $PKG_BUILD/udev/wakeup_enable $INSTALL/lib/udev - chmod +x $INSTALL/lib/udev/wakeup_enable - -mkdir -p $INSTALL/etc/eventlircd.d - cp $PKG_DIR/evmap/*.evmap $INSTALL/etc/eventlircd.d diff --git a/packages/sysutils/remote/eventlircd/meta b/packages/sysutils/remote/eventlircd/package.mk similarity index 84% rename from packages/sysutils/remote/eventlircd/meta rename to packages/sysutils/remote/eventlircd/package.mk index 79b9f2fac7..8d9e65438b 100644 --- a/packages/sysutils/remote/eventlircd/meta +++ b/packages/sysutils/remote/eventlircd/package.mk @@ -26,11 +26,21 @@ PKG_LICENSE="GPL" PKG_SITE="http://code.google.com/p/eventlircd" PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="systemd lirc" -PKG_BUILD_DEPENDS="toolchain systemd" +PKG_BUILD_DEPENDS_TARGET="toolchain systemd" PKG_PRIORITY="optional" PKG_SECTION="system/remote" PKG_SHORTDESC="eventlircd:The eventlircd daemon provides various functions for LIRC devices" PKG_LONGDESC="The eventlircd daemon provides four functions for LIRC devices" -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +post_makeinstall_target() { +# install our own evmap files and udev rules + rm -rf $INSTALL/etc/eventlircd.d + rm -rf $INSTALL/lib/udev/rules.d + + mkdir -p $INSTALL/etc/eventlircd.d + cp $PKG_DIR/evmap/*.evmap $INSTALL/etc/eventlircd.d +} + diff --git a/packages/sysutils/remote/eventlircd/tmpfiles.d/62_eventlircd.conf b/packages/sysutils/remote/eventlircd/tmpfiles.d/62_eventlircd.conf index f857190c06..d5cb376b07 100644 --- a/packages/sysutils/remote/eventlircd/tmpfiles.d/62_eventlircd.conf +++ b/packages/sysutils/remote/eventlircd/tmpfiles.d/62_eventlircd.conf @@ -18,4 +18,4 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -d /var/run/lirc 0755 root root 10d - +d /var/run/lirc 0755 root root - - diff --git a/packages/sysutils/remote/irserver/tmpfiles.d/63_irserver.conf b/packages/sysutils/remote/irserver/tmpfiles.d/63_irserver.conf index f857190c06..d5cb376b07 100644 --- a/packages/sysutils/remote/irserver/tmpfiles.d/63_irserver.conf +++ b/packages/sysutils/remote/irserver/tmpfiles.d/63_irserver.conf @@ -18,4 +18,4 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -d /var/run/lirc 0755 root root 10d - +d /var/run/lirc 0755 root root - - diff --git a/packages/sysutils/remote/lirc/tmpfiles.d/61_lirc.conf b/packages/sysutils/remote/lirc/tmpfiles.d/61_lirc.conf index f857190c06..d5cb376b07 100644 --- a/packages/sysutils/remote/lirc/tmpfiles.d/61_lirc.conf +++ b/packages/sysutils/remote/lirc/tmpfiles.d/61_lirc.conf @@ -18,4 +18,4 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -d /var/run/lirc 0755 root root 10d - +d /var/run/lirc 0755 root root - - diff --git a/packages/sysutils/systemd/build b/packages/sysutils/systemd/build index 0bd1e200b7..6b10fff1e6 100755 --- a/packages/sysutils/systemd/build +++ b/packages/sysutils/systemd/build @@ -70,7 +70,6 @@ ac_cv_func_malloc_0_nonnull=yes \ --disable-localed \ --disable-coredump \ --enable-gudev \ - --enable-keymap \ --disable-manpages \ --enable-split-usr \ --with-firmware-path="/storage/.config/firmware:/lib/firmware" \ diff --git a/packages/sysutils/systemd/install b/packages/sysutils/systemd/install index 3d11752b74..4db2da48fd 100755 --- a/packages/sysutils/systemd/install +++ b/packages/sysutils/systemd/install @@ -36,6 +36,9 @@ add_group video 39 mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/udevadm $INSTALL/usr/bin +mkdir -p $INSTALL/sbin + ln -sf /usr/bin/udevadm $INSTALL/sbin/udevadm + mkdir -p $INSTALL/lib cp -PR $PKG_BUILD/.libs/libsystemd-daemon.so* $INSTALL/lib cp -PR $PKG_BUILD/.libs/libudev.so* $INSTALL/lib @@ -54,20 +57,10 @@ mkdir -p $INSTALL/lib/systemd done cp $PKG_BUILD/mtd_probe $INSTALL/lib/udev - cp $PKG_BUILD/keymap $INSTALL/lib/udev - cp $PKG_BUILD/src/udev/keymap/findkeyboards $INSTALL/lib/udev - cp $PKG_BUILD/src/udev/keymap/keyboard-force-release.sh $INSTALL/lib/udev -mkdir -p $INSTALL/lib/udev/keymaps - cp $PKG_BUILD/keymaps/* $INSTALL/lib/udev/keymaps -mkdir -p $INSTALL/lib/udev/keymaps/force-release - cp $PKG_BUILD/keymaps-force-release/* $INSTALL/lib/udev/keymaps/force-release - mkdir -p $INSTALL/lib/udev/rules.d cp $PKG_BUILD/rules/*.rules $INSTALL/lib/udev/rules.d rm -rf $INSTALL/lib/udev/rules.d/80-net-name-slot.rules rm -rf $INSTALL/lib/udev/rules.d/99-systemd.rules - cp $PKG_BUILD/src/udev/keymap/*.rules $INSTALL/lib/udev/rules.d - mkdir -p $INSTALL/lib/udev/hwdb.d cp $PKG_BUILD/hwdb/*.hwdb $INSTALL/lib/udev/hwdb.d diff --git a/packages/sysutils/systemd/meta b/packages/sysutils/systemd/meta index 0f9aa2682d..2e28f46677 100644 --- a/packages/sysutils/systemd/meta +++ b/packages/sysutils/systemd/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="systemd" -PKG_VERSION="205" +PKG_VERSION="206" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/sysutils/udisks/build b/packages/sysutils/udisks/build deleted file mode 100755 index 757af4c93d..0000000000 --- a/packages/sysutils/udisks/build +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/bin \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --libexecdir=/usr/lib/udisks \ - --localstatedir=/var \ - --disable-static \ - --enable-shared \ - --disable-man-pages \ - --disable-gtk-doc \ - --disable-gtk-doc-html \ - --disable-gtk-doc-pdf \ - --disable-lvm2 \ - --disable-dmmp \ - --disable-remote-access \ - --enable-nls \ - -make - -$MAKEINSTALL diff --git a/packages/sysutils/udisks/init.d/31_mount-disks b/packages/sysutils/udisks/init.d/31_mount-disks index 70ee7a72a4..4824c39236 100644 --- a/packages/sysutils/udisks/init.d/31_mount-disks +++ b/packages/sysutils/udisks/init.d/31_mount-disks @@ -28,22 +28,12 @@ wait_for_dbus - drive_dump () { - udisks --dump | tr -d ' ' | grep 'device-file:' | cut -d ':' -f2 - } - - show_info () { - udisks --show-info $2 | grep "$1:" | tr -d ' ' | cut -d ":" -f2 - } - - for DEVICE in `drive_dump`; do - REMOVABLE="`show_info "removable" $DEVICE`" - MOUNTED="`show_info "is mounted" $DEVICE`" - USAGE="`show_info "usage" $DEVICE`" - - if [ "$REMOVABLE" = "0" -a "$MOUNTED" = "0" -a "$USAGE" = "filesystem" ]; then - udisks --mount "$DEVICE" >/dev/null + for DEVICE in `find /sys/class/block/sd*/removable`; do + if [ "$(cat $DEVICE)" = "0" ]; then + DISK=$(echo "$DEVICE" | sed -e "s,/sys/class/block,/dev," -e "s,/removable,,") + for PART in $(ls "$DISK"[0-9]*);do + udisks --mount "$PART" >/dev/null + done fi - done )& diff --git a/packages/sysutils/udisks/install b/packages/sysutils/udisks/install deleted file mode 100755 index a27c17503b..0000000000 --- a/packages/sysutils/udisks/install +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/etc/dbus-1/system.d - cp $PKG_BUILD/data/org.freedesktop.UDisks.conf $INSTALL/etc/dbus-1/system.d - -mkdir -p $INSTALL/lib/udev - cp -P $PKG_BUILD/src/probers/udisks-part-id $INSTALL/lib/udev - cp -P $PKG_BUILD/src/probers/udisks-probe-ata-smart $INSTALL/lib/udev - -mkdir -p $INSTALL/lib/udev/rules.d -# cp $PKG_BUILD/data/80-udisks.rules $INSTALL/lib/udev/rules.d - -mkdir -p $INSTALL/usr/bin - cp -P $PKG_BUILD/tools/udisks $INSTALL/usr/bin - cp -P $PKG_BUILD/tools/umount.udisks $INSTALL/usr/bin - -mkdir -p $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/udisks-daemon $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-ata-smart-collect $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-ata-smart-selftest $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-change-filesystem-label $INSTALL/usr/lib/udisks -# cp -P $PKG_BUILD/src/helpers/udisks-helper-change-luks-password $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-create-partition $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-create-partition-table $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-delete-partition $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-drive-benchmark $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-drive-detach $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-drive-poll $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-fstab-mounter $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-linux-md-check $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-linux-md-remove-component $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-mdadm-expand $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-mkfs $INSTALL/usr/lib/udisks - cp -P $PKG_BUILD/src/helpers/udisks-helper-modify-partition $INSTALL/usr/lib/udisks - -mkdir -p $INSTALL/usr/share/dbus-1/interfaces - cp -P $PKG_BUILD/data/org.freedesktop.UDisks.Adapter.xml $INSTALL/usr/share/dbus-1/interfaces - cp -P $PKG_BUILD/data/org.freedesktop.UDisks.Device.xml $INSTALL/usr/share/dbus-1/interfaces - cp -P $PKG_BUILD/data/org.freedesktop.UDisks.Expander.xml $INSTALL/usr/share/dbus-1/interfaces - cp -P $PKG_BUILD/data/org.freedesktop.UDisks.Port.xml $INSTALL/usr/share/dbus-1/interfaces - cp -P $PKG_BUILD/data/org.freedesktop.UDisks.xml $INSTALL/usr/share/dbus-1/interfaces - -mkdir -p $INSTALL/usr/share/dbus-1/system-services - cp -P $PKG_BUILD/data/org.freedesktop.UDisks.service $INSTALL/usr/share/dbus-1/system-services - -mkdir -p $INSTALL/usr/share/polkit-1/actions - cp -P $PKG_BUILD/policy/org.freedesktop.udisks.policy $INSTALL/usr/share/polkit-1/actions diff --git a/packages/sysutils/udisks/meta b/packages/sysutils/udisks/package.mk similarity index 73% rename from packages/sysutils/udisks/meta rename to packages/sysutils/udisks/package.mk index 1bfa6f6bb0..31c67651d8 100644 --- a/packages/sysutils/udisks/meta +++ b/packages/sysutils/udisks/package.mk @@ -26,11 +26,27 @@ PKG_LICENSE="GPL" PKG_SITE="http://www.freedesktop.org/wiki/Software/udisks" PKG_URL="http://hal.freedesktop.org/releases/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="systemd glib dbus parted polkit libatasmart" -PKG_BUILD_DEPENDS="toolchain sg3_utils systemd glib dbus dbus-glib parted polkit libatasmart" +PKG_BUILD_DEPENDS_TARGET="toolchain sg3_utils systemd glib dbus dbus-glib parted polkit libatasmart" PKG_PRIORITY="optional" PKG_SECTION="system" PKG_SHORTDESC="udisks: a modular hardware abstraction layer designed for use in Linux systems that is designed to simplify device management." PKG_LONGDESC="Udisks is a modular hardware abstraction layer designed for use in Linux systems that is designed to simplify device management and replace the current monolithic Linux HAL. Udisks includes the ability to enumerate system devices and send notifications when hardware is added or removed from the computer system." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--datadir=/usr/share \ + --libexecdir=/usr/lib/udisks \ + --disable-man-pages \ + --disable-gtk-doc \ + --disable-gtk-doc-html \ + --disable-gtk-doc-pdf \ + --disable-lvm2 \ + --disable-dmmp \ + --disable-remote-access \ + --enable-nls" + +post_makeinstall_target() { + rm -rf $INSTALL/etc/profile.d + rm -rf $INSTALL/lib/udev/rules.d +} diff --git a/packages/sysutils/udisks/tmpfiles.d/31_udisks.conf b/packages/sysutils/udisks/tmpfiles.d/31_udisks.conf index 9178325697..fe79b7e0cd 100644 --- a/packages/sysutils/udisks/tmpfiles.d/31_udisks.conf +++ b/packages/sysutils/udisks/tmpfiles.d/31_udisks.conf @@ -18,4 +18,4 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -d /var/lib/udisks 0755 root root 10d - +d /var/lib/udisks 0755 root root - - diff --git a/packages/sysutils/upower/tmpfiles.d/32_upower.conf b/packages/sysutils/upower/tmpfiles.d/32_upower.conf index a9d84fdf9e..f38fa38838 100644 --- a/packages/sysutils/upower/tmpfiles.d/32_upower.conf +++ b/packages/sysutils/upower/tmpfiles.d/32_upower.conf @@ -18,4 +18,4 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -d /var/lib/upower 0755 root root 10d - +d /var/lib/upower 0755 root root - - diff --git a/packages/sysutils/util-linux/build b/packages/sysutils/util-linux/build deleted file mode 100755 index 526e5b44b5..0000000000 --- a/packages/sysutils/util-linux/build +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/bin \ - --disable-silent-rules \ - --enable-shared \ - --disable-static \ - --disable-gtk-doc \ - --disable-nls \ - --disable-rpath \ - --enable-tls \ - --enable-libuuid \ - --enable-libblkid \ - --enable-libmount \ - --disable-deprecated-mount \ - --disable-mount \ - --enable-fsck \ - --disable-partx \ - --enable-uuidd \ - --disable-mountpoint \ - --disable-fallocate \ - --disable-unshare \ - --disable-arch \ - --disable-ddate \ - --disable-eject \ - --disable-agetty \ - --disable-cramfs \ - --disable-switch-root \ - --disable-pivot-root \ - --disable-elvtune \ - --disable-kill \ - --disable-last \ - --disable-utmpdump \ - --disable-line \ - --disable-mesg \ - --disable-raw \ - --disable-rename \ - --disable-reset \ - --disable-vipw \ - --disable-newgrp \ - --disable-chfn-chsh \ - --enable-chsh-only-listed \ - --disable-login \ - --disable-login-chown-vcs \ - --disable-login-stat-mail \ - --disable-sulogin \ - --disable-su \ - --disable-runuser \ - --disable-ul \ - --disable-more \ - --disable-pg \ - --disable-setterm \ - --disable-schedutils \ - --disable-wall \ - --disable-write \ - --disable-chkdupexe \ - --disable-socket-activation \ - --disable-pg-bell \ - --disable-require-password \ - --disable-use-tty-group \ - --disable-makeinstall-chown \ - --disable-makeinstall-setuid \ - --with-gnu-ld \ - --without-selinux \ - --without-audit \ - --without-udev \ - --without-ncurses \ - --without-slang \ - --without-utempter \ - --without-systemdsystemunitdir - -make - -$MAKEINSTALL - diff --git a/packages/sysutils/util-linux/install b/packages/sysutils/util-linux/install deleted file mode 100755 index 7167fa7607..0000000000 --- a/packages/sysutils/util-linux/install +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/fstrim $INSTALL/usr/bin - cp $PKG_BUILD/.libs/blkid $INSTALL/usr/bin - cp $PKG_BUILD/.libs/fsck $INSTALL/usr/bin - -mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/.libs/libblkid.so* $INSTALL/usr/lib - rm -rf $INSTALL/usr/lib/libblkid.so*T - cp -PR $PKG_BUILD/.libs/libmount.so* $INSTALL/usr/lib - rm -rf $INSTALL/usr/lib/libmount.so*T - cp -PR $PKG_BUILD/.libs/libuuid.so* $INSTALL/usr/lib - rm -rf $INSTALL/usr/lib/libuuid.so*T - -if [ "$SWAP_SUPPORT" = "yes" ]; then - mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/.libs/swapon $INSTALL/usr/bin - cp $PKG_BUILD/.libs/swapoff $INSTALL/usr/bin - - mkdir -p $INSTALL/etc/init.d - cp $PKG_DIR/scripts/32_swapfile $INSTALL/etc/init.d - - mkdir -p $INSTALL/etc - cat $PKG_DIR/config/swap.conf | sed -e "s,@SWAPFILESIZE@,$SWAPFILESIZE,g" > $INSTALL/etc/swap.conf -fi diff --git a/packages/sysutils/util-linux/meta b/packages/sysutils/util-linux/meta deleted file mode 100644 index f65b7287f0..0000000000 --- a/packages/sysutils/util-linux/meta +++ /dev/null @@ -1,35 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -PKG_NAME="util-linux" -PKG_VERSION="2.23.1" -PKG_REV="1" -PKG_ARCH="any" -PKG_LICENSE="GPL" -PKG_URL="http://www.kernel.org/pub/linux/utils/util-linux/v2.23/$PKG_NAME-$PKG_VERSION.tar.xz" -PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" -PKG_PRIORITY="optional" -PKG_SECTION="system" -PKG_SHORTDESC="util-linux: Miscellaneous system utilities for Linux" -PKG_LONGDESC="The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among many features, Util-linux contains the fdisk configuration tool and the login program." -PKG_IS_ADDON="no" - -PKG_AUTORECONF="yes" diff --git a/packages/sysutils/util-linux/package.mk b/packages/sysutils/util-linux/package.mk new file mode 100644 index 0000000000..dc2c2cce47 --- /dev/null +++ b/packages/sysutils/util-linux/package.mk @@ -0,0 +1,122 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="util-linux" +PKG_VERSION="2.23.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_URL="http://www.kernel.org/pub/linux/utils/util-linux/v2.23/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS_TARGET="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="util-linux: Miscellaneous system utilities for Linux" +PKG_LONGDESC="The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among many features, Util-linux contains the fdisk configuration tool and the login program." + +PKG_IS_ADDON="no" +PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--disable-gtk-doc \ + --disable-nls \ + --disable-rpath \ + --enable-tls \ + --enable-libuuid \ + --enable-libblkid \ + --enable-libmount \ + --disable-deprecated-mount \ + --disable-mount \ + --enable-fsck \ + --disable-partx \ + --enable-uuidd \ + --disable-mountpoint \ + --disable-fallocate \ + --disable-unshare \ + --disable-arch \ + --disable-ddate \ + --disable-eject \ + --disable-agetty \ + --disable-cramfs \ + --disable-switch-root \ + --disable-pivot-root \ + --disable-elvtune \ + --disable-kill \ + --disable-last \ + --disable-utmpdump \ + --disable-line \ + --disable-mesg \ + --disable-raw \ + --disable-rename \ + --disable-reset \ + --disable-vipw \ + --disable-newgrp \ + --disable-chfn-chsh \ + --enable-chsh-only-listed \ + --disable-login \ + --disable-login-chown-vcs \ + --disable-login-stat-mail \ + --disable-sulogin \ + --disable-su \ + --disable-runuser \ + --disable-ul \ + --disable-more \ + --disable-pg \ + --disable-setterm \ + --disable-schedutils \ + --disable-wall \ + --disable-write \ + --disable-chkdupexe \ + --disable-socket-activation \ + --disable-pg-bell \ + --disable-require-password \ + --disable-use-tty-group \ + --disable-makeinstall-chown \ + --disable-makeinstall-setuid \ + --with-gnu-ld \ + --without-selinux \ + --without-audit \ + --without-udev \ + --without-ncurses \ + --without-slang \ + --without-utempter \ + --without-systemdsystemunitdir" + +post_makeinstall_target() { + rm -rf $INSTALL/usr/bin + rm -rf $INSTALL/usr/sbin + rm -rf $INSTALL/usr/share + + mkdir -p $INSTALL/usr/sbin + cp fstrim $INSTALL/usr/sbin + cp .libs/blkid $INSTALL/usr/sbin + cp .libs/fsck $INSTALL/usr/sbin + + if [ "$SWAP_SUPPORT" = "yes" ]; then + mkdir -p $INSTALL/usr/sbin + cp .libs/swapon $INSTALL/usr/sbin + cp .libs/swapoff $INSTALL/usr/sbin + + mkdir -p $INSTALL/etc/init.d + cp $PKG_DIR/scripts/32_swapfile $INSTALL/etc/init.d + + mkdir -p $INSTALL/etc + cat $PKG_DIR/config/swap.conf | sed -e "s,@SWAPFILESIZE@,$SWAPFILESIZE,g" > $INSTALL/etc/swap.conf + fi +} diff --git a/packages/toolchain/devel/binutils/meta b/packages/toolchain/devel/binutils/meta index 2f1f838038..3e13dac55c 100644 --- a/packages/toolchain/devel/binutils/meta +++ b/packages/toolchain/devel/binutils/meta @@ -29,7 +29,7 @@ PKG_SITE="http://www.gnu.org/software/binutils/binutils.html" PKG_URL="http://ftp.gnu.org/gnu/binutils/$PKG_NAME-$PKG_VERSION.tar.gz" #PKG_URL="ftp://ftp.kernel.org/pub/linux/devel/binutils/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache bison flex linux-headers gmp-host mpfr cloog ppl" +PKG_BUILD_DEPENDS="ccache bison:host flex linux-headers gmp-host mpfr cloog ppl" PKG_PRIORITY="optional" PKG_SECTION="toolchain/devel" PKG_SHORTDESC="binutils: A GNU collection of binary utilities" diff --git a/packages/toolchain/devel/bison/build b/packages/toolchain/devel/bison/build deleted file mode 100755 index 6f775210a9..0000000000 --- a/packages/toolchain/devel/bison/build +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -setup_toolchain host - -cd $PKG_BUILD -./configure --host=$HOST_NAME \ - --build=$HOST_NAME \ - --prefix=$ROOT/$TOOLCHAIN \ - --disable-rpath \ - --with-gnu-ld - -# The configure system causes Bison to be built without support for -# internationalization of error messages if a bison program is not already in -# $PATH. The following addition will correct this: - echo '#define YYENABLE_NLS 1' >> lib/config.h - -make -make install diff --git a/packages/toolchain/devel/bison/meta b/packages/toolchain/devel/bison/package.mk similarity index 84% rename from packages/toolchain/devel/bison/meta rename to packages/toolchain/devel/bison/package.mk index 26bb34ca9d..dd4073a5d7 100644 --- a/packages/toolchain/devel/bison/meta +++ b/packages/toolchain/devel/bison/package.mk @@ -19,18 +19,27 @@ ################################################################################ PKG_NAME="bison" -PKG_VERSION="2.7.1" +PKG_VERSION="3.0" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.gnu.org/software/bison/" PKG_URL="http://ftp.gnu.org/gnu/bison/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache" +PKG_BUILD_DEPENDS_HOST="ccache" PKG_PRIORITY="optional" PKG_SECTION="toolchain/devel" PKG_SHORTDESC="bison: The GNU general-purpose parser generator" PKG_LONGDESC="Bison is a general-purpose parser generator that converts a grammar description for an LALR(1) context-free grammar into a C program to parse that grammar. Once you are proficient with Bison, you may use it to develop a wide range of language parsers, from those used in simple desk calculators to complex programming languages. Bison is upward compatible with Yacc: all properly-written Yacc grammars ought to work with Bison with no change. Anyone familiar with Yacc should be able to use Bison with little trouble. You need to be fluent in C programming in order to use Bison or to understand this manual." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="no" + +PKG_CONFIGURE_OPTS_HOST="--disable-rpath --with-gnu-ld" + +post_configure_host() { +# The configure system causes Bison to be built without support for +# internationalization of error messages if a bison program is not already in +# $PATH. The following addition will correct this: + echo '#define YYENABLE_NLS 1' >> lib/config.h +} diff --git a/packages/toolchain/meta b/packages/toolchain/meta index 9a85dbce6b..084caf44d7 100644 --- a/packages/toolchain/meta +++ b/packages/toolchain/meta @@ -26,8 +26,8 @@ PKG_LICENSE="GPL" PKG_SITE="http://www.openelec.tv" PKG_URL="" PKG_DEPENDS="" -#PKG_BUILD_DEPENDS="make xz sed pkg-config autotools gcc-final bison flex cmake jam scons yasm nasm" -PKG_BUILD_DEPENDS="make xz sed pkg-config autotools gcc-final bison flex cmake scons yasm nasm" +#PKG_BUILD_DEPENDS="make xz sed pkg-config autotools gcc-final bison:host flex cmake jam scons yasm nasm" +PKG_BUILD_DEPENDS="make xz sed pkg-config autotools gcc-final bison:host flex cmake scons yasm nasm" PKG_PRIORITY="optional" PKG_SECTION="toolchain/devel" PKG_SHORTDESC="toolchain: OpenELEC.tv' toolchain" diff --git a/packages/tools/syslinux/build b/packages/tools/syslinux/build index ae3e2b3c53..5001807864 100755 --- a/packages/tools/syslinux/build +++ b/packages/tools/syslinux/build @@ -26,17 +26,13 @@ $SCRIPTS/build toolchain LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"` -CFLAGS="$CFLAGS -I`ls -d $ROOT/$BUILD/$1*`/libinstaller" -CFLAGS="$CFLAGS -I`ls -d $ROOT/$BUILD/$1*`/libfat" - -SUBDIRS="codepage core libinstaller mtools" -[ "$TARGET_ARCH" = "i386" ] && SUBDIRS="$SUBDIRS mbr" +CFLAGS="$CFLAGS -I../libinstaller -I../libfat" cd $PKG_BUILD make CC=$CC \ AR=$AR \ - RANLIB=$RANLIB \ + RANLIB="$RANLIB" \ LDFLAGS="$LDFLAGS" \ CFLAGS="$CFLAGS -fomit-frame-pointer -D_FILE_OFFSET_BITS=64" \ - BSUBDIRS="$SUBDIRS" + installer diff --git a/packages/unofficial b/packages/unofficial index 726e8ef3d6..ff051d8de5 160000 --- a/packages/unofficial +++ b/packages/unofficial @@ -1 +1 @@ -Subproject commit 726e8ef3d6addd5ff2cf4525be574d6e5abd5a57 +Subproject commit ff051d8de5a8cc1cc378653df36e0a17ac95a9c1 diff --git a/packages/x11/app/setxkbmap/build b/packages/x11/app/setxkbmap/build deleted file mode 100755 index 269461ec26..0000000000 --- a/packages/x11/app/setxkbmap/build +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - -make diff --git a/packages/x11/app/setxkbmap/install b/packages/x11/app/setxkbmap/install deleted file mode 100755 index 16941ff820..0000000000 --- a/packages/x11/app/setxkbmap/install +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/$1 $INSTALL/usr/bin - -mkdir -p $INSTALL/lib/udev - cp $PKG_DIR/scripts/xkb-setup $INSTALL/lib/udev diff --git a/packages/x11/app/setxkbmap/meta b/packages/x11/app/setxkbmap/package.mk similarity index 90% rename from packages/x11/app/setxkbmap/meta rename to packages/x11/app/setxkbmap/package.mk index fd3e84a9ab..b4756225fd 100644 --- a/packages/x11/app/setxkbmap/meta +++ b/packages/x11/app/setxkbmap/package.mk @@ -26,11 +26,16 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.X.org" PKG_URL="http://xorg.freedesktop.org/archive/individual/app/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="libX11" -PKG_BUILD_DEPENDS="toolchain libX11" +PKG_BUILD_DEPENDS_TARGET="toolchain libX11" PKG_PRIORITY="optional" PKG_SECTION="x11/app" PKG_SHORTDESC="setxkbmap: Sets the keyboard using the X Keyboard Extension" PKG_LONGDESC="Setxkbmap sets the keyboard using the X Keyboard Extension." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +post_makeinstall_target() { + mkdir -p $INSTALL/lib/udev + cp $PKG_DIR/scripts/xkb-setup $INSTALL/lib/udev +} diff --git a/packages/x11/app/xkbcomp/build b/packages/x11/app/xkbcomp/build deleted file mode 100755 index a6bde88fc4..0000000000 --- a/packages/x11/app/xkbcomp/build +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD - -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --with-xkb-config-root=$XORG_PATH_XKB \ - -make diff --git a/packages/x11/app/xkbcomp/meta b/packages/x11/app/xkbcomp/package.mk similarity index 92% rename from packages/x11/app/xkbcomp/meta rename to packages/x11/app/xkbcomp/package.mk index 3f4efdc2fe..7d32d6eee7 100644 --- a/packages/x11/app/xkbcomp/meta +++ b/packages/x11/app/xkbcomp/package.mk @@ -26,11 +26,14 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.X.org" PKG_URL="http://xorg.freedesktop.org/archive/individual/app/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="libX11" -PKG_BUILD_DEPENDS="toolchain util-macros libX11" +PKG_BUILD_DEPENDS_TARGET="toolchain util-macros libX11" PKG_PRIORITY="optional" PKG_SECTION="x11/app" PKG_SHORTDESC="xkbcomp: Compiles XKB keyboard description" PKG_LONGDESC="The xkbcomp keymap compiler converts a description of an XKB keymap into one of several output formats." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--with-xkb-config-root=$XORG_PATH_XKB" + diff --git a/packages/x11/data/xkeyboard-config/build b/packages/x11/data/xkeyboard-config/build deleted file mode 100755 index de68801b9d..0000000000 --- a/packages/x11/data/xkeyboard-config/build +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD - -# broken autoreconf - intltoolize --force - -XKBCOMP="/usr/bin/xkbcomp" \ -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --without-xsltproc \ - --enable-compat-rules \ - --enable-runtime-deps \ - --enable-nls \ - --disable-rpath \ - --with-xkb-base=$XORG_PATH_XKB \ - --with-xkb-rules-symlink=xorg \ - --with-gnu-ld \ - -make -make DESTDIR=`pwd`/.install install diff --git a/packages/x11/data/xkeyboard-config/install b/packages/x11/data/xkeyboard-config/install deleted file mode 100755 index 70fe5acbdd..0000000000 --- a/packages/x11/data/xkeyboard-config/install +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/$XORG_PATH_XKB - cp -R $PKG_BUILD/.install/$XORG_PATH_XKB/* $INSTALL/$XORG_PATH_XKB diff --git a/packages/x11/data/xkeyboard-config/meta b/packages/x11/data/xkeyboard-config/package.mk similarity index 70% rename from packages/x11/data/xkeyboard-config/meta rename to packages/x11/data/xkeyboard-config/package.mk index 89f4c37dbd..022369d002 100644 --- a/packages/x11/data/xkeyboard-config/meta +++ b/packages/x11/data/xkeyboard-config/package.mk @@ -19,18 +19,35 @@ ################################################################################ PKG_NAME="xkeyboard-config" -PKG_VERSION="2.8" +PKG_VERSION="2.9" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.X.org" PKG_URL="http://www.x.org/releases/individual/data/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain util-macros xkbcomp" +PKG_BUILD_DEPENDS_TARGET="toolchain util-macros xkbcomp" PKG_PRIORITY="optional" PKG_SECTION="x11/data" PKG_SHORTDESC="xkeyboard-config: X keyboard extension data files" PKG_LONGDESC="X keyboard extension data files." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="XKBCOMP=/usr/bin/xkbcomp \ + --without-xsltproc \ + --enable-compat-rules \ + --enable-runtime-deps \ + --enable-nls \ + --disable-rpath \ + --with-xkb-base=$XORG_PATH_XKB \ + --with-xkb-rules-symlink=xorg \ + --with-gnu-ld" + +pre_build_target() { +# broken autoreconf + ( cd $PKG_BUILD + intltoolize --force + ) +} diff --git a/packages/x11/driver/xf86-video-intel/build b/packages/x11/driver/xf86-video-intel/build deleted file mode 100755 index 7cb119e38b..0000000000 --- a/packages/x11/driver/xf86-video-intel/build +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -# TODO: xf86-video-intel-2.21.5 dont link with LTO enabled - strip_lto - -xorg_drv_configure_prepend - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --enable-shared \ - --disable-static \ - --enable-udev \ - --enable-dri \ - --enable-kms-only \ - --disable-xvmc \ - --disable-ums-only \ - --enable-sna \ - --enable-uxa \ - --disable-glamor \ - --disable-xaa \ - --disable-dga \ - --disable-async-swap \ - --with-xorg-module-dir=$XORG_PATH_MODULES - -make - -$MAKEINSTALL diff --git a/packages/x11/driver/xf86-video-intel/install b/packages/x11/driver/xf86-video-intel/install deleted file mode 100755 index 50bf8bf146..0000000000 --- a/packages/x11/driver/xf86-video-intel/install +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/$XORG_PATH_MODULES/drivers - cp -P $PKG_BUILD/src/.libs/intel_drv.so $INSTALL/$XORG_PATH_MODULES/drivers diff --git a/packages/x11/driver/xf86-video-intel/meta b/packages/x11/driver/xf86-video-intel/package.mk similarity index 67% rename from packages/x11/driver/xf86-video-intel/meta rename to packages/x11/driver/xf86-video-intel/package.mk index 3623548a7a..78230fc6b7 100644 --- a/packages/x11/driver/xf86-video-intel/meta +++ b/packages/x11/driver/xf86-video-intel/package.mk @@ -19,18 +19,36 @@ ################################################################################ PKG_NAME="xf86-video-intel" -PKG_VERSION="2.21.12" +PKG_VERSION="2.21.13" PKG_REV="1" PKG_ARCH="i386 x86_64" PKG_LICENSE="OSS" PKG_SITE="http://intellinuxgraphics.org/" PKG_URL="http://xorg.freedesktop.org/archive/individual/driver/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="systemd intel-gpu-tools" -PKG_BUILD_DEPENDS="toolchain util-macros fontsproto systemd xorg-server" +PKG_BUILD_DEPENDS_TARGET="toolchain util-macros fontsproto systemd xorg-server" PKG_PRIORITY="optional" PKG_SECTION="x11/driver" PKG_SHORTDESC="xf86-video-intel: The Xorg driver for Intel video chips" PKG_LONGDESC="The Xorg driver for Intel i810, i815, 830M, 845G, 852GM, 855GM, 865G, 915G, 915GM and 965G video chips." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--enable-udev \ + --enable-dri \ + --enable-kms-only \ + --disable-xvmc \ + --disable-ums-only \ + --enable-sna \ + --enable-uxa \ + --disable-glamor \ + --disable-xaa \ + --disable-dga \ + --disable-async-swap \ + --with-xorg-module-dir=$XORG_PATH_MODULES" + +pre_configure_target() { +# TODO: xf86-video-intel-2.21.5 dont link with LTO enabled + strip_lto +} diff --git a/packages/x11/font/encodings/build b/packages/x11/font/encodings/build deleted file mode 100755 index 770f4a7f0d..0000000000 --- a/packages/x11/font/encodings/build +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --enable-gzip-small-encodings \ - --enable-gzip-large-encodings \ - --with-fontrootdir=/usr/share/fonts - -make diff --git a/packages/x11/font/encodings/install b/packages/x11/font/encodings/install deleted file mode 100755 index 5d6f18ce2d..0000000000 --- a/packages/x11/font/encodings/install +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -FONTDIR="$INSTALL/usr/share/fonts" - -mkdir -p $FONTDIR/encodings - cp $PKG_BUILD/*.enc.gz $FONTDIR/encodings - cp $PKG_BUILD/encodings.dir $FONTDIR/encodings - -mkdir -p $FONTDIR/encodings/large - cp $PKG_BUILD/large/*.enc.gz $FONTDIR/encodings/large - cp $PKG_BUILD/large/encodings.dir $FONTDIR/encodings/large diff --git a/packages/x11/font/encodings/meta b/packages/x11/font/encodings/package.mk similarity index 85% rename from packages/x11/font/encodings/meta rename to packages/x11/font/encodings/package.mk index d0c5628737..0daf8931dd 100644 --- a/packages/x11/font/encodings/meta +++ b/packages/x11/font/encodings/package.mk @@ -26,11 +26,15 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.X.org" PKG_URL="http://xorg.freedesktop.org/archive/individual/font/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain util-macros font-util-host" +PKG_BUILD_DEPENDS_TARGET="toolchain util-macros font-util:host" PKG_PRIORITY="optional" PKG_SECTION="x11/font" PKG_SHORTDESC="encodings: X font encodings" PKG_LONGDESC="X font encoding meta files." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--enable-gzip-small-encodings \ + --enable-gzip-large-encodings \ + --with-fontrootdir=/usr/share/fonts" diff --git a/packages/x11/font/font-bitstream-type1/build b/packages/x11/font/font-bitstream-type1/build deleted file mode 100755 index d0dafa63bf..0000000000 --- a/packages/x11/font/font-bitstream-type1/build +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --with-fontrootdir=/usr/share/fonts - -make diff --git a/packages/x11/font/font-bitstream-type1/install b/packages/x11/font/font-bitstream-type1/install deleted file mode 100755 index 8b65c62422..0000000000 --- a/packages/x11/font/font-bitstream-type1/install +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -FONTDIR="$INSTALL/usr/share/fonts/Type1" - -mkdir -p $FONTDIR - cp $PKG_BUILD/*.afm $FONTDIR - cp $PKG_BUILD/*.pfb $FONTDIR - -mkfontdir $FONTDIR -mkfontscale $FONTDIR diff --git a/packages/x11/font/font-bitstream-type1/meta b/packages/x11/font/font-bitstream-type1/package.mk similarity index 86% rename from packages/x11/font/font-bitstream-type1/meta rename to packages/x11/font/font-bitstream-type1/package.mk index 0be842e8bf..d08ea4b92b 100644 --- a/packages/x11/font/font-bitstream-type1/meta +++ b/packages/x11/font/font-bitstream-type1/package.mk @@ -26,11 +26,18 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.X.org" PKG_URL="http://xorg.freedesktop.org/archive/individual/font/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_BUILD_DEPENDS_TARGET="toolchain util-macros" PKG_PRIORITY="optional" PKG_SECTION="x11/font" PKG_SHORTDESC="font-bitstream-type1: Bitstream font family" PKG_LONGDESC="Bitstream font family." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--with-fontrootdir=/usr/share/fonts" + +post_install() { + mkfontdir $INSTALL/usr/share/fonts/Type1 + mkfontscale $INSTALL/usr/share/fonts/Type1 +} diff --git a/packages/x11/font/font-cursor-misc/build b/packages/x11/font/font-cursor-misc/build deleted file mode 100755 index d0dafa63bf..0000000000 --- a/packages/x11/font/font-cursor-misc/build +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --with-fontrootdir=/usr/share/fonts - -make diff --git a/packages/x11/font/font-cursor-misc/install b/packages/x11/font/font-cursor-misc/install deleted file mode 100755 index 5ac5161722..0000000000 --- a/packages/x11/font/font-cursor-misc/install +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -FONTDIR="$INSTALL/usr/share/fonts/misc" - -mkdir -p $FONTDIR - cp $PKG_BUILD/*.pcf.gz $FONTDIR - -mkfontdir $FONTDIR diff --git a/packages/x11/font/font-cursor-misc/meta b/packages/x11/font/font-cursor-misc/package.mk similarity index 85% rename from packages/x11/font/font-cursor-misc/meta rename to packages/x11/font/font-cursor-misc/package.mk index 0b9e84fcb6..7f11391b08 100644 --- a/packages/x11/font/font-cursor-misc/meta +++ b/packages/x11/font/font-cursor-misc/package.mk @@ -25,12 +25,19 @@ PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.X.org" PKG_URL="http://xorg.freedesktop.org/archive/individual/font/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="font-util-host" -PKG_BUILD_DEPENDS="toolchain util-macros font-util-host" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS_TARGET="toolchain util-macros font-util:host" PKG_PRIORITY="optional" PKG_SECTION="x11/font" PKG_SHORTDESC="font-cursor-misc: X11 cursor fonts" PKG_LONGDESC="X11 cursor fonts." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--with-fontrootdir=/usr/share/fonts" + +post_install() { + mkfontdir $INSTALL/usr/share/fonts/misc + mkfontscale $INSTALL/usr/share/fonts/misc +} diff --git a/packages/x11/font/font-misc-misc/build b/packages/x11/font/font-misc-misc/build deleted file mode 100755 index 85e3b3c071..0000000000 --- a/packages/x11/font/font-misc-misc/build +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --with-fontrootdir=/usr/share/fonts \ - --disable-silent-rules \ - --enable-iso8859-1 \ - --enable-iso8859-2 \ - --disable-iso8859-3 \ - --disable-iso8859-4 \ - --enable-iso8859-5 \ - --disable-iso8859-6 \ - --enable-iso8859-7 \ - --enable-iso8859-8 \ - --enable-iso8859-9 \ - --disable-iso8859-10 \ - --disable-iso8859-11 \ - --disable-iso8859-12 \ - --disable-iso8859-13 \ - --enable-iso8859-14 \ - --enable-iso8859-15 \ - --disable-iso8859-16 \ - --disable-koi8-r \ - --disable-jisx0201 \ - -make UTIL_DIR="$SYSROOT_PREFIX/usr/share/fonts/util/" diff --git a/packages/x11/font/font-misc-misc/config/fonts.alias b/packages/x11/font/font-misc-misc/config/fonts.alias deleted file mode 100644 index fd8becb875..0000000000 --- a/packages/x11/font/font-misc-misc/config/fonts.alias +++ /dev/null @@ -1 +0,0 @@ -fixed -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1 diff --git a/packages/x11/font/font-misc-misc/install b/packages/x11/font/font-misc-misc/install deleted file mode 100755 index 1a9a38a7f4..0000000000 --- a/packages/x11/font/font-misc-misc/install +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -FONTDIR="$INSTALL/usr/share/fonts/misc" - -mkdir -p $FONTDIR - cp $PKG_BUILD/6x13-ISO8859-1.pcf.gz $FONTDIR - -mkfontdir $FONTDIR diff --git a/packages/x11/font/font-misc-misc/meta b/packages/x11/font/font-misc-misc/package.mk similarity index 51% rename from packages/x11/font/font-misc-misc/meta rename to packages/x11/font/font-misc-misc/package.mk index 7d07e28f1c..d4c01c9e2b 100644 --- a/packages/x11/font/font-misc-misc/meta +++ b/packages/x11/font/font-misc-misc/package.mk @@ -26,11 +26,44 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.X.org" PKG_URL="http://xorg.freedesktop.org/archive/individual/font/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="font-util font-cursor-misc" -PKG_BUILD_DEPENDS="toolchain util-macros font-util font-cursor-misc" +PKG_BUILD_DEPENDS_TARGET="toolchain util-macros font-util font-cursor-misc" PKG_PRIORITY="optional" PKG_SECTION="x11/font" PKG_SHORTDESC="font-misc-misc: A misc. public domain font" PKG_LONGDESC="A misc. public domain font." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--with-fontrootdir=/usr/share/fonts \ + --disable-silent-rules \ + --enable-iso8859-1 \ + --enable-iso8859-2 \ + --disable-iso8859-3 \ + --disable-iso8859-4 \ + --enable-iso8859-5 \ + --disable-iso8859-6 \ + --enable-iso8859-7 \ + --enable-iso8859-8 \ + --enable-iso8859-9 \ + --disable-iso8859-10 \ + --disable-iso8859-11 \ + --disable-iso8859-12 \ + --disable-iso8859-13 \ + --enable-iso8859-14 \ + --enable-iso8859-15 \ + --disable-iso8859-16 \ + --disable-koi8-r \ + --disable-jisx0201" + +PKG_MAKE_OPTS_TARGET="UTIL_DIR=$SYSROOT_PREFIX/usr/share/fonts/util/" + +makeinstall_target() { + mkdir -p $INSTALL/usr/share/fonts/misc + cp 6x13-ISO8859-1.pcf.gz $INSTALL/usr/share/fonts/misc +} + +post_install() { + mkfontdir $INSTALL/usr/share/fonts/misc + mkfontscale $INSTALL/usr/share/fonts/misc +} diff --git a/packages/x11/font/font-util-host/build b/packages/x11/font/font-util-host/build deleted file mode 100755 index cc5d8b058d..0000000000 --- a/packages/x11/font/font-util-host/build +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -$SCRIPTS/unpack font-util - -FONT_UTIL_DIR=`ls -d $BUILD/font-util-[0-9]*` - -setup_toolchain host - -cd $FONT_UTIL_DIR -mkdir -p .objdir-host && cd .objdir-host -../configure --host=$HOST_NAME \ - --build=$HOST_NAME \ - --prefix=$ROOT/$TOOLCHAIN - -make -make install diff --git a/packages/x11/font/font-util-host/meta b/packages/x11/font/font-util-host/meta deleted file mode 100644 index dfda44170f..0000000000 --- a/packages/x11/font/font-util-host/meta +++ /dev/null @@ -1,36 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -PKG_NAME="font-util-host" -PKG_VERSION="" -PKG_REV="1" -PKG_ARCH="any" -PKG_LICENSE="OSS" -PKG_SITE="http://www.X.org" -PKG_URL="" -PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain util-macros" -PKG_PRIORITY="optional" -PKG_SECTION="x11/font" -PKG_SHORTDESC="font-util: X.org font utilities" -PKG_LONGDESC="X.org font utilities." -PKG_IS_ADDON="no" - -PKG_AUTORECONF="no" diff --git a/packages/x11/font/font-util/build b/packages/x11/font/font-util/build deleted file mode 100755 index 76393a3816..0000000000 --- a/packages/x11/font/font-util/build +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -mkdir -p .objdir-target && cd .objdir-target - -../configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --with-mapdir=/usr/share/fonts/util - -make -$MAKEINSTALL diff --git a/packages/x11/font/font-util/install b/packages/x11/font/font-util/install deleted file mode 100755 index 06fdba6ace..0000000000 --- a/packages/x11/font/font-util/install +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/usr/share/fonts/util - cp $PKG_BUILD/map-* $INSTALL/usr/share/fonts/util diff --git a/packages/x11/font/font-util/meta b/packages/x11/font/font-util/package.mk similarity index 86% rename from packages/x11/font/font-util/meta rename to packages/x11/font/font-util/package.mk index 8f2a7d8667..7137ef6cdf 100644 --- a/packages/x11/font/font-util/meta +++ b/packages/x11/font/font-util/package.mk @@ -26,11 +26,18 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.X.org" PKG_URL="http://xorg.freedesktop.org/archive/individual/font/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_BUILD_DEPENDS_TARGET="toolchain util-macros" +PKG_BUILD_DEPENDS_HOST="toolchain util-macros" PKG_PRIORITY="optional" PKG_SECTION="x11/font" PKG_SHORTDESC="font-util: X.org font utilities" PKG_LONGDESC="X.org font utilities." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--with-mapdir=/usr/share/fonts/util" + +post_makeinstall_target() { + rm -rf $INSTALL/usr/bin +} diff --git a/packages/x11/font/font-xfree86-type1/build b/packages/x11/font/font-xfree86-type1/build deleted file mode 100755 index 49061ad3ca..0000000000 --- a/packages/x11/font/font-xfree86-type1/build +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --with-fontrootdir=/usr/share/fonts - -make \ No newline at end of file diff --git a/packages/x11/font/font-xfree86-type1/install b/packages/x11/font/font-xfree86-type1/install deleted file mode 100755 index a4ddededa1..0000000000 --- a/packages/x11/font/font-xfree86-type1/install +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -FONTDIR="$INSTALL/usr/share/fonts/Type1" - -mkdir -p $FONTDIR - cp $PKG_BUILD/cursor.pfa $FONTDIR - -mkfontdir $FONTDIR -mkfontscale $FONTDIR diff --git a/packages/x11/font/font-xfree86-type1/meta b/packages/x11/font/font-xfree86-type1/package.mk similarity index 86% rename from packages/x11/font/font-xfree86-type1/meta rename to packages/x11/font/font-xfree86-type1/package.mk index d1ca38e8b8..81cf66191b 100644 --- a/packages/x11/font/font-xfree86-type1/meta +++ b/packages/x11/font/font-xfree86-type1/package.mk @@ -26,11 +26,18 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.X.org" PKG_URL="http://xorg.freedesktop.org/releases/individual/font/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_BUILD_DEPENDS_TARGET="toolchain util-macros" PKG_PRIORITY="optional" PKG_SECTION="x11/font" PKG_SHORTDESC="font-xfree86-type1: A Xfree86 Inc. Type1 font" PKG_LONGDESC="A Xfree86 Inc. Type1 font." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--with-fontrootdir=/usr/share/fonts" + +post_install() { + mkfontdir $INSTALL/usr/share/fonts/Type1 + mkfontscale $INSTALL/usr/share/fonts/Type1 +} diff --git a/packages/x11/font/liberation-fonts-ttf/install b/packages/x11/font/liberation-fonts-ttf/install deleted file mode 100755 index e0a737419d..0000000000 --- a/packages/x11/font/liberation-fonts-ttf/install +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -FONTDIR="$INSTALL/usr/share/fonts/liberation" - -mkdir -p $FONTDIR - cp $PKG_BUILD/*.ttf $FONTDIR - -mkfontdir $FONTDIR -mkfontscale $FONTDIR diff --git a/packages/x11/font/liberation-fonts-ttf/meta b/packages/x11/font/liberation-fonts-ttf/package.mk similarity index 82% rename from packages/x11/font/liberation-fonts-ttf/meta rename to packages/x11/font/liberation-fonts-ttf/package.mk index 56831a571d..13d4e04823 100644 --- a/packages/x11/font/liberation-fonts-ttf/meta +++ b/packages/x11/font/liberation-fonts-ttf/package.mk @@ -26,11 +26,25 @@ PKG_LICENSE="OFL1_1" PKG_SITE="https://www.redhat.com/promo/fonts/" PKG_URL="https://fedorahosted.org/releases/l/i/liberation-fonts/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_BUILD_DEPENDS_TARGET="toolchain util-macros" PKG_PRIORITY="optional" PKG_SECTION="x11/fonts" PKG_SHORTDESC="liberation-fonts: High quality "open-sourced" vector fonts" PKG_LONGDESC="This packages included the high-quality and open-sourced TrueType vector fonts released by RedHat." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="no" + +make_target() { + : # nothing to make +} + +makeinstall_target() { + mkdir -p $INSTALL/usr/share/fonts/liberation + cp *.ttf $INSTALL/usr/share/fonts/liberation +} + +post_install() { + mkfontdir $INSTALL/usr/share/fonts/liberation + mkfontscale $INSTALL/usr/share/fonts/liberation +} diff --git a/packages/x11/lib/libXfont/build b/packages/x11/lib/libXfont/build deleted file mode 100755 index a33ca70e63..0000000000 --- a/packages/x11/lib/libXfont/build +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --disable-static \ - --enable-shared \ - --disable-ipv6 \ - --enable-freetype \ - --enable-builtins \ - --disable-pcfformat \ - --disable-bdfformat \ - --disable-snfformat \ - --enable-fc \ - --with-gnu-ld \ - --without-xmlto - -make -$MAKEINSTALL diff --git a/packages/x11/lib/libXfont/install b/packages/x11/lib/libXfont/install deleted file mode 100755 index e14383416f..0000000000 --- a/packages/x11/lib/libXfont/install +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/src/.libs/libXfont.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libXfont/meta b/packages/x11/lib/libXfont/package.mk similarity index 72% rename from packages/x11/lib/libXfont/meta rename to packages/x11/lib/libXfont/package.mk index 0cccac5a56..07f2324988 100644 --- a/packages/x11/lib/libXfont/meta +++ b/packages/x11/lib/libXfont/package.mk @@ -19,18 +19,29 @@ ################################################################################ PKG_NAME="libXfont" -PKG_VERSION="1.4.5" +PKG_VERSION="1.4.6" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.X.org" PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="freetype" -PKG_BUILD_DEPENDS="toolchain util-macros fontcacheproto fontsproto xtrans freetype libfontenc" +PKG_BUILD_DEPENDS_TARGET="toolchain util-macros fontcacheproto fontsproto xtrans freetype libfontenc" PKG_PRIORITY="optional" PKG_SECTION="x11/lib" PKG_SHORTDESC="libxfont: X font Library" PKG_LONGDESC="X font Library" -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--disable-ipv6 \ + --enable-freetype \ + --enable-builtins \ + --disable-pcfformat \ + --disable-bdfformat \ + --disable-snfformat \ + --enable-fc \ + --with-gnu-ld \ + --without-xmlto" + diff --git a/packages/x11/other/fontconfig/build b/packages/x11/other/fontconfig/build deleted file mode 100755 index f0919f414f..0000000000 --- a/packages/x11/other/fontconfig/build +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -# ensure we dont use '-O3' optimization. - CFLAGS=`echo $CFLAGS | sed -e "s|-O3|-O2|"` - CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-O3|-O2|"` - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --disable-static \ - --enable-shared \ - --with-arch=$TARGET_ARCH \ - --with-freetype-config=$ROOT/$TOOLCHAIN/bin/freetype-config \ - --with-default-fonts=/usr/share/fonts/liberation \ - --without-add-fonts \ - --disable-dependency-tracking \ - --disable-docs - -make V=1 - -$MAKEINSTALL diff --git a/packages/x11/other/fontconfig/init.d/35_fontconfig b/packages/x11/other/fontconfig/init.d/35_fontconfig index 639deeda32..8197696a8d 100644 --- a/packages/x11/other/fontconfig/init.d/35_fontconfig +++ b/packages/x11/other/fontconfig/init.d/35_fontconfig @@ -22,7 +22,6 @@ # # runlevels: openelec, textmode - FC_CACHE_DIRS="/usr/share/fonts/ /usr/share/xbmc/media/Fonts/" # hack to support user installed fonts @@ -35,9 +34,10 @@ FC_CACHE_DIRS="/usr/share/fonts/ /usr/share/xbmc/media/Fonts/" mount --bind $SUBFONTS /usr/share/xbmc/media/Fonts/ fi - ( progress "Creating fontconfig cache" - fc-cache $FC_CACHE_DIRS + if [ ! -f /storage/.cache/fontconfig/CACHEDIR.TAG ]; then + fc-cache $FC_CACHE_DIRS + fi )& diff --git a/packages/x11/other/fontconfig/install b/packages/x11/other/fontconfig/install deleted file mode 100755 index 9e5ab74174..0000000000 --- a/packages/x11/other/fontconfig/install +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/src/.libs/libfontconfig.so* $INSTALL/usr/lib - -mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/fc-cache/.libs/fc-cache $INSTALL/usr/bin - -mkdir -p $INSTALL/usr/share/fontconfig/conf.avail - cp $PKG_BUILD/conf.d/*.conf $INSTALL/usr/share/fontconfig/conf.avail - -mkdir -p $INSTALL/usr/share/xml/fontconfig - cp $PKG_BUILD/fonts.dtd $INSTALL/usr/share/xml/fontconfig - -mkdir -p $INSTALL/etc/fonts - cp -R $SYSROOT_PREFIX/etc/fonts/* $INSTALL/etc/fonts diff --git a/packages/x11/other/fontconfig/meta b/packages/x11/other/fontconfig/package.mk similarity index 61% rename from packages/x11/other/fontconfig/meta rename to packages/x11/other/fontconfig/package.mk index 7a08b5566e..5d47cdaa89 100644 --- a/packages/x11/other/fontconfig/meta +++ b/packages/x11/other/fontconfig/package.mk @@ -26,11 +26,36 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.fontconfig.org" PKG_URL="http://www.freedesktop.org/software/fontconfig/release/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="freetype libxml2 zlib expat" -PKG_BUILD_DEPENDS="toolchain util-macros freetype libxml2 zlib expat" +PKG_BUILD_DEPENDS_TARGET="toolchain util-macros freetype libxml2 zlib expat" PKG_PRIORITY="optional" PKG_SECTION="x11/other" PKG_SHORTDESC="fontconfig: A library for font customization and configuration" PKG_LONGDESC="Fontconfig is a library for font customization and configuration." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--with-arch=$TARGET_ARCH \ + --with-cache-dir=/storage/.cache/fontconfig \ + --with-default-fonts=/usr/share/fonts/liberation \ + --without-add-fonts \ + --disable-dependency-tracking \ + --disable-docs" + +pre_configure_target() { +# ensure we dont use '-O3' optimization. + CFLAGS=`echo $CFLAGS | sed -e "s|-O3|-O2|"` + CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-O3|-O2|"` + CFLAGS="$CFLAGS -I$ROOT/$PKG_BUILD" + CXXFLAGS="$CXXFLAGS -I$ROOT/$PKG_BUILD" +} + +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 +} diff --git a/packages/sysutils/dosfstools/build b/packages/x11/other/fontconfig/tmpfiles.d/35_fontconfig.conf old mode 100755 new mode 100644 similarity index 95% rename from packages/sysutils/dosfstools/build rename to packages/x11/other/fontconfig/tmpfiles.d/35_fontconfig.conf index d71b2bbf26..0baa588bbe --- a/packages/sysutils/dosfstools/build +++ b/packages/x11/other/fontconfig/tmpfiles.d/35_fontconfig.conf @@ -1,5 +1,3 @@ -#!/bin/sh - ################################################################################ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) @@ -20,8 +18,4 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -. config/options $1 - -cd $PKG_BUILD - -make +d /storage/.cache/fontconfig 0755 root root - - diff --git a/packages/x11/proto/videoproto/package.mk b/packages/x11/proto/videoproto/package.mk index 2f1d55e124..c3874b3564 100644 --- a/packages/x11/proto/videoproto/package.mk +++ b/packages/x11/proto/videoproto/package.mk @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="videoproto" -PKG_VERSION="2.3.1" +PKG_VERSION="2.3.2" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" diff --git a/packages/x11/util/makedepend/build b/packages/x11/util/makedepend/build deleted file mode 100755 index 06589e1f77..0000000000 --- a/packages/x11/util/makedepend/build +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -setup_toolchain host - -cd $PKG_BUILD - -./configure --host=$HOST_NAME \ - --build=$HOST_NAME \ - --prefix=$ROOT/$TOOLCHAIN \ - -make -make install diff --git a/packages/x11/util/makedepend/meta b/packages/x11/util/makedepend/package.mk similarity index 95% rename from packages/x11/util/makedepend/meta rename to packages/x11/util/makedepend/package.mk index 05bc34c1c0..fd9a684e70 100644 --- a/packages/x11/util/makedepend/meta +++ b/packages/x11/util/makedepend/package.mk @@ -19,18 +19,18 @@ ################################################################################ PKG_NAME="makedepend" -PKG_VERSION="1.0.4" +PKG_VERSION="1.0.5" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.X.org" PKG_URL="http://xorg.freedesktop.org/archive/individual/util/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain xproto:host" +PKG_BUILD_DEPENDS_HOST="toolchain xproto:host" PKG_PRIORITY="optional" PKG_SECTION="x11/util" PKG_SHORTDESC="makedepend: Creates dependencies in makefiles" PKG_LONGDESC="Creates dependencies in makefiles, a left-over of the historic imake build system." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="no" diff --git a/packages/x11/xserver/xorg-server/build b/packages/x11/xserver/xorg-server/build deleted file mode 100755 index 3065a91938..0000000000 --- a/packages/x11/xserver/xorg-server/build +++ /dev/null @@ -1,137 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -XORG_SRC="$PKG_BUILD/hw/xfree86" - -get_graphicdrivers - -if [ "$COMPOSITE_SUPPORT" = "yes" ]; then - XORG_COMPOSITE="--enable-composite" -else - XORG_COMPOSITE="--disable-composite" -fi - -if [ "$XINERAMA_SUPPORT" = "yes" ]; then - XORG_XINERAMA="--enable-xinerama" -else - XORG_XINERAMA="--disable-xinerama" -fi - -if [ "$OPENGL" = "Mesa" ]; then - XORG_MESA="--enable-glx --enable-dri" -else - XORG_MESA="--disable-glx --disable-dri" -fi - -# hack to prevent a build error - CFLAGS=`echo $CFLAGS | sed -e "s|-O3|-O2|" -e "s|-Ofast|-O2|"` - LDFLAGS=`echo $LDFLAGS | sed -e "s|-O3|-O2|" -e "s|-Ofast|-O2|"` - -cd $PKG_BUILD - -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --datarootdir=/usr/share \ - --disable-static \ - --enable-shared \ - --disable-debug \ - --disable-silent-rules \ - --disable-strict-compilation \ - --enable-largefile \ - --enable-visibility \ - --disable-unit-tests \ - --disable-sparkle \ - --disable-install-libxf86config \ - --disable-xselinux \ - --enable-aiglx \ - --enable-glx-tls \ - --enable-registry \ - $XORG_COMPOSITE \ - $XORG_XINERAMA \ - --enable-mitshm \ - --disable-xres \ - --enable-record \ - --enable-xv \ - --disable-xvmc \ - --enable-dga \ - --disable-screensaver \ - --disable-xdmcp \ - --disable-xdm-auth-1 \ - $XORG_MESA \ - --enable-dri2 \ - --enable-xf86vidmode \ - --disable-xace \ - --disable-xcsecurity \ - --disable-tslib \ - --enable-dbe \ - --disable-xf86bigfont \ - --enable-dpms \ - --enable-config-udev \ - --disable-config-dbus \ - --disable-config-hal \ - --enable-xfree86-utils \ - --enable-xaa \ - --enable-vgahw \ - --enable-vbe \ - --enable-int10-module \ - --disable-windowswm \ - --enable-libdrm \ - --enable-xorg \ - --disable-dmx \ - --disable-xvfb \ - --disable-xnest \ - --disable-xquartz \ - --disable-standalone-xpbproxy \ - --disable-xwin \ - --disable-kdrive \ - --disable-xephyr \ - --disable-xfake \ - --disable-xfbdev \ - --enable-unix-transport \ - --disable-tcp-transport \ - --disable-local-transport \ - --disable-install-setuid \ - --disable-secure-rpc \ - --disable-docs \ - --disable-devel-docs \ - --with-int10=x86emu \ - --disable-ipv6 \ - --with-gnu-ld \ - --with-sha1=libcrypto \ - --with-os-vendor="OpenELEC.tv" \ - --with-module-dir=$XORG_PATH_MODULES \ - --with-xkb-path=$XORG_PATH_XKB \ - --with-xkb-output=/var/cache/xkb \ - --with-log-dir=/var/log \ - --with-fontrootdir=/usr/share/fonts \ - --with-default-font-path="/usr/share/fonts/misc,built-ins" \ - --with-serverconfig-path="/usr/lib/xserver" \ - --without-xmlto \ - --without-fop \ - -make -$MAKEINSTALL diff --git a/packages/x11/xserver/xorg-server/install b/packages/x11/xserver/xorg-server/install deleted file mode 100755 index db5d7c1354..0000000000 --- a/packages/x11/xserver/xorg-server/install +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -get_graphicdrivers - -XORG_SRC="$PKG_BUILD/hw/xfree86" -XORG_DST="$INSTALL/$XORG_PATH_MODULES" - -mkdir -p $INSTALL/usr/bin - cp $XORG_SRC/Xorg $INSTALL/usr/bin - -mkdir -p $INSTALL/lib/udev - cp $PKG_DIR/scripts/xorg_start $INSTALL/lib/udev - -mkdir -p $XORG_DST - cp -P $XORG_SRC/exa/.libs/libexa.so $XORG_DST - cp -P $XORG_SRC/dixmods/.libs/libfb.so $XORG_DST - cp -P $XORG_SRC/fbdevhw/.libs/libfbdevhw.so $XORG_DST - cp -P $XORG_SRC/int10/.libs/libint10.so $XORG_DST - cp -P $XORG_SRC/dixmods/.libs/libshadow.so $XORG_DST - cp -P $XORG_SRC/shadowfb/.libs/libshadowfb.so $XORG_DST - cp -P $XORG_SRC/vbe/.libs/libvbe.so $XORG_DST - cp -P $XORG_SRC/vgahw/.libs/libvgahw.so $XORG_DST - cp -P $XORG_SRC/dixmods/.libs/libwfb.so $XORG_DST - cp -P $XORG_SRC/xaa/.libs/libxaa.so $XORG_DST - -mkdir -p $XORG_DST/extensions - cp -P $XORG_SRC/dixmods/.libs/libdbe.so $XORG_DST/extensions - cp -P $XORG_SRC/dixmods/.libs/librecord.so $XORG_DST/extensions - cp -P $XORG_SRC/dri2/.libs/libdri2.so $XORG_DST/extensions - cp -P $XORG_SRC/dixmods/extmod/.libs/libextmod.so $XORG_DST/extensions - - if [ -f $XORG_SRC/dri/.libs/libdri.so ]; then - cp -P $XORG_SRC/dri/.libs/libdri.so $XORG_DST/extensions - fi - if [ -f $XORG_SRC/dixmods/.libs/libglx.so ]; then - cp -P $XORG_SRC/dixmods/.libs/libglx.so $XORG_DST/extensions/libglx_mesa.so # rename for cooperate with nvidia drivers - ln -sf /var/lib/libglx.so $XORG_DST/extensions/libglx.so - fi - -mkdir -p $XORG_DST/multimedia - cp -P $XORG_SRC/i2c/.libs/*_drv.so $XORG_DST/multimedia - -mkdir -p $INSTALL/usr/lib/xserver - cp $PKG_BUILD/dix/protocol.txt $INSTALL/usr/lib/xserver - -mkdir -p $INSTALL/usr/share/X11/xorg.conf.d - cp $PKG_BUILD/config/10-evdev.conf $INSTALL/usr/share/X11/xorg.conf.d - -mkdir -p $INSTALL/etc/X11 - if [ -f $PROJECT_DIR/$PROJECT/xorg/xorg.conf ]; then - cp $PROJECT_DIR/$PROJECT/xorg/xorg.conf $INSTALL/etc/X11 - elif [ -f $PKG_DIR/config/xorg.conf ]; then - cp $PKG_DIR/config/xorg.conf $INSTALL/etc/X11 - fi - -if [ "$DEVTOOLS" = yes ]; then - cp $XORG_SRC/utils/cvt/cvt $INSTALL/usr/bin - cp $XORG_SRC/utils/gtf/gtf $INSTALL/usr/bin -fi diff --git a/packages/x11/xserver/xorg-server/meta b/packages/x11/xserver/xorg-server/meta deleted file mode 100644 index c30b9a858c..0000000000 --- a/packages/x11/xserver/xorg-server/meta +++ /dev/null @@ -1,73 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -PKG_NAME="xorg-server" -PKG_VERSION="1.12.4" -PKG_REV="1" -PKG_ARCH="any" -PKG_LICENSE="OSS" -PKG_SITE="http://www.X.org" -PKG_URL="http://xorg.freedesktop.org/archive/individual/xserver/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="libpciaccess libX11 libXfont libdrm openssl freetype pixman systemd" -PKG_BUILD_DEPENDS="toolchain util-macros font-util fontsproto randrproto recordproto renderproto dri2proto fixesproto damageproto scrnsaverproto videoproto inputproto xf86dgaproto xf86vidmodeproto xf86driproto xf86miscproto glproto libpciaccess libX11 libXfont libxkbfile libdrm openssl freetype pixman fontsproto systemd" -PKG_PRIORITY="optional" -PKG_SECTION="x11/xserver" -PKG_SHORTDESC="xorg-server: The Xorg X server" -PKG_LONGDESC="Xorg is a full featured X server that was originally designed for UNIX and UNIX-like operating systems running on Intel x86 hardware." -PKG_IS_ADDON="no" - -PKG_AUTORECONF="yes" - -get_graphicdrivers -if [ "$COMPOSITE_SUPPORT" = "yes" ]; then - PKG_DEPENDS="$PKG_DEPENDS libXcomposite" - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libXcomposite" -fi - -if [ "$XINERAMA_SUPPORT" = "yes" ]; then - PKG_DEPENDS="$PKG_DEPENDS libXinerama" - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libXinerama" -fi - -if [ "$OPENGL" = "Mesa" ]; then - PKG_DEPENDS="$PKG_DEPENDS Mesa glu" - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS Mesa glu" -fi - -# Additional packages we need for using xorg-server: -# Fonts - PKG_DEPENDS="$PKG_DEPENDS encodings font-xfree86-type1 font-bitstream-type1 font-misc-misc" - -# Server - PKG_DEPENDS="$PKG_DEPENDS xkeyboard-config xkbcomp" - -# Drivers - PKG_DEPENDS="$PKG_DEPENDS xf86-input-evdev" - - for drv in $XORG_DRIVERS; do - PKG_DEPENDS="$PKG_DEPENDS xf86-video-$drv" - done - -# Tools - PKG_DEPENDS="$PKG_DEPENDS pciutils xrandr setxkbmap" - -if [ -n "$WINDOWMANAGER" -a "$WINDOWMANAGER" != "none" ]; then - PKG_DEPENDS="$PKG_DEPENDS $WINDOWMANAGER" -fi diff --git a/packages/x11/xserver/xorg-server/package.mk b/packages/x11/xserver/xorg-server/package.mk new file mode 100644 index 0000000000..b8f5c03a05 --- /dev/null +++ b/packages/x11/xserver/xorg-server/package.mk @@ -0,0 +1,187 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="xorg-server" +PKG_VERSION="1.12.4" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/xserver/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libpciaccess libX11 libXfont libdrm openssl freetype pixman systemd" +PKG_BUILD_DEPENDS_TARGET="toolchain util-macros font-util fontsproto randrproto recordproto renderproto dri2proto fixesproto damageproto scrnsaverproto videoproto inputproto xf86dgaproto xf86vidmodeproto xf86driproto xf86miscproto glproto libpciaccess libX11 libXfont libxkbfile libdrm openssl freetype pixman fontsproto systemd" +PKG_PRIORITY="optional" +PKG_SECTION="x11/xserver" +PKG_SHORTDESC="xorg-server: The Xorg X server" +PKG_LONGDESC="Xorg is a full featured X server that was originally designed for UNIX and UNIX-like operating systems running on Intel x86 hardware." + +PKG_IS_ADDON="no" +PKG_AUTORECONF="yes" + +# Additional packages we need for using xorg-server: +# Fonts + PKG_DEPENDS="$PKG_DEPENDS encodings font-xfree86-type1 font-bitstream-type1 font-misc-misc" + +# Server + PKG_DEPENDS="$PKG_DEPENDS xkeyboard-config xkbcomp" + +# Tools + PKG_DEPENDS="$PKG_DEPENDS pciutils xrandr setxkbmap" + +if [ -n "$WINDOWMANAGER" -a "$WINDOWMANAGER" != "none" ]; then + PKG_DEPENDS="$PKG_DEPENDS $WINDOWMANAGER" +fi + +get_graphicdrivers +# Drivers + PKG_DEPENDS="$PKG_DEPENDS xf86-input-evdev" + for drv in $XORG_DRIVERS; do + PKG_DEPENDS="$PKG_DEPENDS xf86-video-$drv" + done + +if [ "$COMPOSITE_SUPPORT" = "yes" ]; then + PKG_DEPENDS="$PKG_DEPENDS libXcomposite" + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libXcomposite" + XORG_COMPOSITE="--enable-composite" +else + XORG_COMPOSITE="--disable-composite" +fi + +if [ "$XINERAMA_SUPPORT" = "yes" ]; then + PKG_DEPENDS="$PKG_DEPENDS libXinerama" + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET libXinerama" + XORG_XINERAMA="--enable-xinerama" +else + XORG_XINERAMA="--disable-xinerama" +fi + +if [ "$OPENGL" = "Mesa" ]; then + PKG_DEPENDS="$PKG_DEPENDS Mesa glu" + PKG_BUILD_DEPENDS_TARGET="$PKG_BUILD_DEPENDS_TARGET Mesa glu" + XORG_MESA="--enable-glx --enable-dri" +else + XORG_MESA="--disable-glx --disable-dri" +fi + +PKG_CONFIGURE_OPTS_TARGET="--disable-debug \ + --disable-silent-rules \ + --disable-strict-compilation \ + --enable-largefile \ + --enable-visibility \ + --disable-unit-tests \ + --disable-sparkle \ + --disable-install-libxf86config \ + --disable-xselinux \ + --enable-aiglx \ + --enable-glx-tls \ + --enable-registry \ + $XORG_COMPOSITE \ + $XORG_XINERAMA \ + --enable-mitshm \ + --disable-xres \ + --enable-record \ + --enable-xv \ + --disable-xvmc \ + --enable-dga \ + --disable-screensaver \ + --disable-xdmcp \ + --disable-xdm-auth-1 \ + $XORG_MESA \ + --enable-dri2 \ + --enable-xf86vidmode \ + --disable-xace \ + --disable-xcsecurity \ + --disable-tslib \ + --enable-dbe \ + --disable-xf86bigfont \ + --enable-dpms \ + --enable-config-udev \ + --disable-config-dbus \ + --disable-config-hal \ + --enable-xfree86-utils \ + --enable-xaa \ + --enable-vgahw \ + --enable-vbe \ + --enable-int10-module \ + --disable-windowswm \ + --enable-libdrm \ + --enable-xorg \ + --disable-dmx \ + --disable-xvfb \ + --disable-xnest \ + --disable-xquartz \ + --disable-standalone-xpbproxy \ + --disable-xwin \ + --disable-kdrive \ + --disable-xephyr \ + --disable-xfake \ + --disable-xfbdev \ + --enable-unix-transport \ + --disable-tcp-transport \ + --disable-local-transport \ + --disable-install-setuid \ + --disable-secure-rpc \ + --disable-docs \ + --disable-devel-docs \ + --with-int10=x86emu \ + --disable-ipv6 \ + --with-gnu-ld \ + --with-sha1=libcrypto \ + --with-os-vendor=OpenELEC.tv \ + --with-module-dir=$XORG_PATH_MODULES \ + --with-xkb-path=$XORG_PATH_XKB \ + --with-xkb-output=/var/cache/xkb \ + --with-log-dir=/var/log \ + --with-fontrootdir=/usr/share/fonts \ + --with-default-font-path=/usr/share/fonts/misc,built-ins \ + --with-serverconfig-path=/usr/lib/xserver \ + --without-xmlto \ + --without-fop" + +pre_configure_target() { +# hack to prevent a build error + CFLAGS=`echo $CFLAGS | sed -e "s|-O3|-O2|" -e "s|-Ofast|-O2|"` + LDFLAGS=`echo $LDFLAGS | sed -e "s|-O3|-O2|" -e "s|-Ofast|-O2|"` +} + +post_makeinstall_target() { + rm -rf $INSTALL/var/cache/xkb + + mkdir -p $INSTALL/lib/udev + cp $PKG_DIR/scripts/xorg_start $INSTALL/lib/udev + + if [ -f $INSTALL/usr/lib/xorg/modules/extensions/libglx.so ]; then + mv $INSTALL/usr/lib/xorg/modules/extensions/libglx.so \ + $INSTALL/usr/lib/xorg/modules/extensions/libglx_mesa.so # rename for cooperate with nvidia drivers + ln -sf /var/lib/libglx.so $INSTALL/usr/lib/xorg/modules/extensions/libglx.so + fi + + mkdir -p $INSTALL/etc/X11 + if [ -f $PROJECT_DIR/$PROJECT/xorg/xorg.conf ]; then + cp $PROJECT_DIR/$PROJECT/xorg/xorg.conf $INSTALL/etc/X11 + elif [ -f $PKG_DIR/config/xorg.conf ]; then + cp $PKG_DIR/config/xorg.conf $INSTALL/etc/X11 + fi + + if [ ! "$DEVTOOLS" = yes ]; then + rm -rf $INSTALL/usr/bin/cvt + rm -rf $INSTALL/usr/bin/gtf + fi +} \ No newline at end of file diff --git a/packages/x11/app/xkbcomp/install b/packages/x11/xserver/xorg-server/tmpfiles.d/xorg-server.conf old mode 100755 new mode 100644 similarity index 91% rename from packages/x11/app/xkbcomp/install rename to packages/x11/xserver/xorg-server/tmpfiles.d/xorg-server.conf index 6a5aaf3171..ba39386809 --- a/packages/x11/app/xkbcomp/install +++ b/packages/x11/xserver/xorg-server/tmpfiles.d/xorg-server.conf @@ -1,5 +1,3 @@ -#!/bin/sh - ################################################################################ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) @@ -20,8 +18,5 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -. config/options $1 - -mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/$1 $INSTALL/usr/bin - +d /var/cache/xkb 0755 root root - - +d /var/lib 0755 root root - - diff --git a/projects/ARCTIC_MC/linux/linux.x86_64.conf b/projects/ARCTIC_MC/linux/linux.x86_64.conf index 1ac2d81744..df33e0a9b1 100644 --- a/projects/ARCTIC_MC/linux/linux.x86_64.conf +++ b/projects/ARCTIC_MC/linux/linux.x86_64.conf @@ -1164,7 +1164,7 @@ CONFIG_MII=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m +CONFIG_TUN=y # CONFIG_VETH is not set # CONFIG_ARCNET is not set @@ -1311,7 +1311,7 @@ CONFIG_REALTEK_PHY=y # CONFIG_MICREL_PHY is not set # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set -CONFIG_PPP=m +CONFIG_PPP=y CONFIG_PPP_BSDCOMP=m CONFIG_PPP_DEFLATE=m # CONFIG_PPP_FILTER is not set diff --git a/projects/ATV/avahi/samba.service b/projects/ATV/avahi/samba.service deleted file mode 100644 index 0cccf71f1c..0000000000 --- a/projects/ATV/avahi/samba.service +++ /dev/null @@ -1,14 +0,0 @@ - - - - %h - - _smb._tcp - 445 - - - _device-info._tcp - 0 - model=AppleTV1,1 - - diff --git a/projects/ATV/linux/linux.i386.conf b/projects/ATV/linux/linux.i386.conf index 80da55de68..f21aa88900 100644 --- a/projects/ATV/linux/linux.i386.conf +++ b/projects/ATV/linux/linux.i386.conf @@ -1143,7 +1143,7 @@ CONFIG_MII=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m +CONFIG_TUN=y # CONFIG_VETH is not set # CONFIG_ARCNET is not set @@ -1240,7 +1240,7 @@ CONFIG_PHYLIB=y # CONFIG_MICREL_PHY is not set # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set -CONFIG_PPP=m +CONFIG_PPP=y CONFIG_PPP_BSDCOMP=m CONFIG_PPP_DEFLATE=m # CONFIG_PPP_FILTER is not set diff --git a/projects/Fusion/linux/linux.x86_64.conf b/projects/Fusion/linux/linux.x86_64.conf index 10a4e9bb94..f75ba12ecb 100644 --- a/projects/Fusion/linux/linux.x86_64.conf +++ b/projects/Fusion/linux/linux.x86_64.conf @@ -1139,7 +1139,7 @@ CONFIG_MII=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m +CONFIG_TUN=y # CONFIG_VETH is not set # CONFIG_ARCNET is not set @@ -1245,7 +1245,7 @@ CONFIG_REALTEK_PHY=y # CONFIG_MICREL_PHY is not set # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set -CONFIG_PPP=m +CONFIG_PPP=y CONFIG_PPP_BSDCOMP=m CONFIG_PPP_DEFLATE=m # CONFIG_PPP_FILTER is not set diff --git a/projects/Generic/linux/linux.i386.conf b/projects/Generic/linux/linux.i386.conf index f2fe25d6e1..e0f97691fc 100644 --- a/projects/Generic/linux/linux.i386.conf +++ b/projects/Generic/linux/linux.i386.conf @@ -1183,7 +1183,7 @@ CONFIG_MII=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m +CONFIG_TUN=y # CONFIG_VETH is not set # CONFIG_ARCNET is not set @@ -1331,7 +1331,7 @@ CONFIG_REALTEK_PHY=y # CONFIG_MICREL_PHY is not set # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set -CONFIG_PPP=m +CONFIG_PPP=y CONFIG_PPP_BSDCOMP=m CONFIG_PPP_DEFLATE=m # CONFIG_PPP_FILTER is not set diff --git a/projects/Generic/linux/linux.x86_64.conf b/projects/Generic/linux/linux.x86_64.conf index 67d131c21a..4d369a5c27 100644 --- a/projects/Generic/linux/linux.x86_64.conf +++ b/projects/Generic/linux/linux.x86_64.conf @@ -1164,7 +1164,7 @@ CONFIG_MII=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m +CONFIG_TUN=y # CONFIG_VETH is not set # CONFIG_ARCNET is not set @@ -1312,7 +1312,7 @@ CONFIG_REALTEK_PHY=y # CONFIG_MICREL_PHY is not set # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set -CONFIG_PPP=m +CONFIG_PPP=y CONFIG_PPP_BSDCOMP=m CONFIG_PPP_DEFLATE=m # CONFIG_PPP_FILTER is not set diff --git a/projects/Generic_OSS/initramfs/initramfs.conf b/projects/Generic_OSS/initramfs/initramfs.conf new file mode 100644 index 0000000000..caeb01670e --- /dev/null +++ b/projects/Generic_OSS/initramfs/initramfs.conf @@ -0,0 +1,2 @@ +# Dont switch framebuffer, we have KMS support here + SWITCH_FRAMEBUFFER=no \ No newline at end of file diff --git a/projects/Generic_OSS/linux/linux.i386.conf b/projects/Generic_OSS/linux/linux.i386.conf index 86d355806c..6b839f6805 100644 --- a/projects/Generic_OSS/linux/linux.i386.conf +++ b/projects/Generic_OSS/linux/linux.i386.conf @@ -853,7 +853,7 @@ CONFIG_STANDALONE=y # CONFIG_PREVENT_FIRMWARE_BUILD is not set CONFIG_FW_LOADER=y CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="bnx2/bnx2-mips-06-6.2.1.fw bnx2/bnx2-mips-09-6.2.1a.fw bnx2/bnx2-rv2p-06-6.0.15.fw bnx2/bnx2-rv2p-09-6.0.17.fw bnx2/bnx2-rv2p-09ax-6.0.17.fw tigon/tg3.bin tigon/tg3_tso5.bin tigon/tg3_tso.bin rtl_nic/rtl8105e-1.fw rtl_nic/rtl8106e-1.fw rtl_nic/rtl8168d-1.fw rtl_nic/rtl8168d-2.fw rtl_nic/rtl8168e-1.fw rtl_nic/rtl8168e-2.fw rtl_nic/rtl8168e-3.fw rtl_nic/rtl8168f-1.fw rtl_nic/rtl8168f-2.fw rtl_nic/rtl8168g-1.fw rtl_nic/rtl8402-1.fw rtl_nic/rtl8411-1.fw radeon/ARUBA_me.bin radeon/ARUBA_pfp.bin radeon/ARUBA_rlc.bin radeon/BARTS_mc.bin radeon/BARTS_me.bin radeon/BARTS_pfp.bin radeon/BTC_rlc.bin radeon/CAICOS_mc.bin radeon/CAICOS_me.bin radeon/CAICOS_pfp.bin radeon/CAYMAN_mc.bin radeon/CAYMAN_me.bin radeon/CAYMAN_pfp.bin radeon/CAYMAN_rlc.bin radeon/CEDAR_me.bin radeon/CEDAR_pfp.bin radeon/CEDAR_rlc.bin radeon/CYPRESS_me.bin radeon/CYPRESS_pfp.bin radeon/CYPRESS_rlc.bin radeon/JUNIPER_me.bin radeon/JUNIPER_pfp.bin radeon/JUNIPER_rlc.bin radeon/PALM_me.bin radeon/PALM_pfp.bin radeon/PITCAIRN_ce.bin radeon/PITCAIRN_mc.bin radeon/PITCAIRN_me.bin radeon/PITCAIRN_pfp.bin radeon/PITCAIRN_rlc.bin radeon/R100_cp.bin radeon/R200_cp.bin radeon/R300_cp.bin radeon/R420_cp.bin radeon/R520_cp.bin radeon/R600_me.bin radeon/R600_pfp.bin radeon/R600_rlc.bin radeon/R700_rlc.bin radeon/REDWOOD_me.bin radeon/REDWOOD_pfp.bin radeon/REDWOOD_rlc.bin radeon/RS600_cp.bin radeon/RS690_cp.bin radeon/RS780_me.bin radeon/RS780_pfp.bin radeon/RV610_me.bin radeon/RV610_pfp.bin radeon/RV620_me.bin radeon/RV620_pfp.bin radeon/RV630_me.bin radeon/RV630_pfp.bin radeon/RV635_me.bin radeon/RV635_pfp.bin radeon/RV670_me.bin radeon/RV670_pfp.bin radeon/RV710_me.bin radeon/RV710_pfp.bin radeon/RV730_me.bin radeon/RV730_pfp.bin radeon/RV770_me.bin radeon/RV770_pfp.bin radeon/SUMO2_me.bin radeon/SUMO2_pfp.bin radeon/SUMO_me.bin radeon/SUMO_pfp.bin radeon/SUMO_rlc.bin radeon/TAHITI_ce.bin radeon/TAHITI_mc.bin radeon/TAHITI_me.bin radeon/TAHITI_pfp.bin radeon/TAHITI_rlc.bin radeon/TURKS_mc.bin radeon/TURKS_me.bin radeon/TURKS_pfp.bin radeon/VERDE_ce.bin radeon/VERDE_mc.bin radeon/VERDE_me.bin radeon/VERDE_pfp.bin radeon/VERDE_rlc.bin" +CONFIG_EXTRA_FIRMWARE="bnx2/bnx2-mips-06-6.2.1.fw bnx2/bnx2-mips-09-6.2.1a.fw bnx2/bnx2-rv2p-06-6.0.15.fw bnx2/bnx2-rv2p-09-6.0.17.fw bnx2/bnx2-rv2p-09ax-6.0.17.fw tigon/tg3.bin tigon/tg3_tso5.bin tigon/tg3_tso.bin rtl_nic/rtl8105e-1.fw rtl_nic/rtl8106e-1.fw rtl_nic/rtl8168d-1.fw rtl_nic/rtl8168d-2.fw rtl_nic/rtl8168e-1.fw rtl_nic/rtl8168e-2.fw rtl_nic/rtl8168e-3.fw rtl_nic/rtl8168f-1.fw rtl_nic/rtl8168f-2.fw rtl_nic/rtl8168g-1.fw rtl_nic/rtl8402-1.fw rtl_nic/rtl8411-1.fw radeon/ARUBA_me.bin radeon/ARUBA_pfp.bin radeon/ARUBA_rlc.bin radeon/BARTS_mc.bin radeon/BARTS_me.bin radeon/BARTS_pfp.bin radeon/BARTS_smc.bin radeon/BONAIRE_ce.bin radeon/BONAIRE_mc.bin radeon/BONAIRE_me.bin radeon/BONAIRE_mec.bin radeon/BONAIRE_pfp.bin radeon/BONAIRE_rlc.bin radeon/BONAIRE_sdma.bin radeon/BONAIRE_uvd.bin radeon/BTC_rlc.bin radeon/CAICOS_mc.bin radeon/CAICOS_me.bin radeon/CAICOS_pfp.bin radeon/CAICOS_smc.bin radeon/CAYMAN_mc.bin radeon/CAYMAN_me.bin radeon/CAYMAN_pfp.bin radeon/CAYMAN_rlc.bin radeon/CAYMAN_smc.bin radeon/CEDAR_me.bin radeon/CEDAR_pfp.bin radeon/CEDAR_rlc.bin radeon/CEDAR_smc.bin radeon/CYPRESS_me.bin radeon/CYPRESS_pfp.bin radeon/CYPRESS_rlc.bin radeon/CYPRESS_smc.bin radeon/CYPRESS_uvd.bin radeon/HAINAN_ce.bin radeon/HAINAN_mc.bin radeon/HAINAN_me.bin radeon/HAINAN_pfp.bin radeon/HAINAN_rlc.bin radeon/HAINAN_smc.bin radeon/JUNIPER_me.bin radeon/JUNIPER_pfp.bin radeon/JUNIPER_rlc.bin radeon/JUNIPER_smc.bin radeon/KABINI_ce.bin radeon/KABINI_me.bin radeon/KABINI_mec.bin radeon/KABINI_pfp.bin radeon/KABINI_rlc.bin radeon/KABINI_sdma.bin radeon/LICENSE.radeon radeon/OLAND_ce.bin radeon/OLAND_mc.bin radeon/OLAND_me.bin radeon/OLAND_pfp.bin radeon/OLAND_rlc.bin radeon/OLAND_smc.bin radeon/PALM_me.bin radeon/PALM_pfp.bin radeon/PITCAIRN_ce.bin radeon/PITCAIRN_mc.bin radeon/PITCAIRN_me.bin radeon/PITCAIRN_pfp.bin radeon/PITCAIRN_rlc.bin radeon/PITCAIRN_smc.bin radeon/R100_cp.bin radeon/R200_cp.bin radeon/R300_cp.bin radeon/R420_cp.bin radeon/R520_cp.bin radeon/R600_me.bin radeon/R600_pfp.bin radeon/R600_rlc.bin radeon/R700_rlc.bin radeon/REDWOOD_me.bin radeon/REDWOOD_pfp.bin radeon/REDWOOD_rlc.bin radeon/REDWOOD_smc.bin radeon/RS600_cp.bin radeon/RS690_cp.bin radeon/RS780_me.bin radeon/RS780_pfp.bin radeon/RV610_me.bin radeon/RV610_pfp.bin radeon/RV620_me.bin radeon/RV620_pfp.bin radeon/RV630_me.bin radeon/RV630_pfp.bin radeon/RV635_me.bin radeon/RV635_pfp.bin radeon/RV670_me.bin radeon/RV670_pfp.bin radeon/RV710_me.bin radeon/RV710_pfp.bin radeon/RV710_smc.bin radeon/RV710_uvd.bin radeon/RV730_me.bin radeon/RV730_pfp.bin radeon/RV730_smc.bin radeon/RV740_smc.bin radeon/RV770_me.bin radeon/RV770_pfp.bin radeon/RV770_smc.bin radeon/SUMO2_me.bin radeon/SUMO2_pfp.bin radeon/SUMO_me.bin radeon/SUMO_pfp.bin radeon/SUMO_rlc.bin radeon/SUMO_uvd.bin radeon/TAHITI_ce.bin radeon/TAHITI_mc.bin radeon/TAHITI_me.bin radeon/TAHITI_pfp.bin radeon/TAHITI_rlc.bin radeon/TAHITI_smc.bin radeon/TAHITI_uvd.bin radeon/TURKS_mc.bin radeon/TURKS_me.bin radeon/TURKS_pfp.bin radeon/TURKS_smc.bin radeon/VERDE_ce.bin radeon/VERDE_mc.bin radeon/VERDE_me.bin radeon/VERDE_pfp.bin radeon/VERDE_rlc.bin radeon/VERDE_smc.bin" CONFIG_EXTRA_FIRMWARE_DIR="firmware" CONFIG_FW_LOADER_USER_HELPER=y # CONFIG_DEBUG_DRIVER is not set @@ -1183,7 +1183,7 @@ CONFIG_MII=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m +CONFIG_TUN=y # CONFIG_VETH is not set # CONFIG_ARCNET is not set @@ -1329,7 +1329,7 @@ CONFIG_REALTEK_PHY=y # CONFIG_MICREL_PHY is not set # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set -CONFIG_PPP=m +CONFIG_PPP=y CONFIG_PPP_BSDCOMP=m CONFIG_PPP_DEFLATE=m # CONFIG_PPP_FILTER is not set diff --git a/projects/Generic_OSS/splash/splash.png b/projects/Generic_OSS/splash/splash.png new file mode 100644 index 0000000000..316c0d7087 Binary files /dev/null and b/projects/Generic_OSS/splash/splash.png differ diff --git a/projects/ION/linux/linux.x86_64.conf b/projects/ION/linux/linux.x86_64.conf index 161b7c3851..dbe731c5cc 100644 --- a/projects/ION/linux/linux.x86_64.conf +++ b/projects/ION/linux/linux.x86_64.conf @@ -1126,7 +1126,7 @@ CONFIG_MII=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m +CONFIG_TUN=y # CONFIG_VETH is not set # CONFIG_ARCNET is not set @@ -1233,7 +1233,7 @@ CONFIG_REALTEK_PHY=y # CONFIG_MICREL_PHY is not set # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set -CONFIG_PPP=m +CONFIG_PPP=y CONFIG_PPP_BSDCOMP=m CONFIG_PPP_DEFLATE=m # CONFIG_PPP_FILTER is not set diff --git a/projects/Intel/linux/linux.x86_64.conf b/projects/Intel/linux/linux.x86_64.conf index 6520b4e4e5..c9269e92db 100644 --- a/projects/Intel/linux/linux.x86_64.conf +++ b/projects/Intel/linux/linux.x86_64.conf @@ -1141,7 +1141,7 @@ CONFIG_MII=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m +CONFIG_TUN=y # CONFIG_VETH is not set # CONFIG_ARCNET is not set @@ -1256,7 +1256,7 @@ CONFIG_REALTEK_PHY=y # CONFIG_MICREL_PHY is not set # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set -CONFIG_PPP=m +CONFIG_PPP=y CONFIG_PPP_BSDCOMP=m CONFIG_PPP_DEFLATE=m # CONFIG_PPP_FILTER is not set diff --git a/projects/RPi/linux/linux.arm.conf b/projects/RPi/linux/linux.arm.conf index 3611556bee..7d4fe2e870 100644 --- a/projects/RPi/linux/linux.arm.conf +++ b/projects/RPi/linux/linux.arm.conf @@ -832,7 +832,7 @@ CONFIG_MII=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m +CONFIG_TUN=y # CONFIG_VETH is not set # @@ -873,7 +873,7 @@ CONFIG_PHYLIB=y # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set # CONFIG_MICREL_KS8995MA is not set -CONFIG_PPP=m +CONFIG_PPP=y CONFIG_PPP_BSDCOMP=m CONFIG_PPP_DEFLATE=m # CONFIG_PPP_FILTER is not set diff --git a/projects/Ultra/linux/linux.x86_64.conf b/projects/Ultra/linux/linux.x86_64.conf index 0b619f8cb1..c752ca737e 100644 --- a/projects/Ultra/linux/linux.x86_64.conf +++ b/projects/Ultra/linux/linux.x86_64.conf @@ -1118,7 +1118,7 @@ CONFIG_MII=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m +CONFIG_TUN=y # CONFIG_VETH is not set # CONFIG_ARCNET is not set @@ -1209,7 +1209,7 @@ CONFIG_PHYLIB=y # CONFIG_MICREL_PHY is not set # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set -CONFIG_PPP=m +CONFIG_PPP=y CONFIG_PPP_BSDCOMP=m CONFIG_PPP_DEFLATE=m # CONFIG_PPP_FILTER is not set diff --git a/projects/Virtual/linux/linux.i386.conf b/projects/Virtual/linux/linux.i386.conf index 5a193b25fa..7097df3df7 100644 --- a/projects/Virtual/linux/linux.i386.conf +++ b/projects/Virtual/linux/linux.i386.conf @@ -1183,7 +1183,7 @@ CONFIG_MII=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m +CONFIG_TUN=y # CONFIG_VETH is not set # CONFIG_ARCNET is not set @@ -1330,7 +1330,7 @@ CONFIG_REALTEK_PHY=y # CONFIG_MICREL_PHY is not set # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set -CONFIG_PPP=m +CONFIG_PPP=y CONFIG_PPP_BSDCOMP=m CONFIG_PPP_DEFLATE=m # CONFIG_PPP_FILTER is not set diff --git a/projects/Virtual/linux/linux.x86_64.conf b/projects/Virtual/linux/linux.x86_64.conf index 1ac2d81744..df33e0a9b1 100644 --- a/projects/Virtual/linux/linux.x86_64.conf +++ b/projects/Virtual/linux/linux.x86_64.conf @@ -1164,7 +1164,7 @@ CONFIG_MII=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=m +CONFIG_TUN=y # CONFIG_VETH is not set # CONFIG_ARCNET is not set @@ -1311,7 +1311,7 @@ CONFIG_REALTEK_PHY=y # CONFIG_MICREL_PHY is not set # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set -CONFIG_PPP=m +CONFIG_PPP=y CONFIG_PPP_BSDCOMP=m CONFIG_PPP_DEFLATE=m # CONFIG_PPP_FILTER is not set diff --git a/scripts/build b/scripts/build index 31fb5e4d84..d8d8a07789 100755 --- a/scripts/build +++ b/scripts/build @@ -183,7 +183,7 @@ if [ ! -f $STAMP ]; then cd $PKG_BUILD - if [ "$TARGET" = "target" ]; then + if [ "$TARGET" = "target" ]; then if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" ]; then mkdir -p .$TARGET_NAME cd .$TARGET_NAME @@ -257,6 +257,7 @@ if [ ! -f $STAMP ]; then rm -rf $INSTALL/usr/share/info rm -rf $INSTALL/usr/share/locale rm -rf $INSTALL/usr/share/man + rm -rf $INSTALL/usr/share/pkgconfig find $INSTALL/lib -name "*.la" -exec rm -rf "{}" ";" 2>/dev/null || true find $INSTALL/usr/lib -name "*.la" -exec rm -rf "{}" ";" 2>/dev/null || true find $INSTALL/lib -name "*.a" -exec rm -rf "{}" ";" 2>/dev/null || true diff --git a/scripts/install b/scripts/install index 87947163bc..df3a9c6747 100755 --- a/scripts/install +++ b/scripts/install @@ -56,22 +56,52 @@ for p in $PKG_DEPENDS $PKG_DEPENDS_TARGET; do $SCRIPTS/install $p done -if [ -d "$BUILD/${PKG_NAME}-${PKG_VERSION}" ]; then - PKG_BUILD="$BUILD/${PKG_NAME}-${PKG_VERSION}" -elif [ -d "$BUILD/${PKG_NAME}_${PKG_VERSION}" ]; then - PKG_BUILD="$BUILD/${PKG_NAME}_${PKG_VERSION}" -elif [ -d "$BUILD/${PKG_NAME}.${PKG_VERSION}" ]; then - PKG_BUILD="$BUILD/${PKG_NAME}.${PKG_VERSION}" -elif [ -d "$BUILD/${PKG_NAME}${PKG_VERSION}" ]; then - PKG_BUILD="$BUILD/${PKG_NAME}${PKG_VERSION}" -elif [ -d "$BUILD/${PKG_NAME}" ]; then - PKG_BUILD="$BUILD/${PKG_NAME}" -fi +if [ -f $PKG_DIR/package.mk ]; then + # unset functions + unset -f pre_install + unset -f post_install -if [ -d $PKG_BUILD/.install_pkg ]; then - mkdir -p $INSTALL - cp -PR $PKG_BUILD/.install_pkg/* $INSTALL + # include buildfile + . $PKG_DIR/package.mk + + # set PKG_BUILD variable + if [ -z "$PKG_BUILD" ]; then + if [ -d "$BUILD/${PKG_NAME}-${PKG_VERSION}" ]; then + PKG_BUILD="$BUILD/${PKG_NAME}-${PKG_VERSION}" + elif [ -d "$BUILD/${PKG_NAME}_${PKG_VERSION}" ]; then + PKG_BUILD="$BUILD/${PKG_NAME}_${PKG_VERSION}" + elif [ -d "$BUILD/${PKG_NAME}.${PKG_VERSION}" ]; then + PKG_BUILD="$BUILD/${PKG_NAME}.${PKG_VERSION}" + elif [ -d "$BUILD/${PKG_NAME}${PKG_VERSION}" ]; then + PKG_BUILD="$BUILD/${PKG_NAME}${PKG_VERSION}" + elif [ -d "$BUILD/${PKG_NAME}" ]; then + PKG_BUILD="$BUILD/${PKG_NAME}" + fi + fi + + # install + if [ "$(type -t pre_install)" = "function" ]; then + pre_install + fi + if [ -d $PKG_BUILD/.install_pkg ]; then + mkdir -p $INSTALL + cp -PR $PKG_BUILD/.install_pkg/* $INSTALL + fi + if [ "$(type -t post_install)" = "function" ]; then + post_install + fi elif [ -f $PKG_DIR/install ]; then + if [ -d "$BUILD/${PKG_NAME}-${PKG_VERSION}" ]; then + PKG_BUILD="$BUILD/${PKG_NAME}-${PKG_VERSION}" + elif [ -d "$BUILD/${PKG_NAME}_${PKG_VERSION}" ]; then + PKG_BUILD="$BUILD/${PKG_NAME}_${PKG_VERSION}" + elif [ -d "$BUILD/${PKG_NAME}.${PKG_VERSION}" ]; then + PKG_BUILD="$BUILD/${PKG_NAME}.${PKG_VERSION}" + elif [ -d "$BUILD/${PKG_NAME}${PKG_VERSION}" ]; then + PKG_BUILD="$BUILD/${PKG_NAME}${PKG_VERSION}" + elif [ -d "$BUILD/${PKG_NAME}" ]; then + PKG_BUILD="$BUILD/${PKG_NAME}" + fi $PKG_DIR/install $@ >&$VERBOSE_OUT fi diff --git a/tools/mkpkg/mkpkg_xbmc-gotham b/tools/mkpkg/mkpkg_xbmc-gotham index faf3682ec5..ea170e32cc 100755 --- a/tools/mkpkg/mkpkg_xbmc-gotham +++ b/tools/mkpkg/mkpkg_xbmc-gotham @@ -38,7 +38,7 @@ echo "getting sources..." cd .. if [ -z "$PKG_VERSION" ]; then - PKG_VERSION="$GIT_REV" + PKG_VERSION="13.alpha-$GIT_REV" fi echo "copying sources..."