diff --git a/packages/mediacenter/xbmc-pvr/build b/packages/mediacenter/xbmc-pvr/build index 23ae3a09d8..4ed4a0610e 100755 --- a/packages/mediacenter/xbmc-pvr/build +++ b/packages/mediacenter/xbmc-pvr/build @@ -35,7 +35,6 @@ $SCRIPTS/build freetype $SCRIPTS/build jasper # $SCRIPTS/build libass -# $SCRIPTS/build a52dec $SCRIPTS/build libmad $SCRIPTS/build libsamplerate $SCRIPTS/build libogg @@ -105,6 +104,8 @@ cd - --disable-ccache \ --disable-pulse \ --enable-faac \ + --disable-libdts \ + --disable-liba52 \ --enable-dvdcss \ --disable-mid \ --disable-goom \ @@ -116,7 +117,6 @@ cd - --disable-external-liba52 \ --disable-external-libdts \ --disable-external-libass \ - --enable-external-libogg \ --enable-external-python \ make externals diff --git a/packages/mediacenter/xbmc-pvr/install b/packages/mediacenter/xbmc-pvr/install index d5ace9f3b6..2c66160f5e 100755 --- a/packages/mediacenter/xbmc-pvr/install +++ b/packages/mediacenter/xbmc-pvr/install @@ -78,7 +78,7 @@ mkdir -p $INSTALL/usr/share/xbmc/media/Fonts cp -PR $PKG_DIR/fonts/*.ttf $INSTALL/usr/share/xbmc/media/Fonts mkdir -p $INSTALL/usr/share/xbmc/media - cp -PR $PKG_BUILD/media/weather.rar $INSTALL/usr/share/xbmc/media/ + cp -PR $PKG_BUILD/media/weather.zip $INSTALL/usr/share/xbmc/media/ cp -PR $PKG_BUILD/media/icon.png $INSTALL/usr/share/xbmc/media/ cp -PR $PKG_DIR/splash/Splash.png $INSTALL/usr/share/xbmc/media/ @@ -94,7 +94,6 @@ mkdir -p $INSTALL/usr/share/xbmc/sounds cp -PR $PKG_BUILD/sounds/* $INSTALL/usr/share/xbmc/sounds mkdir -p $INSTALL/usr/share/xbmc/system - cp -PR $PKG_BUILD/system/*linux.so $INSTALL/usr/share/xbmc/system cp -PR $PKG_BUILD/system/*.xml $INSTALL/usr/share/xbmc/system cp -PR $PKG_BUILD/system/*.conf $INSTALL/usr/share/xbmc/system diff --git a/packages/mediacenter/xbmc-pvr/patches/000-changeset_r27124.diff b/packages/mediacenter/xbmc-pvr/patches/000-changeset_r27124.diff deleted file mode 100644 index 2a5dbe70bf..0000000000 --- a/packages/mediacenter/xbmc-pvr/patches/000-changeset_r27124.diff +++ /dev/null @@ -1,24 +0,0 @@ -diff -Naur xbmc-pvr-27135/xbmc/lib/libPython/xbmcmodule/player.cpp xbmc-pvr-27135.patch/xbmc/lib/libPython/xbmcmodule/player.cpp ---- xbmc-pvr-27135/xbmc/lib/libPython/xbmcmodule/player.cpp 2010-01-24 11:53:57.108631848 +0100 -+++ xbmc-pvr-27135.patch/xbmc/lib/libPython/xbmcmodule/player.cpp 2010-01-24 17:57:58.453446334 +0100 -@@ -470,12 +470,15 @@ - char *cLine = NULL; - if (!PyArg_ParseTuple(args, (char*)"s", &cLine)) return NULL; - -- int nStream = g_application.m_pPlayer->GetSubtitleCount(); -+ if (g_application.m_pPlayer) -+ { -+ int nStream = g_application.m_pPlayer->GetSubtitleCount(); - -- g_settings.m_currentVideoSettings.m_SubtitleOn = true; -- g_application.m_pPlayer->SetSubtitleVisible(true); -- g_application.m_pPlayer->AddSubtitle(cLine); -- g_application.m_pPlayer->SetSubtitle(nStream); -+ g_settings.m_currentVideoSettings.m_SubtitleOn = true; -+ g_application.m_pPlayer->SetSubtitleVisible(true); -+ g_application.m_pPlayer->AddSubtitle(cLine); -+ g_application.m_pPlayer->SetSubtitle(nStream); -+ } - - Py_INCREF(Py_None); - return Py_None; diff --git a/packages/mediacenter/xbmc-pvr/patches/000-changeset_r27125.diff b/packages/mediacenter/xbmc-pvr/patches/000-changeset_r27125.diff deleted file mode 100644 index f2e2e14e51..0000000000 --- a/packages/mediacenter/xbmc-pvr/patches/000-changeset_r27125.diff +++ /dev/null @@ -1,195 +0,0 @@ -diff -Naur xbmc-pvr-27135/configure.in xbmc-pvr-27135.patch/configure.in ---- xbmc-pvr-27135/configure.in 2010-01-24 11:53:00.868755115 +0100 -+++ xbmc-pvr-27135.patch/configure.in 2010-01-24 17:59:15.923594722 +0100 -@@ -55,8 +55,6 @@ - external_liba52_disabled="== Use of external liba52 disabled. ==" - external_libdts_enabled="== Use of external libdts enabled. ==" - external_libdts_disabled="== Use of external libdts disabled. ==" --external_libmpeg2_enabled="== Use of external libmpeg2 enabled. ==" --external_libmpeg2_disabled="== Use of external libmpeg2 disabled. ==" - external_libass_enabled="== Use of external libass enabled. ==" - external_libass_disabled="== Use of external libass disabled. ==" - external_libogg_enabled="== Use of external libogg enabled. ==" -@@ -218,12 +216,6 @@ - [use_external_libdts=$enableval], - [use_external_libdts=no]) - --AC_ARG_ENABLE([external-libmpeg2], -- [AS_HELP_STRING([--enable-external-libmpeg2], -- [enable use of external libmpeg2 library (default is no) 'Linux only'])], -- [use_external_libmpeg2=$enableval], -- [use_external_libmpeg2=no]) -- - AC_ARG_ENABLE([external-libass], - [AS_HELP_STRING([--enable-external-libass], - [enable use of external libass library (default is no) 'Linux only'])], -@@ -328,6 +320,8 @@ - AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library)) - AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library)) - AC_CHECK_LIB([wavpack], [main],, AC_MSG_ERROR($missing_library)) -+AC_CHECK_LIB([mpeg2], [main],, AC_MSG_ERROR($missing_library)) -+AC_CHECK_LIB([mpeg2convert],[main],, AC_MSG_ERROR($missing_library)) - PKG_CHECK_MODULES([MAD], [mad], - [INCLUDES+=" $MAD_CFLAGS"; LIBS+=" $MAD_LIBS"], - AC_MSG_ERROR($missing_library)) -@@ -592,19 +586,6 @@ - USE_EXTERNAL_LIBDTS=0 - fi - --# External libmpeg2 --if test "$use_external_libraries" = "yes" || test "$use_external_libmpeg2" = "yes"; then -- AC_CHECK_LIB([mpeg2], [main],, AC_MSG_ERROR($missing_library)) -- AC_CHECK_LIB([mpeg2convert], [main],, AC_MSG_ERROR($missing_library)) -- -- AC_MSG_NOTICE($external_libmpeg2_enabled) -- USE_EXTERNAL_LIBMPEG2=1 -- AC_DEFINE([USE_EXTERNAL_LIBMPEG2], [1], [Whether to use external libmpeg2 library.]) --else -- AC_MSG_NOTICE($external_libmpeg2_disabled) -- USE_EXTERNAL_LIBMPEG2=0 --fi -- - # External libass - if test "$use_external_libraries" = "yes" || test "$use_external_libass" = "yes"; then - # We need libass >= 0.9.7. -@@ -984,11 +965,6 @@ - else - final_message="$final_message\n External libdts:\tNo" - fi -- if test "$use_external_libmpeg2" = "yes"; then -- final_message="$final_message\n External libmpeg2:\tYes" -- else -- final_message="$final_message\n External libmpeg2:\tNo" -- fi - if test "$use_external_libass" = "yes"; then - final_message="$final_message\n External libass:\tYes" - else -@@ -1354,27 +1330,6 @@ - fi - ], [$USE_EXTERNAL_LIBA52]) - --XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libmpeg2], [ -- if test "$host_vendor" = "apple" ; then -- CFLAGS="-fPIC -fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ -- ./configure MACOSX_DEPLOYMENT_TARGET=10.4 \ -- --with-pic \ -- --disable-static \ -- --enable-shared \ -- --disable-directx \ -- --disable-sdl \ -- --without-x -- else -- ./configure \ -- --with-pic \ -- --disable-static \ -- --enable-shared \ -- --disable-directx \ -- --disable-sdl \ -- --without-x -- fi --], [$USE_EXTERNAL_LIBMPEG2]) -- - XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libmad], [ - if test "$host_vendor" = "apple" ; then - CFLAGS="-fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ -diff -Naur xbmc-pvr-27135/README.ubuntu xbmc-pvr-27135.patch/README.ubuntu ---- xbmc-pvr-27135/README.ubuntu 2010-01-24 11:53:28.003696562 +0100 -+++ xbmc-pvr-27135.patch/README.ubuntu 2010-01-24 17:59:15.923594722 +0100 -@@ -41,7 +41,7 @@ - - For Ubuntu (all versions >= 7.04): - -- # sudo aptitude install subversion make g++ gcc gawk pmount libtool nasm automake cmake gperf unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl3 libcurl4-openssl-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbis-dev libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libfaac-dev libenca-dev libxt-dev libxtst-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmms-dev libmpeg3-dev libfaad-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libwavpack-dev -+ # sudo aptitude install subversion make g++ gcc gawk pmount libtool nasm automake cmake gperf unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl3 libcurl4-openssl-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbis-dev libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libfaac-dev libenca-dev libxt-dev libxtst-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmms-dev libmpeg3-dev libfaad-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libwavpack-dev libmpeg2-4-dev - - On 8.04 and older versions, libmms is outdated and thus XBMC will not compile properly. - In this case you will have to manually compile the latest version. -diff -Naur xbmc-pvr-27135/xbmc/cores/dvdplayer/Codecs/Makefile.in xbmc-pvr-27135.patch/xbmc/cores/dvdplayer/Codecs/Makefile.in ---- xbmc-pvr-27135/xbmc/cores/dvdplayer/Codecs/Makefile.in 2010-01-24 11:54:24.100638872 +0100 -+++ xbmc-pvr-27135.patch/xbmc/cores/dvdplayer/Codecs/Makefile.in 2010-01-24 17:59:15.921599160 +0100 -@@ -16,9 +16,6 @@ - ifneq (@USE_EXTERNAL_LIBDTS@,1) - DIRS+=libdts - endif --ifneq (@USE_EXTERNAL_LIBMPEG2@,1) -- DIRS+=libmpeg2 --endif - - LIBS= - ifneq (@USE_EXTERNAL_FFMPEG@,1) -@@ -35,9 +32,6 @@ - ifneq (@USE_EXTERNAL_LIBDTS@,1) - LIBS+=libdts-$(ARCH).so - endif --ifneq (@USE_EXTERNAL_LIBMPEG2@,1) -- LIBS+=libmpeg2-$(ARCH).so --endif - - ifeq ($(findstring osx,$(ARCH)),osx) - DIRS+=libmad -@@ -131,11 +125,6 @@ - liba52/libao/libao.a $(BUNDLE1_O) - #$(WRAPPER_OSX) $@;mv output.so $@ - --$(SYSDIR)/libmpeg2-$(ARCH).so: $(WRAPPER_OSX) libmpeg2/libmpeg2/libmpeg2.la -- ld -bundle -flat_namespace -undefined suppress -o $@ \ -- libmpeg2/libmpeg2/.libs/*.o $(BUNDLE1_O) -- $(WRAPPER_OSX) $@;mv output.so $@ -- - libdts/libdts/libdts.a : libdts; - libdts: - $(MAKE) -C $@ -@@ -153,10 +142,6 @@ - liba52: - $(MAKE) -C $@ - --libmpeg2/libmpeg2/libmpeg2.la: libmpeg2 --libmpeg2: -- $(MAKE) -C $@ -- - else - - $(SYSDIR)/avutil-50-$(ARCH).so: ffmpeg/libavutil/libavutil.so -@@ -203,10 +188,6 @@ - $(CC) -o $@ $(LDFLAGS) --soname,$@ liba52/libao/libao.a \ - -Wl`cat $(WRAPPER:.o=.def)` $(WRAPPER) - --$(SYSDIR)/libmpeg2-$(ARCH).so: $(WRAPPER) libmpeg2/libmpeg2/libmpeg2.la -- $(CC) -o $@ $(LDFLAGS) --soname,$@ libmpeg2/libmpeg2/.libs/*.o \ -- -Wl`cat $(WRAPPER:.o=.def)` $(WRAPPER) -- - libdts/libdts/libdts.a : libdts; - libdts: - $(MAKE) -C $@ -@@ -216,10 +197,6 @@ - liba52: - $(MAKE) -C $@ - --libmpeg2/libmpeg2/libmpeg2.la: libmpeg2 --libmpeg2: -- $(MAKE) -C $@ -- - endif - - clean: -diff -Naur xbmc-pvr-27135/xbmc/cores/dvdplayer/DVDCodecs/Video/DllLibMpeg2.h xbmc-pvr-27135.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/DllLibMpeg2.h ---- xbmc-pvr-27135/xbmc/cores/dvdplayer/DVDCodecs/Video/DllLibMpeg2.h 2010-01-24 11:54:33.299754754 +0100 -+++ xbmc-pvr-27135.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/DllLibMpeg2.h 2010-01-24 17:59:15.921599160 +0100 -@@ -25,7 +25,7 @@ - #include "config.h" - #endif - extern "C" { --#if (defined USE_EXTERNAL_LIBMPEG2) -+#if (!defined WIN32) - #include - #include - #else -@@ -54,7 +54,7 @@ - virtual void mpeg2_skip(mpeg2dec_t * mpeg2dec, int skip)=0; - }; - --#if (defined USE_EXTERNAL_LIBMPEG2) -+#if (!defined WIN32) - - class DllLibMpeg2 : public DllDynamic, DllLibMpeg2Interface - { diff --git a/packages/mediacenter/xbmc-pvr/patches/000-changeset_r27130.diff b/packages/mediacenter/xbmc-pvr/patches/000-changeset_r27130.diff deleted file mode 100644 index ee5f1004b9..0000000000 --- a/packages/mediacenter/xbmc-pvr/patches/000-changeset_r27130.diff +++ /dev/null @@ -1,40 +0,0 @@ -diff -Naur xbmc-pvr-27135/xbmc/utils/SystemInfo.cpp xbmc-pvr-27135.patch/xbmc/utils/SystemInfo.cpp ---- xbmc-pvr-27135/xbmc/utils/SystemInfo.cpp 2010-01-24 11:54:23.303629749 +0100 -+++ xbmc-pvr-27135.patch/xbmc/utils/SystemInfo.cpp 2010-01-24 18:00:16.991476525 +0100 -@@ -577,9 +577,27 @@ - #if defined(_LINUX) && !defined(__APPLE__) - CStdString CSysInfo::GetLinuxDistro() - { -- CStdString result = ""; -+ static const char* release_file[] = { "/etc/debian_version", -+ "/etc/SuSE-release", -+ "/etc/mandrake-release", -+ "/etc/fedora-release", -+ "/etc/redhat-release", -+ "/etc/gentoo-release", -+ "/etc/slackware-version", -+ "/etc/arch-release", -+ NULL }; - - FILE* pipe = popen("unset PYTHONHOME; unset PYTHONPATH; lsb_release -d | cut -f2", "r"); -+ -+ for (int i = 0; !pipe && release_file[i]; i++) -+ { -+ CStdString cmd = "cat "; -+ cmd += release_file[i]; -+ -+ pipe = popen(cmd.c_str(), "r"); -+ } -+ -+ CStdString result = ""; - if (pipe) - { - char buffer[256] = {'\0'}; -@@ -589,7 +607,6 @@ - CLog::Log(LOGWARNING, "Unable to determine Linux distribution"); - pclose(pipe); - } -- - return result.Trim(); - } - #endif diff --git a/packages/mediacenter/xbmc-pvr/patches/000-changeset_r27134.diff b/packages/mediacenter/xbmc-pvr/patches/000-changeset_r27134.diff deleted file mode 100644 index 50542e9275..0000000000 --- a/packages/mediacenter/xbmc-pvr/patches/000-changeset_r27134.diff +++ /dev/null @@ -1,57 +0,0 @@ -diff -Naur xbmc-pvr-27135/xbmc/FileItem.cpp xbmc-pvr-27135.patch/xbmc/FileItem.cpp ---- xbmc-pvr-27135/xbmc/FileItem.cpp 2010-01-24 11:53:29.580755057 +0100 -+++ xbmc-pvr-27135.patch/xbmc/FileItem.cpp 2010-01-24 18:02:09.346444342 +0100 -@@ -33,11 +33,9 @@ - #include "FileSystem/MultiPathDirectory.h" - #include "FileSystem/MusicDatabaseDirectory.h" - #include "FileSystem/VideoDatabaseDirectory.h" --#include "FileSystem/IDirectory.h" - #include "FileSystem/FactoryDirectory.h" - #include "MusicInfoTagLoaderFactory.h" - #include "CueDocument.h" --#include "utils/fstrcmp.h" - #include "VideoDatabase.h" - #include "MusicDatabase.h" - #include "SortFileItem.h" -@@ -57,7 +55,6 @@ - #include "GUISettings.h" - #include "AdvancedSettings.h" - #include "Settings.h" --#include "utils/TimeUtils.h" - #include "utils/RegExp.h" - #include "utils/log.h" - #include "karaoke/karaokelyricsfactory.h" -diff -Naur xbmc-pvr-27135/xbmc/FileItem.cpp.orig xbmc-pvr-27135.patch/xbmc/FileItem.cpp.orig -diff -Naur xbmc-pvr-27135/xbmc/GUIWindowVideoBase.cpp xbmc-pvr-27135.patch/xbmc/GUIWindowVideoBase.cpp ---- xbmc-pvr-27135/xbmc/GUIWindowVideoBase.cpp 2010-01-24 11:54:22.566755297 +0100 -+++ xbmc-pvr-27135.patch/xbmc/GUIWindowVideoBase.cpp 2010-01-24 18:02:09.343444194 +0100 -@@ -36,7 +36,6 @@ - #include "Application.h" - #include "NfoFile.h" - #include "Picture.h" --#include "utils/fstrcmp.h" - #include "PlayListPlayer.h" - #include "GUIPassword.h" - #include "FileSystem/ZipManager.h" -diff -Naur xbmc-pvr-27135/xbmc/ProgramDatabase.cpp xbmc-pvr-27135.patch/xbmc/ProgramDatabase.cpp ---- xbmc-pvr-27135/xbmc/ProgramDatabase.cpp 2010-01-24 11:53:30.581257422 +0100 -+++ xbmc-pvr-27135.patch/xbmc/ProgramDatabase.cpp 2010-01-24 18:02:09.344444453 +0100 -@@ -20,7 +20,6 @@ - */ - - #include "ProgramDatabase.h" --#include "utils/fstrcmp.h" - #include "Util.h" - #include "GUIWindowFileManager.h" - #include "FileItem.h" -diff -Naur xbmc-pvr-27135/xbmc/VideoDatabase.cpp xbmc-pvr-27135.patch/xbmc/VideoDatabase.cpp ---- xbmc-pvr-27135/xbmc/VideoDatabase.cpp 2010-01-24 11:53:29.525632072 +0100 -+++ xbmc-pvr-27135.patch/xbmc/VideoDatabase.cpp 2010-01-24 18:02:09.342444075 +0100 -@@ -21,7 +21,6 @@ - - #include "VideoDatabase.h" - #include "GUIWindowVideoBase.h" --#include "utils/fstrcmp.h" - #include "utils/RegExp.h" - #include "utils/GUIInfoManager.h" - #include "Util.h" diff --git a/packages/mediacenter/xbmc-pvr/patches/010_xbmc-crosscompile_add_host_and_build_to_configures-0.2.diff b/packages/mediacenter/xbmc-pvr/patches/010_xbmc-crosscompile_add_host_and_build_to_configures-0.2.diff index 65a491a205..fe6493c2ec 100644 --- a/packages/mediacenter/xbmc-pvr/patches/010_xbmc-crosscompile_add_host_and_build_to_configures-0.2.diff +++ b/packages/mediacenter/xbmc-pvr/patches/010_xbmc-crosscompile_add_host_and_build_to_configures-0.2.diff @@ -1,7 +1,7 @@ -diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in ---- xbmc-27135/configure.in 2010-01-24 11:46:42.037632392 +0100 -+++ xbmc-27135.patch/configure.in 2010-01-24 13:02:45.482579215 +0100 -@@ -1098,6 +1098,8 @@ +diff -Naur xbmc-27191/configure.in xbmc-27191.patch/configure.in +--- xbmc-27191/configure.in 2010-01-26 10:56:15.897804152 +0100 ++++ xbmc-27191.patch/configure.in 2010-01-26 11:32:58.096953871 +0100 +@@ -1073,6 +1073,8 @@ XB_CONFIG_MODULE([xbmc/lib/libPython/Python], [ if test "$host_vendor" = "apple" ; then ./configure \ @@ -10,7 +10,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --enable-ipv6 \ --enable-unicode=ucs4 \ --without-cxx \ -@@ -1120,6 +1122,8 @@ +@@ -1095,6 +1097,8 @@ cp pyconfig.h Include else ./configure \ @@ -19,7 +19,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --enable-ipv6 \ --enable-unicode=ucs4 \ --without-cxx \ -@@ -1137,6 +1141,8 @@ +@@ -1112,6 +1116,8 @@ if test "$host_vendor" = "apple" ; then CFLAGS="-fPIC -fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ ./configure MACOSX_DEPLOYMENT_TARGET=10.4 -C \ @@ -28,29 +28,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --with-pic \ --disable-asm-optimizations \ --disable-xmms-plugin \ -@@ -1151,7 +1157,9 @@ - XB_CONFIG_MODULE([xbmc/cores/paplayer/vorbisfile/libvorbis], [ - if test "$host_vendor" = "apple" ; then - CFLAGS="-fPIC -fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ -- ./configure MACOSX_DEPLOYMENT_TARGET=10.4 --with-pic -+ ./configure MACOSX_DEPLOYMENT_TARGET=10.4 --with-pic \ -+ --host=$host_alias \ -+ --build=$build_alias - else - true - fi -@@ -1160,7 +1168,9 @@ - XB_CONFIG_MODULE([xbmc/cores/paplayer/vorbisfile/ogg], [ - if test "$host_vendor" = "apple" ; then - CFLAGS="-fPIC -fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ -- ./configure MACOSX_DEPLOYMENT_TARGET=10.4 --with-pic -+ ./configure MACOSX_DEPLOYMENT_TARGET=10.4 --with-pic \ -+ --host=$host_alias \ -+ --build=$build_alias - else - true - fi -@@ -1173,6 +1183,7 @@ +@@ -1130,6 +1136,7 @@ --disable-amd3dnow \ --disable-static \ `if test "$use_debug" = "no"; then echo --disable-debug; fi` \ @@ -58,7 +36,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --disable-muxers \ --disable-encoders \ --disable-devices \ -@@ -1199,6 +1210,7 @@ +@@ -1156,6 +1163,7 @@ --disable-static \ --disable-ipv6 \ `if test "$use_debug" = "no"; then echo --disable-debug; fi` \ @@ -66,7 +44,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --disable-muxers \ --disable-encoders \ --disable-decoder=mpeg_xvmc \ -@@ -1211,6 +1223,7 @@ +@@ -1168,6 +1176,7 @@ --enable-postproc \ --enable-gpl \ `if test "$use_vdpau" = "yes"; then echo --enable-vdpau; else echo --disable-vdpau; fi` \ @@ -74,7 +52,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --enable-libfaad \ --enable-protocol=http \ --enable-pthreads \ -@@ -1224,12 +1237,16 @@ +@@ -1181,12 +1190,16 @@ CFLAGS="-fPIC -fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ ./configure \ @@ -91,7 +69,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --disable-oss \ --disable-solaris-audio \ --disable-al-audio \ -@@ -1242,11 +1259,15 @@ +@@ -1199,11 +1212,15 @@ if test "$host_vendor" = "apple" ; then ./configure MACOSX_DEPLOYMENT_TARGET=10.4 \ CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ @@ -107,7 +85,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --disable-doc \ --enable-static \ --with-pic -@@ -1257,6 +1278,8 @@ +@@ -1214,6 +1231,8 @@ if test "$host_vendor" = "apple" ; then ./configure2 MACOSX_DEPLOYMENT_TARGET=10.4 \ --extra-cflags="$DVDREAD_CFLAGS -D__DARWIN__ -fPIC -DPIC -fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -I`pwd`/../libdvdcss/src" \ @@ -116,7 +94,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --enable-static \ --disable-shared \ --cc="$CC" && -@@ -1266,6 +1289,8 @@ +@@ -1223,6 +1242,8 @@ else ./configure2 \ --extra-cflags="$DVDREAD_CFLAGS -fPIC -DPIC -I`pwd`/../libdvdcss/src" \ @@ -125,7 +103,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --enable-static \ --disable-shared \ --cc="$CC" && -@@ -1281,6 +1306,8 @@ +@@ -1238,6 +1259,8 @@ ./configure2 MACOSX_DEPLOYMENT_TARGET=10.4 \ --extra-cflags="$DVDREAD_CFLAGS -fPIC -DPIC -fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -I`pwd`/../includes" \ --extra-ldflags="-L`pwd`/../libdvdread/obj" \ @@ -134,7 +112,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --with-dvdread-config="`pwd`/../libdvdread/obj/dvdread-config" \ --enable-static \ --disable-shared \ -@@ -1289,6 +1316,8 @@ +@@ -1246,6 +1269,8 @@ ./configure2 \ --extra-cflags="$DVDREAD_CFLAGS -fPIC -DPIC -I`pwd`/../includes" \ --extra-ldflags="-L`pwd`/../libdvdread/obj" \ @@ -143,7 +121,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --with-dvdread-config="`pwd`/../libdvdread/obj/dvdread-config" \ --enable-static \ --disable-shared \ -@@ -1300,6 +1329,8 @@ +@@ -1257,6 +1282,8 @@ if test "$host_vendor" = "apple" ; then CFLAGS="-O3 -fPIC -fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ ./configure MACOSX_DEPLOYMENT_TARGET=10.4 \ @@ -152,7 +130,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --with-pic else true -@@ -1310,6 +1341,8 @@ +@@ -1267,6 +1294,8 @@ if test "$host_vendor" = "apple" ; then CFLAGS="-fPIC -fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ ./configure MACOSX_DEPLOYMENT_TARGET=10.4 \ @@ -161,7 +139,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --with-pic \ --disable-static \ --enable-shared \ -@@ -1319,6 +1352,8 @@ +@@ -1276,6 +1305,8 @@ --disable-al-audio else ./configure \ @@ -170,7 +148,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --with-pic \ --disable-static \ --enable-shared \ -@@ -1334,6 +1369,8 @@ +@@ -1291,6 +1322,8 @@ if test "$host_vendor" = "apple" ; then CFLAGS="-fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ ./configure MACOSX_DEPLOYMENT_TARGET=10.4 \ @@ -179,7 +157,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --with-pic else true -@@ -1344,17 +1381,23 @@ +@@ -1301,17 +1334,23 @@ if test "$host_vendor" = "apple" ; then export MACOSX_DEPLOYMENT_TARGET=10.4 CFLAGS="-fPIC -fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ @@ -206,7 +184,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in fi ], [$USE_EXTERNAL_LIBASS]) -@@ -1363,12 +1406,16 @@ +@@ -1320,12 +1359,16 @@ CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -fno-common" \ CPPFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -fno-common" \ ./configure MACOSX_DEPLOYMENT_TARGET=10.4 \ @@ -223,7 +201,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --disable-static \ --disable-debugging \ --with-pic -@@ -1386,6 +1433,8 @@ +@@ -1343,6 +1386,8 @@ XB_CONFIG_MODULE([xbmc/visualizations/Goom/goom2k4-0],[ if test "$host_vendor" != "apple" ; then ./configure \ @@ -232,7 +210,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --disable-shared \ --enable-static \ --with-pic -@@ -1400,6 +1449,8 @@ +@@ -1357,6 +1402,8 @@ CXXFLAGS="-fPIC -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \ LDFLAGS="-L/opt/local/lib" \ LIBS="-lz" \ @@ -241,7 +219,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib \ --without-xscreensaver \ --disable-sound \ -@@ -1415,6 +1466,8 @@ +@@ -1372,6 +1419,8 @@ ./configure \ CFLAGS="-fPIC" \ CXXFLAGS="-fPIC" \ @@ -250,7 +228,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in --without-xscreensaver \ --disable-sound \ --disable-cyclone \ -@@ -1430,18 +1483,26 @@ +@@ -1387,18 +1436,26 @@ XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libbdnav/], [ if test "$host_vendor" = "apple" ; then @@ -282,7 +260,7 @@ diff -Naur xbmc-27135/configure.in xbmc-27135.patch/configure.in fi ], [0]) -@@ -1449,9 +1510,13 @@ +@@ -1406,9 +1463,13 @@ if test "$host_vendor" = "apple" ; then CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -fno-common" \ CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -fno-common" \ diff --git a/packages/mediacenter/xbmc-pvr/patches/changeset_r27569-r27594.diff b/packages/mediacenter/xbmc-pvr/patches/changeset_r27569-r27594.diff new file mode 100644 index 0000000000..0f8cdc04b3 --- /dev/null +++ b/packages/mediacenter/xbmc-pvr/patches/changeset_r27569-r27594.diff @@ -0,0 +1,4769 @@ +diff -Naur xbmc-pvr-27594.orig/language/Chinese (Simple)/strings.xml xbmc-pvr-27594.patch/language/Chinese (Simple)/strings.xml +--- xbmc-pvr-27594.orig/language/Chinese (Simple)/strings.xml 2010-02-08 18:51:27.000000000 +0100 ++++ xbmc-pvr-27594.patch/language/Chinese (Simple)/strings.xml 2010-02-09 07:31:57.947899745 +0100 +@@ -1,6 +1,6 @@ +  + +- ++ + + 程序 + 图片 +@@ -289,7 +289,7 @@ + 调整帧数 + 演员 + 年份 +- 规范音量 ++ 增加声道缩减混音音量 + 程序 + + 昏暗 +@@ -476,7 +476,7 @@ + 音频输出设备 + 直通输出设备 + 此艺人没有传记 +- 多声道音频 Downmix 转换为立体声 ++ 多声道音频声道缩减混音成立体声 + + 排序:%s + 名称 +diff -Naur xbmc-pvr-27594.orig/language/Chinese (Simple)/strings.xml.orig xbmc-pvr-27594.patch/language/Chinese (Simple)/strings.xml.orig +--- xbmc-pvr-27594.orig/language/Chinese (Simple)/strings.xml.orig 1970-01-01 01:00:00.000000000 +0100 ++++ xbmc-pvr-27594.patch/language/Chinese (Simple)/strings.xml.orig 2010-02-09 07:31:57.957899336 +0100 +@@ -0,0 +1,2205 @@ ++ ++ ++ ++ ++ 程序 ++ 图片 ++ 音乐 ++ 视频 ++ 节目预告 ++ 系统设置 ++ XBMC SVN ++ 文件管理 ++ 天气 ++ XBMC媒体中心 ++ ++ 星期一 ++ 星期二 ++ 星期三 ++ 星期四 ++ 星期五 ++ 星期六 ++ 星期日 ++ ++ 一月 ++ 二月 ++ 三月 ++ 四月 ++ 五月 ++ 六月 ++ 七月 ++ 八月 ++ 九月 ++ 十月 ++ 十一月 ++ 十二月 ++ ++ 星期一 ++ 星期二 ++ 星期三 ++ 星期四 ++ 星期五 ++ 星期六 ++ 星期日 ++ ++ 一月 ++ 二月 ++ 三月 ++ 四月 ++ 五月 ++ 六月 ++ 七月 ++ 八月 ++ 九月 ++ 十月 ++ 十一月 ++ 十二月 ++ ++ 显示:自动 ++ 显示:自动大图标 ++ 显示:图标 ++ 显示:列表 ++ 扫描 ++ 排序:名称 ++ 排序:日期 ++ 排序:大小 ++ ++ ++ 幻灯片播放 ++ 创建缩略图册 ++ 创建缩略图 ++ 快捷方式 ++ 暂停 ++ ++ 复制 ++ 移动 ++ 删除 ++ 重命名 ++ 新文件夹 ++ 确认复制文件 ++ 确认移动文件 ++ 确认删除文件 ++ 复制这些文件? ++ 移动这些文件? ++ 删除这些文件? ++ 状态 ++ 对象 ++ 常用 ++ 幻灯片播放 ++ 系统信息 ++ 显示器 ++ 专辑 ++ 艺人 ++ 歌曲 ++ 类型 ++ 播放列表 ++ 查找 ++ 系统信息 ++ 温度: ++ CPU: ++ GPU: ++ 时间: ++ 当前: ++ 版本: ++ 网络: ++ 类型: ++ 手动(静态分配) ++ 自动(动态分配) ++ 网卡物理地址(MAC) ++ IP 地址 ++ 连接: ++ 半双工 ++ 全双工 ++ 存储器 ++ 驱动器 ++ 空闲 ++ 视频 ++ 空闲内存 ++ 无连接 ++ 空闲 ++ 无效的 ++ 光驱开启 ++ 读取中 ++ 无盘 ++ 当前光盘 ++ 皮肤 ++ 启用 FTP 服务器 ++ ++ 分辨率 ++ 调整显示器刷新率适应视频 ++ 把 4:3 节目拉伸到 16:9 ++ ++ ++ 发行时间 ++ ++ 音调 ++ 风格 ++ ++ 歌曲 ++ 持续时间 ++ 选择专辑 ++ 音轨 ++ 评论 ++ 刷新 ++ 查找专辑 ++ 确定 ++ 没有找到专辑! ++ 全部选择 ++ 查找媒体信息 ++ 保存 ++ 乱序播放 ++ 清除 ++ 查找 ++ 查找... ++ 没有发现信息! ++ 选择视频: ++ 读取%s信息 ++ 载入视频详细资料 ++ ++ 标语 ++ 大纲 ++ ++ 得票: ++ 演员表 ++ 剧情简介 ++ 播放 ++ 下一首 ++ 上一首 ++ 界面校准 ++ 屏幕校准 ++ 柔化 ++ 缩放 ++ 画面宽高比 ++ DVD 驱动器 ++ 请放入光盘 ++ 远程共享 ++ 网络未连接 ++ 取消 ++ 速度 ++ ++ 测试图案... ++ 从 freedb.org 获取音乐 CD 信息 ++ 载入播放列表时打乱顺序 ++ 硬盘停转时间 ++ 视频滤镜 ++ ++ ++ 线性 ++ 非等方性 ++ 梅花多重取样 ++ 三维锐化 ++ 缩小 ++ 放大 ++ 播放完成后清除列表 ++ ++ 脚本 ++ 语言 ++ 音乐 ++ 视觉效果 ++ 选择目标目录 ++ 双声道时输出到所有扬声器 ++ 通道数 ++ - DTS 数字音效 ++ CDDB ++ 获取 CD 信息 ++ 错误 ++ 启用音乐文件标签信息读取 ++ 开始 ++ Shoutcast 网络音乐台 ++ 等待开始... ++ 脚本输出 ++ 允许通过 HTTP 控制 XBMC ++ 录音 ++ 停止录音 ++ 排序:音轨 ++ 排序:时间 ++ 排序:标题 ++ 排序:艺人 ++ 排序:专辑 ++ 前100排名榜 ++ 左上角过扫描补偿 ++ 右下角过扫描补偿 ++ 字幕位置 ++ 画面纵横比调整 ++ 移动箭头改变过扫描补偿边框 ++ 移动横线改变字幕位置 ++ 调整屏幕中央的方框为长宽相等的完美正方形 ++ 不能读取设置 ++ 使用默认预设值 ++ 请检查 .xml 文件 ++ 找到%i条 ++ 查找结果 ++ 无结果 ++ 后处理滤镜 ++ 字幕 ++ 字体 ++ - 尺寸 ++ 动态范围压缩 ++ 视频 ++ 音频 ++ 字幕浏览 ++ 创建书签 ++ 清除书签 ++ 声音延迟 ++ 书签 ++ - AAC 数字音效 ++ - MP1 数字音效 ++ - MP2 数字音效 ++ - MP3 数字音效 ++ 延迟 ++ 语言 ++ 开启 ++ 去交错(隔行变逐行) ++ - 自动后处理 ++ - 垂直区块滤波器 ++ - 水平区块滤波器 ++ - 自动亮度/对比度调节 ++ - 消除压缩带来的画面瑕疵 ++ (0=自动) ++ 清理资料库 ++ 准备中... ++ 资料库错误! ++ 搜寻歌曲... ++ 成功清理资料库! ++ 清理歌曲... ++ 清理歌曲错误! ++ 清理艺人信息... ++ 清理艺人信息错误! ++ 清理类型信息... ++ 清理类型信息错误! ++ 清理路径信息... ++ 清理路径信息错误! ++ 清理专辑... ++ 清理专辑错误! ++ 写入更新中... ++ 写入错误! ++ 这需要一些时间... ++ 压缩资料库中... ++ 压缩资料库错误! ++ 要清理资料库吗? ++ 清理资料库... ++ 开始 ++ 帧数转换 ++ 音频输出 ++ 模拟 ++ 数码 ++ 群星 ++ 播放光盘 ++ 电影 ++ 调整帧数 ++ 演员 ++ 年份 ++ 规范音量 ++ 程序 ++ ++ 昏暗 ++ 全黑 ++ 骇客任务 ++ 屏保空闲时间 ++ 屏幕保护模式 ++ 自动关机功能计时器 ++ 全部专辑 ++ 新加的专辑 ++ 屏幕保护 ++ 幻灯全部目录 ++ 屏幕保护画面亮度衰减级别 ++ 排序:文件 ++ - AC3 数字音效 ++ 排序:名字 ++ 排序:年份 ++ 排序:评分 ++ IMDb ++ 标题 ++ 雷雨 ++ 局部 ++ 大部分 ++ 晴朗 ++ ++ ++ ++ ++ 上午 ++ 下午 ++ 阵雨 ++ 少数 ++ 短时有 ++ ++ 强烈 ++ 转晴 ++ ++ ++ 提早 ++ 阵雨 ++ 飘雪 ++ ++ ++ ++ ++ 薄雾 ++ 位置选择 ++ 刷新时间 ++ 温度单位 ++ 速度单位 ++ 天气 ++ 温度 ++ 体感温度 ++ 紫外线 ++ ++ 露点 ++ 湿度 ++ 风向 ++ 风速 ++ 默认 ++ ++ 访问天气服务 ++ 取得天气数据: ++ 不能获得天气数据 ++ 手动查询 ++ 此专辑无评论 ++ 下载缩略图... ++ 不可用 ++ 显示:大图标 ++ ++ 删除专辑信息 ++ 删除 CD 信息 ++ 选择 ++ 找不到专辑信息。 ++ 找不到 CD 信息! ++ 光盘 ++ 请放入正确的 CD/DVD ++ 请放入下一张 CD/DVD ++ 排序:DVD# ++ 无缓存 ++ 从资料库中移除影片 ++ 确定移除'%s'? ++ ++ 移动磁盘 ++ 打开文件 ++ 缓存 ++ 硬盘 ++ UDF ++ 网络 ++ 互联网 ++ 视频 ++ 音频 ++ DVD ++ 自动播放媒体 ++ 液晶屏设置 ++ 开启 ++ ++ 第 1 行位置 ++ 第 2 行位置 ++ 第 3 行位置 ++ 第 4 行位置 ++ ++ 模式 ++ 选择显示 ++ 字幕 ++ 音频流 ++ [启用] ++ 字幕 ++ 背光 ++ 亮度 ++ 对比度 ++ 伽码 ++ 类型 ++ 移动条块来改变 OSD 位置 ++ OSD 位置 ++ 改机者 ++ 改机芯片 ++ ++ 只有音乐 ++ 音乐和视频 ++ 不能读取播放列表 ++ OSD ++ 皮肤和语言 ++ 用户界面 ++ 音频设置 ++ 关于 XBMC ++ ++ 删除专辑 ++ 重复 ++ 重复单首 ++ 重复整个目录 ++ 自动播放下一首歌曲 ++ - 使用大图标 ++ Vobsubs 字幕缩放 ++ 高级选项(仅适用于专家!) ++ 总体音量 ++ 以桌面的分辨率播放视频 ++ 校准 ++ 显示扩展文件名 ++ 排序:类型 ++ 无法连接到在线搜索服务 ++ 下载专辑信息失败... ++ 寻找专辑名... ++ 开启 ++ ++ ++ 从文件中载入媒体信息... ++ 排序:使用次数 ++ 开启可视化效果 ++ 启用视频模式自动切换 ++ 启动界面 ++ 主界面 ++ 设置界面 ++ 风格 ++ ++ 最近播放的专辑 ++ 运行 ++ 运行方式 ++ 编辑软件标题 ++ 合辑 ++ 移除源 ++ 切换媒体 ++ 选择播放列表 ++ 新的播放列表... ++ 添加到播放列表 ++ 手工添加到资料库 ++ 输入标题 ++ 错误:重复标题 ++ 选择类型 ++ 新的类型 ++ 手工添加 ++ 输入类型 ++ 显示:%s ++ 列表 ++ 图标 ++ 大列表 ++ 大图标 ++ 宽幅 ++ 大宽幅 ++ 专辑图标 ++ DVD 图标 ++ DVD ++ 媒体信息 ++ 音频输出设备 ++ 直通输出设备 ++ 此艺人没有传记 ++ 多声道音频 Downmix 转换为立体声 ++ ++ 排序:%s ++ 名称 ++ 日期 ++ 大小 ++ 音轨 ++ 时长 ++ 标题 ++ 艺人 ++ 专辑 ++ 播放列表 ++ 标签 ++ 文件 ++ 年份 ++ 评价 ++ 类型 ++ 使用次数 ++ 专辑艺人 ++ 播放次数 ++ 最后播放 ++ 注释 ++ 加入日期 ++ 默认 ++ 制作公司 ++ 路径 ++ ++ 排序方向 ++ 排序方法 ++ 显示模式 ++ 记住每个文件夹的显示模式 ++ 升序 ++ 降序 ++ 编辑播放列表 ++ 过滤 ++ 取消舞会模式 ++ 舞会模式 ++ 随机 ++ ++ 单首 ++ 全部 ++ ++ 重复:关闭 ++ 重复:单首 ++ 重复:所有 ++ ++ 压缩音乐 CD ++ 中等 ++ 标准 ++ 极好 ++ 固定码率 ++ 压缩... ++ ++ 储存到: ++ 不能压缩 CD 或音轨 ++ CD 压缩路径没有设置 ++ 压缩音轨 ++ 请输入序号 ++ ++ 音乐 CD ++ 编码器 ++ 质量 ++ 码率 ++ 包括音轨序号 ++ 所有歌曲 ++ 显示模式 ++ 正常 ++ 填满屏幕 ++ 拉伸为 4:3 ++ 拉伸为 14:9 ++ 拉伸为 16:9 ++ 视频原始像素比例 ++ 自定义 ++ 回放增益 ++ 回放增益音量调整 ++ 使用音轨增益等级 ++ 使用专辑增益等级 ++ 音量 - 重复播放的文件 ++ 音量 - 不重复播放的文件 ++ 播放增益时忽略消波失真 ++ 裁剪黑边 ++ 需要解压一个大文件,是否继续? ++ 从资料库中移除 ++ 导出视频库 ++ 导入视频库 ++ 导入中 ++ 导出中 ++ 浏览资料库 ++ 年份 ++ 更新资料库 ++ 显示调试信息 ++ 浏览可执行文件 ++ 浏览播放列表 ++ 浏览文件夹 ++ 歌曲信息 ++ ++ 音量放大 ++ 选择导出文件夹 ++ 此文件已不可用 ++ 要从资料库移除吗? ++ 浏览脚本 ++ ++ 清理资料库 ++ 清除资料库中的旧歌曲 ++ 当前路径曾被扫瞄过 ++ 网络 ++ - 服务器 ++ ++ 使用 HTTP 代理服务器访问互联网 ++ ++ 网络地址(IP) ++ 无效端口!必须在 1 至 65535 之间。 ++ HTTP 代理 ++ ++ - 分配方式 ++ 自动(动态分配) ++ 手动(静态分配) ++ 默认(Dashboard) ++ - IP 地址 ++ - 子网掩码 ++ - 默认网关 ++ - DNS 服务器 ++ 保存和重启 ++ 无效地址!正确格式为:AAA.BBB.CCC.DDD ++ 从 0 到 255 之间的数字 ++ 修改未保存,继续且不保存吗? ++ Web 服务器 ++ FTP 服务器 ++ ++ - 端口 ++ ++ 保存和应用 ++ - 密码 ++ 无密码 ++ - 字符集 ++ - 字形 ++ - 颜色 ++ 常规 ++ 粗体 ++ 斜体 ++ 粗斜体 ++ 白色 ++ 黄色 ++ 文件 ++ 当前视图无信息 ++ 请关闭资料库模式 ++ 图像载入错误 ++ 编辑路径 ++ 镜像图像 ++ 确定? ++ 移除共享 ++ ++ 新增程序连接 ++ 编辑程序路径 ++ 编辑程序名称 ++ 编辑路径深度 ++ ++ 显示:大列表 ++ 黄色 ++ 白色 ++ 蓝色 ++ 亮绿 ++ 翠绿 ++ 青色 ++ 浅灰 ++ 灰色 ++ ++ ++ 错误 %i:不能共享 ++ - FTP 服务器限定工作在 FATX 格式 ++ 音频输出 ++ 搜索中 ++ 幻灯图片目录 ++ 网卡 ++ - 无线网络名(ESSID) ++ - 无线网加密方式 ++ - 无线网安全 ++ 保存和应用网卡设置 ++ 不加密 ++ WEP ++ WPA ++ WPA2 ++ 应用网卡设置,请稍等. ++ 网卡重启完成. ++ 网卡无法重启. ++ 网卡停用 ++ 网卡停用完成. ++ 无线网络名(ESSID) ++ ++ 允许本机程序控制 XBMC ++ 端口 ++ 端口范围 ++ 允许异地程序控制 XBMC ++ 初始重复等待时间(ms) ++ 持续等待时间(ms) ++ 最大客户端数 ++ 互联网访问 ++ ++ 输入了无效端口 ++ 有效端口范围是 1-65535 ++ 有效端口范围是 1024-65535 ++ ++ 屏幕保护预览 ++ 无法连接 ++ XBMC 无法连接到该网上邻居! ++ 这可能是由于网络没有连接。 ++ 可以用其他方式来添加它吗? ++ ++ IP 地址 ++ 添加网上邻居 ++ 协议 ++ 服务器地址 ++ 服务器名称 ++ 远程路径 ++ 共享文件夹 ++ 端口 ++ 用户名 ++ 网络服务器 ++ 输入服务器网络地址 ++ 输入服务器远程路径 ++ 输入端口号 ++ 输入用户名 ++ 添加%s目录 ++ 输入或选择目录。 ++ 为该目录命名。 ++ 浏览目录 ++ 浏览 ++ 无法获得目录信息。 ++ 添加目录 ++ 编辑目录 ++ 编辑%s目录 ++ 输入新的标签 ++ 选择图像文件 ++ 选择图像目录 ++ 添加网上邻居... ++ 浏览文件 ++ 子菜单 ++ 启用子菜单按钮 ++ 收藏夹 ++ 视频插件 ++ 音乐插件 ++ 图片插件 ++ 载入目录 ++ 检索%i项目 ++ 检索%i在%i项目 ++ 程序插件 ++ 设置插件缩略图 ++ 插件设置 ++ 接入点 ++ 其它... ++ - 用户名 ++ 脚本设置 ++ 单曲 ++ ++ SMB 共享设置 ++ 工作组 ++ 默认账号 ++ 默认密码 ++ ++ WINS-服务器 ++ 安装 SMB 共享 ++ ++ 移除 ++ 音乐 ++ 视频 ++ 图片 ++ 文件 ++ 音乐和视频 ++ 音乐和图片 ++ 音乐和文件 ++ 视频和图片 ++ 视频和文件 ++ 图片和文件 ++ 音乐和视频和图片 ++ 音乐和视频和图片和文件 ++ 停用 ++ 文件和音乐和视频 ++ 文件和图片和音乐 ++ 文件和图片和视频 ++ 音乐和程序 ++ 视频和程序 ++ 图片和程序 ++ 音乐和视频和图片和程序 ++ 程序和视频和音乐 ++ 程序和图片和音乐 ++ 程序和图片和视频 ++ ++ FTP 账号 ++ FTP 密码 ++ 用户密码设置成功! ++ ++ 自动检测 ++ 自动检测系统 ++ 昵称 ++ ++ 确认连接 ++ 发送 FTP 用户名和密码 ++ Ping 间隔 ++ 是否连接到自动发现的系统? ++ ++ 通过 Zeroconf 协议发布这些服务 ++ ++ 自定义音频设备 ++ 自定义直通输出设备 ++ ++ 漂流 ++ ++ 结冰 ++ 晚间 ++ 局部 ++ 雷阵雨 ++ ++ 阴沉 ++ ++ ++ ++ 区域性 ++ ++ 清澈 ++ 无风 ++ ++ ++ 小雨 ++ 雷雨 ++ 毛毛雨 ++ ++ 悬浮物 ++ 雷雨 ++ 雷阵雨 ++ ++ ++ ++ 空闲时显示器休眠 ++ ++ ++ 影片长度 ++ ++ 脚本错误!:%s ++ ++ 启用 LCD/VFD ++ ++ 首页 ++ 程序 ++ 图片 ++ 文件管理 ++ 系统设置 ++ 音乐 ++ 视频 ++ 系统信息 ++ 设置->常用 ++ 设置->屏幕 ++ 设置->用户界面->界面校准 ++ 设置->视频->屏幕校准 ++ 设置->图片 ++ 设置->程序 ++ 设置->天气 ++ 设置->音乐 ++ 设置->系统设置 ++ 设置->视频 ++ 设置->网络设置 ++ 设置->用户界面 ++ 脚本 ++ ++ 视频/播放列表 ++ 设置->用户配置 ++ ++ "是/否"对话框 ++ 进度对话框 ++ ++ 查找字幕... ++ 缓存字幕... ++ 结束 ++ 正在缓存中 ++ 打开流 ++ ++ 音乐/播放列表 ++ 音乐/文件 ++ 音乐/资料库 ++ 播放列表编辑 ++ 歌曲100排行榜 ++ 专辑100排行榜 ++ 程序 ++ 系统设置 ++ 天气预报 ++ 网络游戏 ++ 功能扩展 ++ 系统信息 ++ ++ 音乐 - 资料库 ++ 正在播放 - 音乐 ++ ++ 正在播放 - 视频 ++ 专辑信息 ++ 视频信息 ++ ++ 选择 ++ 音乐/信息 ++ 确认 ++ 视频/信息 ++ 脚本/信息 ++ 全屏视频 ++ 音频可视化效果 ++ ++ 文件堆叠 ++ 重新生成索引... ++ 返回到音乐窗口 ++ 返回到视频窗口 ++ 更新金手指列表 ++ 金手指 ++ 没有找到金手指 ++ 金手指设置 ++ 所有金手指信息丢失,请更新金手指列表! ++ 从上次中断处继续播放 ++ ++ ++ 询问 ++ 从头开始播放 ++ 从 %s 处继续播放 ++ 正在验证金手指... ++ ++ 0 ++ 1 ++ 2 ++ 3 ++ 4 ++ 5 ++ 6 ++ 7 ++ 8 ++ 9 ++ c ++ ok ++ * ++ 已锁定!输入密码... ++ 输入密码 ++ 输入管理员密码 ++ 输入解锁密码 ++ 或按 C 取消 ++ 输入 XBOX 手柄按键顺序,然后 ++ 按 Start 确认,或按 Back 取消 ++ 设置锁定 ++ 解除锁定 ++ 重新锁定 ++ 移除锁定 ++ 数字密码 ++ 手柄按键组合 ++ 全文字密码 ++ 输入新密码 ++ 确认新密码 ++ 密码不正确, ++ 重试次数 ++ 输入密码不正确! ++ 拒绝读取 ++ 已达密码重试次数限制! ++ 系统将立刻关闭! ++ 拒绝访问 ++ 重新上锁 ++ 更改锁定 ++ 共享锁定 ++ 密码不能为空,请重试! ++ 主机锁定 ++ 超过重试次数就关机 ++ 管理员密码错误 ++ 请输入正确的管理员密码 ++ 系统设置和文件管理 ++ 作为所有视频的默认设置 ++ 将要初始化所有配置 ++ 每幅图片显示时间 ++ 使用移动和缩放特效 ++ 在 PAL 制式播放 NTSC 视频 ++ 在 NTSC 制式播放 PAL 视频 ++ 以 PAL60 制式播放 NTSC 视频 ++ 12小时制 ++ 24小时制 ++ 日/月 ++ 月/日 ++ ++ 系统开机时间 ++ 分钟 ++ 小时 ++ ++ 累计开机时间 ++ ++ 天气 ++ ++ 屏幕保护 ++ 全屏 OSD ++ ++ 系统设置 ++ 立即关闭硬盘 ++ 只有视频 ++ - 延迟 ++ - 最小影音文件时长 ++ 关机 ++ Dashboard ++ 使用自定义 Dashboard 路径 ++ 自动关机功能 ++ 退出 ++ 休眠 ++ 待机 ++ 退出 ++ 重启 ++ 最小化 ++ 电源按钮作用 ++ ++ 是否有通过SSH连接的会话存在? ++ 挂接移动存储器 ++ 不安全的移除设备 ++ 成功移除设备 ++ 游戏手柄插入 ++ 游戏手柄拔出 ++ ++ 闪烁过滤 ++ 使用驱动选择(需要重启) ++ 垂直空白同步 ++ 停用 ++ 只在视频播放时开启 ++ 总是开启 ++ 测试 & 应用分辨率 ++ 保存此分辨率? ++ 是否保存此分辨率? ++ ++ 高品质倍线 ++ 关闭 ++ 普通清晰度内容时打开 ++ 始终打开 ++ ++ 倍线方式 ++ Bicubic ++ Lanczos ++ Sinc ++ VDPAU ++ VDPAU 高品质倍线等级 ++ VDPAU 演播室级色彩转换 ++ ++ 其他显示器空白显示 ++ 禁止 ++ 空白显示 ++ ++ 检测到活动连接! ++ 如果你处理,你将不再能控制你的 ++ XBMC,你是否确认要停止远程控制? ++ ++ 改变 Apple 遥控器的模式? ++ 如果你现在正在使用 Apple 遥控器 ++ 控制 XBMC,修改这些设置将影响对 ++ 系统的控制。你确认要处理吗? ++ ++ 硬盘密匙: ++ 硬盘温度: ++ DVD 型号: ++ DVD 固件版本: ++ 硬盘型号: ++ 硬盘序列号: ++ 硬盘固件版本: ++ 硬盘密码: ++ 硬盘锁定状态: ++ 子网掩码 ++ 网关地址 ++ 首选 DNS 服务器地址 ++ 初始化失败 ++ ++ 游戏手柄 ++ 键盘 ++ 鼠标 ++ 耳麦 ++ 记忆卡 ++ 遥控器 ++ 控制器端口 ++ ++ 从不 ++ 立即 ++ 隔%i秒以后 ++ 硬盘安装日期: ++ 硬盘运转周期: ++ ++ 用户配置 ++ 删除用户配置'%s'? ++ 最近载入的用户配置: ++ 未知 ++ 覆盖 ++ 闹铃 ++ 闹铃间隔(分钟) ++ 闹铃启动,倒计时%i分钟。 ++ 响铃! ++ 闹铃取消,剩余%i分%i秒。 ++ ++ 搜索 RAR 文件中的字幕 ++ 浏览字幕文件... ++ 移动该项目 ++ 将项目移动至此 ++ 取消移动 ++ ++ 硬件: ++ CPU 使用: ++ ++ 已经连接,但没有有效的 DNS! ++ 硬盘 ++ DVD-ROM ++ 存储器 ++ 默认 ++ 网络 ++ 视频 ++ 硬件 ++ ++ 操作系统: ++ CPU 速度: ++ BIOS 型号: ++ 视频芯片: ++ 屏幕分辨率: ++ Xbox 版本: ++ Xbox 序列号: ++ Xbox 生产商: ++ 改机芯片: ++ A/V 线: ++ 视频&游戏区域: ++ DVD 区域: ++ 互联网: ++ 已经连接到互联网 ++ 无法联网,请检查网络设置! ++ XBLIVE 钥匙: ++ 目标温度 ++ 风扇转速 ++ 自动控温 ++ 指定风扇转速 ++ 皮肤字体 ++ 开启转换双向字串 ++ 显示 RSS 新闻 ++ 显示上级目录图标 ++ 音轨命名参数 ++ 你想重新启动系统 ++ 以重新启动 XBMC 吗? ++ 放缩效果 ++ 漂浮效果 ++ 缩小黑边 ++ 重启 ++ 歌曲淡入淡出 ++ 创建缩略图 ++ 循环缩略图 ++ 开始幻灯播放图片 ++ 循环幻灯播放图片 ++ 随机播放 ++ 立体声 ++ 左声道 ++ 右声道 ++ 开启卡拉OK支持 ++ 背景透明度 ++ 前景透明度 ++ 影音延迟 ++ 卡拉OK ++ %s未找到 ++ 打开%s时发生错误 ++ 无法载入%s ++ 错误:内存不足 ++ 上移 ++ 下移 ++ 编辑标签 ++ 设为默认 ++ 移除按键 ++ 面板 LED ++ 面板 LED 颜色 ++ 默认 ++ 绿色 ++ 橙色 ++ 红色 ++ 循环 ++ 当播放时关闭 LED ++ 视频信息 ++ 加入播放列表 ++ 查询互联网电影数据库... ++ 扫描新的内容 ++ 正在播放... ++ 专辑信息 ++ 扫瞄项目到数据库 ++ 停止扫瞄 ++ 渲染方式 ++ 低品质像素着色器 ++ 硬件覆盖 ++ 高品质像素着色器 ++ 播放项目 ++ 设置艺人缩略图 ++ 自动获取缩略图 ++ 开启语音 ++ 启用装置 ++ 音量 ++ 默认显示方式 ++ 默认亮度数值 ++ 默认对比度数值 ++ 默认伽码数值 ++ 从上次中断处继续播放 ++ 语音特效 - 端口 1 ++ 语音特效 - 端口 2 ++ 语音特效 - 端口 3 ++ 语音特效 - 端口 4 ++ 使用时间搜寻 ++ 音轨命名模板 ++ 预设 ++ 该可视化效果没有预设 ++ 该可视化效果没有设置 ++ 弹出/载入 ++ 播放音乐时启用可视化效果 ++ 计算大小 ++ 计算文件夹大小 ++ 视频设置 ++ 声音和字幕设置 ++ 启用字幕 ++ 快捷方式 ++ 排序时忽略冠词(如 "the") ++ 同一专辑内歌曲淡入淡出 ++ 浏览%s ++ 显示音轨位置 ++ 清除默认 ++ 继续播放 ++ 取得缩略图 ++ 图片信息 ++ %s 预设 ++ (IMDb 用户评价) ++ 排行榜前 250: ++ 收听 last.fm 电台 ++ 风扇最低转速 ++ ++ 正在下载 ++ 包含只在合辑中出现的艺术家 ++ 渲染模式 ++ 自动检测 ++ 基本着色(ARB) ++ 高级着色(GLSL) ++ 软件着色 ++ 安全移除 ++ VDPAU 硬解码 ++ 开始幻灯片播放 ++ 记住此目录 ++ 使用象素缓冲对象 ++ Crystal HD 硬解码 ++ ++ 影音同步方式 ++ 音频时钟 ++ 视频时钟(丢弃/重复音频) ++ 视频时钟(重采样音频) ++ 最高重采样率(%) ++ 重采样质量 ++ 低(快) ++ ++ ++ 极高(慢) ++ 同步回放显示 ++ ++ Apple 遥控器 ++ ++ 允许用遥控器启动 XBMC ++ 序列延时 ++ ++ 关闭 ++ 标准 ++ 通用遥控器 ++ 万能遥控器(Harmony) ++ ++ Apple 遥控器错误 ++ 不能打开 Apple 遥控器支持. ++ ++ 视频堆叠 ++ 关闭堆叠 ++ 下载播放列表... ++ 下载流媒体列表... ++ 分析流媒体列表... ++ 流媒体列表下载失败 ++ 播放列表下载失败 ++ ++ 游戏目录 ++ 自动切换为图标显示条件 ++ 允许自动切换为图标显示 ++ - 使用大图标 ++ - 条件 ++ - 百分比 ++ 没有文件且至少有一个图标 ++ 至少有一个文件和一个图标 ++ 图标所占百分比 ++ 浏览设置 ++ 改变地区码 1 ++ 改变地区码 2 ++ 改变地区码 3 ++ 资料库 ++ 无电视 ++ 输入最近的城市 ++ 视频/音频/DVD 缓存 - 硬盘 ++ 视频缓存 - DVD 驱动器 ++ - 局域网 ++ - 互联网 ++ 音频缓存 - DVD 驱动器 ++ - 局域网 ++ - 互联网 ++ DVD 缓存 - DVD 驱动器 ++ - 局域网 ++ 服务 ++ ++ 网络设置已改变 ++ XBMC 需要重启改变你的网络设置。 ++ 你想现在就重启吗? ++ 后置处理 ++ ++ - 播放时关机 ++ %i分 ++ %i秒 ++ %i毫秒 ++ %i%% ++ %ikbps ++ %ikb ++ %i.0dB ++ 时间显示格式 ++ 日期显示格式 ++ 图形界面滤镜 ++ ++ 使用后台搜寻 ++ 停止搜寻 ++ 无法搜寻媒体信息 ++ 电影胶片效果 ++ 搜索远端共享的缩略图 ++ 未知类型文件缓冲 - 互联网 ++ 自动 ++ 输入用户名 ++ 日期和时间 ++ 设置日期 ++ 设置时间 ++ 输入24小时格式时间(时:分) ++ 输入日期(日/月/年) ++ 输入 IP 地址 ++ 确定要设置这些参数吗? ++ 应用设置 ++ 允许重命名和删除文件 ++ ++ 设置时区 ++ 使用夏令制时间 ++ 添加到收藏夹 ++ 从收藏夹移除 ++ 皮肤颜色 ++ 时区-国家 ++ 时区 ++ 文件列表 ++ 显示 EXIF 图片信息 ++ 使用全屏窗口而非真正全屏显示 ++ 选中歌曲加入播放列表 ++ 自动播放音乐 CD ++ 播放 ++ DVD ++ 自动播放 DVD ++ 文本字幕字体 ++ 界面语言 ++ 字符集 ++ 调试 ++ 安全 ++ 输入设备 ++ 省电模式 ++ ++ 删除 ++ 游戏 ++ ++ 添加 ++ ++ 密码 ++ ++ 资料库 ++ 数据库 ++ * 所有专辑 ++ * 所有艺人 ++ * 所有歌曲 ++ * 所有类型 ++ ++ 缓冲中... ++ 导航音效 ++ 皮肤预设 ++ 皮肤主题 ++ 缺省主题 ++ ++ Last.fm ++ 将歌曲提交到 Last.fm ++ Last.fm 用户名 ++ Last.fm 密码 ++ 无法连接:休眠中... ++ 请升级 XBMC ++ 无法通过认证:检查帐号和密码 ++ 连接 ++ 无法连接 ++ 上传进度%i ++ 已缓存%i首歌曲 ++ 上传中... ++ 上传剩余%i秒 ++ 打开方式... ++ 使用平滑的影音同步 ++ 缩略图显示时隐藏文件名 ++ 通过合作模式玩 ++ 将歌曲提交到 Libre.fm ++ Libre.fm 用户名 ++ Libre.fm 密码 ++ Libre.fm ++ 歌曲提交 ++ ++ 将 Last.fm 节目提交到 Last.fm ++ 连接到 Last.fm... ++ 选择电台... ++ 寻找相似的艺人... ++ 寻找相似的标记... ++ 你的用户配置(%name%) ++ 所有排行 ++ %name% 艺人排行 ++ %name% 专辑排行 ++ %name% 歌曲排行 ++ 收听 %name% Last.fm ++ %name% 同类型艺人 ++ %name% 专辑排行 ++ %name% 歌曲排行 ++ %name% 标签排行 ++ %name% 最爱歌迷 ++ 收听 %name% 在 Last.fm 的歌迷 ++ 收听 %name% 在 Last.fm 的同类型艺人 ++ %name% 艺人排行 ++ %name% 专辑排行 ++ %name% 歌曲排行 ++ %name% 好友 ++ %name% 同好 ++ %name% 艺人周排行 ++ %name% 专辑周排行 ++ %name% 歌曲周排行 ++ 收听 %name% 在 Last.fm 的同好 ++ 收听 %name% 的个人 Last.fm ++ 收听 %name% 在 Last.fm 的最爱 ++ 正在从 Last.fm 获取列表 ++ 不能从 Last.fm 获取列表... ++ 输入艺人名来寻找相关资料 ++ 输入标签名来寻找相关资料 ++ %name% 最近听过的歌曲 ++ 收听 %name% 在 Last.fm 的推荐 ++ %name% 的排行 ++ 收听 %name% 在 Last.fm 的播放列表 ++ 你想把目前歌曲加入你的最爱吗? ++ 你想封锁目前的歌曲吗? ++ 加入你的最爱歌曲:'%s' ++ 不能加入 '%s' 到你的最爱 ++ 已被封禁:'%s'. ++ 不能封禁 '%s'. ++ %name% 最近喜好的歌曲 ++ %name% 最近封锁的歌曲 ++ 从最爱中移除 ++ 解除封锁 ++ 您想从你的最爱移除这首歌曲吗? ++ 你想解除封锁这首歌曲吗? ++ ++ 路径错误或无法找到! ++ 无法连接服务器! ++ 没有找到服务器! ++ 没有找到工作组! ++ ++ 打开多个源路径 ++ 路径: ++ ++ 常用 ++ ++ 互联网查询 ++ 高级设置 ++ 播放碟片 ++ ++ 输入新标题 ++ 输入视频名称 ++ 输入配置名称 ++ 输入专辑名称 ++ 输入播放列表名称 ++ 输入新的文件名 ++ 输入文件夹名称 ++ 输入目录 ++ 可使用选项:%A, %T, %N, %B, %D, %G, %Y, %F, %S ++ 输入查询字符串 ++ 关闭 ++ 自动选择 ++ 去交错 ++ 抖动 ++ 抖动(倒转) ++ 交错设置 ++ 取消中... ++ 输入艺人名字 ++ 播放失败 ++ 一个或多个项目播放失败! ++ 输入数据 ++ 详情请查看日志文件。 ++ 取消舞会模式! ++ 资料库中没有符合条件的歌曲! ++ 无法初始化资料库! ++ 无法打开资料库! ++ 无法从资料库获取歌曲文件! ++ 舞会模式播放列表 ++ ++ 所有视频文件 ++ 未观看的 ++ 已观看的 ++ 标记为已观看 ++ 标记为未观看 ++ 编辑标题 ++ 使用 NTSC-M 和 NTSC-J 制式 ++ 只使用 NTSC-M 制式 ++ 只使用 NTSC-J 制式 ++ 只使用 PAL-60 制式 ++ 60hz 游戏设置 ++ ++ 操作被中断 ++ 复制文件失败 ++ 部分文件复制失败 ++ 移动文件失败 ++ 部分文件移动失败 ++ 删除文件失败 ++ 部分文件删除失败 ++ ++ 视频扫描方式 ++ 最近邻 ++ 双线性 ++ 双三次 ++ Lanczos2 ++ Lanczos3 ++ 正弦8 ++ 双三次(软件) ++ Lanczos(软件) ++ 正弦(软件) ++ 时间平滑 ++ 时间/空间平滑 ++ (VDPAU)降噪 ++ (VDPAU)锐化 ++ 帧率逆转换 ++ Lanczos3优化 ++ 自动 ++ 时间平滑(半速) ++ 时间/空间平滑(半速) ++ ++ 显示睡眠时间 ++ ++ 切换到频道 ++ ++ 音乐保存目录 ++ 使用外部 DVD 播放程序 ++ 外部 DVD 播放程序 ++ 金手指目录 ++ 屏幕抓图目录 ++ ++ 播放列表目录 ++ 录音 ++ 屏幕抓图 ++ 使用 XBMC ++ ++ 音乐播放列表 ++ 视频播放列表 ++ 你要执行该游戏? ++ 排序:播放列表 ++ 远程缩略图 ++ 当前缩略图 ++ 本地缩略图 ++ 无缩略图 ++ 选择缩略图 ++ ++ ++ ++ 冲突 ++ 扫描新的 ++ 扫描全部 ++ 区域 ++ ++ ++ ++ 摘要 ++ 锁定音乐部分 ++ 锁定视频部分 ++ 锁定图片部分 ++ 锁定程序与脚本部分 ++ 锁定文件管理 ++ 锁定系统设置 ++ 重新设置 ++ 进入管理员模式 ++ 离开管理员模式 ++ 创建用户配置'%s'? ++ 应用新的设置开始 ++ 最适合模式 ++ 自动切换 16x9 与 4x3 模式 ++ 视堆叠文件为单一文件 ++ 注意 ++ 已离开管理员模式 ++ 已进入管理员模式 ++ Allmusic.com 缩略图 ++ ++ 移除缩略图 ++ 新加入用户配置... ++ 下载所有专辑的讯息 ++ 媒体讯息 ++ 分离的 ++ 共用预设值 ++ 共用预设值(只读) ++ 复制预设值 ++ 用户配置图片 ++ 锁定偏好设置 ++ 编辑用户配置 ++ 锁定用户配置 ++ 无法建立目录 ++ 用户配置目录 ++ 启动时刷新媒体来源 ++ 请确定选择的目录是可写入的 ++ 且是有效的目录名称 ++ MPAA评分 ++ 输入管理员密码 ++ 在开机时询问管理员密码 ++ 桌面设置 ++ - 无连结设置 - ++ 启用桌面动画效果 ++ 播放音乐时关闭 RSS ++ 启用快捷方式 ++ 在主界面中显示程序菜单 ++ 显示音乐讯息 ++ 显示天气预报 ++ 显示系统信息 ++ 显示可用的磁盘空间 C: E: F: ++ 显示可用的磁盘空间 E: F: G: ++ 天气预报 ++ 可用的磁盘空间 ++ 输入一个已有的共享名称 ++ 密码 ++ 载入用户配置 ++ 用户配置名称 ++ 媒体来源 ++ 用户配置密码 ++ 登录窗口 ++ 抓取专辑讯息 ++ 正在取得专辑讯息 ++ 当 CD 播放时不能抓取该 CD ++ 管理员密码与设置 ++ 输入管理员密码后,始终启用管理员模式 ++ 或是从预设值中复制? ++ 保存变更到用户配置文件? ++ 发现旧设置值 ++ 你要使用吗? ++ 发现旧媒体来源 ++ 分离的(锁定) ++ 根目录 ++ 皮肤缩放 ++ UPnP 客户端 ++ 自动启动 UPnP 客户端 ++ 上次登录:%s ++ 从未登录 ++ 用户配置%i / %i ++ 用户登录/选择用户配置 ++ 在登录窗口中使用锁定 ++ 密码无效 ++ 需先设置管理员锁定 ++ 你现在要设置吗? ++ 载入程序讯息 ++ 启动舞会模式! ++ 真实 ++ 混合饮料 ++ 填入玻璃 ++ 登录 ++ 注销 ++ 转到根目录 ++ 交织 ++ 交织(倒转) ++ 混合 ++ 从头播放视频 ++ 编辑网络位置 ++ 移除网络位置 ++ 你想扫描这个目录吗? ++ 记忆卡 ++ 记忆卡已插入 ++ 找不到记忆卡 ++ 在%i端口,第%i槽 ++ 锁定屏幕保护 ++ 设置 ++ 用户名 ++ 键入密码 ++ 自动关机定时器 ++ 自动关机定时(分钟) ++ 启动自动关机在%i分钟后 ++ 30分钟后自动关机 ++ 60分钟后自动关机 ++ 120分钟后自动关机 ++ 自定义自动关机时间 ++ 取消自动关机 ++ 锁定设置文件%s ++ 浏览... ++ 系统摘要信息 ++ 存储设备信息 ++ 硬盘驱动器信息 ++ 光盘驱动器信息 ++ 网络设备信息 ++ 视频设备信息 ++ 硬件设备信息 ++ 总计 ++ 已使用 ++ ++ 不支持锁定 ++ 没有上锁 ++ 已经上锁 ++ 已冻结 ++ 需要重新启动 ++ ++ 生产线 ++ Windows 网络(SMB) ++ XBMSP 服务器 ++ FTP 服务器 ++ ITunes 音乐共享(DAAP) ++ UPnP 媒体服务器 ++ 显示视频信息 ++ 完成 ++ 上档 ++ 大写 ++ 符号 ++ 退格 ++ 空格 ++ 重载桌面皮肤 ++ 根据 EXIF 信息旋转图片 ++ 使用海报模式显示剧集 ++ 请稍候... ++ 备份 EEPROM ++ 备份 BIOS ++ 启用剧情和评论自动滚动 ++ 自定义 ++ 显示除错信息 ++ 资料库更新时下载附加信息 ++ ++ 默认音乐信息服务 ++ 改变刮削器 ++ 导出音乐资料库 ++ 导入音乐资料库 ++ 未找到艺人! ++ 下载艺人信息失败 ++ ++ ++ ++ 舞会模式!(视频) ++ 鸡尾酒(视频) ++ 填入玻璃(视频) ++ WebDAV服务器(HTTP) ++ WebDAV服务器(HTTPS) ++ ++ WEB服务器目录(HTTP) ++ WEB服务器目录(HTTPS) ++ 无法写入文件夹: ++ 你要跳过并继续吗? ++ RSS 信源 ++ ++ 未知 BIOS,请把 xbmc.log 中 MD5 部分加到 BiosIDs.ini ++ 备用 DNS 服务器地址 ++ DHCP 服务器: ++ 新建文件夹 ++ 播放时关闭 LCD 背光 ++ 未知或板载(保护状态) ++ 暂停时关闭 LCD 背光 ++ 暂停时打开 LED ++ 视频 - 资料库 ++ 游戏存档 ++ 排序:标签 ++ 下载存档 ++ 把游戏存档存放在硬盘上 ++ 下载游戏存档失败! ++ 选择需要下载和安装的游戏存档 ++ 没有当前游戏所对应的存档文件 ++ 切换到游戏存档 ++ 游戏存档 ++ 分段播放... ++ 重新校准 ++ 这个操作会重新校准%s的配置 ++ 还原为初时配置 ++ 选择指定位置 ++ ++ 以文件夹名来查找 ++ 文件 ++ 用文件夹名或文件名进行查找? ++ 设置内容 ++ 文件夹 ++ 是否嵌套查找? ++ 取消源锁定 ++ 演员 ++ 影片 ++ 导演 ++ 是否从XBMC资料库中移除 ++ 所有位于该路径的项目? ++ 电影 ++ 剧集 ++ 该目录包含 ++ 运行自动扫描 ++ 嵌套查找 ++ 饰演 ++ 导演 ++ 该目录下无视频文件! ++ 票数 ++ 剧集信息 ++ 分集信息 ++ 下载剧集详细介绍 ++ 取得分集介绍 ++ 下载分集信息到资料库 ++ 选择剧集: ++ 输入剧集名 ++ 第%i季 ++ ++ 分集 ++ 下载分集详细介绍 ++ 从资料库移除分集 ++ 从资料库移除剧集 ++ 剧集 ++ 剧情 ++ * 整季 ++ 隐藏已观看的 ++ 序列号 ++ 显示未观看影片的剧情介绍 ++ * 未观看之前隐藏 * ++ 设置季缩略图 ++ 季图片 ++ ++ 下载影片信息 ++ 不指定内容 ++ ++ 刷新剧集信息 ++ 刷新所有分集信息? ++ 被选文件夹包含单个电视剧集 ++ 扫描时排除文件夹 ++ 特别 ++ 自动获取季缩略图 ++ 被选文件夹包含单个视频 ++ 链接到电视剧集 ++ 移除到电视剧集的链接 ++ 最近加入的影片 ++ 最近加入的剧集 ++ 制作公司 ++ 音乐电视 ++ 最近加入的音乐电视 ++ 音乐电视 ++ 从资料库移除音乐电视 ++ 音乐电视信息 ++ 载入音乐电视信息 ++ 混合 ++ 按艺人进入专辑 ++ 进入专辑 ++ 播放歌曲 ++ 从专辑进入音乐电视 ++ 按艺人进入音乐电视 ++ 播放音乐电视 ++ 加入资料库时下载演员缩略图 ++ 设置演员缩略图 ++ ++ 移除分集书签 ++ 设置分集书签 ++ 刮削器设置 ++ 下载音乐电视信息 ++ 下载剧集信息 ++ 预告片 ++ 简捷查看 ++ 简捷查看剧集 ++ 获取同人画 ++ 在影音库和中显示同人画 ++ 扫描新内容 ++ 最初发表 ++ 编剧 ++ 自动显示整齐的文件和目录名 ++ ++ 从不 ++ 如果只有一季 ++ 总是 ++ 有预告片 ++ ++ 幻灯播放同人画 ++ 导出到单个文件或多个文件 ++ 每个文件项目数? ++ 单个文件 ++ 多文件 ++ 导出缩略图和同人画? ++ 覆盖原文件? ++ 资料库更新时排除的路径 ++ 提取缩略图和媒体标识 ++ 影片集 ++ 设置影片集缩略图 ++ 导出演员缩略图 ++ 选择同人画 ++ 本地同人画 ++ 无同人画 ++ 当前同人画 ++ 远程同人画 ++ 更新内容 ++ 要刷新此目录下的 ++ 所有项目吗? ++ 同人画 ++ 发现本地存储的信息。 ++ 忽略并从互联网刷新吗? ++ 无法下载信息 ++ 服务器不可用。 ++ 要继续扫描吗? ++ ++ ++ 显示隐藏文件和目录 ++ ++ TuxBox 客户端 ++ 警告:目标 TuxBox 设备正处于录制模式! ++ 流媒体将会被停止! ++ 切换频道:%s 失败! ++ 确认是否开始流媒体传输? ++ 正在连接:%s ++ TuxBox 设备 ++ ++ ++ 添加共享媒体... ++ 通过 UPnP 共享视频和音乐库 ++ ++ 编辑媒体共享 ++ 移除媒体共享 ++ 字幕目录 ++ 视频和相关字幕目录 ++ ++ 使用鼠标 ++ 在播放媒体文件时播放导航声效 ++ 缩略图 ++ 强制 DVD 播放器区码 ++ 视频输出 ++ 视频模式 ++ 一般 ++ 信箱模式 ++ 宽屏幕 ++ 开启 480p ++ 开启 720p ++ 开启 1080i ++ 输入新播放列表的名称 ++ 在文件列表中显示“添加目录”按钮 ++ 启用滚动条 ++ 视频资料库使用浏览过滤按钮 ++ 打开 ++ 噪音管理 ++ 快速 ++ 安静 ++ 启用自定义背景 ++ 电源管理 ++ 高功率 ++ 低功率 ++ 高待机 ++ 低待机 ++ 缓存档不能超过4GB ++ ++ 高品质像素着色器 V2 ++ 启用启动时自动播放播放列表 ++ 使用 Tween 动画效果 ++ 包含 ++ 未包含 ++ ++ 不是 ++ 开始于 ++ 中止于 ++ 大于 ++ 小于 ++ 之后 ++ 之前 ++ 最后 ++ 非最后 ++ 刮削器 ++ 默认电影刮削器 ++ 默认剧集刮削器 ++ 默认音乐电视刮削器 ++ 启用基于刮削器语言的回送 ++ - 设置 ++ 多语言 ++ ++ 等于 ++ 智能播放列表规则 ++ 符合条件的歌曲在 ++ 新规则... ++ 歌曲必须满足 ++ 所有条件 ++ 一条或多条规则 ++ 限制 ++ 无限制 ++ 排序 ++ 升序 ++ 降序 ++ 编辑智能播放列表 ++ 播放列表名称 ++ 查找满足条件的歌曲 ++ - 编辑 ++ %i首歌曲 ++ 新的智能播放列表... ++ %c磁盘 ++ 编辑舞会模式规则 ++ Home文件夹 ++ 观看次数 ++ 插曲标题 ++ 视频分辨率 ++ 音频声道数 ++ 视频编码 ++ 音频编码 ++ 对白语言 ++ 字幕语言 ++ 摇控器发送键盘按键 ++ ++ 文件名称 ++ 文件路径 ++ 文件大小 ++ 文件日期/时间 ++ 幻灯片索引 ++ 解析度 ++ 评论 ++ 彩色/黑白 ++ JPEG 影像处理 ++ ++ 拍摄时间 ++ 描述 ++ 制造厂商 ++ 相机型号 ++ EXIF 注释 ++ 固件 ++ 光圈值 ++ 镜头焦长 ++ 焦点距离 ++ 曝光 ++ 曝光时间 ++ 曝光倾向 ++ 曝光模式 ++ 闪光灯 ++ 白平衡 ++ 光源 ++ 测光模式 ++ ISO 感光值 ++ 数位变焦 ++ CCD 宽度 ++ GPS 纬度 ++ GPS 经度 ++ GPS 高度 ++ 方位 ++ ++ 补充类别 ++ 关键字 ++ 说明 ++ 作者 ++ 标题 ++ 特别指令 ++ 类别 ++ 署名报导 ++ 署名报导标题 ++ 信用 ++ 来源 ++ 版权条款 ++ 物件名称 ++ 城市 ++ ++ 国家 ++ 原始的 Tx 引用 ++ 日期建立 ++ 版权标志 ++ 国家代码 ++ 参考服务 ++ 允许通过 UPnP 控制 XBMC ++ 尝试略过介绍直接跳至 DVD 菜单 ++ 保存音乐 ++ 查询所有艺人信息 ++ 下载专辑信息 ++ 下载艺人信息 ++ 传记 ++ 唱片分类 ++ 搜索艺人 ++ 选择艺人 ++ 艺人信息 ++ 乐器 ++ 创建时间 ++ 成型时间 ++ 风格 ++ 解散时间 ++ 死亡时间 ++ 活跃年代 ++ 标签 ++ 创建/成型 ++ ++ ++ ++ 在启动时更新资料库 ++ 总是在后台更新资料库 ++ - DNS 后缀 ++ ++ 延迟:%2.3fs ++ 提前:%2.3fs ++ 字幕位置 ++ OpenGL 提供商: ++ OpenGL 渲染器: ++ OpenGL 版本: ++ 显示卡温度: ++ CPU 温度: ++ 可用内存 ++ 用户配置数据 ++ 视频播放暂停时画面变暗 ++ 所有记录 ++ 标题 ++ ++ 直播频道 ++ 录音的标题 ++ 节目表 ++ 为减少黑边允许高宽比误差 ++ 在列表中显示视频文件 ++ DirectX 提供商: ++ Direct3D 版本: ++ ++ ++ 字体 ++ - 尺寸 ++ - 颜色 ++ - 字符集 ++ 卡拉OK标题导出为 HTML ++ 卡拉OK标题导出为 CSV ++ 导入卡拉OK标题... ++ 自动显示歌曲选择 ++ 导出卡拉OK标题... ++ 输入歌曲编号 ++ 白/绿 ++ 白/红 ++ 白/兰 ++ 黑/白 ++ ++ 天气插件 ++ - 插件设置 ++ ++ 开启图文电视 ++ 片段 %i ++ 缓存 %i 字节 ++ 停止 ++ 运行 ++ ++ ++ 外部播放器激活 ++ 点 OK 关闭播放器 ++ ++ 播放完毕时点 OK ++ ++ ++ 资料库模式 ++ QWERTY 键盘 ++ 音频直通输出启用中 ++ ++ 自动开启游戏抗闪烁过滤 ++ ++ ++ ++ ++ ++ 预告片质量Trailer quality ++ 媒体流 ++ 下载 ++ 下载 & 播放 ++ 下载 & 保存 ++ 今天 ++ 明天 ++ 保存 ++ 拷贝 ++ 设置下载目录 ++ 搜索持续时间 ++ ++ ++ 用DVD player代替常规播放器 ++ 播放视频前揭示是否先下载 ++ 片断 ++ 重启以启用插件 ++ 今晚 ++ 明晚 ++ 状况 ++ 降雨量 ++ 降雨 ++ 潮湿 ++ 感觉 ++ 观测值 ++ 偏离正常值 ++ 日出 ++ 日落 ++ 详细资料 ++ 天气趋势 ++ 流动封面 ++ 翻译文本 ++ 地图列表 %s 分类 ++ 36 小时 ++ 地图 ++ 每小时 ++ 周末 ++ %s 天 ++ 提醒 ++ 提醒 ++ 选择您的 ++ 查看您的 ++ 配置您的 ++ 季节 ++ 使用您的 ++ 观看您的 ++ 聆听您的 ++ 浏览您的 ++ 配置您的 ++ 电源控制 ++ 菜单 ++ 播放您的 ++ 选项 ++ 编辑 ++ 关于您的 ++ 星级 ++ 桌面背景 ++ 桌面背景集 ++ 自定义桌面背景 ++ 自定义桌面背景集 ++ 浏览自述文件 ++ 浏览更新记录 ++ 运行此版本的 %s 需要 ++ XBMC为 %s 或更高版本。 ++ 请升级XBMC。 ++ 未找到数据! ++ 下一页 ++ ++ ++ 这是一个堆叠文件,请选择要播放的片段。 ++ 脚本目录 ++ 启用自定义脚本按钮 ++ ++ ++ Lame ++ Vorbis ++ Wav ++ DXVA ++ ++ 扬声器设置 ++ 2.0 ++ 2.1 ++ 3.0 ++ 3.1 ++ 4.0 ++ 4.1 ++ 5.0 ++ 5.1 ++ 7.0 ++ 7.1 ++ ++ +diff -Naur xbmc-pvr-27594.orig/lib/xbmc-dll-symbols/DllAvFormat.c xbmc-pvr-27594.patch/lib/xbmc-dll-symbols/DllAvFormat.c +--- xbmc-pvr-27594.orig/lib/xbmc-dll-symbols/DllAvFormat.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbmc-pvr-27594.patch/lib/xbmc-dll-symbols/DllAvFormat.c 2010-02-09 07:33:38.777898025 +0100 +@@ -0,0 +1,83 @@ ++/* ++ * various utility functions used within FFmpeg ++ * Copyright (c) 2000, 2001, 2002 Fabrice Bellard ++ * ++ * FFmpeg is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * FFmpeg 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 ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with FFmpeg; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++/* Functions defined here are functions that cannot be resolved through the ++ * ffmpeg shared libraries, yet are used in XBMC. ++ */ ++ ++#if (defined HAVE_CONFIG_H) && (!defined WIN32) ++ #include "config.h" ++#endif ++#if (defined USE_EXTERNAL_FFMPEG) ++#include ++ ++/* Taken from libavformat/utils.c */ ++static void flush_packet_queue(AVFormatContext *s) ++{ ++ AVPacketList *pktl; ++ ++ for(;;) { ++ pktl = s->packet_buffer; ++ if (!pktl) ++ break; ++ s->packet_buffer = pktl->next; ++ av_free_packet(&pktl->pkt); ++ av_free(pktl); ++ } ++ while(s->raw_packet_buffer){ ++ pktl = s->raw_packet_buffer; ++ s->raw_packet_buffer = pktl->next; ++ av_free_packet(&pktl->pkt); ++ av_free(pktl); ++ } ++ s->packet_buffer_end= ++ s->raw_packet_buffer_end= NULL; ++} ++ ++/* Taken from libavformat/utils.c */ ++void av_read_frame_flush(AVFormatContext *s) ++{ ++ AVStream *st; ++ int i, j; ++ ++ flush_packet_queue(s); ++ ++ s->cur_st = NULL; ++ ++ /* for each stream, reset read state */ ++ for(i = 0; i < s->nb_streams; i++) { ++ st = s->streams[i]; ++ ++ if (st->parser) { ++ av_parser_close(st->parser); ++ st->parser = NULL; ++ av_free_packet(&st->cur_pkt); ++ } ++ st->last_IP_pts = AV_NOPTS_VALUE; ++ st->cur_dts = AV_NOPTS_VALUE; /* we set the current DTS to an unspecified origin */ ++ st->reference_dts = AV_NOPTS_VALUE; ++ /* fail safe */ ++ st->cur_ptr = NULL; ++ st->cur_len = 0; ++ ++ for(j=0; jpts_buffer[j]= AV_NOPTS_VALUE; ++ } ++} ++#endif /* (defined USE_EXTERNAL_FFMPEG) */ +diff -Naur xbmc-pvr-27594.orig/lib/xbmc-dll-symbols/Makefile xbmc-pvr-27594.patch/lib/xbmc-dll-symbols/Makefile +--- xbmc-pvr-27594.orig/lib/xbmc-dll-symbols/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ xbmc-pvr-27594.patch/lib/xbmc-dll-symbols/Makefile 2010-02-09 07:33:38.778906804 +0100 +@@ -0,0 +1,6 @@ ++SRCS = DllAvFormat.c ++ ++LIB = dll-symbols.a ++ ++include ../../Makefile.include ++-include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(SRCS))) +diff -Naur xbmc-pvr-27594.orig/Makefile.in xbmc-pvr-27594.patch/Makefile.in +--- xbmc-pvr-27594.orig/Makefile.in 2010-02-08 19:09:44.000000000 +0100 ++++ xbmc-pvr-27594.patch/Makefile.in 2010-02-09 07:33:38.769772192 +0100 +@@ -98,7 +98,8 @@ + xbmc/lib/libid3tag \ + xbmc/lib/libapetag \ + xbmc/lib/libPython/linux \ +- lib/libmodplug ++ lib/libmodplug \ ++ lib/xbmc-dll-symbols + + SS_DIRS=\ + xbmc/screensavers/rsxs-0.9/xbmc +@@ -278,6 +279,8 @@ + $(MAKE) -C xbmc/lib/libapetag + lib/libmodplug/src/.libs/libmodplug.a: force + $(MAKE) -C lib/libmodplug ++lib/xbmc-dll-symbols/dll-symbols.a: force ++ $(MAKE) -C lib/xbmc-dll-symbols + + exports: + $(MAKE) xbmc/cores/DllLoader/exports/exports.a +@@ -441,6 +444,8 @@ + xbmc/posix/posix.a + endif + ++OBJSXBMC += lib/xbmc-dll-symbols/dll-symbols.a ++ + xbmc.bin: $(OBJSXBMC) $(DYNOBJSXBMC) + ifeq ($(findstring osx,$(ARCH)), osx) + $(CXX) $(CXXFLAGS) -o xbmc.bin -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(OBJSXBMC) $(LIBS) $(LDFLAGS) -rdynamic +diff -Naur xbmc-pvr-27594.orig/Makefile.in.orig xbmc-pvr-27594.patch/Makefile.in.orig +diff -Naur xbmc-pvr-27594.orig/xbmc/ButtonTranslator.cpp xbmc-pvr-27594.patch/xbmc/ButtonTranslator.cpp +--- xbmc-pvr-27594.orig/xbmc/ButtonTranslator.cpp 2010-02-08 18:53:42.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/ButtonTranslator.cpp 2010-02-09 07:31:57.960897391 +0100 +@@ -948,6 +948,7 @@ + else if (strWindow.Equals("karaokelargeselector")) windowID = WINDOW_DIALOG_KARAOKE_SELECTOR; + else if (strWindow.Equals("sliderdialog")) windowID = WINDOW_DIALOG_SLIDER; + else if (strWindow.Equals("songinformation")) windowID = WINDOW_DIALOG_SONG_INFO; ++ else if (strWindow.Equals("busydialog")) windowID = WINDOW_DIALOG_BUSY; + else + CLog::Log(LOGERROR, "Window Translator: Can't find window %s", strWindow.c_str()); + +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/Codecs/DllAvCodec.h xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/Codecs/DllAvCodec.h +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/Codecs/DllAvCodec.h 2010-02-08 18:53:23.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/Codecs/DllAvCodec.h 2010-02-09 07:33:32.412911808 +0100 +@@ -89,7 +89,7 @@ + void * const out[6], const int out_stride[6], + const void * const in[6], const int in_stride[6], int len)=0; + virtual int av_dup_packet(AVPacket *pkt)=0; +- virtual int av_init_packet(AVPacket *pkt)=0; ++ virtual void av_init_packet(AVPacket *pkt)=0; + }; + + #if (defined USE_EXTERNAL_FFMPEG) +@@ -160,7 +160,7 @@ + { return ::av_audio_convert(ctx, out, out_stride, in, in_stride, len); } + + virtual int av_dup_packet(AVPacket *pkt) { return ::av_dup_packet(pkt); } +- virtual int av_init_packet(AVPacket *pkt) { return ::av_init_packet(pkt); } ++ virtual void av_init_packet(AVPacket *pkt) { return ::av_init_packet(pkt); } + + + // DLL faking. +@@ -197,7 +197,7 @@ + DEFINE_METHOD8(int, av_parser_parse, (AVCodecParserContext* p1, AVCodecContext* p2, uint8_t** p3, int* p4, const uint8_t* p5, int p6, int64_t p7, int64_t p8)) + #endif + DEFINE_METHOD1(int, av_dup_packet, (AVPacket *p1)) +- DEFINE_METHOD1(int, av_init_packet, (AVPacket *p1)) ++ DEFINE_METHOD1(void, av_init_packet, (AVPacket *p1)) + + LOAD_SYMBOLS(); + +@@ -320,7 +320,7 @@ + virtual void av_freep(void *ptr) { ::av_freep(ptr); } + virtual int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding d) { return ::av_rescale_rnd(a, b, c, d); } + virtual const AVCRC* av_crc_get_table(AVCRCId crc_id) { return ::av_crc_get_table(crc_id); } +- virtual uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length) { return ::av_crc(ctx, crc, buffer); } ++ virtual uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length) { return ::av_crc(ctx, crc, buffer, length); } + + // DLL faking. + virtual bool ResolveExports() { return true; } +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/Codecs/DllAvFormat.h xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/Codecs/DllAvFormat.h +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/Codecs/DllAvFormat.h 2010-02-08 18:53:23.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/Codecs/DllAvFormat.h 2010-02-09 07:33:38.777898025 +0100 +@@ -18,11 +18,13 @@ + #if (defined USE_EXTERNAL_FFMPEG) + #if (defined HAVE_LIBAVFORMAT_AVFORMAT_H) + #include +- #include + #else + #include +- #include + #endif ++ /* libavformat/riff.h is not a public header, so include it here */ ++ #include ++ /* av_read_frame_flush() is defined for us in DllAvFormat.c */ ++ void av_read_frame_flush(AVFormatContext *s); + #else + #include "libavformat/avformat.h" + #include "libavformat/riff.h" +@@ -42,9 +44,9 @@ + virtual void av_close_input_file(AVFormatContext *s)=0; + virtual void av_close_input_stream(AVFormatContext *s)=0; + virtual int av_read_frame(AVFormatContext *s, AVPacket *pkt)=0; ++ virtual void av_read_frame_flush(AVFormatContext *s)=0; + virtual int av_read_play(AVFormatContext *s)=0; + virtual int av_read_pause(AVFormatContext *s)=0; +- virtual void av_read_frame_flush(AVFormatContext *s)=0; + virtual int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)=0; + #if (!defined USE_EXTERNAL_FFMPEG) + virtual int av_find_stream_info_dont_call(AVFormatContext *ic)=0; +@@ -101,6 +103,7 @@ + virtual void av_close_input_file(AVFormatContext *s) { ::av_close_input_file(s); } + virtual void av_close_input_stream(AVFormatContext *s) { ::av_close_input_stream(s); } + virtual int av_read_frame(AVFormatContext *s, AVPacket *pkt) { return ::av_read_frame(s, pkt); } ++ virtual void av_read_frame_flush(AVFormatContext *s) { return ::av_read_frame_flush(s); } + virtual int av_read_play(AVFormatContext *s) { return ::av_read_play(s); } + virtual int av_read_pause(AVFormatContext *s) { return ::av_read_pause(s); } + virtual int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { return ::av_seek_frame(s, stream_index, timestamp, flags); } +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLibFaad.cpp xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLibFaad.cpp +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLibFaad.cpp 2010-02-08 18:53:24.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLibFaad.cpp 2010-02-09 07:31:57.961900793 +0100 +@@ -105,21 +105,25 @@ + + enum PCMChannels* CDVDAudioCodecLibFaad::GetChannelMap() + { ++ int index = 0; + for(int i = 0; i < m_iSourceChannels; ++i) +- { + switch(m_frameInfo.channel_position[i]) + { +- case FRONT_CHANNEL_CENTER: m_pChannelMap[i] = PCM_FRONT_CENTER ; break; +- case FRONT_CHANNEL_LEFT : m_pChannelMap[i] = PCM_FRONT_LEFT ; break; +- case FRONT_CHANNEL_RIGHT : m_pChannelMap[i] = PCM_FRONT_RIGHT ; break; +- case SIDE_CHANNEL_LEFT : m_pChannelMap[i] = PCM_SIDE_LEFT ; break; +- case SIDE_CHANNEL_RIGHT : m_pChannelMap[i] = PCM_SIDE_RIGHT ; break; +- case BACK_CHANNEL_LEFT : m_pChannelMap[i] = PCM_BACK_LEFT ; break; +- case BACK_CHANNEL_RIGHT : m_pChannelMap[i] = PCM_BACK_RIGHT ; break; +- case BACK_CHANNEL_CENTER : m_pChannelMap[i] = PCM_BACK_CENTER ; break; +- case LFE_CHANNEL : m_pChannelMap[i] = PCM_LOW_FREQUENCY; break; ++ case FRONT_CHANNEL_CENTER: m_pChannelMap[index++] = PCM_FRONT_CENTER ; break; ++ case FRONT_CHANNEL_LEFT : m_pChannelMap[index++] = PCM_FRONT_LEFT ; break; ++ case FRONT_CHANNEL_RIGHT : m_pChannelMap[index++] = PCM_FRONT_RIGHT ; break; ++ case SIDE_CHANNEL_LEFT : m_pChannelMap[index++] = PCM_SIDE_LEFT ; break; ++ case SIDE_CHANNEL_RIGHT : m_pChannelMap[index++] = PCM_SIDE_RIGHT ; break; ++ case BACK_CHANNEL_LEFT : m_pChannelMap[index++] = PCM_BACK_LEFT ; break; ++ case BACK_CHANNEL_RIGHT : m_pChannelMap[index++] = PCM_BACK_RIGHT ; break; ++ case BACK_CHANNEL_CENTER : m_pChannelMap[index++] = PCM_BACK_CENTER ; break; ++ case LFE_CHANNEL : m_pChannelMap[index++] = PCM_LOW_FREQUENCY; break; + } +- } ++ ++ if (index < m_iSourceChannels) ++ return NULL; ++ ++ assert(index == m_iSourceChannels); + return m_pChannelMap; + } + +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/CrystalHD/CrystalHD.cpp xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/CrystalHD/CrystalHD.cpp +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/CrystalHD/CrystalHD.cpp 2010-02-08 18:53:24.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/CrystalHD/CrystalHD.cpp 2010-02-09 07:33:28.840898772 +0100 +@@ -1597,6 +1597,14 @@ + return false; + } + ++int CCrystalHD::GetInputCount(void) ++{ ++ if (m_pInputThread) ++ return m_pInputThread->GetInputCount(); ++ else ++ return 0; ++} ++ + int CCrystalHD::GetReadyCount(void) + { + if (m_pOutputThread) +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/CrystalHD/CrystalHD.h xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/CrystalHD/CrystalHD.h +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/CrystalHD/CrystalHD.h 2010-02-08 18:53:24.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/CrystalHD/CrystalHD.h 2010-02-09 07:33:28.837804757 +0100 +@@ -127,6 +127,7 @@ + void Reset(void); + bool AddInput(unsigned char *pData, size_t size, double pts); + ++ int GetInputCount(void); + int GetReadyCount(void); + void BusyListPop(void); + +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecCrystalHD.cpp xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecCrystalHD.cpp +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecCrystalHD.cpp 2010-02-08 18:53:24.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecCrystalHD.cpp 2010-02-09 07:33:28.841899451 +0100 +@@ -165,15 +165,17 @@ + // Handle Input, add demuxer packet to input queue, we must accept it or + // it will be discarded as DVDPlayerVideo has no concept of "try again". + if ( m_Device->AddInput(pData, iSize, m_pts) ) +- pData = NULL; ++ { ++ // always wait for input to be consumed, one less thing to worry about ++ //while (m_Device->GetInputCount()) ++ // Sleep(1); ++ } + else + { + // Deep crap error, this should never happen unless we run away pulling demuxer pkts. + CLog::Log(LOGDEBUG, "%s: m_pInputThread->AddInput full.", __MODULE_NAME__); + Sleep(10); + } +- // Always return VC_BUFFER +- ret |= VC_BUFFER; + + // Fake a decoding delay of 1/2 the frame duration, this helps keep DVDPlayerVideo from + // draining the demuxer queue. DVDPlayerVideo expects one picture frame for each demuxer +@@ -199,6 +201,8 @@ + ret |= VC_PICTURE; + } + } ++ if (m_Device->GetInputCount() < 2) ++ ret |= VC_BUFFER; + + return ret; + } +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h 2010-02-08 18:53:24.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h 2010-02-09 07:33:01.061899743 +0100 +@@ -89,7 +89,6 @@ + + #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 +-#define DVP_FLAG_NOAUTOSYNC 0x00000040 // disregard any smooth syncing on this picture + + // DVP_FLAG 0x00000100 - 0x00000f00 is in use by libmpeg2! + +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp 2010-01-24 11:49:29.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp 2010-02-09 07:33:19.948774751 +0100 +@@ -1209,7 +1209,6 @@ + if(m_mixerstep) + { + picture->iRepeatPicture = -0.5; +- picture->iFlags |= DVP_FLAG_NOAUTOSYNC; + if(m_mixerstep > 1) + picture->pts = DVD_NOPTS_VALUE; + } +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp.orig xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp.orig +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp.orig 1970-01-01 01:00:00.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp.orig 2010-02-09 07:33:32.409807037 +0100 +@@ -0,0 +1,1256 @@ ++/* ++ * Copyright (C) 2005-2008 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, write to ++ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ++ * http://www.gnu.org/copyleft/gpl.html ++ * ++ */ ++ ++#if (defined HAVE_CONFIG_H) && (!defined WIN32) ++ #include "config.h" ++#endif ++#include "system.h" ++#ifndef __STDC_CONSTANT_MACROS ++#define __STDC_CONSTANT_MACROS ++#endif ++#ifndef __STDC_LIMIT_MACROS ++#define __STDC_LIMIT_MACROS ++#endif ++#ifdef _LINUX ++#include "stdint.h" ++#else ++#define INT64_C __int64 ++#endif ++#include "DVDDemuxFFmpeg.h" ++#include "DVDInputStreams/DVDInputStream.h" ++#include "DVDInputStreams/DVDInputStreamNavigator.h" ++#ifdef HAS_FILESYSTEM_MMS ++#include "DVDInputStreams/DVDInputStreamMMS.h" ++#endif ++#include "DVDInputStreams/DVDInputStreamRTMP.h" ++#include "DVDDemuxUtils.h" ++#include "DVDClock.h" // for DVD_TIME_BASE ++#include "utils/Win32Exception.h" ++#include "AdvancedSettings.h" ++#include "GUISettings.h" ++#include "FileSystem/File.h" ++#include "FileSystem/Directory.h" ++#include "utils/log.h" ++#include "Thread.h" ++#include "utils/TimeUtils.h" ++ ++void CDemuxStreamAudioFFmpeg::GetStreamInfo(std::string& strInfo) ++{ ++ if(!m_stream) return; ++ char temp[128]; ++ m_parent->m_dllAvCodec.avcodec_string(temp, 128, m_stream->codec, 0); ++ strInfo = temp; ++} ++ ++void CDemuxStreamAudioFFmpeg::GetStreamName(std::string& strInfo) ++{ ++ if(!m_stream) return; ++ if(!m_description.empty()) ++ strInfo = m_description; ++ else ++ CDemuxStream::GetStreamName(strInfo); ++} ++ ++void CDemuxStreamSubtitleFFmpeg::GetStreamName(std::string& strInfo) ++{ ++ if(!m_stream) return; ++ if(!m_description.empty()) ++ strInfo = m_description; ++ else ++ CDemuxStream::GetStreamName(strInfo); ++} ++ ++void CDemuxStreamVideoFFmpeg::GetStreamInfo(std::string& strInfo) ++{ ++ if(!m_stream) return; ++ char temp[128]; ++ m_parent->m_dllAvCodec.avcodec_string(temp, 128, m_stream->codec, 0); ++ strInfo = temp; ++} ++ ++void CDemuxStreamSubtitleFFmpeg::GetStreamInfo(std::string& strInfo) ++{ ++ if(!m_stream) return; ++ char temp[128]; ++ m_parent->m_dllAvCodec.avcodec_string(temp, 128, m_stream->codec, 0); ++ strInfo = temp; ++} ++ ++// these need to be put somewhere that are compiled, we should have some better place for it ++ ++CCriticalSection DllAvCodec::m_critSection; ++std::map g_logbuffer; ++ ++void ff_avutil_log(void* ptr, int level, const char* format, va_list va) ++{ ++ CSingleLock lock(DllAvCodec::m_critSection); ++ uintptr_t threadId = (uintptr_t)CThread::GetCurrentThreadId(); ++ CStdString &buffer = g_logbuffer[threadId]; ++ ++ AVClass* avc= ptr ? *(AVClass**)ptr : NULL; ++ ++ if(level >= AV_LOG_DEBUG && g_advancedSettings.m_logLevel <= LOG_LEVEL_DEBUG_SAMBA) ++ return; ++ else if(g_advancedSettings.m_logLevel <= LOG_LEVEL_NORMAL) ++ return; ++ ++ int type; ++ switch(level) ++ { ++ case AV_LOG_INFO : type = LOGINFO; break; ++ case AV_LOG_ERROR : type = LOGERROR; break; ++ case AV_LOG_DEBUG : ++ default : type = LOGDEBUG; break; ++ } ++ ++ CStdString message, prefix; ++ message.FormatV(format, va); ++ ++ prefix.Format("ffmpeg[%X]: ", threadId); ++ if(avc) ++ { ++ if(avc->item_name) ++ prefix += CStdString("[") + avc->item_name(ptr) + "] "; ++ else if(avc->class_name) ++ prefix += CStdString("[") + avc->class_name + "] "; ++ } ++ ++ buffer += message; ++ int pos, start = 0; ++ while( (pos = buffer.find_first_of('\n', start)) >= 0 ) ++ { ++ if(pos>start) ++ CLog::Log(type, "%s%s", prefix.c_str(), buffer.substr(start, pos-start).c_str()); ++ start = pos+1; ++ } ++ buffer.erase(0, start); ++} ++ ++static void ff_flush_avutil_log_buffers(void) ++{ ++ CSingleLock lock(DllAvCodec::m_critSection); ++ ++ /* Loop through the logbuffer list and remove any blank buffers ++ If the thread using the buffer is still active, it will just ++ add a new buffer next time it writes to the log */ ++ std::map::iterator it; ++ for (it = g_logbuffer.begin(); it != g_logbuffer.end(); ) ++ if ((*it).second.IsEmpty()) ++ g_logbuffer.erase(it++); ++ else ++ ++it; ++} ++ ++#ifdef _MSC_VER ++static __declspec(thread) CDVDDemuxFFmpeg* g_demuxer = 0; ++#else ++static TLS g_tls; ++#define g_demuxer (*((CDVDDemuxFFmpeg**)g_tls.Get())) ++#endif ++ ++static int interrupt_cb(void) ++{ ++ if(g_demuxer && g_demuxer->Aborted()) ++ return 1; ++ return 0; ++} ++ ++//////////////////////////////////////////////////////////////////////////////////////////////// ++//////////////////////////////////////////////////////////////////////////////////////////////// ++/* ++static int dvd_file_open(URLContext *h, const char *filename, int flags) ++{ ++ return -1; ++} ++*/ ++ ++static int dvd_file_read(URLContext *h, BYTE* buf, int size) ++{ ++ if(interrupt_cb()) ++ return -1; ++ ++ CDVDInputStream* pInputStream = (CDVDInputStream*)h->priv_data; ++ return pInputStream->Read(buf, size); ++} ++/* ++static int dvd_file_write(URLContext *h, BYTE* buf, int size) ++{ ++ return -1; ++} ++*/ ++static offset_t dvd_file_seek(URLContext *h, offset_t pos, int whence) ++{ ++ if(interrupt_cb()) ++ return -1; ++ ++ CDVDInputStream* pInputStream = (CDVDInputStream*)h->priv_data; ++ if(whence == AVSEEK_SIZE) ++ return pInputStream->GetLength(); ++ else ++ return pInputStream->Seek(pos, whence); ++} ++ ++static int dvd_file_close(URLContext *h) ++{ ++ return 0; ++} ++ ++URLProtocol dvd_file_protocol = { ++ "CDVDInputStream", ++ NULL, /*url_open*/ ++ dvd_file_read, /*url_read*/ ++ NULL, /*url_write*/ ++ dvd_file_seek, /*url_seek*/ ++ dvd_file_close, /*url_close*/ ++ NULL, /*URLProtocol*/ ++ NULL, /*url_read_pause*/ ++ NULL /*url_read_seek*/ ++ }; ++ ++//////////////////////////////////////////////////////////////////////////////////////////////// ++//////////////////////////////////////////////////////////////////////////////////////////////// ++ ++CDVDDemuxFFmpeg::CDVDDemuxFFmpeg() : CDVDDemux() ++{ ++ m_pFormatContext = NULL; ++ m_pInput = NULL; ++ m_ioContext = NULL; ++ InitializeCriticalSection(&m_critSection); ++ for (int i = 0; i < MAX_STREAMS; i++) m_streams[i] = NULL; ++ m_iCurrentPts = DVD_NOPTS_VALUE; ++} ++ ++CDVDDemuxFFmpeg::~CDVDDemuxFFmpeg() ++{ ++ Dispose(); ++ DeleteCriticalSection(&m_critSection); ++ ff_flush_avutil_log_buffers(); ++} ++ ++bool CDVDDemuxFFmpeg::Aborted() ++{ ++ if(!m_timeout) ++ return false; ++ ++ if(CTimeUtils::GetTimeMS() > m_timeout) ++ return true; ++ ++ return false; ++} ++ ++bool CDVDDemuxFFmpeg::Open(CDVDInputStream* pInput) ++{ ++ AVInputFormat* iformat = NULL; ++ std::string strFile; ++ m_iCurrentPts = DVD_NOPTS_VALUE; ++ m_speed = DVD_PLAYSPEED_NORMAL; ++ g_demuxer = this; ++ ++ if (!pInput) return false; ++ ++ if (!m_dllAvUtil.Load() || !m_dllAvCodec.Load() || !m_dllAvFormat.Load()) { ++ CLog::Log(LOGERROR,"CDVDDemuxFFmpeg::Open - failed to load ffmpeg libraries"); ++ return false; ++ } ++ ++ // register codecs ++ m_dllAvFormat.av_register_all(); ++ m_dllAvFormat.url_set_interrupt_cb(interrupt_cb); ++ ++ // could be used for interupting ffmpeg while opening a file (eg internet streams) ++ // url_set_interrupt_cb(NULL); ++ ++ m_pInput = pInput; ++ strFile = m_pInput->GetFileName(); ++ ++ bool streaminfo = true; /* set to true if we want to look for streams before playback*/ ++ ++ if( m_pInput->GetContent().length() > 0 ) ++ { ++ std::string content = m_pInput->GetContent(); ++ ++ /* check if we can get a hint from content */ ++ if( content.compare("audio/aacp") == 0 ) ++ iformat = m_dllAvFormat.av_find_input_format("aac"); ++ else if( content.compare("audio/aac") == 0 ) ++ iformat = m_dllAvFormat.av_find_input_format("aac"); ++ else if( content.compare("video/x-vobsub") == 0 ) ++ iformat = m_dllAvFormat.av_find_input_format("mpeg"); ++ else if( content.compare("video/x-dvd-mpeg") == 0 ) ++ iformat = m_dllAvFormat.av_find_input_format("mpeg"); ++ else if( content.compare("video/flv") == 0 ) ++ iformat = m_dllAvFormat.av_find_input_format("flv"); ++ else if( content.compare("video/x-flv") == 0 ) ++ iformat = m_dllAvFormat.av_find_input_format("flv"); ++ ++ /* these are likely pure streams, and as such we don't */ ++ /* want to try to look for streaminfo before playback */ ++ if( iformat ) ++ streaminfo = false; ++ } ++ ++ if( m_pInput->IsStreamType(DVDSTREAM_TYPE_FFMPEG) ) ++ { ++ m_timeout = CTimeUtils::GetTimeMS() + 10000; ++ ++ // special stream type that makes avformat handle file opening ++ // allows internal ffmpeg protocols to be used ++ if( m_dllAvFormat.av_open_input_file(&m_pFormatContext, strFile.c_str(), iformat, FFMPEG_FILE_BUFFER_SIZE, NULL) < 0 ) ++ { ++ CLog::Log(LOGDEBUG, "Error, could not open file %s", strFile.c_str()); ++ Dispose(); ++ return false; ++ } ++ } ++ else ++ { ++ m_timeout = 0; ++ ++ // initialize url context to be used as filedevice ++ URLContext* context = (URLContext*)m_dllAvUtil.av_mallocz(sizeof(struct URLContext) + strFile.length() + 1); ++ context->prot = &dvd_file_protocol; ++ context->priv_data = (void*)m_pInput; ++ context->max_packet_size = FFMPEG_FILE_BUFFER_SIZE; ++ ++ if (m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD)) ++ { ++ context->max_packet_size = FFMPEG_DVDNAV_BUFFER_SIZE; ++ context->is_streamed = 1; ++ } ++ else if ((m_pInput->IsStreamType(DVDSTREAM_TYPE_TV)) || ++ (m_pInput->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER))) ++ { ++ if(m_pInput->Seek(0, SEEK_POSSIBLE) == 0) ++ context->is_streamed = 1; ++ ++ // this actually speeds up channel changes by almost a second ++ // however, it alsa makes player not buffer anything, this ++ // leads to buffer underruns in audio renderer ++ //if(context->is_streamed) ++ // streaminfo = false; ++ } ++ else ++ { ++ if(m_pInput->Seek(0, SEEK_POSSIBLE) == 0) ++ context->is_streamed = 1; ++ } ++ ++#if LIBAVFORMAT_VERSION_INT >= (52<<16) ++ context->filename = (char *) &context[1]; ++#endif ++ ++ strcpy(context->filename, strFile.c_str()); ++ ++ // open our virtual file device ++ if(m_dllAvFormat.url_fdopen(&m_ioContext, context) < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Unable to init io context", __FUNCTION__); ++ m_dllAvUtil.av_free(context); ++ Dispose(); ++ return false; ++ } ++ ++ if( iformat == NULL ) ++ { ++ // let ffmpeg decide which demuxer we have to open ++ AVProbeData pd; ++ BYTE probe_buffer[FFMPEG_FILE_BUFFER_SIZE + AVPROBE_PADDING_SIZE]; ++ ++ // init probe data ++ pd.buf = probe_buffer; ++ pd.filename = strFile.c_str(); ++ ++ // read data using avformat's buffers ++ if(context->is_streamed) ++ pd.buf_size = m_dllAvFormat.get_partial_buffer(m_ioContext, pd.buf, context->max_packet_size); ++ else ++ pd.buf_size = m_dllAvFormat.get_buffer(m_ioContext, pd.buf, context->max_packet_size); ++ ++ if (pd.buf_size <= 0) ++ { ++ CLog::Log(LOGERROR, "%s - error reading from input stream, %s", __FUNCTION__, strFile.c_str()); ++ return false; ++ } ++ memset(pd.buf+pd.buf_size, 0, AVPROBE_PADDING_SIZE); ++ ++ // restore position again ++ m_dllAvFormat.url_fseek(m_ioContext , 0, SEEK_SET); ++ ++ iformat = m_dllAvFormat.av_probe_input_format(&pd, 1); ++ if (!iformat) ++ { ++ // av_probe_input_format failed, re-probe the ffmpeg/ffplay method. ++ // av_open_input_file uses av_probe_input_format2 for probing format, ++ // starting at 2048, up to max buffer size of 1048576. We just probe to ++ // the buffer size allocated above so as to avoid seeks on content that ++ // might not be seekable. ++ int max_buf_size = pd.buf_size; ++ for (int probe_size=std::min(2048, pd.buf_size); probe_size <= max_buf_size && !iformat; probe_size<<=1) ++ { ++ CLog::Log(LOGDEBUG, "%s - probing failed, re-probing with probe size [%d]", __FUNCTION__, probe_size); ++ int score= probe_size < max_buf_size ? AVPROBE_SCORE_MAX/4 : 0; ++ pd.buf_size = probe_size; ++ iformat = m_dllAvFormat.av_probe_input_format2(&pd, 1, &score); ++ } ++ } ++ if (!iformat) ++ { ++ CLog::Log(LOGERROR, "%s - error probing input format, %s", __FUNCTION__, strFile.c_str()); ++ return false; ++ } ++ else ++ { ++ if (iformat->name) ++ CLog::Log(LOGDEBUG, "%s - probing detected format [%s]", __FUNCTION__, iformat->name); ++ else ++ CLog::Log(LOGDEBUG, "%s - probing detected unnamed format", __FUNCTION__); ++ } ++ } ++ ++ ++ // open the demuxer ++ if (m_dllAvFormat.av_open_input_stream(&m_pFormatContext, m_ioContext, strFile.c_str(), iformat, NULL) < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error, could not open file %s", __FUNCTION__, strFile.c_str()); ++ Dispose(); ++ return false; ++ } ++ } ++ ++ // we need to know if this is matroska later ++ m_bMatroska = strcmp(m_pFormatContext->iformat->name, "matroska") == 0; ++ ++ // in combination with libdvdnav seek, av_find_stream_info wont work ++ // so we do this for files only ++ if (streaminfo) ++ { ++ /* too speed up live sources, only analyse very short */ ++ if(m_pInput->Seek(0, SEEK_POSSIBLE) == 0) ++ m_pFormatContext->max_analyze_duration = 500000; ++ ++ ++ CLog::Log(LOGDEBUG, "%s - av_find_stream_info starting", __FUNCTION__); ++ int iErr = m_dllAvFormat.av_find_stream_info(m_pFormatContext); ++ if (iErr < 0) ++ { ++ CLog::Log(LOGWARNING,"could not find codec parameters for %s", strFile.c_str()); ++ if (m_pFormatContext->nb_streams == 1 && m_pFormatContext->streams[0]->codec->codec_id == CODEC_ID_AC3) ++ { ++ // special case, our codecs can still handle it. ++ } ++ else ++ { ++ Dispose(); ++ return false; ++ } ++ } ++ CLog::Log(LOGDEBUG, "%s - av_find_stream_info finished", __FUNCTION__); ++ } ++ // reset any timeout ++ m_timeout = 0; ++ ++ // if format can be nonblocking, let's use that ++ m_pFormatContext->flags |= AVFMT_FLAG_NONBLOCK; ++ ++ // print some extra information ++ m_dllAvFormat.dump_format(m_pFormatContext, 0, strFile.c_str(), 0); ++ ++ UpdateCurrentPTS(); ++ ++ if (m_pInput->IsStreamType(DVDSTREAM_TYPE_MMS)) // HACK: until we figure out how to detect which mms streams are active ++ return true; ++ ++ // add the ffmpeg streams to our own stream array ++ if (m_pFormatContext->nb_programs) ++ { ++ m_program = UINT_MAX; ++ // look for first non empty stream and discard nonselected programs ++ for (unsigned int i = 0; i < m_pFormatContext->nb_programs; i++) ++ { ++ if(m_program == UINT_MAX && m_pFormatContext->programs[i]->nb_stream_indexes > 0) ++ m_program = i; ++ ++ if(i != m_program) ++ m_pFormatContext->programs[i]->discard = AVDISCARD_ALL; ++ } ++ if(m_program == UINT_MAX) ++ m_program = 0; ++ ++ // add streams from selected program ++ for (unsigned int i = 0; i < m_pFormatContext->programs[m_program]->nb_stream_indexes; i++) ++ AddStream(m_pFormatContext->programs[m_program]->stream_index[i]); ++ } ++ else ++ { ++ for (unsigned int i = 0; i < m_pFormatContext->nb_streams; i++) ++ AddStream(i); ++ } ++ ++ return true; ++} ++ ++void CDVDDemuxFFmpeg::Dispose() ++{ ++ g_demuxer = this; ++ ++ if (m_pFormatContext) ++ { ++ if (m_ioContext) ++ { ++ if(m_pFormatContext->pb && m_pFormatContext->pb != m_ioContext) ++ { ++ CLog::Log(LOGWARNING, "CDVDDemuxFFmpeg::Dispose - demuxer changed our byte context behind our back, possible memleak"); ++ m_ioContext = m_pFormatContext->pb; ++ } ++ m_dllAvFormat.av_close_input_stream(m_pFormatContext); ++ m_dllAvFormat.url_fclose(m_ioContext); ++ } ++ else ++ m_dllAvFormat.av_close_input_file(m_pFormatContext); ++ } ++ m_ioContext = NULL; ++ m_pFormatContext = NULL; ++ m_speed = DVD_PLAYSPEED_NORMAL; ++ ++ for (int i = 0; i < MAX_STREAMS; i++) ++ { ++ if (m_streams[i]) ++ { ++ if (m_streams[i]->ExtraData) ++ delete[] (BYTE*)(m_streams[i]->ExtraData); ++ delete m_streams[i]; ++ } ++ m_streams[i] = NULL; ++ } ++ m_pInput = NULL; ++ ++ m_dllAvFormat.Unload(); ++ m_dllAvCodec.Unload(); ++ m_dllAvUtil.Unload(); ++} ++ ++void CDVDDemuxFFmpeg::Reset() ++{ ++ CDVDInputStream* pInputStream = m_pInput; ++ Dispose(); ++ Open(pInputStream); ++} ++ ++void CDVDDemuxFFmpeg::Flush() ++{ ++ g_demuxer = this; ++ ++#if (!defined USE_EXTERNAL_FFMPEG) ++ if (m_pFormatContext) ++ m_dllAvFormat.av_read_frame_flush(m_pFormatContext); ++#endif ++ ++ m_iCurrentPts = DVD_NOPTS_VALUE; ++} ++ ++void CDVDDemuxFFmpeg::Abort() ++{ ++ m_timeout = 1; ++} ++ ++void CDVDDemuxFFmpeg::SetSpeed(int iSpeed) ++{ ++ g_demuxer = this; ++ ++ if(!m_pFormatContext) ++ return; ++ ++ if(m_speed != DVD_PLAYSPEED_PAUSE && iSpeed == DVD_PLAYSPEED_PAUSE) ++ { ++ m_pInput->Pause((double)m_iCurrentPts); ++ m_dllAvFormat.av_read_pause(m_pFormatContext); ++ } ++ else if(m_speed == DVD_PLAYSPEED_PAUSE && iSpeed != DVD_PLAYSPEED_PAUSE) ++ { ++ m_pInput->Pause((double)m_iCurrentPts); ++ m_dllAvFormat.av_read_play(m_pFormatContext); ++ } ++ m_speed = iSpeed; ++ ++ AVDiscard discard = AVDISCARD_NONE; ++ if(m_speed > 4*DVD_PLAYSPEED_NORMAL) ++ discard = AVDISCARD_NONKEY; ++ else if(m_speed > 2*DVD_PLAYSPEED_NORMAL) ++ discard = AVDISCARD_BIDIR; ++ else if(m_speed < DVD_PLAYSPEED_PAUSE) ++ discard = AVDISCARD_NONKEY; ++ ++ ++ for(unsigned int i = 0; i < m_pFormatContext->nb_streams; i++) ++ { ++ if(m_pFormatContext->streams[i]) ++ { ++ if(m_pFormatContext->streams[i]->discard != AVDISCARD_ALL) ++ m_pFormatContext->streams[i]->discard = discard; ++ } ++ } ++} ++ ++double CDVDDemuxFFmpeg::ConvertTimestamp(int64_t pts, int den, int num) ++{ ++ if (pts == (int64_t)AV_NOPTS_VALUE) ++ return DVD_NOPTS_VALUE; ++ ++ // do calculations in floats as they can easily overflow otherwise ++ // we don't care for having a completly exact timestamp anyway ++ double timestamp = (double)pts * num / den; ++ double starttime = 0.0f; ++ ++ if (m_pFormatContext->start_time != (int64_t)AV_NOPTS_VALUE) ++ starttime = (double)m_pFormatContext->start_time / AV_TIME_BASE; ++ ++ if(timestamp > starttime) ++ timestamp -= starttime; ++ else if( timestamp + 0.1f > starttime ) ++ timestamp = 0; ++ ++ return timestamp*DVD_TIME_BASE; ++} ++ ++DemuxPacket* CDVDDemuxFFmpeg::Read() ++{ ++ g_demuxer = this; ++ ++ AVPacket pkt; ++ DemuxPacket* pPacket = NULL; ++ // on some cases where the received packet is invalid we will need to return an empty packet (0 length) otherwise the main loop (in CDVDPlayer) ++ // would consider this the end of stream and stop. ++ bool bReturnEmpty = false; ++ Lock(); ++ if (m_pFormatContext) ++ { ++ // assume we are not eof ++ if(m_pFormatContext->pb) ++ m_pFormatContext->pb->eof_reached = 0; ++ ++ // keep track if ffmpeg doesn't always set these ++ pkt.size = 0; ++ pkt.data = NULL; ++ pkt.stream_index = MAX_STREAMS; ++ ++ // timeout reads after 100ms ++ m_timeout = CTimeUtils::GetTimeMS() + 20000; ++ int result = 0; ++ try ++ { ++ result = m_dllAvFormat.av_read_frame(m_pFormatContext, &pkt); ++ } ++ catch(const win32_exception &e) ++ { ++ e.writelog(__FUNCTION__); ++ result = AVERROR(EFAULT); ++ } ++ m_timeout = 0; ++ ++ if (result == AVERROR(EINTR) || result == AVERROR(EAGAIN)) ++ { ++ // timeout, probably no real error, return empty packet ++ bReturnEmpty = true; ++ } ++ else if (result < 0) ++ { ++ Flush(); ++ } ++ else if (pkt.size < 0 || pkt.stream_index >= MAX_STREAMS) ++ { ++ // XXX, in some cases ffmpeg returns a negative packet size ++ if(m_pFormatContext->pb && !m_pFormatContext->pb->eof_reached) ++ { ++ CLog::Log(LOGERROR, "CDVDDemuxFFmpeg::Read() no valid packet"); ++ bReturnEmpty = true; ++ Flush(); ++ } ++ else ++ CLog::Log(LOGERROR, "CDVDDemuxFFmpeg::Read() returned invalid packet and eof reached"); ++ ++ m_dllAvCodec.av_free_packet(&pkt); ++ } ++ else ++ { ++ AVStream *stream = m_pFormatContext->streams[pkt.stream_index]; ++ ++ if (m_pFormatContext->nb_programs) ++ { ++ /* check so packet belongs to selected program */ ++ for (unsigned int i = 0; i < m_pFormatContext->programs[m_program]->nb_stream_indexes; i++) ++ { ++ if(pkt.stream_index == (int)m_pFormatContext->programs[m_program]->stream_index[i]) ++ { ++ pPacket = CDVDDemuxUtils::AllocateDemuxPacket(pkt.size); ++ break; ++ } ++ } ++ ++ if (!pPacket) ++ bReturnEmpty = true; ++ } ++ else ++ pPacket = CDVDDemuxUtils::AllocateDemuxPacket(pkt.size); ++ ++ if (pPacket) ++ { ++ // lavf sometimes bugs out and gives 0 dts/pts instead of no dts/pts ++ // since this could only happens on initial frame under normal ++ // circomstances, let's assume it is wrong all the time ++ if(pkt.dts == 0) ++ pkt.dts = AV_NOPTS_VALUE; ++ if(pkt.pts == 0) ++ pkt.pts = AV_NOPTS_VALUE; ++ ++ if(m_bMatroska && stream->codec && stream->codec->codec_type == CODEC_TYPE_VIDEO) ++ { // matroska can store different timestamps ++ // for different formats, for native stored ++ // stuff it is pts, but for ms compatibility ++ // tracks, it is really dts. sadly ffmpeg ++ // sets these two timestamps equal all the ++ // time, so we select it here instead ++ if(stream->codec->codec_tag == 0) ++ pkt.dts = AV_NOPTS_VALUE; ++ else ++ pkt.pts = AV_NOPTS_VALUE; ++ } ++ ++ // we need to get duration slightly different for matroska embedded text subtitels ++ if(m_bMatroska && stream->codec->codec_id == CODEC_ID_TEXT && pkt.convergence_duration != 0) ++ pkt.duration = pkt.convergence_duration; ++ ++ // copy contents into our own packet ++ pPacket->iSize = pkt.size; ++ ++ // maybe we can avoid a memcpy here by detecting where pkt.destruct is pointing too? ++ if (pkt.data) ++ memcpy(pPacket->pData, pkt.data, pPacket->iSize); ++ ++ pPacket->pts = ConvertTimestamp(pkt.pts, stream->time_base.den, stream->time_base.num); ++ pPacket->dts = ConvertTimestamp(pkt.dts, stream->time_base.den, stream->time_base.num); ++ pPacket->duration = DVD_SEC_TO_TIME((double)pkt.duration * stream->time_base.num / stream->time_base.den); ++ ++ // used to guess streamlength ++ if (pPacket->dts != DVD_NOPTS_VALUE && (pPacket->dts > m_iCurrentPts || m_iCurrentPts == DVD_NOPTS_VALUE)) ++ m_iCurrentPts = pPacket->dts; ++ ++ ++ // check if stream has passed full duration, needed for live streams ++ if(pkt.dts != (int64_t)AV_NOPTS_VALUE) ++ { ++ int64_t duration; ++ duration = pkt.dts; ++ if(stream->start_time != (int64_t)AV_NOPTS_VALUE) ++ duration -= stream->start_time; ++ ++ if(duration > stream->duration) ++ { ++ stream->duration = duration; ++ duration = m_dllAvUtil.av_rescale_rnd(stream->duration, stream->time_base.num * AV_TIME_BASE, stream->time_base.den, AV_ROUND_NEAR_INF); ++ if ((m_pFormatContext->duration == (int64_t)AV_NOPTS_VALUE && m_pFormatContext->file_size > 0) ++ || (m_pFormatContext->duration != (int64_t)AV_NOPTS_VALUE && duration > m_pFormatContext->duration)) ++ m_pFormatContext->duration = duration; ++ } ++ } ++ ++ // check if stream seem to have grown since start ++ if(m_pFormatContext->file_size > 0 && m_pFormatContext->pb) ++ { ++ if(m_pFormatContext->pb->pos > m_pFormatContext->file_size) ++ m_pFormatContext->file_size = m_pFormatContext->pb->pos; ++ } ++ ++ pPacket->iStreamId = pkt.stream_index; // XXX just for now ++ } ++ m_dllAvCodec.av_free_packet(&pkt); ++ } ++ } ++ Unlock(); ++ ++ if (bReturnEmpty && !pPacket) ++ pPacket = CDVDDemuxUtils::AllocateDemuxPacket(0); ++ ++ if (!pPacket) return NULL; ++ ++ // check streams, can we make this a bit more simple? ++ if (pPacket && pPacket->iStreamId >= 0 && pPacket->iStreamId <= MAX_STREAMS) ++ { ++ if (!m_streams[pPacket->iStreamId] || ++ m_streams[pPacket->iStreamId]->pPrivate != m_pFormatContext->streams[pPacket->iStreamId] || ++ m_streams[pPacket->iStreamId]->codec != m_pFormatContext->streams[pPacket->iStreamId]->codec->codec_id) ++ { ++ // content has changed, or stream did not yet exist ++ AddStream(pPacket->iStreamId); ++ } ++ // we already check for a valid m_streams[pPacket->iStreamId] above ++ else if (m_streams[pPacket->iStreamId]->type == STREAM_AUDIO) ++ { ++ if (((CDemuxStreamAudio*)m_streams[pPacket->iStreamId])->iChannels != m_pFormatContext->streams[pPacket->iStreamId]->codec->channels || ++ ((CDemuxStreamAudio*)m_streams[pPacket->iStreamId])->iSampleRate != m_pFormatContext->streams[pPacket->iStreamId]->codec->sample_rate) ++ { ++ // content has changed ++ AddStream(pPacket->iStreamId); ++ } ++ } ++ else if (m_streams[pPacket->iStreamId]->type == STREAM_VIDEO) ++ { ++ if (((CDemuxStreamVideo*)m_streams[pPacket->iStreamId])->iWidth != m_pFormatContext->streams[pPacket->iStreamId]->codec->width || ++ ((CDemuxStreamVideo*)m_streams[pPacket->iStreamId])->iHeight != m_pFormatContext->streams[pPacket->iStreamId]->codec->height) ++ { ++ // content has changed ++ AddStream(pPacket->iStreamId); ++ } ++ } ++ } ++ return pPacket; ++} ++ ++bool CDVDDemuxFFmpeg::SeekTime(int time, bool backwords, double *startpts) ++{ ++ g_demuxer = this; ++ ++ if(time < 0) ++ time = 0; ++ ++ if (m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD)) ++ { ++ CLog::Log(LOGDEBUG, "%s - seeking using navigator", __FUNCTION__); ++ if (!((CDVDInputStreamNavigator*)m_pInput)->SeekTime(time)) ++ return false; ++ ++ if(startpts) ++ *startpts = DVD_NOPTS_VALUE; ++ ++ Flush(); ++ return true; ++ } ++ ++#ifdef HAS_FILESYSTEM_MMS ++ if (m_pInput->IsStreamType(DVDSTREAM_TYPE_MMS)) ++ { ++ if (!((CDVDInputStreamMMS*)m_pInput)->SeekTime(time)) ++ return false; ++ ++ Flush(); ++ return true; ++ } ++#endif ++ ++ if (m_pInput->IsStreamType(DVDSTREAM_TYPE_RTMP)) ++ { ++ if (!((CDVDInputStreamRTMP*)m_pInput)->SeekTime(time)) ++ return false; ++ ++ Flush(); ++ return true; ++ } ++ ++ if(!m_pInput->Seek(0, SEEK_POSSIBLE) ++ && !m_pInput->IsStreamType(DVDSTREAM_TYPE_FFMPEG)) ++ { ++ CLog::Log(LOGDEBUG, "%s - input stream reports it is not seekable", __FUNCTION__); ++ return false; ++ } ++ ++ __int64 seek_pts = (__int64)time * (AV_TIME_BASE / 1000); ++ if (m_pFormatContext->start_time != (int64_t)AV_NOPTS_VALUE) ++ seek_pts += m_pFormatContext->start_time; ++ ++ Lock(); ++ int ret = m_dllAvFormat.av_seek_frame(m_pFormatContext, -1, seek_pts, backwords ? AVSEEK_FLAG_BACKWARD : 0); ++ ++ if(ret >= 0) ++ UpdateCurrentPTS(); ++ Unlock(); ++ ++ if(m_iCurrentPts == DVD_NOPTS_VALUE) ++ CLog::Log(LOGDEBUG, "%s - unknown position after seek", __FUNCTION__); ++ else ++ CLog::Log(LOGDEBUG, "%s - seek ended up on time %d", __FUNCTION__, (int)(m_iCurrentPts / DVD_TIME_BASE * 1000)); ++ ++ // in this case the start time is requested time ++ if(startpts) ++ *startpts = DVD_MSEC_TO_TIME(time); ++ ++ // demuxer will return failure, if you seek to eof ++ if (m_pInput->IsEOF() && ret <= 0) ++ return true; ++ ++ return (ret >= 0); ++} ++ ++bool CDVDDemuxFFmpeg::SeekByte(__int64 pos) ++{ ++ g_demuxer = this; ++ ++ Lock(); ++ int ret = m_dllAvFormat.av_seek_frame(m_pFormatContext, -1, pos, AVSEEK_FLAG_BYTE); ++ ++ if(ret >= 0) ++ UpdateCurrentPTS(); ++ ++ Unlock(); ++ return (ret >= 0); ++} ++ ++void CDVDDemuxFFmpeg::UpdateCurrentPTS() ++{ ++ m_iCurrentPts = DVD_NOPTS_VALUE; ++ for(unsigned int i = 0; i < m_pFormatContext->nb_streams; i++) ++ { ++ AVStream *stream = m_pFormatContext->streams[i]; ++ if(stream && stream->cur_dts != (int64_t)AV_NOPTS_VALUE) ++ { ++ double ts = ConvertTimestamp(stream->cur_dts, stream->time_base.den, stream->time_base.num); ++ if(m_iCurrentPts == DVD_NOPTS_VALUE || m_iCurrentPts > ts ) ++ m_iCurrentPts = ts; ++ } ++ } ++} ++ ++int CDVDDemuxFFmpeg::GetStreamLength() ++{ ++ if (!m_pFormatContext) ++ return 0; ++ ++ /* apperently ffmpeg messes up sometimes, so check for negative value too */ ++ if (m_pFormatContext->duration == (int64_t)AV_NOPTS_VALUE || m_pFormatContext->duration < 0LL) ++ { ++ // no duration is available for us ++ // try to calculate it ++ int iLength = 0; ++ if (m_iCurrentPts != DVD_NOPTS_VALUE && m_pFormatContext->file_size > 0 && m_pFormatContext->pb && m_pFormatContext->pb->pos > 0) ++ { ++ iLength = (int)(((m_iCurrentPts * m_pFormatContext->file_size) / m_pFormatContext->pb->pos) / 1000) & 0xFFFFFFFF; ++ } ++ return iLength; ++ } ++ ++ return (int)(m_pFormatContext->duration / (AV_TIME_BASE / 1000)); ++} ++ ++CDemuxStream* CDVDDemuxFFmpeg::GetStream(int iStreamId) ++{ ++ if (iStreamId < 0 || iStreamId >= MAX_STREAMS) return NULL; ++ return m_streams[iStreamId]; ++} ++ ++int CDVDDemuxFFmpeg::GetNrOfStreams() ++{ ++ int i = 0; ++ while (i < MAX_STREAMS && m_streams[i]) i++; ++ return i; ++} ++ ++void CDVDDemuxFFmpeg::AddStream(int iId) ++{ ++ AVStream* pStream = m_pFormatContext->streams[iId]; ++ if (pStream) ++ { ++ if (m_streams[iId]) ++ { ++ if( m_streams[iId]->ExtraData ) delete[] (BYTE*)(m_streams[iId]->ExtraData); ++ delete m_streams[iId]; ++ } ++ ++ switch (pStream->codec->codec_type) ++ { ++ case CODEC_TYPE_AUDIO: ++ { ++ CDemuxStreamAudioFFmpeg* st = new CDemuxStreamAudioFFmpeg(this, pStream); ++ m_streams[iId] = st; ++ st->iChannels = pStream->codec->channels; ++ st->iSampleRate = pStream->codec->sample_rate; ++ st->iBlockAlign = pStream->codec->block_align; ++ st->iBitRate = pStream->codec->bit_rate; ++ st->iBitsPerSample = pStream->codec->bits_per_coded_sample; ++ ++ if(m_bMatroska && m_dllAvFormat.av_metadata_get(pStream->metadata, "description", NULL, 0)) ++ st->m_description = m_dllAvFormat.av_metadata_get(pStream->metadata, "description", NULL, 0)->value; ++ ++ break; ++ } ++ case CODEC_TYPE_VIDEO: ++ { ++ CDemuxStreamVideoFFmpeg* st = new CDemuxStreamVideoFFmpeg(this, pStream); ++ m_streams[iId] = st; ++ if(strcmp(m_pFormatContext->iformat->name, "flv") == 0) ++ st->bVFR = true; ++ else ++ st->bVFR = false; ++ ++ if(pStream->r_frame_rate.den && pStream->r_frame_rate.num) ++ { ++ st->iFpsRate = pStream->r_frame_rate.num; ++ st->iFpsScale = pStream->r_frame_rate.den; ++ } ++ else ++ { ++ st->iFpsRate = 0; ++ st->iFpsScale = 0; ++ } ++ st->iWidth = pStream->codec->width; ++ st->iHeight = pStream->codec->height; ++ if (pStream->sample_aspect_ratio.num == 0) ++ st->fAspect = 0.0; ++ else ++ st->fAspect = av_q2d(pStream->sample_aspect_ratio) * pStream->codec->width / pStream->codec->height; ++ ++ break; ++ } ++ case CODEC_TYPE_DATA: ++ { ++ m_streams[iId] = new CDemuxStream(); ++ m_streams[iId]->type = STREAM_DATA; ++ break; ++ } ++ case CODEC_TYPE_SUBTITLE: ++ { ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,38,1) ++ if (pStream->codec->codec_id == CODEC_ID_DVB_TELETEXT && g_guiSettings.GetBool("videoplayer.teletextenabled")) ++ { ++ CDemuxStreamTeletext* st = new CDemuxStreamTeletext(); ++ m_streams[iId] = st; ++ m_streams[iId]->type = STREAM_TELETEXT; ++ break; ++ } ++ else ++#endif ++ { ++ CDemuxStreamSubtitleFFmpeg* st = new CDemuxStreamSubtitleFFmpeg(this, pStream); ++ m_streams[iId] = st; ++ if(pStream->codec) ++ st->identifier = pStream->codec->sub_id; ++ ++ if(m_bMatroska && m_dllAvFormat.av_metadata_get(pStream->metadata, "description", NULL, 0)) ++ st->m_description = m_dllAvFormat.av_metadata_get(pStream->metadata, "description", NULL, 0)->value; ++ ++ break; ++ } ++ } ++ case CODEC_TYPE_ATTACHMENT: ++ { //mkv attachments. Only bothering with fonts for now. ++ if(pStream->codec->codec_id == CODEC_ID_TTF) ++ { ++ std::string fileName = "special://temp/fonts/"; ++ XFILE::CDirectory::Create(fileName); ++ fileName += pStream->filename; ++ XFILE::CFile file; ++ if(pStream->codec->extradata && file.OpenForWrite(fileName)) ++ { ++ file.Write(pStream->codec->extradata, pStream->codec->extradata_size); ++ file.Close(); ++ } ++ } ++ m_streams[iId] = new CDemuxStream(); ++ m_streams[iId]->type = STREAM_NONE; ++ break; ++ } ++ default: ++ { ++ m_streams[iId] = new CDemuxStream(); ++ m_streams[iId]->type = STREAM_NONE; ++ break; ++ } ++ } ++ ++ // generic stuff ++ if (pStream->duration != (int64_t)AV_NOPTS_VALUE) m_streams[iId]->iDuration = (int)((pStream->duration / AV_TIME_BASE) & 0xFFFFFFFF); ++ ++ m_streams[iId]->codec = pStream->codec->codec_id; ++ m_streams[iId]->codec_fourcc = pStream->codec->codec_tag; ++ m_streams[iId]->iId = iId; ++ m_streams[iId]->source = STREAM_SOURCE_DEMUX; ++ m_streams[iId]->pPrivate = pStream; ++ ++ strcpy( m_streams[iId]->language, pStream->language ); ++ ++ if( pStream->codec->extradata && pStream->codec->extradata_size > 0 ) ++ { ++ m_streams[iId]->ExtraSize = pStream->codec->extradata_size; ++ m_streams[iId]->ExtraData = new BYTE[pStream->codec->extradata_size]; ++ memcpy(m_streams[iId]->ExtraData, pStream->codec->extradata, pStream->codec->extradata_size); ++ } ++ ++ //FFMPEG has an error doesn't set type properly for DTS ++ if( m_streams[iId]->codec == CODEC_ID_AC3 && (pStream->id >= 136 && pStream->id <= 143) ) ++ m_streams[iId]->codec = CODEC_ID_DTS; ++ ++ if( m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD) ) ++ { ++ // this stuff is really only valid for dvd's. ++ // this is so that the physicalid matches the ++ // id's reported from libdvdnav ++ switch(m_streams[iId]->codec) ++ { ++ case CODEC_ID_AC3: ++ m_streams[iId]->iPhysicalId = pStream->id - 128; ++ break; ++ case CODEC_ID_DTS: ++ m_streams[iId]->iPhysicalId = pStream->id - 136; ++ break; ++ case CODEC_ID_MP2: ++ m_streams[iId]->iPhysicalId = pStream->id - 448; ++ break; ++ case CODEC_ID_PCM_S16BE: ++ m_streams[iId]->iPhysicalId = pStream->id - 160; ++ break; ++ case CODEC_ID_DVD_SUBTITLE: ++ m_streams[iId]->iPhysicalId = pStream->id - 0x20; ++ break; ++ default: ++ m_streams[iId]->iPhysicalId = pStream->id & 0x1f; ++ break; ++ } ++ } ++ else ++ m_streams[iId]->iPhysicalId = pStream->id; ++ } ++} ++ ++std::string CDVDDemuxFFmpeg::GetFileName() ++{ ++ if(m_pInput && m_pInput) ++ return m_pInput->GetFileName(); ++ else ++ return ""; ++} ++ ++int CDVDDemuxFFmpeg::GetChapterCount() ++{ ++ if(m_pInput && m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD)) ++ return ((CDVDInputStreamNavigator*)m_pInput)->GetChapterCount(); ++ ++ if(m_pFormatContext == NULL) ++ return 0; ++ #if (LIBAVFORMAT_VERSION_MAJOR == 52) && (LIBAVFORMAT_VERSION_MINOR >= 14) ++ return m_pFormatContext->nb_chapters; ++ #else ++ return 0; ++ #endif ++} ++ ++int CDVDDemuxFFmpeg::GetChapter() ++{ ++ if(m_pInput && m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD)) ++ return ((CDVDInputStreamNavigator*)m_pInput)->GetChapter(); ++ ++ if(m_pFormatContext == NULL ++ || m_iCurrentPts == DVD_NOPTS_VALUE) ++ return 0; ++ ++ #if (LIBAVFORMAT_VERSION_MAJOR == 52) && (LIBAVFORMAT_VERSION_MINOR >= 14) ++ for(unsigned i = 0; i < m_pFormatContext->nb_chapters; i++) ++ { ++ AVChapter *chapter = m_pFormatContext->chapters[i]; ++ if(m_iCurrentPts >= ConvertTimestamp(chapter->start, chapter->time_base.den, chapter->time_base.num) ++ && m_iCurrentPts < ConvertTimestamp(chapter->end, chapter->time_base.den, chapter->time_base.num)) ++ return i + 1; ++ } ++ #endif ++ return 0; ++} ++ ++void CDVDDemuxFFmpeg::GetChapterName(std::string& strChapterName) ++{ ++ if(m_pInput && m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD)) ++ return; ++ else ++ { ++ #if (LIBAVFORMAT_VERSION_MAJOR == 52) && (LIBAVFORMAT_VERSION_MINOR >= 14) ++ int chapterIdx = GetChapter(); ++ if(chapterIdx > 0 && m_pFormatContext->chapters[chapterIdx-1]->title) ++ strChapterName = m_pFormatContext->chapters[chapterIdx-1]->title; ++ #endif ++ } ++} ++ ++bool CDVDDemuxFFmpeg::SeekChapter(int chapter, double* startpts) ++{ ++ if(chapter < 1) ++ chapter = 1; ++ ++ if(m_pInput && m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD)) ++ { ++ CLog::Log(LOGDEBUG, "%s - chapter seeking using navigator", __FUNCTION__); ++ if(!((CDVDInputStreamNavigator*)m_pInput)->SeekChapter(chapter)) ++ return false; ++ ++ if(startpts) ++ *startpts = DVD_NOPTS_VALUE; ++ ++ Flush(); ++ return true; ++ } ++ ++ if(m_pFormatContext == NULL) ++ return false; ++ ++ #if (LIBAVFORMAT_VERSION_MAJOR == 52) && (LIBAVFORMAT_VERSION_MINOR >= 14) ++ if(chapter < 1 || chapter > (int)m_pFormatContext->nb_chapters) ++ return false; ++ ++ AVChapter *ch = m_pFormatContext->chapters[chapter-1]; ++ double dts = ConvertTimestamp(ch->start, ch->time_base.den, ch->time_base.num); ++ return SeekTime(DVD_TIME_TO_MSEC(dts), false, startpts); ++ #else ++ return false; ++ #endif ++} ++ ++void CDVDDemuxFFmpeg::GetStreamCodecName(int iStreamId, CStdString &strName) ++{ ++ CDemuxStream *stream = GetStream(iStreamId); ++ if (stream) ++ { ++ unsigned int in = stream->codec_fourcc; ++ // FourCC codes are only valid on video streams, audio codecs in AVI/WAV ++ // are 2 bytes and audio codecs in transport streams have subtle variation ++ // e.g AC-3 instead of ac3 ++ if (stream->type == STREAM_VIDEO && in != 0) ++ { ++ char fourcc[5]; ++#if defined(__powerpc__) ++ fourcc[0] = in & 0xff; ++ fourcc[1] = (in >> 8) & 0xff; ++ fourcc[2] = (in >> 16) & 0xff; ++ fourcc[3] = (in >> 24) & 0xff; ++#else ++ memcpy(fourcc, &in, 4); ++#endif ++ fourcc[4] = 0; ++ // fourccs have to be 4 characters ++ if (strlen(fourcc) == 4) ++ { ++ strName = fourcc; ++ strName.MakeLower(); ++ return; ++ } ++ } ++ ++ if (m_dllAvCodec.IsLoaded()) ++ { ++ AVCodec *codec = m_dllAvCodec.avcodec_find_decoder(stream->codec); ++ if (codec) ++ strName = codec->name; ++ } ++ } ++} +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp 2010-02-08 18:53:24.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp 2010-02-09 07:32:53.966806838 +0100 +@@ -356,7 +356,7 @@ + if (m_messageQueue.ReceivedAbortRequest()) return DECODE_FLAG_ABORT; + + CDVDMsg* pMsg; +- int priority = (m_speed == DVD_PLAYSPEED_PAUSE) && m_started ? 1 : 0; ++ int priority = (m_speed == DVD_PLAYSPEED_PAUSE && m_started) ? 1 : 0; + + int timeout; + if(m_duration > 0) +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp 2010-02-08 18:53:24.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp 2010-02-09 07:33:01.060899554 +0100 +@@ -158,15 +158,9 @@ + { + + if (hint.fpsrate && hint.fpsscale) +- { + m_fFrameRate = (float)hint.fpsrate / hint.fpsscale; +- m_autosync = 10; +- } + else +- { + m_fFrameRate = 25; +- m_autosync = 1; // avoid using frame time as we don't know it accurate +- } + + //if adjust refreshrate is used, or if sync playback to display is on, + //we try to calculate the framerate from the pts', because the codec fps +@@ -182,15 +176,12 @@ + + m_iDroppedRequest = 0; + m_iLateFrames = 0; +- +- if (hint.vfr) +- m_autosync = 1; ++ m_autosync = 1; + + if( m_fFrameRate > 100 || m_fFrameRate < 5 ) + { + CLog::Log(LOGERROR, "CDVDPlayerVideo::OpenStream - Invalid framerate %d, using forced 25fps and just trust timestamps", (int)m_fFrameRate); + m_fFrameRate = 25; +- m_autosync = 1; // avoid using frame time as we don't know it accurate + } + + // use aspect in stream if available +@@ -570,13 +561,6 @@ + if(mDeinterlace.Process(&picture)) + mDeinterlace.GetPicture(&picture); + } +- else if( mInt == VS_INTERLACEMETHOD_RENDER_WEAVE +- || mInt == VS_INTERLACEMETHOD_RENDER_WEAVE_INVERTED ) +- { +- /* if we are syncing frames, dvdplayer will be forced to play at a given framerate */ +- /* unless we directly sync to the correct pts, we won't get a/v sync as video can never catch up */ +- picture.iFlags |= DVP_FLAG_NOAUTOSYNC; +- } + + /* if frame has a pts (usually originiating from demux packet), use that */ + if(picture.pts != DVD_NOPTS_VALUE) +@@ -1025,17 +1009,9 @@ + iFrameSleep = min(iFrameSleep, DVD_MSEC_TO_TIME(500)); + + if( m_stalled ) +- { // when we render a still, we can't sync to clock anyway + iSleepTime = iFrameSleep; +- } + else +- { +- // try to decide on how to sync framerate +- if( pPicture->iFlags & DVP_FLAG_NOAUTOSYNC ) +- iSleepTime = iClockSleep; +- else +- iSleepTime = iFrameSleep + (iClockSleep - iFrameSleep) / m_autosync; +- } ++ iSleepTime = iFrameSleep + (iClockSleep - iFrameSleep) / m_autosync; + + #ifdef PROFILE /* during profiling, try to play as fast as possible */ + iSleepTime = 0; +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleLineCollection.cpp xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleLineCollection.cpp +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleLineCollection.cpp 2010-01-14 06:15:47.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleLineCollection.cpp 2010-02-09 07:31:57.962897211 +0100 +@@ -58,6 +58,25 @@ + m_iSize++; + } + ++void CDVDSubtitleLineCollection::Sort() ++{ ++ if (!m_pHead || !m_pHead->pNext) ++ return; ++ ++ for (ListElement* p1 = m_pHead; p1->pNext->pNext != NULL; p1 = p1->pNext) ++ { ++ for (ListElement* p2 = p1->pNext; p2->pNext != NULL; p2 = p2->pNext) ++ { ++ if (p1->pOverlay->iPTSStartTime > p2->pOverlay->iPTSStartTime) ++ { ++ CDVDOverlay* temp = p1->pOverlay; ++ p1->pOverlay = p2->pOverlay; ++ p2->pOverlay = temp; ++ } ++ } ++ } ++} ++ + CDVDOverlay* CDVDSubtitleLineCollection::Get(double iPts) + { + CDVDOverlay* pOverlay = NULL; +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleLineCollection.h xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleLineCollection.h +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleLineCollection.h 2010-01-14 06:15:47.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleLineCollection.h 2010-02-09 07:31:57.962897211 +0100 +@@ -40,6 +40,7 @@ + //void Unlock() { LeaveCriticalSection(&m_critSection); } + + void Add(CDVDOverlay* pSubtitle); ++ void Sort(); + + CDVDOverlay* Get(double iPts = 0LL); // get the first overlay in this fifo + +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParserSami.cpp xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParserSami.cpp +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParserSami.cpp 2010-01-14 06:15:47.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParserSami.cpp 2010-02-09 07:31:57.963904804 +0100 +@@ -82,7 +82,7 @@ + if(pOverlay) + TagConv.ConvertLine(pOverlay, text, strlen(text)); + } +- ++ m_collection.Sort(); + return true; + } + +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParserSSA.cpp xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParserSSA.cpp +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParserSSA.cpp 2010-01-14 06:15:47.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParserSSA.cpp 2010-02-09 07:31:57.963904804 +0100 +@@ -64,6 +64,7 @@ + m_collection.Add(overlay); + } + } ++ m_collection.Sort(); + return true; + } + +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParserSubrip.cpp xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParserSubrip.cpp +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParserSubrip.cpp 2010-01-14 06:15:47.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParserSubrip.cpp 2010-02-09 07:31:57.964897381 +0100 +@@ -98,7 +98,7 @@ + } + } + } +- ++ m_collection.Sort(); + return true; + } + +diff -Naur xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDTSCorrection.cpp xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDTSCorrection.cpp +--- xbmc-pvr-27594.orig/xbmc/cores/dvdplayer/DVDTSCorrection.cpp 2010-01-14 06:16:15.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/cores/dvdplayer/DVDTSCorrection.cpp 2010-02-09 07:33:15.293899500 +0100 +@@ -77,6 +77,9 @@ + if (!CheckPattern(pattern)) + { + m_ptscorrection = 0.0; //no pattern no correction ++ m_pattern = pattern; //save the current pattern ++ m_patternpos = 0; //reset the position ++ + if (m_haspattern) + { + m_haspattern = false; +@@ -232,11 +235,7 @@ + { + //if no pattern was detected or if the size of the patterns differ we don't have a match + if (pattern.size() != m_pattern.size() || pattern.size() < 1 || (pattern.size() == 1 && pattern[0] <= MAXERR)) +- { +- m_pattern = pattern; //save the current pattern +- m_patternpos = 0; //reset the position + return false; +- } + + //the saved pattern should have moved 1 diff into the past + m_patternpos = (m_patternpos + 1) % m_pattern.size(); +@@ -247,15 +246,13 @@ + double diff = pattern[(m_patternpos + i) % pattern.size()]; + + if (!MatchDiff(diff, m_pattern[i])) +- { +- m_pattern = pattern; //save the current pattern +- m_patternpos = 0; //reset the position + return false; +- } +- //we save the pattern, in case it changes very slowly +- m_pattern[i] = diff; + } + ++ //we save the pattern, in case it changes very slowly ++ for (unsigned int i = 0; i < m_pattern.size(); i++) ++ m_pattern[i] = pattern[(m_patternpos + i) % pattern.size()]; ++ + return true; + } + +diff -Naur xbmc-pvr-27594.orig/xbmc/GUIWindowMusicBase.cpp xbmc-pvr-27594.patch/xbmc/GUIWindowMusicBase.cpp +--- xbmc-pvr-27594.orig/xbmc/GUIWindowMusicBase.cpp 2010-02-08 18:53:42.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/GUIWindowMusicBase.cpp 2010-02-09 07:32:42.283806859 +0100 +@@ -711,10 +711,7 @@ + FormatAndSort(items); + SetupFanart(items); + for (int i = 0; i < items.Size(); ++i) +- { +- m_musicdatabase.SetPropertiesForFileItem(*items[i]); + AddItemToPlayList(items[i], queuedItems); +- } + } + else + { +@@ -752,7 +749,9 @@ + CFileItemPtr itemCheck = queuedItems.Get(pItem->m_strPath); + if (!itemCheck || itemCheck->m_lStartOffset != pItem->m_lStartOffset) + { // add item +- queuedItems.Add(pItem); ++ CFileItemPtr item(new CFileItem(*pItem)); ++ m_musicdatabase.SetPropertiesForFileItem(*item); ++ queuedItems.Add(item); + } + } + } +diff -Naur xbmc-pvr-27594.orig/xbmc/utils/Makefile xbmc-pvr-27594.patch/xbmc/utils/Makefile +--- xbmc-pvr-27594.orig/xbmc/utils/Makefile 2010-02-08 18:53:42.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/utils/Makefile 2010-02-09 07:31:57.964897381 +0100 +@@ -73,7 +73,8 @@ + Semaphore.cpp \ + FileOperationJob.cpp \ + FileUtils.cpp \ +- Variant.cpp ++ Variant.cpp \ ++ PCMLimiter.cpp + + LIB=utils.a + +diff -Naur xbmc-pvr-27594.orig/xbmc/utils/PCMLimiter.cpp xbmc-pvr-27594.patch/xbmc/utils/PCMLimiter.cpp +--- xbmc-pvr-27594.orig/xbmc/utils/PCMLimiter.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/utils/PCMLimiter.cpp 2010-02-09 07:31:57.965897221 +0100 +@@ -0,0 +1,119 @@ ++/* ++ * Copyright (C) 2005-2008 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, write to ++ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ++ * http://www.gnu.org/copyleft/gpl.html ++ * ++ */ ++ ++//based on the fast lookahead limiter from http://plugin.org.uk/ ++ ++//original description: ++ ++/* ++This is a limiter with an attack time of 5ms. It adds just over 5ms of ++lantecy to the input signal, but it guatantees that there will be no signals ++over the limit, and tries to get the minimum ammount of distortion. ++*/ ++ ++#include "system.h" ++#include "MathUtils.h" ++#include "PCMLimiter.h" ++ ++CPCMLimiter::CPCMLimiter(int samplerate, int channels) ++{ ++ //delay buffer of 5 milliseconds ++ m_delaybuffsize = MathUtils::round_int((double)samplerate * DELAYTIME); ++ m_channels = channels; ++ m_samplerate = samplerate; //save samplerate as float so we don't cast every sample ++ m_release = 2.0; //default release time 2 seconds ++ ++ m_delaybuff = new float[m_delaybuffsize * m_channels]; ++ memset(m_delaybuff, 0, m_delaybuffsize * m_channels * sizeof(float)); ++ m_delaybuffpos = 0; ++ ++ m_chunknum = 0; ++ m_chunkpos = 0; ++ m_chunksize = m_delaybuffsize / 10; //chunk size of roughly 0.5 ms ++ memset(m_chunks, 0, sizeof(m_chunks)); ++ ++ m_peak = 0.0f; ++ m_atten = 1.0f; ++ m_attenlp = 1.0f; ++ m_delta = 0.0f; ++} ++ ++CPCMLimiter::~CPCMLimiter() ++{ ++ delete [] m_delaybuff; ++} ++ ++void CPCMLimiter::Run(float* insamples, float* outsamples, int frames) ++{ ++ float* inptr = insamples; ++ float* outptr = outsamples; ++ float* delayptr; ++ ++ for (int i = 0; i < frames; i++) ++ { ++ if (m_chunkpos++ == m_chunksize) ++ { //we have a full chunk, apparently the attenuation is calculated here ++ //I'm not completely sure what this does, it seems to base the attenuation on the rate of change ++ m_delta = (1.0f - m_atten) / (m_samplerate / m_release); ++ for (int j = 0; j < 10; j++) ++ { ++ int p = (m_chunknum - 9 + j) & (CHUNKS - 1); ++ float thisdelta = (1.0f / m_chunks[p] - m_atten) / ((float)(j + 1) * m_samplerate * (DELAYTIME / 10.0f) + 1.0f); ++ if (thisdelta < m_delta) ++ m_delta = thisdelta; ++ } ++ m_chunks[m_chunknum++ & (CHUNKS - 1)] = m_peak; ++ m_peak = 0.0f; ++ m_chunkpos = 0; ++ } ++ ++ delayptr = m_delaybuff + m_delaybuffpos * m_channels; ++ ++ for (int j = 0; j < m_channels; j++) ++ { ++ //store input at the beginning of the delay buffer ++ delayptr[j] = *inptr++; ++ ++ //get the maximum absolute value of all the channels ++ if (fabs(delayptr[j]) > m_peak) ++ m_peak = fabs(delayptr[j]); ++ } ++ ++ //calculate attenuation ++ m_atten += m_delta; ++ m_attenlp = m_atten * 0.1f + m_attenlp * 0.9f; ++ ++ //not sure what this is for ++ if (m_delta > 0.0f && m_atten > 1.0f) ++ { ++ m_atten = 1.0f; ++ m_delta = 0.0; ++ } ++ ++ //increase delaybuffer position ++ m_delaybuffpos = (m_delaybuffpos + 1) % m_delaybuffsize; ++ ++ //write from the end of the delay buffer to the output with attenuation ++ for (int j = 0; j < m_channels; j++) ++ *outptr++ = delayptr[j] * m_attenlp; ++ } ++} ++ +diff -Naur xbmc-pvr-27594.orig/xbmc/utils/PCMLimiter.h xbmc-pvr-27594.patch/xbmc/utils/PCMLimiter.h +--- xbmc-pvr-27594.orig/xbmc/utils/PCMLimiter.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/utils/PCMLimiter.h 2010-02-09 07:31:57.966906769 +0100 +@@ -0,0 +1,53 @@ ++#pragma once ++/* ++ * Copyright (C) 2005-2008 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, write to ++ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ++ * http://www.gnu.org/copyleft/gpl.html ++ * ++ */ ++ ++#define CHUNKS 16 ++#define DELAYTIME 0.005f ++ ++class CPCMLimiter ++{ ++ public: ++ CPCMLimiter(int samplerate, int channels); ++ ~CPCMLimiter(); ++ ++ void Run(float* insamples, float* outsamples, int frames); ++ void SetRelease(float release) { m_release = release; } ++ double GetDelay() { return DELAYTIME; } ++ ++ private: ++ float* m_delaybuff; ++ int m_delaybuffsize; //buffer size in frames ++ int m_delaybuffpos; //m_delaybuff is used as a ringbuffer ++ float m_samplerate; ++ int m_channels; ++ float m_release; //release time in seconds ++ ++ int m_chunknum; ++ int m_chunkpos; ++ int m_chunksize; ++ float m_chunks[CHUNKS]; ++ ++ float m_peak; ++ float m_atten; ++ float m_attenlp; ++ float m_delta; ++}; +diff -Naur xbmc-pvr-27594.orig/xbmc/utils/PCMRemap.cpp xbmc-pvr-27594.patch/xbmc/utils/PCMRemap.cpp +--- xbmc-pvr-27594.orig/xbmc/utils/PCMRemap.cpp 2010-02-08 18:53:42.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/utils/PCMRemap.cpp 2010-02-09 07:32:57.658786358 +0100 +@@ -48,42 +48,6 @@ + /* 7.1 */ {PCM_FRONT_LEFT, PCM_FRONT_RIGHT, PCM_FRONT_CENTER, PCM_SIDE_LEFT, PCM_SIDE_RIGHT, PCM_BACK_LEFT, PCM_BACK_RIGHT, PCM_LOW_FREQUENCY, PCM_INVALID} + }; + +-static const char* PCMChannelName[PCM_MAX_CH] = +-{ +- "FL", +- "FR", +- "CE", +- "LFE", +- "BL", +- "BR", +- "FLOC", +- "FROC", +- "BC", +- "SL", +- "SR", +- "TFL", +- "TFR", +- "TFC", +- "TC", +- "TBL", +- "TBR", +- "TBC", +-}; +- +-static const char* PCMLayoutName[PCM_MAX_LAYOUT] = +-{ +- "2.0", +- "2.1", +- "3.0", +- "3.1", +- "4.0", +- "4.1", +- "5.0", +- "5.1", +- "7.0", +- "7.1" +-}; +- + /* + map missing output into channel @ volume level + the order of this table is important, mix tables can not depend on channels that have not been defined yet +@@ -269,6 +233,8 @@ + if (!m_inSet || !m_outSet) return; + + unsigned int in_ch, out_ch; ++ bool hasSide = false; ++ bool hasBack = false; + + m_inStride = m_inSampleSize * m_inChannels ; + m_outStride = m_inSampleSize * m_outChannels; +@@ -285,6 +251,32 @@ + } + } + ++ /* see if our input has side/back channels */ ++ for(in_ch = 0; in_ch < m_inChannels; ++in_ch) ++ switch(m_inMap[in_ch]) ++ { ++ case PCM_SIDE_LEFT: ++ case PCM_SIDE_RIGHT: ++ hasSide = true; ++ break; ++ ++ case PCM_BACK_LEFT: ++ case PCM_BACK_RIGHT: ++ hasBack = true; ++ break; ++ ++ default:; ++ } ++ ++ /* if our input has side, and not back channels, and our output doesnt have side channels */ ++ if (hasSide && !hasBack && (!m_useable[PCM_SIDE_LEFT] || !m_useable[PCM_SIDE_RIGHT])) ++ { ++ CLog::Log(LOGDEBUG, "CPCMRemap: Forcing side channel map to back channels"); ++ for(in_ch = 0; in_ch < m_inChannels; ++in_ch) ++ if (m_inMap[in_ch] == PCM_SIDE_LEFT ) m_inMap[in_ch] = PCM_BACK_LEFT; ++ else if (m_inMap[in_ch] == PCM_SIDE_RIGHT) m_inMap[in_ch] = PCM_BACK_RIGHT; ++ } ++ + /* see if we need to normalize the levels */ + bool dontnormalize = g_guiSettings.GetBool("audiooutput.dontnormalizelevels"); + CLog::Log(LOGDEBUG, "CPCMRemap: Downmix normalization is %s", (dontnormalize ? "disabled" : "enabled")); +@@ -313,6 +305,9 @@ + } + + /* convert the levels into RMS values */ ++ float loudest = 0.0; ++ bool hasLoudest = false; ++ + for(out_ch = 0; out_ch < m_outChannels; ++out_ch) + { + float scale = 0; +@@ -333,19 +328,33 @@ + /* normalize the levels if it is turned on */ + if (!dontnormalize) + for(dst = m_lookupMap[m_outMap[out_ch]]; dst->channel != PCM_INVALID; ++dst) ++ { + dst->level /= scale; ++ /* find the loudest output level we have that is not 1-1 */ ++ if (dst->level < 1.0 && loudest < dst->level) ++ { ++ loudest = dst->level; ++ hasLoudest = true; ++ } ++ } + } + +- /* output the final map for debugging */ ++ /* adjust the channels that are too loud */ + for(out_ch = 0; out_ch < m_outChannels; ++out_ch) + { + CStdString s = "", f; + for(dst = m_lookupMap[m_outMap[out_ch]]; dst->channel != PCM_INVALID; ++dst) + { +- f.Format("%s(%f%s) ", PCMChannelName[dst->channel], dst->level, dst->copy ? "*" : ""); ++ if (hasLoudest && dst->copy) ++ { ++ dst->level = loudest; ++ dst->copy = false; ++ } ++ ++ f.Format("%s(%f%s) ", PCMChannelStr(dst->channel).c_str(), dst->level, dst->copy ? "*" : ""); + s += f; + } +- CLog::Log(LOGDEBUG, "CPCMRemap: %s = %s\n", PCMChannelName[m_outMap[out_ch]], s.c_str()); ++ CLog::Log(LOGDEBUG, "CPCMRemap: %s = %s\n", PCMChannelStr(m_outMap[out_ch]).c_str(), s.c_str()); + } + } + +@@ -357,17 +366,15 @@ + return; + } + +- CStdString mapping = ""; ++ CStdString mapping; + for(unsigned int i = 0; i < channels; ++i) +- mapping += ((i == 0) ? "" : ",") + (CStdString)PCMChannelName[channelMap[i]]; ++ mapping += ((i == 0) ? "" : ",") + PCMChannelStr(channelMap[i]); + + CLog::Log(LOGINFO, "CPCMRemap: %s channel map: %s\n", info.c_str(), mapping.c_str()); + } + + void CPCMRemap::Reset() + { +- m_inMap = NULL; +- m_outMap = NULL; + m_inSet = false; + m_outSet = false; + Dispose(); +@@ -377,9 +384,10 @@ + enum PCMChannels *CPCMRemap::SetInputFormat(unsigned int channels, enum PCMChannels *channelMap, unsigned int sampleSize) + { + m_inChannels = channels; +- m_inMap = channelMap; + m_inSampleSize = sampleSize; + m_inSet = channelMap != NULL; ++ if (channelMap) ++ memcpy(m_inMap, channelMap, sizeof(enum PCMChannels) * channels); + + /* fix me later */ + assert(sampleSize == 2); +@@ -388,7 +396,7 @@ + m_channelLayout = (enum PCMLayout)g_guiSettings.GetInt("audiooutput.channellayout"); + if (m_channelLayout >= PCM_MAX_LAYOUT) m_channelLayout = PCM_LAYOUT_2_0; + +- CLog::Log(LOGINFO, "CPCMRemap: Channel Layout: %s\n", PCMLayoutName[m_channelLayout]); ++ CLog::Log(LOGINFO, "CPCMRemap: Channel Layout: %s\n", PCMLayoutStr(m_channelLayout).c_str()); + m_layoutMap = PCMLayoutMap[m_channelLayout]; + + DumpMap("I", channels, channelMap); +@@ -401,8 +409,9 @@ + void CPCMRemap::SetOutputFormat(unsigned int channels, enum PCMChannels *channelMap) + { + m_outChannels = channels; +- m_outMap = channelMap; + m_outSet = channelMap != NULL; ++ if (channelMap) ++ memcpy(m_outMap, channelMap, sizeof(enum PCMChannels) * channels); + + DumpMap("O", channels, channelMap); + BuildMap(); +@@ -484,3 +493,79 @@ + return frames * m_inSampleSize * m_inChannels; + } + ++CStdString CPCMRemap::PCMChannelStr(enum PCMChannels ename) ++{ ++ static const char* PCMChannelName[] = ++ { ++ "FL", ++ "FR", ++ "CE", ++ "LFE", ++ "BL", ++ "BR", ++ "FLOC", ++ "FROC", ++ "BC", ++ "SL", ++ "SR", ++ "TFL", ++ "TFR", ++ "TFC", ++ "TC", ++ "TBL", ++ "TBR", ++ "TBC", ++ }; ++ ++ int namepos = (int)ename; ++ CStdString namestr; ++ ++ if (namepos < 0 || namepos >= (int)(sizeof(PCMChannelName) / sizeof(const char*))) ++ { ++ namestr.Format("UNKNOWN CHANNEL:%i", namepos); ++ } ++ else ++ { ++ if (PCMChannelName[namepos]) ++ namestr = PCMChannelName[namepos]; ++ else ++ namestr.Format("CHANNEL %i IS NULL", namepos); ++ } ++ ++ return namestr; ++} ++ ++CStdString CPCMRemap::PCMLayoutStr(enum PCMLayout ename) ++{ ++ static const char* PCMLayoutName[] = ++ { ++ "2.0", ++ "2.1", ++ "3.0", ++ "3.1", ++ "4.0", ++ "4.1", ++ "5.0", ++ "5.1", ++ "7.0", ++ "7.1" ++ }; ++ ++ int namepos = (int)ename; ++ CStdString namestr; ++ ++ if (namepos < 0 || namepos >= (int)(sizeof(PCMLayoutName) / sizeof(const char*))) ++ { ++ namestr.Format("UNKNOWN LAYOUT:%i", namepos); ++ } ++ else ++ { ++ if (PCMLayoutName[namepos]) ++ namestr = PCMLayoutName[namepos]; ++ else ++ namestr.Format("LAYOUT %i IS NULL", namepos); ++ } ++ ++ return namestr; ++} ++ +diff -Naur xbmc-pvr-27594.orig/xbmc/utils/PCMRemap.h xbmc-pvr-27594.patch/xbmc/utils/PCMRemap.h +--- xbmc-pvr-27594.orig/xbmc/utils/PCMRemap.h 2010-02-08 18:53:42.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/utils/PCMRemap.h 2010-02-09 07:32:57.656929012 +0100 +@@ -81,7 +81,9 @@ + enum PCMLayout m_channelLayout; + unsigned int m_inChannels, m_outChannels; + unsigned int m_inSampleSize; +- enum PCMChannels *m_inMap, *m_outMap, *m_layoutMap; ++ enum PCMChannels m_inMap [PCM_MAX_CH]; ++ enum PCMChannels m_outMap[PCM_MAX_CH]; ++ enum PCMChannels *m_layoutMap; + + bool m_useable [PCM_MAX_CH]; + int m_inStride, m_outStride; +@@ -91,6 +93,8 @@ + void BuildMap(); + void DumpMap(CStdString info, int unsigned channels, enum PCMChannels *channelMap); + void Dispose(); ++ CStdString PCMChannelStr(enum PCMChannels ename); ++ CStdString PCMLayoutStr(enum PCMLayout ename); + public: + + CPCMRemap(); +diff -Naur xbmc-pvr-27594.orig/xbmc/utils/RingBuffer.cpp xbmc-pvr-27594.patch/xbmc/utils/RingBuffer.cpp +--- xbmc-pvr-27594.orig/xbmc/utils/RingBuffer.cpp 2010-02-08 18:53:42.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/utils/RingBuffer.cpp 2010-02-09 07:32:34.316928213 +0100 +@@ -20,6 +20,8 @@ + */ + + #include "RingBuffer.h" ++#include "SingleLock.h" ++ + #include + #include + #include +@@ -27,7 +29,6 @@ + /* Constructor */ + CRingBuffer::CRingBuffer() + { +- InitializeCriticalSection(&m_critSection); + m_buffer = NULL; + m_size = 0; + m_readPtr = 0; +@@ -39,28 +40,25 @@ + CRingBuffer::~CRingBuffer() + { + Destroy(); +- DeleteCriticalSection(&m_critSection); + } + + /* Create a ring buffer with the specified 'size' */ + bool CRingBuffer::Create(unsigned int size) + { +- EnterCriticalSection(&m_critSection); ++ CSingleLock lock(m_critSection); + m_buffer = (char*)malloc(size); + if (m_buffer != NULL) + { + m_size = size; +- LeaveCriticalSection(&m_critSection); + return true; + } +- LeaveCriticalSection(&m_critSection); + return false; + } + + /* Free the ring buffer and set all values to NULL or 0 */ + void CRingBuffer::Destroy() + { +- EnterCriticalSection(&m_critSection); ++ CSingleLock lock(m_critSection); + if (m_buffer != NULL) + { + free(m_buffer); +@@ -70,17 +68,15 @@ + m_readPtr = 0; + m_writePtr = 0; + m_fillCount = 0; +- LeaveCriticalSection(&m_critSection); + } + + /* Clear the ring buffer */ + void CRingBuffer::Clear() + { +- EnterCriticalSection(&m_critSection); ++ CSingleLock lock(m_critSection); + m_readPtr = 0; + m_writePtr = 0; + m_fillCount = 0; +- LeaveCriticalSection(&m_critSection); + } + + /* Read in data from the ring buffer to the supplied buffer 'buf'. The amount +@@ -88,10 +84,9 @@ + */ + bool CRingBuffer::ReadData(char *buf, unsigned int size) + { +- EnterCriticalSection(&m_critSection); ++ CSingleLock lock(m_critSection); + if (size > m_fillCount) + { +- LeaveCriticalSection(&m_critSection); + return false; + } + if (size + m_readPtr > m_size) +@@ -109,7 +104,6 @@ + if (m_readPtr == m_size) + m_readPtr = 0; + m_fillCount -= size; +- LeaveCriticalSection(&m_critSection); + return true; + } + +@@ -118,7 +112,7 @@ + */ + bool CRingBuffer::ReadData(CRingBuffer &rBuf, unsigned int size) + { +- EnterCriticalSection(&m_critSection); ++ CSingleLock lock(m_critSection); + if (rBuf.getBuffer() == NULL) + rBuf.Create(size); + +@@ -133,7 +127,6 @@ + SkipBytes(size); + } + +- LeaveCriticalSection(&m_critSection); + return bOk; + } + +@@ -142,10 +135,9 @@ + */ + bool CRingBuffer::WriteData(char *buf, unsigned int size) + { +- EnterCriticalSection(&m_critSection); ++ CSingleLock lock(m_critSection); + if (size > m_size - m_fillCount) + { +- LeaveCriticalSection(&m_critSection); + return false; + } + if (size + m_writePtr > m_size) +@@ -163,7 +155,6 @@ + if (m_writePtr == m_size) + m_writePtr = 0; + m_fillCount += size; +- LeaveCriticalSection(&m_critSection); + return true; + } + +@@ -172,7 +163,7 @@ + */ + bool CRingBuffer::WriteData(CRingBuffer &rBuf, unsigned int size) + { +- EnterCriticalSection(&m_critSection); ++ CSingleLock lock(m_critSection); + if (m_buffer == NULL) + Create(size); + +@@ -186,24 +177,21 @@ + bOk = WriteData(&rBuf.getBuffer()[0], size - chunksize); + } + +- LeaveCriticalSection(&m_critSection); + return bOk; + } + + /* Skip bytes in buffer to be read */ + bool CRingBuffer::SkipBytes(int skipSize) + { +- EnterCriticalSection(&m_critSection); ++ CSingleLock lock(m_critSection); + if (skipSize < 0) + { +- LeaveCriticalSection(&m_critSection); + return false; // skipping backwards is not supported + } + + unsigned int size = skipSize; + if (size > m_fillCount) + { +- LeaveCriticalSection(&m_critSection); + return false; + } + if (size + m_readPtr > m_size) +@@ -218,7 +206,6 @@ + if (m_readPtr == m_size) + m_readPtr = 0; + m_fillCount -= size; +- LeaveCriticalSection(&m_critSection); + return true; + } + +@@ -243,6 +230,7 @@ + + unsigned int CRingBuffer::getSize() + { ++ CSingleLock lock(m_critSection); + return m_size; + } + +@@ -253,15 +241,18 @@ + + unsigned int CRingBuffer::getWritePtr() + { ++ CSingleLock lock(m_critSection); + return m_writePtr; + } + + unsigned int CRingBuffer::getMaxReadSize() + { ++ CSingleLock lock(m_critSection); + return m_fillCount; + } + + unsigned int CRingBuffer::getMaxWriteSize() + { ++ CSingleLock lock(m_critSection); + return m_size - m_fillCount; + } +diff -Naur xbmc-pvr-27594.orig/xbmc/utils/RingBuffer.h xbmc-pvr-27594.patch/xbmc/utils/RingBuffer.h +--- xbmc-pvr-27594.orig/xbmc/utils/RingBuffer.h 2010-01-24 11:50:44.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/utils/RingBuffer.h 2010-02-09 07:32:34.316928213 +0100 +@@ -24,7 +24,7 @@ + + class CRingBuffer + { +- CRITICAL_SECTION m_critSection; ++ CCriticalSection m_critSection; + char *m_buffer; + unsigned int m_size; + unsigned int m_readPtr; +diff -Naur xbmc-pvr-27594.orig/xbmc/VideoDatabase.cpp xbmc-pvr-27594.patch/xbmc/VideoDatabase.cpp +--- xbmc-pvr-27594.orig/xbmc/VideoDatabase.cpp 2010-02-08 18:53:42.000000000 +0100 ++++ xbmc-pvr-27594.patch/xbmc/VideoDatabase.cpp 2010-02-09 07:31:57.984772386 +0100 +@@ -7035,7 +7035,7 @@ + CStdString strFanart; + CUtil::ReplaceExtension(item.GetTBNFile(), "-fanart.jpg", strFanart); + +- if (CFile::Exists(item.GetCachedFanart(), false) && (overwrite || !CFile::Exists(strFanart), false)) ++ if (CFile::Exists(item.GetCachedFanart(), false) && (overwrite || !CFile::Exists(strFanart, false))) + if (!CFile::Cache(item.GetCachedFanart(),strFanart)) + CLog::Log(LOGERROR, "%s: Movie fanart export failed! ('%s' -> '%s')", __FUNCTION__, item.GetCachedFanart().c_str(), strFanart.c_str()); + diff --git a/packages/mediacenter/xbmc-pvr/url b/packages/mediacenter/xbmc-pvr/url index c494450796..9a1b00723e 100644 --- a/packages/mediacenter/xbmc-pvr/url +++ b/packages/mediacenter/xbmc-pvr/url @@ -1 +1 @@ -http://sources.openelec.tv/svn/xbmc-pvr-27135.tar.bz2 +http://sources.openelec.tv/svn/xbmc-pvr-27594.tar.bz2