diff options
106 files changed, 992 insertions, 949 deletions
diff --git a/.gitignore b/.gitignore index 41c452011c..53ca56c1f0 100644 --- a/.gitignore +++ b/.gitignore @@ -412,27 +412,7 @@ lib/cpluff/stamp-h1 /system/cdrip/vorbisenc.dll # /system/players/dvdplayer -/system/players/dvdplayer/avcodec-55.dll -/system/players/dvdplayer/avfilter-4.dll -/system/players/dvdplayer/avformat-55.dll -/system/players/dvdplayer/avutil-52.dll -/system/players/dvdplayer/freetype6.dll -/system/players/dvdplayer/libass.dll -/system/players/dvdplayer/libdvdcss-2.dll -/system/players/dvdplayer/libdvdnav.dll -/system/players/dvdplayer/libexpat-1.dll -/system/players/dvdplayer/libfontconfig-1.dll -/system/players/dvdplayer/libgmp-10.dll -/system/players/dvdplayer/libgnutls-28.dll -/system/players/dvdplayer/libhogweed-2-5.dll -/system/players/dvdplayer/libnettle-4-7.dll -/system/players/dvdplayer/libp11-kit-0.dll -/system/players/dvdplayer/librtmp.dll -/system/players/dvdplayer/postproc-52.dll -/system/players/dvdplayer/swresample-0.dll -/system/players/dvdplayer/swscale-2.dll -/system/players/dvdplayer/libbluray.dll -/system/players/dvdplayer/libmpeg2-0.dll +/system/players/dvdplayer/* # /system/players/paplayer /system/players/paplayer/libmodplug.dll diff --git a/.gitmodules b/.gitmodules index a92044bef7..c1fe5780e3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,3 @@ -[submodule "touched"] - path = addons/skin.touched - url = git://github.com/xbmc/skin.touched.git - ignore = all +[submodule "addons/skin.re-touched"] + path = addons/skin.re-touched + url = git://github.com/xbmc/skin.re-touched.git diff --git a/Makefile.in b/Makefile.in index 75d79a65dd..bda532b726 100644 --- a/Makefile.in +++ b/Makefile.in @@ -258,9 +258,9 @@ LIBADDON_DIRS=\ CONFLUENCE_MEDIA=addons/skin.confluence/media SKIN_DIRS=$(CONFLUENCE_MEDIA) -ifeq (@USE_SKIN_TOUCHED@,1) -TOUCHED_MEDIA=addons/skin.touched/media -SKIN_DIRS+=$(TOUCHED_MEDIA) +ifeq (@USE_TOUCH_SKIN@,1) +TOUCH_SKIN_MEDIA=addons/skin.re-touched/media +SKIN_DIRS+=$(TOUCH_SKIN_MEDIA) endif LIBS=@LIBS@ @@ -353,8 +353,8 @@ config.status: configure ifeq (@USE_TEXTUREPACKER@,1) skins: tools/TexturePacker/TexturePacker force $(MAKE) -C $(CONFLUENCE_MEDIA) -ifeq (@USE_SKIN_TOUCHED@,1) - $(MAKE) -C $(TOUCHED_MEDIA) +ifeq (@USE_TOUCH_SKIN@,1) + $(MAKE) -C $(TOUCH_SKIN_MEDIA) endif else skins: diff --git a/addons/skin.confluence/720p/DialogPVRChannelsOSD.xml b/addons/skin.confluence/720p/DialogPVRChannelsOSD.xml index e21eda5968..3064605068 100644 --- a/addons/skin.confluence/720p/DialogPVRChannelsOSD.xml +++ b/addons/skin.confluence/720p/DialogPVRChannelsOSD.xml @@ -114,7 +114,7 @@ <aligny>center</aligny> <textcolor>grey</textcolor> <selectedcolor>grey</selectedcolor> - <info>ListItem.ChannelNumber</info> + <info>ListItem.ChannelNumberLabel</info> </control> <control type="image"> <left>5</left> @@ -234,7 +234,7 @@ <aligny>center</aligny> <textcolor>grey</textcolor> <selectedcolor>grey</selectedcolor> - <info>ListItem.ChannelNumber</info> + <info>ListItem.ChannelNumberLabel</info> </control> <control type="image"> <left>5</left> diff --git a/addons/skin.confluence/720p/DialogPVRGroupManager.xml b/addons/skin.confluence/720p/DialogPVRGroupManager.xml index 5ff1bba3bd..46b1c33e44 100644 --- a/addons/skin.confluence/720p/DialogPVRGroupManager.xml +++ b/addons/skin.confluence/720p/DialogPVRGroupManager.xml @@ -226,7 +226,7 @@ <aligny>center</aligny> <textcolor>grey2</textcolor> <selectedcolor>selected</selectedcolor> - <label>$INFO[ListItem.ChannelNumber,(,) - ]$INFO[ListItem.ChannelName]</label> + <label>$INFO[ListItem.ChannelNumberLabel,(,) - ]$INFO[ListItem.ChannelName]</label> </control> </itemlayout> <focusedlayout height="45"> @@ -264,7 +264,7 @@ <aligny>center</aligny> <textcolor>white</textcolor> <selectedcolor>selected</selectedcolor> - <label>$INFO[ListItem.ChannelNumber,(,) - ]$INFO[ListItem.ChannelName]</label> + <label>$INFO[ListItem.ChannelNumberLabel,(,) - ]$INFO[ListItem.ChannelName]</label> </control> </focusedlayout> </control> @@ -345,7 +345,7 @@ <aligny>center</aligny> <textcolor>grey2</textcolor> <selectedcolor>selected</selectedcolor> - <label>$INFO[ListItem.ChannelNumber,(,) - ]$INFO[ListItem.ChannelName]</label> + <label>$INFO[ListItem.ChannelNumberLabel,(,) - ]$INFO[ListItem.ChannelName]</label> </control> </itemlayout> <focusedlayout height="45"> @@ -383,7 +383,7 @@ <aligny>center</aligny> <textcolor>white</textcolor> <selectedcolor>selected</selectedcolor> - <label>$INFO[ListItem.ChannelNumber,(,) - ]$INFO[ListItem.ChannelName]</label> + <label>$INFO[ListItem.ChannelNumberLabel,(,) - ]$INFO[ListItem.ChannelName]</label> </control> </focusedlayout> </control> diff --git a/addons/skin.confluence/720p/VideoFullScreen.xml b/addons/skin.confluence/720p/VideoFullScreen.xml index a7c85c9805..896c6f5d9a 100644 --- a/addons/skin.confluence/720p/VideoFullScreen.xml +++ b/addons/skin.confluence/720p/VideoFullScreen.xml @@ -173,7 +173,7 @@ <height>25</height> <align>left</align> <font>font12</font> - <label>$INFO[VideoPlayer.ChannelName]$INFO[VideoPlayer.ChannelNumber, - ([COLOR=blue],[/COLOR])]</label> + <label>$INFO[VideoPlayer.ChannelName]$INFO[VideoPlayer.ChannelNumberLabel, - ([COLOR=blue],[/COLOR])]</label> <textcolor>grey2</textcolor> <shadowcolor>black</shadowcolor> <visible>VideoPlayer.Content(LiveTV)</visible> diff --git a/addons/skin.confluence/720p/ViewsPVRGuide.xml b/addons/skin.confluence/720p/ViewsPVRGuide.xml index dda4f819fe..2d266e4c14 100644 --- a/addons/skin.confluence/720p/ViewsPVRGuide.xml +++ b/addons/skin.confluence/720p/ViewsPVRGuide.xml @@ -64,7 +64,7 @@ <aligny>center</aligny> <textcolor>grey</textcolor> <selectedcolor>grey</selectedcolor> - <info>ListItem.ChannelNumber</info> + <info>ListItem.ChannelNumberLabel</info> </control> <control type="image"> <left>45</left> @@ -115,7 +115,7 @@ <aligny>center</aligny> <textcolor>grey</textcolor> <selectedcolor>grey</selectedcolor> - <info>ListItem.ChannelNumber</info> + <info>ListItem.ChannelNumberLabel</info> </control> <control type="image"> <left>45</left> diff --git a/addons/skin.confluence/720p/includes.xml b/addons/skin.confluence/720p/includes.xml index 4dabb76464..4948a3c503 100644 --- a/addons/skin.confluence/720p/includes.xml +++ b/addons/skin.confluence/720p/includes.xml @@ -324,7 +324,7 @@ <top>30r</top> <width>700</width> <height>20</height> - <label>$INFO[VideoPlayer.ChannelName]$INFO[VideoPlayer.ChannelNumber, - ([COLOR=blue],[/COLOR])]</label> + <label>$INFO[VideoPlayer.ChannelName]$INFO[VideoPlayer.ChannelNumberLabel, - ([COLOR=blue],[/COLOR])]</label> <align>left</align> <aligny>center</aligny> <font>font12</font> diff --git a/addons/skin.re-touched b/addons/skin.re-touched new file mode 160000 +Subproject 1c4d55a3a701a37e5ebce44033e930bffd1b84b diff --git a/addons/skin.touched b/addons/skin.touched deleted file mode 160000 -Subproject 0e390a398490c41a4969cad597bee32dc8f7e87 diff --git a/configure.in b/configure.in index 7acb37af9b..490b12be36 100644 --- a/configure.in +++ b/configure.in @@ -1419,14 +1419,14 @@ else DISABLE_PROJECTM=0 fi -# skin touched -use_skin_touched=no -if [[ -f "addons/skin.touched/addon.xml" ]]; then - use_skin_touched=yes - USE_SKIN_TOUCHED=1 - AC_DEFINE([HAS_SKIN_TOUCHED], [1], [Whether to build skin touched.]) +# touch skin +use_touch_skin=no +if [[ -f "addons/skin.re-touched/addon.xml" ]]; then + use_touch_skin=yes + USE_TOUCH_SKIN=1 + AC_DEFINE([HAS_TOUCH_SKIN], [1], [Whether to build the touch skin.]) else - USE_SKIN_TOUCHED=0 + USE_TOUCH_SKIN=0 fi # libssh @@ -1659,13 +1659,13 @@ else fi # FFmpeg -FFMPEG_LIBNAMES="libavcodec >= 55.69.100 - libavfilter >= 4.11.100 - libavformat >= 55.48.100 - libavutil >= 52.92.100 - libpostproc >= 52.3.100 - libswscale >= 2.6.100 - libswresample >= 0.19.100" +FFMPEG_LIBNAMES="libavcodec >= 56.1.100 + libavfilter >= 5.1.100 + libavformat >= 56.4.101 + libavutil >= 54.7.100 + libpostproc >= 53.0.100 + libswscale >= 3.0.100 + libswresample >= 1.1.100" ffmpeg_build="${abs_top_srcdir}/tools/depends/target/ffmpeg" FFMPEG_VER_SHA=$(grep "VERSION=" ${ffmpeg_build}/FFMPEG-VERSION | sed 's/VERSION=//g') @@ -2129,10 +2129,10 @@ else final_message="$final_message\n ProjectM:\tNo" fi -if test "$use_skin_touched" = "yes"; then - final_message="$final_message\n Skin Touched:\tYes" +if test "$use_touch_skin" = "yes"; then + final_message="$final_message\n Touch skin:\tYes" else - final_message="$final_message\n Skin Touched:\tNo" + final_message="$final_message\n Touch skin:\tNo" fi if test "$use_x11" = "yes"; then @@ -2494,8 +2494,8 @@ if test "$use_wayland" = "yes"; then OUTPUT_FILES="$OUTPUT_FILES xbmc/windowing/tests/wayland/Makefile" fi -if test "$use_skin_touched" = "yes"; then -OUTPUT_FILES="$OUTPUT_FILES addons/skin.touched/media/Makefile" +if test "$use_touch_skin" = "yes"; then +OUTPUT_FILES="$OUTPUT_FILES addons/skin.re-touched/media/Makefile" fi if test "$use_codec_libstagefright" = "yes"; then @@ -2538,7 +2538,7 @@ AC_SUBST(FFMPEG_LIBDIR) AC_SUBST(USE_STATIC_FFMPEG) AC_SUBST(GNUTLS_ALL_LIBS) AC_SUBST(VORBISENC_ALL_LIBS) -AC_SUBST(USE_SKIN_TOUCHED) +AC_SUBST(USE_TOUCH_SKIN) AC_SUBST(USE_LIBAV_HACKS) AC_SUBST(PYTHON_VERSION) AC_SUBST(OUTPUT_FILES) diff --git a/docs/README.android b/docs/README.android index 5bfe7297eb..db37050f00 100644 --- a/docs/README.android +++ b/docs/README.android @@ -142,7 +142,7 @@ Make sure to pick a toolchain for your desired architecture. # cd $HOME # git clone git://github.com/xbmc/xbmc.git xbmc-android # cd xbmc-android - # git submodule update --init addons/skin.touched + # git submodule update --init addons/skin.re-touched ----------------------------------------------------------------------------- 5. How to compile diff --git a/docs/README.ios b/docs/README.ios index c1ccad6d9b..59bcaa38ab 100644 --- a/docs/README.ios +++ b/docs/README.ios @@ -41,7 +41,7 @@ character itself should NOT be typed as part of the command. $ cd $HOME $ git clone git://github.com/xbmc/xbmc.git xbmc $ cd xbmc - $ git submodule update --init addons/skin.touched + $ git submodule update --init addons/skin.re-touched ----------------------------------------------------------------------------- 3.0 Install Xcode diff --git a/language/English/strings.po b/language/English/strings.po index 2aab89a416..348b77e784 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -4569,61 +4569,61 @@ msgstr "" #empty strings from id 12023 to 12309 #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#12310" msgid "0" msgstr "" #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#12311" msgid "1" msgstr "" #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#12312" msgid "2" msgstr "" #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#12313" msgid "3" msgstr "" #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#12314" msgid "4" msgstr "" #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#12315" msgid "5" msgstr "" #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#12316" msgid "6" msgstr "" #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#12317" msgid "7" msgstr "" #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#12318" msgid "8" msgstr "" #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#12319" msgid "9" msgstr "" @@ -5024,13 +5024,13 @@ msgid "Suspend" msgstr "" #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#13012" msgid "Exit" msgstr "" #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#13013" msgid "Reboot" msgstr "" @@ -5046,7 +5046,7 @@ msgid "Power button action" msgstr "" #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#13016" msgid "Power off System" msgstr "" @@ -5365,7 +5365,7 @@ msgstr "" #empty strings from id 13175 to 13199 #: skin.confluence -#: skin.touched +#: skin.retouched #: xbmc\profiles\ProfilesManager.cpp #: xbmc/profiles/dialogs/GUIDialogProfileSettings.cpp msgctxt "#13200" @@ -12177,7 +12177,7 @@ msgid "Version:" msgstr "" #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#24052" msgid "Disclaimer" msgstr "" @@ -12566,7 +12566,7 @@ msgstr "" #strings 29800 thru 29998 reserved strings used only in the default Project Mayhem III skin and not c++ code #: skin.confluence -#: skin.touched +#: skin.retouched msgctxt "#29800" msgid "Library Mode" msgstr "" @@ -12577,7 +12577,6 @@ msgid "QWERTY keyboard" msgstr "" #: skin.confluence -#: skin.touched msgctxt "#29802" msgid "Passthrough Audio in use" msgstr "" @@ -12815,8 +12814,8 @@ msgctxt "#33062" msgid "Play the" msgstr "" -#: addons/skin/touched/ #: addons/skin/confluence +#: skin.retouched msgctxt "#33063" msgid "Options" msgstr "" diff --git a/media/Splash.png b/media/Splash.png Binary files differindex 17fd02aaff..4413466abe 100644 --- a/media/Splash.png +++ b/media/Splash.png diff --git a/project/BuildDependencies/DownloadBuildDeps.bat b/project/BuildDependencies/DownloadBuildDeps.bat index ed76ec7dc0..81df45a4bc 100644 --- a/project/BuildDependencies/DownloadBuildDeps.bat +++ b/project/BuildDependencies/DownloadBuildDeps.bat @@ -3,7 +3,7 @@ SETLOCAL SET CUR_PATH=%CD% -SET XBMC_PATH=%CD%\..\.. +SET APP_PATH=%CD%\..\.. SET TMP_PATH=%CD%\scripts\tmp rem can't run rmdir and md back to back. access denied error otherwise. diff --git a/project/BuildDependencies/DownloadMingwBuildEnv.bat b/project/BuildDependencies/DownloadMingwBuildEnv.bat index fa5ca42d16..793309f5b7 100644 --- a/project/BuildDependencies/DownloadMingwBuildEnv.bat +++ b/project/BuildDependencies/DownloadMingwBuildEnv.bat @@ -6,7 +6,7 @@ SET MSYS_INSTALL_PATH="%CD%\msys" SET MINGW_INSTALL_PATH="%CD%\msys\mingw" SET CUR_PATH=%CD% -SET XBMC_PATH=%CD%\..\.. +SET APP_PATH=%CD%\..\.. SET TMP_PATH=%CD%\scripts\tmp rem can't run rmdir and md back to back. access denied error otherwise. @@ -41,7 +41,7 @@ SET FSTAB=%MINGW_INSTALL_PATH% SET FSTAB=%FSTAB:\=/% SET FSTAB=%FSTAB:"=% ECHO %FSTAB% /mingw>>"%MSYS_INSTALL_PATH%\etc\fstab" -SET FSTAB=%XBMC_PATH% +SET FSTAB=%APP_PATH% SET FSTAB=%FSTAB:\=/% SET FSTAB=%FSTAB:"=% ECHO %FSTAB% /xbmc>>"%MSYS_INSTALL_PATH%\etc\fstab" diff --git a/project/BuildDependencies/scripts/1_copy_deps_d.bat b/project/BuildDependencies/scripts/1_copy_deps_d.bat index f6aaa3396c..d52304fbf5 100644 --- a/project/BuildDependencies/scripts/1_copy_deps_d.bat +++ b/project/BuildDependencies/scripts/1_copy_deps_d.bat @@ -1,12 +1,12 @@ @ECHO OFF -IF EXIST "%XBMC_PATH%\system\webserver" rmdir "%XBMC_PATH%\system\webserver" /S /Q -IF EXIST "%XBMC_PATH%\system\airplay" rmdir "%XBMC_PATH%\system\airplay" /S /Q +IF EXIST "%APP_PATH%\system\webserver" rmdir "%APP_PATH%\system\webserver" /S /Q +IF EXIST "%APP_PATH%\system\airplay" rmdir "%APP_PATH%\system\airplay" /S /Q rem create directories -IF NOT EXIST "%XBMC_PATH%\system\players\paplayer" md "%XBMC_PATH%\system\players\paplayer" -IF NOT EXIST "%XBMC_PATH%\project\VS2010Express\XBMC\Debug (DirectX)" md "%XBMC_PATH%\project\VS2010Express\XBMC\Debug (DirectX)" -IF NOT EXIST "%XBMC_PATH%\system\webserver" md "%XBMC_PATH%\system\webserver" -IF NOT EXIST "%XBMC_PATH%\system\airplay" md "%XBMC_PATH%\system\airplay" -IF NOT EXIST "%XBMC_PATH%\project\Win32BuildSetup\dependencies" md "%XBMC_PATH%\project\Win32BuildSetup\dependencies" -IF NOT EXIST "%XBMC_PATH%\system\cdrip" md "%XBMC_PATH%\system\cdrip"
\ No newline at end of file +IF NOT EXIST "%APP_PATH%\system\players\paplayer" md "%APP_PATH%\system\players\paplayer" +IF NOT EXIST "%APP_PATH%\project\VS2010Express\Application\Debug" md "%APP_PATH%\project\VS2010Express\Application\Debug" +IF NOT EXIST "%APP_PATH%\system\webserver" md "%APP_PATH%\system\webserver" +IF NOT EXIST "%APP_PATH%\system\airplay" md "%APP_PATH%\system\airplay" +IF NOT EXIST "%APP_PATH%\project\Win32BuildSetup\dependencies" md "%APP_PATH%\project\Win32BuildSetup\dependencies" +IF NOT EXIST "%APP_PATH%\system\cdrip" md "%APP_PATH%\system\cdrip"
\ No newline at end of file diff --git a/project/BuildDependencies/scripts/PIL_d.bat b/project/BuildDependencies/scripts/PIL_d.bat index 5042ffc373..1f5eac21e9 100644 --- a/project/BuildDependencies/scripts/PIL_d.bat +++ b/project/BuildDependencies/scripts/PIL_d.bat @@ -2,7 +2,7 @@ SET LOC_PATH=%CD% SET FILES=%LOC_PATH%\PIL_d.txt -SET OUTDIR="%XBMC_PATH%\addons\script.module.pil\lib\PIL" +SET OUTDIR="%APP_PATH%\addons\script.module.pil\lib\PIL" CALL dlextract.bat PIL %FILES% diff --git a/project/BuildDependencies/scripts/fontconfig_d.bat b/project/BuildDependencies/scripts/fontconfig_d.bat index 51c1e440ce..e8543f0bd5 100644 --- a/project/BuildDependencies/scripts/fontconfig_d.bat +++ b/project/BuildDependencies/scripts/fontconfig_d.bat @@ -10,7 +10,7 @@ cd %TMP_PATH% xcopy include\fontconfig "%CUR_PATH%\include\fontconfig" /E /Q /I /Y copy lib\fontconfig.lib "%CUR_PATH%\lib\" /Y rem libfontconfig-1.dll requires libexpat-1.dll which is copied by libexpat_d.bat -copy bin\libfontconfig-1.dll "%XBMC_PATH%\system\players\dvdplayer\" -copy freetype-2.4.6-1-win32\bin\freetype6.dll "%XBMC_PATH%\system\players\dvdplayer\" +copy bin\libfontconfig-1.dll "%APP_PATH%\system\players\dvdplayer\" +copy freetype-2.4.6-1-win32\bin\freetype6.dll "%APP_PATH%\system\players\dvdplayer\" cd %LOC_PATH% diff --git a/project/BuildDependencies/scripts/get_formed.cmd b/project/BuildDependencies/scripts/get_formed.cmd index a3f630fac4..ffe44c10e2 100644 --- a/project/BuildDependencies/scripts/get_formed.cmd +++ b/project/BuildDependencies/scripts/get_formed.cmd @@ -51,7 +51,7 @@ FOR /F %%f IN ('dir /B /A:-D "%~n1\*.*"') DO (del "%~n1\%%f" /F /Q || EXIT /B 4) CALL :setSubStageName Copying %1 to build tree... REM Copy only content of extracted ".\packagename\" -XCOPY "%~n1\*" "%XBMC_PATH%\" /E /I /Y /F /R /H /K || EXIT /B 5 +XCOPY "%~n1\*" "%APP_PATH%\" /E /I /Y /F /R /H /K || EXIT /B 5 dir /A:-D * >NUL 2>NUL && ( CALL :setSubStageName Post-Cleaning %1... diff --git a/project/BuildDependencies/scripts/get_mingw_env.bat b/project/BuildDependencies/scripts/get_mingw_env.bat index b071f56ff9..9228100350 100644 --- a/project/BuildDependencies/scripts/get_mingw_env.bat +++ b/project/BuildDependencies/scripts/get_mingw_env.bat @@ -25,6 +25,6 @@ copy xasm.exe "%MINGW_INSTALL_PATH%\bin\xasm.exe" /Y copy mads.exe "%MINGW_INSTALL_PATH%\bin\mads.exe" /Y rem copy "%MINGW_INSTALL_PATH%\bin\mingw32-make.exe" "%MINGW_INSTALL_PATH%\bin\make.exe" /Y rem xcopy curl-7.21.0-devel-mingw32\include\curl "%CUR_PATH%\include\curl" /E /Q /I /Y -rem copy curl-7.21.0-devel-mingw32\bin\*.dll "%XBMC_PATH%\system\" /Y +rem copy curl-7.21.0-devel-mingw32\bin\*.dll "%APP_PATH%\system\" /Y cd %LOC_PATH% diff --git a/project/BuildDependencies/scripts/libcdio_d.bat b/project/BuildDependencies/scripts/libcdio_d.bat index 0104c6838f..550150771f 100644 --- a/project/BuildDependencies/scripts/libcdio_d.bat +++ b/project/BuildDependencies/scripts/libcdio_d.bat @@ -9,7 +9,7 @@ cd %TMP_PATH% xcopy libcdio-0.83-win32\include\* "%CUR_PATH%\include\" /E /Q /I /Y copy libcdio-0.83-win32\lib\libcdio.dll.lib "%CUR_PATH%\lib\" /Y -copy libcdio-0.83-win32\bin\libcdio-13.dll "%XBMC_PATH%\project\Win32BuildSetup\dependencies\" /Y -copy libcdio-0.83-win32\bin\libiconv-2.dll "%XBMC_PATH%\project\Win32BuildSetup\dependencies\" /Y +copy libcdio-0.83-win32\bin\libcdio-13.dll "%APP_PATH%\project\Win32BuildSetup\dependencies\" /Y +copy libcdio-0.83-win32\bin\libiconv-2.dll "%APP_PATH%\project\Win32BuildSetup\dependencies\" /Y cd %LOC_PATH% diff --git a/project/BuildDependencies/scripts/libcec_d.bat b/project/BuildDependencies/scripts/libcec_d.bat index 0b41b8a8ec..b5104c3cf4 100644 --- a/project/BuildDependencies/scripts/libcec_d.bat +++ b/project/BuildDependencies/scripts/libcec_d.bat @@ -10,6 +10,6 @@ cd %TMP_PATH% mkdir "%CUR_PATH%\include\libcec" xcopy libcec\include\* "%CUR_PATH%\include\libcec\." /E /Q /I /Y -copy libcec\libcec.dll "%XBMC_PATH%\system\." +copy libcec\libcec.dll "%APP_PATH%\system\." cd %LOC_PATH% diff --git a/project/BuildDependencies/scripts/libcurl_d.bat b/project/BuildDependencies/scripts/libcurl_d.bat index ed08aa9d62..5de849bc63 100644 --- a/project/BuildDependencies/scripts/libcurl_d.bat +++ b/project/BuildDependencies/scripts/libcurl_d.bat @@ -12,6 +12,6 @@ rem I found no reference to zlib1.dll in any curl dll del curl-7.21.6-devel-mingw32\bin\zlib1.dll xcopy curl-7.21.6-devel-mingw32\include\curl "%CUR_PATH%\include\curl" /E /Q /I /Y -copy curl-7.21.6-devel-mingw32\bin\*.dll "%XBMC_PATH%\system\" /Y +copy curl-7.21.6-devel-mingw32\bin\*.dll "%APP_PATH%\system\" /Y cd %LOC_PATH% diff --git a/project/BuildDependencies/scripts/libexpat_d.bat b/project/BuildDependencies/scripts/libexpat_d.bat index b14bf04c8a..4d5cb61dcd 100644 --- a/project/BuildDependencies/scripts/libexpat_d.bat +++ b/project/BuildDependencies/scripts/libexpat_d.bat @@ -9,8 +9,8 @@ cd %TMP_PATH% copy include\* "%CUR_PATH%\include\" /Y copy lib\expat.lib "%CUR_PATH%\lib\libexpat.lib" /Y -copy bin\libexpat-1.dll "%XBMC_PATH%\system\libexpat.dll" +copy bin\libexpat-1.dll "%APP_PATH%\system\libexpat.dll" rem libexpat-1.dll for libfontconfig-1.dll which is needed for libass.dll -copy bin\libexpat-1.dll "%XBMC_PATH%\system\players\dvdplayer\" +copy bin\libexpat-1.dll "%APP_PATH%\system\players\dvdplayer\" cd %LOC_PATH% diff --git a/project/BuildDependencies/scripts/libflac_d.bat b/project/BuildDependencies/scripts/libflac_d.bat index 88ef08dd62..17ac8de62b 100644 --- a/project/BuildDependencies/scripts/libflac_d.bat +++ b/project/BuildDependencies/scripts/libflac_d.bat @@ -8,7 +8,7 @@ CALL dlextract.bat libflac %FILES% cd %TMP_PATH% xcopy include\FLAC "%CUR_PATH%\include\FLAC" /E /Q /I /Y -copy lib\libFLAC.dll "%XBMC_PATH%\system\players\paplayer\" /Y +copy lib\libFLAC.dll "%APP_PATH%\system\players\paplayer\" /Y IF EXIST "include\FLAC++" rmdir "include\FLAC++" /S /Q IF EXIST "include\ogg" rmdir "include\ogg" /S /Q diff --git a/project/BuildDependencies/scripts/libmicrohttpd_d.bat b/project/BuildDependencies/scripts/libmicrohttpd_d.bat index 595e5a7462..7076c87507 100644 --- a/project/BuildDependencies/scripts/libmicrohttpd_d.bat +++ b/project/BuildDependencies/scripts/libmicrohttpd_d.bat @@ -8,7 +8,7 @@ CALL dlextract.bat libmicrohttpd %FILES% cd %TMP_PATH% xcopy libmicrohttpd-0.4.5-win32\include\* "%CUR_PATH%\include" /E /Q /I /Y -xcopy libmicrohttpd-0.4.5-win32\bin\*.dll "%XBMC_PATH%\system\webserver" /E /Q /I /Y +xcopy libmicrohttpd-0.4.5-win32\bin\*.dll "%APP_PATH%\system\webserver" /E /Q /I /Y copy libmicrohttpd-0.4.5-win32\lib\libmicrohttpd.dll.lib "%CUR_PATH%\lib\" /Y cd %LOC_PATH% diff --git a/project/BuildDependencies/scripts/liboggvorbis_d.bat b/project/BuildDependencies/scripts/liboggvorbis_d.bat index 4abf6d9b9a..0de23091dd 100644 --- a/project/BuildDependencies/scripts/liboggvorbis_d.bat +++ b/project/BuildDependencies/scripts/liboggvorbis_d.bat @@ -9,8 +9,8 @@ cd %TMP_PATH% xcopy include\ogg "%CUR_PATH%\include\ogg" /E /Q /I /Y xcopy include\vorbis "%CUR_PATH%\include\vorbis" /E /Q /I /Y -copy bin\ogg.dll "%XBMC_PATH%\system\cdrip\" /Y -copy bin\vorbis.dll "%XBMC_PATH%\system\cdrip\" /Y -copy bin\vorbisfile.dll "%XBMC_PATH%\system\players\paplayer\" /Y +copy bin\ogg.dll "%APP_PATH%\system\cdrip\" /Y +copy bin\vorbis.dll "%APP_PATH%\system\cdrip\" /Y +copy bin\vorbisfile.dll "%APP_PATH%\system\players\paplayer\" /Y cd %LOC_PATH% diff --git a/project/BuildDependencies/scripts/libplist_d.bat b/project/BuildDependencies/scripts/libplist_d.bat index f0061b6e5c..53e3c60809 100644 --- a/project/BuildDependencies/scripts/libplist_d.bat +++ b/project/BuildDependencies/scripts/libplist_d.bat @@ -8,6 +8,6 @@ CALL dlextract.bat libplist %FILES% cd %TMP_PATH% xcopy libplist-1.7-win32-2\include\* "%CUR_PATH%\include\" /E /Q /I /Y -xcopy libplist-1.7-win32-2\bin\* "%XBMC_PATH%\system\" /E /Q /I /Y +xcopy libplist-1.7-win32-2\bin\* "%APP_PATH%\system\" /E /Q /I /Y cd %LOC_PATH% diff --git a/project/BuildDependencies/scripts/librtmp_d.bat b/project/BuildDependencies/scripts/librtmp_d.bat index 717332f68f..c99e1d6d58 100644 --- a/project/BuildDependencies/scripts/librtmp_d.bat +++ b/project/BuildDependencies/scripts/librtmp_d.bat @@ -8,6 +8,6 @@ CALL dlextract.bat librtmp %FILES% cd %TMP_PATH% xcopy librtmp-20110723-git-b627335-win32\include\*.h "%CUR_PATH%\include\librtmp\" /E /Q /I /Y -xcopy librtmp-20110723-git-b627335-win32\lib\*.dll "%XBMC_PATH%\system\players\dvdplayer\" /E /Q /I /Y +xcopy librtmp-20110723-git-b627335-win32\lib\*.dll "%APP_PATH%\system\players\dvdplayer\" /E /Q /I /Y cd %LOC_PATH% diff --git a/project/BuildDependencies/scripts/libsdl_d.bat b/project/BuildDependencies/scripts/libsdl_d.bat index a308333aef..601a58e5d9 100644 --- a/project/BuildDependencies/scripts/libsdl_d.bat +++ b/project/BuildDependencies/scripts/libsdl_d.bat @@ -10,9 +10,9 @@ cd %TMP_PATH% xcopy SDL-1.2.14\include\* "%CUR_PATH%\include\SDL\" /E /Q /I /Y copy SDL-1.2.14\lib\SDL.lib "%CUR_PATH%\lib\SDL.lib" /Y -copy SDL-1.2.14\lib\SDL.dll "%XBMC_PATH%\tools\TexturePacker\SDL.dll" +copy SDL-1.2.14\lib\SDL.dll "%APP_PATH%\tools\TexturePacker\SDL.dll" copy SDL_image-1.2.10\include\SDL_image.h "%CUR_PATH%\include\SDL\" -copy SDL_image-1.2.10\lib\*.dll "%XBMC_PATH%\tools\TexturePacker\" +copy SDL_image-1.2.10\lib\*.dll "%APP_PATH%\tools\TexturePacker\" copy SDL_image-1.2.10\lib\SDL_image.lib "%CUR_PATH%\lib\SDL_image.lib" /Y diff --git a/project/BuildDependencies/scripts/zlib_d.bat b/project/BuildDependencies/scripts/zlib_d.bat index c3ee5ee752..a472ff593e 100644 --- a/project/BuildDependencies/scripts/zlib_d.bat +++ b/project/BuildDependencies/scripts/zlib_d.bat @@ -9,6 +9,6 @@ cd %TMP_PATH% xcopy include\* "%CUR_PATH%\include\" /E /Q /I /Y copy lib\zlib.lib "%CUR_PATH%\lib\" /Y -copy bin\zlib1.dll "%XBMC_PATH%\system\" /Y +copy bin\zlib1.dll "%APP_PATH%\system\" /Y cd %LOC_PATH% diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj index 4af2c43db2..ff9e0ffb33 100644 --- a/project/VS2010Express/XBMC.vcxproj +++ b/project/VS2010Express/XBMC.vcxproj @@ -18,6 +18,7 @@ <ProjectGuid>{3A68081D-E8F9-4523-9436-530DE9E5530A}</ProjectGuid> <RootNamespace>XBMC_PC</RootNamespace> <Keyword>Win32Proj</Keyword> + <ProjectName>Kodi</ProjectName> </PropertyGroup> <Import Project="$(SolutionDir)\XBMC.core-defaults.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -86,12 +87,12 @@ <Link> <AdditionalOptions>/IGNORE:4089 /ignore:4254 %(AdditionalOptions)</AdditionalOptions> <AdditionalDependencies>D3dx9.lib;DInput8.lib;DSound.lib;winmm.lib;Mpr.lib;Iphlpapi.lib;PowrProf.lib;setupapi.lib;dwmapi.lib;yajl.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)XBMC.exe</OutputFile> + <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile> <IgnoreSpecificDefaultLibraries>libcpmt;libc;msvcrt;libcmt;msvcrtd;msvcprtd;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <ModuleDefinitionFile> </ModuleDefinitionFile> - <DelayLoadDLLs>libxslt.dll;dnssd.dll;dwmapi.dll;libmicrohttpd-5.dll;ssh.dll;sqlite3.dll;avcodec-55.dll;avfilter-4.dll;avformat-55.dll;avutil-52.dll;postproc-52.dll;swresample-0.dll;swscale-2.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <ProgramDatabaseFile>$(OutDir)XBMC.pdb</ProgramDatabaseFile> + <DelayLoadDLLs>libxslt.dll;dnssd.dll;dwmapi.dll;libmicrohttpd-5.dll;ssh.dll;sqlite3.dll;avcodec-56.dll;avfilter-5.dll;avformat-56.dll;avutil-54.dll;postproc-53.dll;swresample-1.dll;swscale-3.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile> <EntryPointSymbol> </EntryPointSymbol> <RandomizedBaseAddress>true</RandomizedBaseAddress> @@ -118,14 +119,14 @@ <Link> <AdditionalOptions>/IGNORE:4089 /ignore:4254 %(AdditionalOptions)</AdditionalOptions> <AdditionalDependencies>D3dx9.lib;DInput8.lib;DSound.lib;winmm.lib;ws2_32.lib;Mpr.lib;Iphlpapi.lib;PowrProf.lib;setupapi.lib;dwmapi.lib;strmiids.lib;dxguid.lib;mfuuid.lib;comctl32.lib;yajl.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)xbmc-test.exe</OutputFile> + <OutputFile>$(OutDir)$(ProjectName)-test.exe</OutputFile> <AdditionalLibraryDirectories> </AdditionalLibraryDirectories> <IgnoreSpecificDefaultLibraries>libc;msvcrt;libcmt;msvcrtd;msvcprtd;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <ModuleDefinitionFile> </ModuleDefinitionFile> - <DelayLoadDLLs>libxslt.dll;dnssd.dll;dwmapi.dll;libmicrohttpd-5.dll;ssh.dll;sqlite3.dll;avcodec-55.dll;avfilter-4.dll;avformat-55.dll;avutil-52.dll;postproc-52.dll;swresample-0.dll;swscale-2.dll;%(DelayLoadDLLs)</DelayLoadDLLs> - <ProgramDatabaseFile>$(OutDir)XBMC.pdb</ProgramDatabaseFile> + <DelayLoadDLLs>libxslt.dll;dnssd.dll;dwmapi.dll;libmicrohttpd-5.dll;ssh.dll;sqlite3.dll;avcodec-56.dll;avfilter-5.dll;avformat-56.dll;avutil-54.dll;postproc-53.dll;swresample-1.dll;swscale-3.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile> <SubSystem>Console</SubSystem> <EntryPointSymbol> </EntryPointSymbol> @@ -153,11 +154,11 @@ <Link> <AdditionalOptions>/IGNORE:4089 /ignore:4254 %(AdditionalOptions)</AdditionalOptions> <AdditionalDependencies>D3dx9.lib;DInput8.lib;DSound.lib;winmm.lib;Mpr.lib;Iphlpapi.lib;PowrProf.lib;setupapi.lib;dwmapi.lib;yajl.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> - <OutputFile>$(OutDir)XBMC.exe</OutputFile> + <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile> <IgnoreSpecificDefaultLibraries>libc;msvcrt;libci;msvcprt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> - <DelayLoadDLLs>libxslt.dll;dnssd.dll;dwmapi.dll;libmicrohttpd-5.dll;ssh.dll;sqlite3.dll;avcodec-55.dll;avfilter-4.dll;avformat-55.dll;avutil-52.dll;postproc-52.dll;swresample-0.dll;swscale-2.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>libxslt.dll;dnssd.dll;dwmapi.dll;libmicrohttpd-5.dll;ssh.dll;sqlite3.dll;avcodec-56.dll;avfilter-5.dll;avformat-56.dll;avutil-54.dll;postproc-53.dll;swresample-1.dll;swscale-3.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> - <ProgramDatabaseFile>$(OutDir)XBMC.pdb</ProgramDatabaseFile> + <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile> <RandomizedBaseAddress>true</RandomizedBaseAddress> <DataExecutionPrevention>true</DataExecutionPrevention> <AdditionalLibraryDirectories>..\..\lib\win32\ffmpeg\.libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> diff --git a/project/Win32BuildSetup/BuildSetup.bat b/project/Win32BuildSetup/BuildSetup.bat index 70b4e02d28..8883607992 100644 --- a/project/Win32BuildSetup/BuildSetup.bat +++ b/project/Win32BuildSetup/BuildSetup.bat @@ -1,5 +1,16 @@ @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION +REM setup all paths +SET cur_dir=%CD% +SET base_dir=%cur_dir%\..\.. +SET builddeps_dir=%cur_dir%\..\..\project\BuildDependencies +SET bin_dir=%builddeps_dir%\bin +SET msys_bin_dir=%builddeps_dir%\msys\bin +REM read the version values from version.txt +FOR /f %%i IN ('%msys_bin_dir%\awk.exe "/APP_NAME/ {print $2}" %base_dir%\version.txt') DO SET APP_NAME=%%i +FOR /f %%i IN ('%msys_bin_dir%\awk.exe "/COMPANY_NAME/ {print $2}" %base_dir%\version.txt') DO SET COMPANY=%%i +FOR /f %%i IN ('%msys_bin_dir%\awk.exe "/WEBSITE/ {print $2}" %base_dir%\version.txt') DO SET WEBSITE=%%i + rem ----Usage---- rem BuildSetup [clean|noclean] rem clean to force a full rebuild @@ -8,9 +19,9 @@ rem noprompt to avoid all prompts rem nomingwlibs to skip building all libs built with mingw CLS COLOR 1B -TITLE XBMC for Windows Build Script +TITLE %APP_NAME% for Windows Build Script rem ----PURPOSE---- -rem - Create a working XBMC build with a single click +rem - Create a working application build with a single click rem ------------------------------------------------------------- rem Config rem If you get an error that Visual studio was not found, SET your path for VSNET main executable. @@ -49,34 +60,14 @@ set WORKSPACE=%CD%\..\.. goto DIE ) - set EXE= "..\VS2010Express\XBMC\%buildconfig%\XBMC.exe" - set PDB= "..\VS2010Express\XBMC\%buildconfig%\XBMC.pdb" + set EXE= "..\VS2010Express\XBMC\%buildconfig%\%APP_NAME%.exe" + set PDB= "..\VS2010Express\XBMC\%buildconfig%\%APP_NAME%.pdb" :: sets the BRANCH env var call getbranch.bat rem CONFIG END rem ------------------------------------------------------------- - - echo : - echo ::: - echo :::: - echo :::: - echo ::::::: ::::::::::::::::: :::::: :::::: ::::::: - echo ::::::::: :::::::::::::::::::: :::::::::: :::::::::: ::::::::: - echo ::::::::: :::::::::::::::::::::: :::::::::::::::::::::::: ::::::::: - echo ::::::::: ::: ::::: ::::: :::::::: :::: ::::: - echo :::::: :::: :::: :::: ::::: ::::::: - echo ::::: :::: ::::::: ::::: :::::: - echo ::::: ::: :::::: ::: :::::: - echo :::: ::: :::::: :::: :::::: - echo :::: ::: ::::::: :::: :::::: - echo ::::: :::: ::::::: :::: :::::: - echo ::::::: :::: :::::::: ::: ::::::: - echo ::::::::::::::: ::::: ::::: ::: ::: ::::::::: - echo ::::::::: ::::::::: ::::::::::: ::: ::: ::: ::::::::: - echo :::::::: ::::::::: ::::::::: ::: ::: ::: :::::::: - echo :::::: ::::::: ::::: : :: :: :::::: goto EXE_COMPILE :EXE_COMPILE @@ -131,10 +122,10 @@ set WORKSPACE=%CD%\..\.. ECHO ------------------------------------------------------------ ECHO Cleaning Solution... %NET% %CLEAN_EXE% - ECHO Compiling XBMC branch %BRANCH%... + ECHO Compiling %APP_NAME% branch %BRANCH%... %NET% %OPTS_EXE% IF %errorlevel%==1 ( - set DIETEXT="XBMC.EXE failed to build! See %CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" + set DIETEXT="%APP_NAME%.EXE failed to build! See %CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" IF %promptlevel%==noprompt ( type "%CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" ) @@ -148,10 +139,10 @@ set WORKSPACE=%CD%\..\.. :COMPILE_NO_CLEAN_EXE ECHO Wait while preparing the build. ECHO ------------------------------------------------------------ - ECHO Compiling XBMC branch %BRANCH%... + ECHO Compiling %APP_NAME% branch %BRANCH%... %NET% %OPTS_EXE% IF %errorlevel%==1 ( - set DIETEXT="XBMC.EXE failed to build! See %CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" + set DIETEXT="%APP_NAME%.EXE failed to build! See %CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" IF %promptlevel%==noprompt ( type "%CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log" ) @@ -198,7 +189,7 @@ set WORKSPACE=%CD%\..\.. Echo addons\visualization.projectm\>>exclude.txt Echo addons\visualization.glspectrum\>>exclude.txt rem Exclude skins as they're copied by their own script - Echo addons\skin.touched\>>exclude.txt + Echo addons\skin.re-touched\>>exclude.txt Echo addons\skin.confluence\>>exclude.txt md BUILD_WIN32\application @@ -243,16 +234,16 @@ set WORKSPACE=%CD%\..\.. call build.bat > NUL cd %build_path% - IF EXIST ..\..\addons\skin.touched\build.bat ( - ECHO Building Touched Skin... - cd ..\..\addons\skin.touched + IF EXIST ..\..\addons\skin.re-touched\build.bat ( + ECHO Building Touch Skin... + cd ..\..\addons\skin.re-touched call build.bat > NUL cd %build_path% ) rem restore color and title, some scripts mess these up COLOR 1B - TITLE XBMC for Windows Build Script + TITLE %APP_NAME% for Windows Build Script IF EXIST exclude.txt del exclude.txt > NUL del /s /q /f BUILD_WIN32\application\*.so > NUL @@ -272,8 +263,8 @@ set WORKSPACE=%CD%\..\.. ECHO ------------------------------------------------------------ call getdeploydependencies.bat CALL extract_git_rev.bat > NUL - SET APP_SETUPFILE=XBMCSetup-%GIT_REV%-%BRANCH%.exe - SET APP_PDBFILE=XBMCSetup-%GIT_REV%-%BRANCH%.pdb + SET APP_SETUPFILE=%APP_NAME%Setup-%GIT_REV%-%BRANCH%.exe + SET APP_PDBFILE=%APP_NAME%Setup-%GIT_REV%-%BRANCH%.pdb ECHO Creating installer %APP_SETUPFILE%... IF EXIST %APP_SETUPFILE% del %APP_SETUPFILE% > NUL rem get path to makensis.exe from registry, first try tab delim @@ -312,7 +303,7 @@ set WORKSPACE=%CD%\..\.. ) SET NSISExe=%NSISExePath%\makensis.exe - "%NSISExe%" /V1 /X"SetCompressor /FINAL lzma" /Dapp_root="%CD%\BUILD_WIN32" /Dapp_revision="%GIT_REV%" /Dapp_target="%target%" /Dapp_branch="%BRANCH%" "XBMC for Windows.nsi" + "%NSISExe%" /V1 /X"SetCompressor /FINAL lzma" /Dapp_root="%CD%\BUILD_WIN32" /DAPP_NAME="%APP_NAME%" /DCOMPANY="%COMPANY%" /DWEBSITE="%WEBSITE%" /Dapp_revision="%GIT_REV%" /Dapp_target="%target%" /Dapp_branch="%BRANCH%" "genNsisInstaller.nsi" IF NOT EXIST "%APP_SETUPFILE%" ( set DIETEXT=Failed to create %APP_SETUPFILE%. NSIS installed? goto DIE diff --git a/project/Win32BuildSetup/XBMC for Windows.nsi b/project/Win32BuildSetup/genNsisInstaller.nsi index 2e810512d3..83016dbf7f 100644 --- a/project/Win32BuildSetup/XBMC for Windows.nsi +++ b/project/Win32BuildSetup/genNsisInstaller.nsi @@ -11,10 +11,6 @@ !include "WinVer.nsh" ;-------------------------------- -;define global used name - !define APP_NAME "XBMC" - -;-------------------------------- ;General ;Name and file @@ -45,11 +41,11 @@ !define MUI_HEADERIMAGE !define MUI_ICON "..\..\tools\windows\packaging\media\xbmc.ico" - !define MUI_HEADERIMAGE_BITMAP "..\..\tools\windows\packaging\media\installer\header.bmp" - !define MUI_WELCOMEFINISHPAGE_BITMAP "..\..\tools\windows\packaging\media\installer\welcome-left.bmp" + ;!define MUI_HEADERIMAGE_BITMAP "..\..\tools\windows\packaging\media\installer\header.bmp" + ;!define MUI_WELCOMEFINISHPAGE_BITMAP "..\..\tools\windows\packaging\media\installer\welcome-left.bmp" !define MUI_COMPONENTSPAGE_SMALLDESC - !define MUI_FINISHPAGE_LINK "Please visit http://xbmc.org for more information." - !define MUI_FINISHPAGE_LINK_LOCATION "http://xbmc.org" + !define MUI_FINISHPAGE_LINK "Please visit ${WEBSITE} for more information." + !define MUI_FINISHPAGE_LINK_LOCATION "${WEBSITE}" !define MUI_FINISHPAGE_RUN "$INSTDIR\${APP_NAME}.exe" !define MUI_FINISHPAGE_RUN_NOTCHECKED !define MUI_ABORTWARNING @@ -91,10 +87,38 @@ InstType "Minimal" ; 3. ;-------------------------------- ;Installer Sections -Section "XBMC" SecAPP +Section "${APP_NAME}" SecAPP SetShellVarContext current SectionIn RO SectionIn 1 2 3 #section is in install type Normal/Full/Minimal + + ;Move XBMC portable_data and appdata folder if exists to new location + ;and safe clean out old install folder + Var /GLOBAL INSTDIR_OLD + ReadRegStr $INSTDIR_OLD HKCU "Software\XBMC" "" + ${IfNot} $INSTDIR_OLD == "" + IfFileExists "$APPDATA\XBMC\*.*" 0 +3 + Rename "$APPDATA\XBMC\" "$APPDATA\${APP_NAME}\" + MessageBox MB_OK|MB_ICONEXCLAMATION|MB_TOPMOST|MB_SETFOREGROUND "Your current XBMC userdata folder was moved to the new ${APP_NAME} userdata location.$\n.This to make the transition as smooth as possible without any user interactions needed." + + ${IfNot} $INSTDIR_OLD == $INSTDIR + IfFileExists $INSTDIR_OLD\portable_data\*.* 0 +3 + Rename "$INSTDIR_OLD\portable_data\" "$INSTDIR\portable_data\" + MessageBox MB_OK|MB_ICONEXCLAMATION|MB_TOPMOST|MB_SETFOREGROUND "Your current XBMC portable_data folder was moved to the new installation folder.$\nPlease manually adjust the short-cut for starting ${APP_NAME} accordingly." + + RMDir /r "$INSTDIR_OLD\addons" + RMDir /r "$INSTDIR_OLD\language" + RMDir /r "$INSTDIR_OLD\media" + RMDir /r "$INSTDIR_OLD\sounds" + RMDir /r "$INSTDIR_OLD\system" + RMDir /r "$INSTDIR_OLD\userdata" + Delete "$INSTDIR_OLD\*.*" + RMDir "$INSTDIR_OLD" + ${EndIf} + DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBMC" + DeleteRegKey HKCU "Software\XBMC" + ${EndIf} + ;Clean up install folder RMDir /r $INSTDIR\addons RMDir /r $INSTDIR\language @@ -144,9 +168,12 @@ Section "XBMC" SecAPP "" "$INSTDIR\Uninstall.exe" 0 SW_SHOWNORMAL \ "" "Uninstall ${APP_NAME}." - WriteINIStr "$SMPROGRAMS\$StartMenuFolder\Visit ${APP_NAME} Online.url" "InternetShortcut" "URL" "http://xbmc.org" + WriteINIStr "$SMPROGRAMS\$StartMenuFolder\Visit ${APP_NAME} Online.url" "InternetShortcut" "URL" "${WEBSITE}" !insertmacro MUI_STARTMENU_WRITE_END - + + ;Remove old XBMC shortcuts + RMDir /r "$SMPROGRAMS\XBMC" + ;add entry to add/remove programs WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \ "DisplayName" "${APP_NAME}" @@ -161,12 +188,12 @@ Section "XBMC" SecAPP WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \ "DisplayIcon" "$INSTDIR\${APP_NAME}.exe,0" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \ - "Publisher" "Team XBMC" + "Publisher" "${COMPANY}" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \ - "HelpLink" "http://xbmc.org/support" + "HelpLink" "${WEBSITE}" WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \ - "URLInfoAbout" "http://xbmc.org" - + "URLInfoAbout" "${WEBSITE}" + SectionEnd ;*-addons.nsi are generated by genNsisIncludes.bat @@ -228,24 +255,28 @@ Section "Uninstall" SetShellVarContext current ;ADD YOUR OWN FILES HERE... - Delete "$INSTDIR\*.*" RMDir /r "$INSTDIR\addons" RMDir /r "$INSTDIR\language" RMDir /r "$INSTDIR\media" RMDir /r "$INSTDIR\sounds" RMDir /r "$INSTDIR\system" + Delete "$INSTDIR\*.*" -;Uninstall User Data if option is checked, otherwise skip + ;Un-install User Data if option is checked, otherwise skip ${If} $UnPageProfileCheckbox_State == ${BST_CHECKED} - RMDir /r "$INSTDIR" RMDir /r "$APPDATA\${APP_NAME}\" + RMDir /r "$INSTDIR\portable_data\" ${Else} -;Even if userdata is kept in %appdata%\xbmc\userdata, the $INSTDIR\userdata should be cleaned up on uninstall if not used -;If guisettings.xml exists in the XBMC\userdata directory, do not delete XBMC\userdata directory -;If that file does not exists, then delete that folder and $INSTDIR - IfFileExists $INSTDIR\userdata\guisettings.xml +2 - RMDir /r "$INSTDIR" + ;Check if %appdata%\${APP_NAME}\userdata and portable_data contain no guisettings.xml + ;If that file does not exists, then delete those folders and $INSTDIR + IfFileExists $INSTDIR\portable_data\userdata\guisettings.xml +2 + RMDir /r "$INSTDIR\portable_data\" + RMDir "$INSTDIR\" + IfFileExists "$APPDATA\${APP_NAME}\userdata\guisettings.xml" +2 + RMDir /r "$APPDATA\${APP_NAME}\userdata\" + RMDir "$APPDATA\${APP_NAME}" ${EndIf} + RMDir "$INSTDIR" !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder Delete "$SMPROGRAMS\$StartMenuFolder\${APP_NAME}.lnk" diff --git a/system/settings/settings.xml b/system/settings/settings.xml index af05fb7ddc..547d214fff 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -587,11 +587,8 @@ <control type="spinner" format="integer" /> </setting> <setting id="videoplayer.useframemtdec" type="boolean" parent="videoplayer.decodingmethod" label="13440" help="36423"> - <dependencies> - <dependency type="enable" setting="videoplayer.decodingmethod" operator="is">0</dependency> - </dependencies> <level>2</level> - <default>false</default> + <default>true</default> <control type="toggle" /> </setting> <setting id="videoplayer.useamcodec" type="boolean" label="13438" help="36422"> diff --git a/tools/buildsteps/android/prepare-xbmc b/tools/buildsteps/android/prepare-xbmc index e83b22aad4..3a82e5c600 100644 --- a/tools/buildsteps/android/prepare-xbmc +++ b/tools/buildsteps/android/prepare-xbmc @@ -4,5 +4,8 @@ XBMC_PLATFORM_DIR=android #fetch submodules cd $WORKSPACE -rm -r $WORKSPACE/addons/skin.touched -git submodule update --init $WORKSPACE/addons/skin.touched +if test -d $WORKSPACE/addons/skin.re-touched +then +rm -r $WORKSPACE/addons/skin.re-touched +fi +git submodule update --init $WORKSPACE/addons/skin.re-touched diff --git a/tools/buildsteps/androidx86/prepare-xbmc b/tools/buildsteps/androidx86/prepare-xbmc index e83b22aad4..3a82e5c600 100644 --- a/tools/buildsteps/androidx86/prepare-xbmc +++ b/tools/buildsteps/androidx86/prepare-xbmc @@ -4,5 +4,8 @@ XBMC_PLATFORM_DIR=android #fetch submodules cd $WORKSPACE -rm -r $WORKSPACE/addons/skin.touched -git submodule update --init $WORKSPACE/addons/skin.touched +if test -d $WORKSPACE/addons/skin.re-touched +then +rm -r $WORKSPACE/addons/skin.re-touched +fi +git submodule update --init $WORKSPACE/addons/skin.re-touched diff --git a/tools/buildsteps/ios/prepare-xbmc b/tools/buildsteps/ios/prepare-xbmc index 2f2503b437..1b93c2bdb7 100755 --- a/tools/buildsteps/ios/prepare-xbmc +++ b/tools/buildsteps/ios/prepare-xbmc @@ -4,5 +4,8 @@ XBMC_PLATFORM_DIR=ios #fetch submodules cd $WORKSPACE -rm -r $WORKSPACE/addons/skin.touched -git submodule update --init $WORKSPACE/addons/skin.touched +if test -d $WORKSPACE/addons/skin.re-touched +then +rm -r $WORKSPACE/addons/skin.re-touched +fi +git submodule update --init $WORKSPACE/addons/skin.re-touched diff --git a/tools/buildsteps/win32/download-depends.bat b/tools/buildsteps/win32/download-depends.bat index 6faf963a51..802a65c699 100644 --- a/tools/buildsteps/win32/download-depends.bat +++ b/tools/buildsteps/win32/download-depends.bat @@ -4,7 +4,7 @@ SETLOCAL SET CUR_PATH=%WORKSPACE%\project\BuildDependencies SET TMP_PATH=%WORKSPACE%\project\BuildDependencies\scripts\tmp -SET XBMC_PATH=%WORKSPACE% +SET APP_PATH=%WORKSPACE% cd %CUR_PATH% diff --git a/tools/buildsteps/win32/download-msys.bat b/tools/buildsteps/win32/download-msys.bat index d62f3e9e7a..5e627e41b1 100644 --- a/tools/buildsteps/win32/download-msys.bat +++ b/tools/buildsteps/win32/download-msys.bat @@ -3,7 +3,7 @@ SETLOCAL SET CUR_PATH=%WORKSPACE%\project\BuildDependencies -SET XBMC_PATH=%WORKSPACE% +SET APP_PATH=%WORKSPACE% SET TMP_PATH=%CUR_PATH%\scripts\tmp SET MSYS_INSTALL_PATH="%CUR_PATH%\msys" @@ -43,7 +43,7 @@ SET FSTAB=%MINGW_INSTALL_PATH% SET FSTAB=%FSTAB:\=/% SET FSTAB=%FSTAB:"=% ECHO %FSTAB% /mingw>>"%MSYS_INSTALL_PATH%\etc\fstab" -SET FSTAB=%XBMC_PATH% +SET FSTAB=%APP_PATH% SET FSTAB=%FSTAB:\=/% SET FSTAB=%FSTAB:"=% ECHO %FSTAB% /xbmc>>"%MSYS_INSTALL_PATH%\etc\fstab" diff --git a/tools/buildsteps/win32/make-mingwlibs.sh b/tools/buildsteps/win32/make-mingwlibs.sh index 9591e476cb..417a69522e 100644 --- a/tools/buildsteps/win32/make-mingwlibs.sh +++ b/tools/buildsteps/win32/make-mingwlibs.sh @@ -83,7 +83,7 @@ echo "##### building ffmpeg dlls #####" cd /xbmc/project/Win32BuildSetup runBackgroundProcess "./buildffmpeg.sh $MAKECLEAN" setfilepath /xbmc/system/players/dvdplayer -checkfiles avcodec-55.dll avformat-55.dll avutil-52.dll postproc-52.dll swscale-2.dll avfilter-4.dll swresample-0.dll +checkfiles avcodec-56.dll avformat-56.dll avutil-54.dll postproc-53.dll swscale-3.dll avfilter-5.dll swresample-1.dll echo "##### building of ffmpeg dlls done #####" echo "##### building libdvd dlls #####" diff --git a/tools/buildsteps/win32/prepare-env.bat b/tools/buildsteps/win32/prepare-env.bat index d95fda56d7..7e1d30cbd9 100644 --- a/tools/buildsteps/win32/prepare-env.bat +++ b/tools/buildsteps/win32/prepare-env.bat @@ -25,5 +25,5 @@ IF EXIST %WORKSPACE%\project\VS2010Express\objs rmdir %WORKSPACE%\project\VS2010 IF EXIST %WORKSPACE%\project\VS2010Express\libs rmdir %WORKSPACE%\project\VS2010Express\libs /S /Q rem fetch submodules -IF EXIST "%WORKSPACE%\addons\skin.touched" rmdir "%WORKSPACE%\addons\skin.touched" /S /Q || exit /b 10 -git submodule update --init "%WORKSPACE%\addons\skin.touched" || exit /b 30 +IF EXIST "%WORKSPACE%\addons\skin.re-touched" rmdir "%WORKSPACE%\addons\skin.re-touched" /S /Q || exit /b 10 +git submodule update --init "%WORKSPACE%\addons\skin.re-touched" || exit /b 30 diff --git a/tools/darwin/Support/CopyRootFiles-atv2.command b/tools/darwin/Support/CopyRootFiles-atv2.command index 95dabad8d3..4f45dd76ee 100755 --- a/tools/darwin/Support/CopyRootFiles-atv2.command +++ b/tools/darwin/Support/CopyRootFiles-atv2.command @@ -17,7 +17,7 @@ SYNC="rsync -aq --exclude .git* --exclude .DS_Store* --exclude *.dll --exclude * SKINSYNC="rsync -aq --exclude .git* --exclude CVS* --exclude .svn* --exclude .cvsignore* --exclude .cvspass* --exclude .DS_Store* --exclude *.dll --exclude *.DLL --exclude *linux.* --exclude *.bat" # rsync command for including everything but the skins -ADDONSYNC="rsync -aq --exclude .git* --exclude CVS* --exclude .svn* --exclude .cvsignore* --exclude .cvspass* --exclude .DS_Store* --exclude addons/skin.confluence --exclude addons/skin.touched --exclude screensaver.rsxs* --exclude visualization.*" +ADDONSYNC="rsync -aq --exclude .git* --exclude CVS* --exclude .svn* --exclude .cvsignore* --exclude .cvspass* --exclude .DS_Store* --exclude addons/skin.confluence --exclude addons/skin.re-touched --exclude screensaver.rsxs* --exclude visualization.*" # binary name is XBMC but we build XBMC.bin so to get a clean binary each time mv $TARGET_BUILD_DIR/$TARGET_NAME/XBMC.bin $TARGET_BUILD_DIR/$TARGET_NAME/XBMC diff --git a/tools/darwin/Support/CopyRootFiles-ios.command b/tools/darwin/Support/CopyRootFiles-ios.command index bc60a704d3..9249aa025a 100755 --- a/tools/darwin/Support/CopyRootFiles-ios.command +++ b/tools/darwin/Support/CopyRootFiles-ios.command @@ -17,7 +17,7 @@ SYNC="rsync -aq --exclude .git* --exclude .DS_Store* --exclude *.dll --exclude * SKINSYNC="rsync -aq --exclude .git* --exclude CVS* --exclude .svn* --exclude .cvsignore* --exclude .cvspass* --exclude .DS_Store* --exclude *.dll --exclude *.DLL --exclude *linux.* --exclude *.bat" # rsync command for including everything but the skins -ADDONSYNC="rsync -aq --exclude .git* --exclude CVS* --exclude .svn* --exclude .cvsignore* --exclude .cvspass* --exclude .DS_Store* --exclude addons/skin.confluence --exclude addons/skin.touched --exclude screensaver.rsxs* --exclude visualization.*" +ADDONSYNC="rsync -aq --exclude .git* --exclude CVS* --exclude .svn* --exclude .cvsignore* --exclude .cvspass* --exclude .DS_Store* --exclude addons/skin.confluence --exclude addons/skin.re-touched --exclude screensaver.rsxs* --exclude visualization.*" # binary name is XBMC but we build XBMC.bin so to get a clean binary each time mv $TARGET_BUILD_DIR/$TARGET_NAME/XBMC.bin $TARGET_BUILD_DIR/$TARGET_NAME/XBMC @@ -40,15 +40,15 @@ ${SYNC} "$SRCROOT/addons/visualization.waveform" "$TARGET_BUILD_DIR/$TARGET ${SYNC} "$SRCROOT/language" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome" ${SYNC} "$SRCROOT/media" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome" -# sync skin.touched if it exists -if [ -f "$SRCROOT/addons/skin.touched/addon.xml" ]; then +# sync touch skin if it exists +if [ -f "$SRCROOT/addons/skin.re-touched/addon.xml" ]; then SYNCSKIN_A=${SKINSYNC} -if [ -f "$SRCROOT/addons/skin.touched/media/Textures.xbt" ]; then +if [ -f "$SRCROOT/addons/skin.re-touched/media/Textures.xbt" ]; then SYNCSKIN_A="${SKINSYNC} --exclude *.png --exclude *.jpg" fi -${SYNCSKIN_A} "$SRCROOT/addons/skin.touched" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/addons" -${SYNC} "$SRCROOT/addons/skin.touched/background" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/addons/skin.touched" -${SYNC} "$SRCROOT/addons/skin.touched/icon.png" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/addons/skin.touched" +${SYNCSKIN_A} "$SRCROOT/addons/skin.re-touched" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/addons" +${SYNC} "$SRCROOT/addons/skin.re-touched/background" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/addons/skin.re-touched" +${SYNC} "$SRCROOT/addons/skin.re-touched/icon.png" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/addons/skin.re-touched" fi # sync skin.confluence @@ -64,4 +64,4 @@ ${SYNC} "$SRCROOT/sounds" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome" ${SYNC} "$SRCROOT/system" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome" ${SYNC} "$SRCROOT/userdata" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome" -fi
\ No newline at end of file +fi diff --git a/tools/darwin/Support/CopyRootFiles-osx.command b/tools/darwin/Support/CopyRootFiles-osx.command index 783e5e5207..8bc01f2cd1 100755 --- a/tools/darwin/Support/CopyRootFiles-osx.command +++ b/tools/darwin/Support/CopyRootFiles-osx.command @@ -17,7 +17,7 @@ SYNC="rsync -aq --exclude .git* --exclude .DS_Store* --exclude *.dll --exclude * SYNCSKIN="rsync -aq --exclude .git* --exclude CVS* --exclude .svn* --exclude .cvsignore* --exclude .cvspass* --exclude .DS_Store* --exclude *.dll --exclude *.DLL --exclude *linux.* --exclude *.png --exclude *.jpg --exclude *.bat" # rsync command for including everything but the skins -ADDONSYNC="rsync -aq --exclude .git* --exclude .DS_Store* --exclude addons/skin.confluence --exclude addons/skin.touched" +ADDONSYNC="rsync -aq --exclude .git* --exclude .DS_Store* --exclude addons/skin.confluence --exclude addons/skin.re-touched" mkdir -p "$TARGET_BUILD_DIR/$TARGET_NAME/Contents/Resources/XBMC" mkdir -p "$TARGET_BUILD_DIR/$TARGET_NAME/Contents/Resources/XBMC/addons" diff --git a/tools/depends/target/ffmpeg/FFMPEG-VERSION b/tools/depends/target/ffmpeg/FFMPEG-VERSION index af3870d7a8..24b01fb8ab 100644 --- a/tools/depends/target/ffmpeg/FFMPEG-VERSION +++ b/tools/depends/target/ffmpeg/FFMPEG-VERSION @@ -1,5 +1,5 @@ LIBNAME=ffmpeg BASE_URL=https://github.com/xbmc/FFmpeg/archive -VERSION=2.3.2-Helix-alpha3 +VERSION=2.4-Helix-alpha4 ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz diff --git a/version.txt b/version.txt index f1632f63e6..f5176637fb 100644 --- a/version.txt +++ b/version.txt @@ -1,5 +1,6 @@ APP_NAME Kodi COMPANY_NAME Team-Kodi +WEBSITE http://kodi.tv VERSION_MAJOR 14 VERSION_MINOR 0 VERSION_TAG ALPHA4 diff --git a/xbmc/DllPaths_win32.h b/xbmc/DllPaths_win32.h index fcc1148f6c..7f379ae5a5 100644 --- a/xbmc/DllPaths_win32.h +++ b/xbmc/DllPaths_win32.h @@ -53,15 +53,6 @@ #define DLL_PATH_LIBDVDNAV "special://xbmcbin/system/players/dvdplayer/libdvdnav.dll" #define DLL_PATH_LIBRTMP "special://xbmcbin/system/players/dvdplayer/librtmp.dll" -/* ffmpeg */ -#define DLL_PATH_LIBAVCODEC "special://xbmcbin/system/players/dvdplayer/avcodec-54.dll" -#define DLL_PATH_LIBAVFORMAT "special://xbmcbin/system/players/dvdplayer/avformat-54.dll" -#define DLL_PATH_LIBAVUTIL "special://xbmcbin/system/players/dvdplayer/avutil-52.dll" -#define DLL_PATH_LIBAVFILTER "special://xbmcbin/system/players/dvdplayer/avfilter-3.dll" -#define DLL_PATH_LIBPOSTPROC "special://xbmcbin/system/players/dvdplayer/postproc-52.dll" -#define DLL_PATH_LIBSWSCALE "special://xbmcbin/system/players/dvdplayer/swscale-2.dll" -#define DLL_PATH_LIBSWRESAMPLE "special://xbmcbin/system/players/dvdplayer/swresample-0.dll" - /* cdrip */ #define DLL_PATH_OGG "special://xbmcbin/system/cdrip/ogg.dll" #define DLL_PATH_VORBIS "special://xbmcbin/system/cdrip/vorbis.dll" diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index 6492562c40..5ca1759b1a 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -347,6 +347,8 @@ const infomap musicplayer[] = {{ "title", MUSICPLAYER_TITLE }, { "lastplayed", MUSICPLAYER_LASTPLAYED }, { "channelname", MUSICPLAYER_CHANNEL_NAME }, { "channelnumber", MUSICPLAYER_CHANNEL_NUMBER }, + { "subchannelnumber", MUSICPLAYER_SUB_CHANNEL_NUMBER }, + { "channelnumberlabel", MUSICPLAYER_CHANNEL_NUMBER_LBL }, { "channelgroup", MUSICPLAYER_CHANNEL_GROUP } }; @@ -404,6 +406,8 @@ const infomap videoplayer[] = {{ "title", VIDEOPLAYER_TITLE }, { "nextduration", VIDEOPLAYER_NEXT_DURATION }, { "channelname", VIDEOPLAYER_CHANNEL_NAME }, { "channelnumber", VIDEOPLAYER_CHANNEL_NUMBER }, + { "subchannelnumber", VIDEOPLAYER_SUB_CHANNEL_NUMBER }, + { "channelnumberlabel", VIDEOPLAYER_CHANNEL_NUMBER_LBL }, { "channelgroup", VIDEOPLAYER_CHANNEL_GROUP }, { "hasepg", VIDEOPLAYER_HAS_EPG }, { "parentalrating", VIDEOPLAYER_PARENTAL_RATING }, @@ -1571,6 +1575,8 @@ CStdString CGUIInfoManager::GetLabel(int info, int contextWindow, std::string *f case MUSICPLAYER_LYRICS: case MUSICPLAYER_CHANNEL_NAME: case MUSICPLAYER_CHANNEL_NUMBER: + case MUSICPLAYER_SUB_CHANNEL_NUMBER: + case MUSICPLAYER_CHANNEL_NUMBER_LBL: case MUSICPLAYER_CHANNEL_GROUP: case MUSICPLAYER_PLAYCOUNT: case MUSICPLAYER_LASTPLAYED: @@ -1613,6 +1619,8 @@ CStdString CGUIInfoManager::GetLabel(int info, int contextWindow, std::string *f case VIDEOPLAYER_NEXT_DURATION: case VIDEOPLAYER_CHANNEL_NAME: case VIDEOPLAYER_CHANNEL_NUMBER: + case VIDEOPLAYER_SUB_CHANNEL_NUMBER: + case VIDEOPLAYER_CHANNEL_NUMBER_LBL: case VIDEOPLAYER_CHANNEL_GROUP: case VIDEOPLAYER_PARENTAL_RATING: case VIDEOPLAYER_PLAYCOUNT: @@ -3727,6 +3735,19 @@ CStdString CGUIInfoManager::GetMusicTagLabel(int info, const CFileItem *item) } } break; + case MUSICPLAYER_SUB_CHANNEL_NUMBER: + { + CPVRChannel* channel = m_currentFile->GetPVRChannelInfoTag(); + if (channel) + return StringUtils::Format("%i", channel->SubChannelNumber()); + } + break; + case MUSICPLAYER_CHANNEL_NUMBER_LBL: + { + CPVRChannel* channel = m_currentFile->GetPVRChannelInfoTag(); + return channel ? channel->FormattedChannelNumber() : ""; + } + break; case MUSICPLAYER_CHANNEL_GROUP: { CPVRChannel* channeltag = m_currentFile->GetPVRChannelInfoTag(); @@ -3824,10 +3845,16 @@ CStdString CGUIInfoManager::GetVideoLabel(int item) /* General channel infos */ case VIDEOPLAYER_CHANNEL_NAME: return tag->ChannelName(); + case VIDEOPLAYER_CHANNEL_NUMBER: - { - return StringUtils::Format("%i", tag->ChannelNumber());; - } + return StringUtils::Format("%i", tag->ChannelNumber()); + + case VIDEOPLAYER_SUB_CHANNEL_NUMBER: + return StringUtils::Format("%i", tag->SubChannelNumber()); + + case VIDEOPLAYER_CHANNEL_NUMBER_LBL: + return tag->FormattedChannelNumber(); + case VIDEOPLAYER_CHANNEL_GROUP: { if (tag && !tag->IsRadio()) diff --git a/xbmc/GUIInfoManager.h b/xbmc/GUIInfoManager.h index 0b5f5e938f..fa06381eed 100644 --- a/xbmc/GUIInfoManager.h +++ b/xbmc/GUIInfoManager.h @@ -215,6 +215,8 @@ namespace INFO #define MUSICPLAYER_CHANNEL_NAME 229 #define MUSICPLAYER_CHANNEL_NUMBER 230 #define MUSICPLAYER_CHANNEL_GROUP 231 +#define MUSICPLAYER_SUB_CHANNEL_NUMBER 232 +#define MUSICPLAYER_CHANNEL_NUMBER_LBL 233 #define VIDEOPLAYER_TITLE 250 #define VIDEOPLAYER_GENRE 251 @@ -279,6 +281,8 @@ namespace INFO #define VIDEOPLAYER_STEREOSCOPIC_MODE 311 #define VIDEOPLAYER_SUBTITLES_LANG 312 #define VIDEOPLAYER_AUDIO_LANG 313 +#define VIDEOPLAYER_SUB_CHANNEL_NUMBER 314 +#define VIDEOPLAYER_CHANNEL_NUMBER_LBL 315 #define CONTAINER_CAN_FILTER 342 #define CONTAINER_CAN_FILTERADVANCED 343 diff --git a/xbmc/LangInfo.h b/xbmc/LangInfo.h index a3e5794040..aa499fde8a 100644 --- a/xbmc/LangInfo.h +++ b/xbmc/LangInfo.h @@ -20,6 +20,7 @@ */ #include "settings/lib/ISettingCallback.h" +#include "utils/GlobalsHandling.h" #include <map> #include <string> @@ -186,4 +187,5 @@ protected: }; -extern CLangInfo g_langInfo; +XBMC_GLOBAL_REF(CLangInfo, g_langInfo); +#define g_langInfo XBMC_GLOBAL_USE(CLangInfo) diff --git a/xbmc/SystemGlobals.cpp b/xbmc/SystemGlobals.cpp index 2dd1734f7a..6166bd8060 100644 --- a/xbmc/SystemGlobals.cpp +++ b/xbmc/SystemGlobals.cpp @@ -28,7 +28,6 @@ #include "filesystem/DllLibCurl.h" #include "filesystem/DirectoryCache.h" #include "GUIPassword.h" -#include "LangInfo.h" #include "utils/LangCodeExpander.h" #include "PartyModeManager.h" #include "PlayListPlayer.h" @@ -53,7 +52,6 @@ #endif CXBMCRenderManager g_renderManager; - CLangInfo g_langInfo; CLangCodeExpander g_LangCodeExpander; CLocalizeStrings g_localizeStrings; CLocalizeStrings g_localizeStringsTemp; diff --git a/xbmc/addons/GUIDialogAddonInfo.cpp b/xbmc/addons/GUIDialogAddonInfo.cpp index 92e397165c..794116ca5a 100644 --- a/xbmc/addons/GUIDialogAddonInfo.cpp +++ b/xbmc/addons/GUIDialogAddonInfo.cpp @@ -55,7 +55,7 @@ using namespace ADDON; using namespace XFILE; CGUIDialogAddonInfo::CGUIDialogAddonInfo(void) - : CGUIDialog(WINDOW_DIALOG_ADDON_INFO, "DialogAddonInfo.xml") + : CGUIDialog(WINDOW_DIALOG_ADDON_INFO, "DialogAddonInfo.xml"), m_jobid(0) { m_item = CFileItemPtr(new CFileItem); m_loadType = KEEP_IN_MEMORY; diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp index fe5e8934c3..de07de5692 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp @@ -175,6 +175,7 @@ CActiveAE::CActiveAE() : m_audioCallback = NULL; m_vizInitialized = false; m_sinkHasVolume = false; + m_stats.Reset(44100); } CActiveAE::~CActiveAE() @@ -2483,7 +2484,7 @@ IAESound *CActiveAE::MakeSound(const std::string& file) AVFormatContext *fmt_ctx = NULL; AVCodecContext *dec_ctx = NULL; AVIOContext *io_ctx; - AVInputFormat *io_fmt; + AVInputFormat *io_fmt = NULL; AVCodec *dec = NULL; CActiveAESound *sound = NULL; SampleConfig config; diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp index ec10397f26..16e5513c0e 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp @@ -44,6 +44,7 @@ CActiveAEStream::CActiveAEStream(AEAudioFormat *format) m_paused = false; m_rgain = 1.0; m_volume = 1.0; + SetVolume(1.0); m_amplify = 1.0; m_streamSpace = m_format.m_frameSize * m_format.m_frames; m_streamDraining = false; diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp index 4626f166df..b251e26e9b 100644 --- a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp +++ b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp @@ -365,11 +365,10 @@ static void SinkInfoRequestCallback(pa_context *c, const pa_sink_info *i, int eo defaultDevice.m_deviceType = AE_DEVTYPE_PCM; sinkStruct->list->push_back(defaultDevice); } - bool valid = true; if (i && i->name) { CAEDeviceInfo device; - + bool valid = true; device.m_deviceName = string(i->name); device.m_displayName = string(i->description); if (i->active_port && i->active_port->description) @@ -423,7 +422,7 @@ static void SinkInfoRequestCallback(pa_context *c, const pa_sink_info *i, int eo { CLog::Log(LOGDEBUG, "PulseAudio: Skipped %s with devicestring %s", device.m_displayName.c_str(), device.m_deviceName.c_str()); } - } + } pa_threaded_mainloop_signal(sinkStruct->mainloop, 0); } diff --git a/xbmc/cores/VideoRenderers/BaseRenderer.h b/xbmc/cores/VideoRenderers/BaseRenderer.h index fb41ccf1bd..850aa6fd2d 100644 --- a/xbmc/cores/VideoRenderers/BaseRenderer.h +++ b/xbmc/cores/VideoRenderers/BaseRenderer.h @@ -29,7 +29,7 @@ #define MAX_PLANES 3 #define MAX_FIELDS 3 -#define NUM_BUFFERS 3 +#define NUM_BUFFERS 6 class CSetting; @@ -89,10 +89,11 @@ public: /** * Returns number of references a single buffer can retain when rendering a single frame */ - virtual unsigned int GetProcessorSize() { return 0; } + virtual unsigned int GetOptimalBufferSize() { return 0; } virtual unsigned int GetMaxBufferSize() { return 0; } virtual void SetBufferSize(int numBuffers) { } virtual void ReleaseBuffer(int idx) { } + virtual bool NeedBufferForRef(int idx) { return false; } virtual bool Supports(ERENDERFEATURE feature) { return false; } diff --git a/xbmc/cores/VideoRenderers/DXVA.cpp b/xbmc/cores/VideoRenderers/DXVA.cpp index 8d57509278..86146d7593 100644 --- a/xbmc/cores/VideoRenderers/DXVA.cpp +++ b/xbmc/cores/VideoRenderers/DXVA.cpp @@ -148,12 +148,9 @@ CProcessor::CProcessor() { m_service = NULL; m_process = NULL; - m_time = 0; g_Windowing.Register(this); - m_surfaces = NULL; m_context = NULL; - m_index = 0; m_progressive = true; } @@ -174,21 +171,7 @@ void CProcessor::Close() { CSingleLock lock(m_section); SAFE_RELEASE(m_process); - for(unsigned i = 0; i < m_sample.size(); i++) - { - SAFE_RELEASE(m_sample[i].context); - SAFE_RELEASE(m_sample[i].sample.SrcSurface); - } - m_sample.clear(); - SAFE_RELEASE(m_context); - if (m_surfaces) - { - for (unsigned i = 0; i < m_size; i++) - SAFE_RELEASE(m_surfaces[i]); - free(m_surfaces); - m_surfaces = NULL; - } } bool CProcessor::UpdateSize(const DXVA2_VideoDesc& dsc) @@ -371,8 +354,6 @@ bool CProcessor::Open(UINT width, UINT height, unsigned int flags, unsigned int if (!OpenProcessor()) return false; - m_time = 0; - return true; } @@ -499,136 +480,92 @@ bool CProcessor::OpenProcessor() bool CProcessor::CreateSurfaces() { LPDIRECT3DDEVICE9 pD3DDevice = g_Windowing.Get3DDevice(); - m_surfaces = (LPDIRECT3DSURFACE9*)calloc(m_size, sizeof(LPDIRECT3DSURFACE9)); + LPDIRECT3DSURFACE9 surfaces[32]; for (unsigned idx = 0; idx < m_size; idx++) + { CHECK(pD3DDevice->CreateOffscreenPlainSurface( - (m_desc.SampleWidth + 15) & ~15, - (m_desc.SampleHeight + 15) & ~15, - m_desc.Format, - D3DPOOL_DEFAULT, - &m_surfaces[idx], - NULL)); + (m_desc.SampleWidth + 15) & ~15, + (m_desc.SampleHeight + 15) & ~15, + m_desc.Format, + D3DPOOL_DEFAULT, + &surfaces[idx], + NULL)); + } m_context = new CSurfaceContext(); + for (int i = 0; i < m_size; i++) + { + m_context->AddSurface(surfaces[i]); + } return true; } -REFERENCE_TIME CProcessor::Add(DVDVideoPicture* picture) +CRenderPicture *CProcessor::Convert(DVDVideoPicture* picture) { - CSingleLock lock(m_section); - - IDirect3DSurface9* surface = NULL; - CSurfaceContext* context = NULL; - - if (picture->iFlags & DVP_FLAG_DROPPED) - return 0; - - switch (picture->format) + if (picture->format != RENDER_FMT_YUV420P) { - case RENDER_FMT_DXVA: - { - surface = (IDirect3DSurface9*)picture->data[3]; - context = picture->context; - break; - } - - case RENDER_FMT_YUV420P: - { - surface = m_surfaces[m_index]; - m_index = (m_index + 1) % m_size; - - context = m_context; - - D3DLOCKED_RECT rectangle; - if (FAILED(surface->LockRect(&rectangle, NULL, 0))) - return 0; - - // Convert to NV12 - Luma - // TODO: Optimize this later using shaders/swscale/etc. - uint8_t *s = picture->data[0]; - uint8_t* bits = (uint8_t*)(rectangle.pBits); - for (unsigned y = 0; y < picture->iHeight; y++) - { - memcpy(bits, s, picture->iWidth); - s += picture->iLineSize[0]; - bits += rectangle.Pitch; - } - - D3DSURFACE_DESC desc; - if (FAILED(surface->GetDesc(&desc))) - return 0; - - // Convert to NV12 - Chroma - for (unsigned y = 0; y < picture->iHeight/2; y++) - { - uint8_t *s_u = picture->data[1] + (y * picture->iLineSize[1]); - uint8_t *s_v = picture->data[2] + (y * picture->iLineSize[2]); - uint8_t *d_uv = ((uint8_t*)(rectangle.pBits)) + (desc.Height + y) * rectangle.Pitch; - for (unsigned x = 0; x < picture->iWidth/2; x++) - { - *d_uv++ = *s_u++; - *d_uv++ = *s_v++; - } - } - - if (FAILED(surface->UnlockRect())) - return 0; - - break; - } - - default: - { - CLog::Log(LOGWARNING, "DXVA - colorspace not supported by processor, skipping frame"); - return 0; - } + CLog::Log(LOGERROR, "%s - colorspace not supported by processor, skipping frame.", __FUNCTION__); + return NULL; } - if (!surface || !context) - return 0; - - m_time += 2; - - surface->AddRef(); - context->Acquire(); + IDirect3DSurface9* surface = m_context->GetFree(NULL); + if (!surface) + { + CLog::Log(LOGERROR, "%s - no free video surface", __FUNCTION__); + return NULL; + } - SVideoSample vs = {}; - vs.sample.Start = m_time; - vs.sample.End = 0; - vs.sample.SampleFormat = m_desc.SampleFormat; + D3DLOCKED_RECT rectangle; + if (FAILED(surface->LockRect(&rectangle, NULL, 0))) + { + CLog::Log(LOGERROR, "%s - could not lock rect", __FUNCTION__); + m_context->ClearReference(surface); + return NULL; + } - if (picture->iFlags & DVP_FLAG_INTERLACED) + // Convert to NV12 - Luma + // TODO: Optimize this later using shaders/swscale/etc. + uint8_t *s = picture->data[0]; + uint8_t* bits = (uint8_t*)(rectangle.pBits); + for (unsigned y = 0; y < picture->iHeight; y++) { - if (picture->iFlags & DVP_FLAG_TOP_FIELD_FIRST) - vs.sample.SampleFormat.SampleFormat = DXVA2_SampleFieldInterleavedEvenFirst; - else - vs.sample.SampleFormat.SampleFormat = DXVA2_SampleFieldInterleavedOddFirst; + memcpy(bits, s, picture->iWidth); + s += picture->iLineSize[0]; + bits += rectangle.Pitch; } - else + D3DSURFACE_DESC desc; + if (FAILED(surface->GetDesc(&desc))) { - vs.sample.SampleFormat.SampleFormat = DXVA2_SampleProgressiveFrame; + CLog::Log(LOGERROR, "%s - could not get surface descriptor", __FUNCTION__); + m_context->ClearReference(surface); + return NULL; } - - vs.sample.PlanarAlpha = DXVA2_Fixed32OpaqueAlpha(); - vs.sample.SampleData = 0; - vs.sample.SrcSurface = surface; - - - vs.context = context; - - if(!m_sample.empty()) - m_sample.back().sample.End = vs.sample.Start; - - m_sample.push_back(vs); - if (m_sample.size() > m_size) + // Convert to NV12 - Chroma + uint8_t *s_u, *s_v, *d_uv; + for (unsigned y = 0; y < picture->iHeight / 2; y++) + { + s_u = picture->data[1] + (y * picture->iLineSize[1]); + s_v = picture->data[2] + (y * picture->iLineSize[2]); + d_uv = ((uint8_t*)(rectangle.pBits)) + (desc.Height + y) * rectangle.Pitch; + for (unsigned x = 0; x < picture->iWidth / 2; x++) + { + *d_uv++ = *s_u++; + *d_uv++ = *s_v++; + } + } + if (FAILED(surface->UnlockRect())) { - SAFE_RELEASE(m_sample.front().context); - SAFE_RELEASE(m_sample.front().sample.SrcSurface); - m_sample.pop_front(); + CLog::Log(LOGERROR, "%s - failed to unlock surface", __FUNCTION__); + m_context->ClearReference(surface); + return NULL; } - return m_time; + m_context->ClearReference(surface); + m_context->MarkRender(surface); + CRenderPicture *pic = new CRenderPicture(m_context); + pic->surface = surface; + return pic; } static DXVA2_Fixed32 ConvertRange(const DXVA2_ValueRange& range, int value, int min, int max, int def) @@ -645,10 +582,13 @@ static DXVA2_Fixed32 ConvertRange(const DXVA2_ValueRange& range, int value, int return range.DefaultValue; } -bool CProcessor::Render(CRect src, CRect dst, IDirect3DSurface9* target, REFERENCE_TIME time, DWORD flags) +bool CProcessor::Render(CRect src, CRect dst, IDirect3DSurface9* target, IDirect3DSurface9** source, DWORD flags, UINT frameIdx) { CSingleLock lock(m_section); + if (!source[2]) + return false; + // With auto deinterlacing, the Ion Gen. 1 drops some frames with deinterlacing processor + progressive flags for progressive material. // For that GPU (or when specified by an advanced setting), use the progressive processor. // This is at the expense of the switch speed when video interlacing flags change and a deinterlacing processor is actually required. @@ -667,30 +607,6 @@ bool CProcessor::Render(CRect src, CRect dst, IDirect3DSurface9* target, REFEREN return false; } - // MinTime and MaxTime are the first and last samples to keep. Delete the rest. - REFERENCE_TIME MinTime = time - m_max_back_refs*2; - REFERENCE_TIME MaxTime = time + m_max_fwd_refs*2; - - SSamples::iterator it = m_sample.begin(); - while (it != m_sample.end()) - { - if (it->sample.Start < MinTime) - { - SAFE_RELEASE(it->context); - SAFE_RELEASE(it->sample.SrcSurface); - it = m_sample.erase(it); - } - else - ++it; - } - - if(m_sample.empty()) - return false; - - // MinTime and MaxTime are now the first and last samples to feed the processor. - MinTime = time - m_caps.NumBackwardRefSamples*2; - MaxTime = time + m_caps.NumForwardRefSamples*2; - D3DSURFACE_DESC desc; CHECK(target->GetDesc(&desc)); CRect rectTarget(0, 0, desc.Width, desc.Height); @@ -698,63 +614,70 @@ bool CProcessor::Render(CRect src, CRect dst, IDirect3DSurface9* target, REFEREN RECT sourceRECT = { src.x1, src.y1, src.x2, src.y2 }; RECT dstRECT = { dst.x1, dst.y1, dst.x2, dst.y2 }; + // set sample format for progressive and interlaced + UINT sampleFormat = DXVA2_SampleProgressiveFrame; + if (flags & RENDER_FLAG_FIELD0 && flags & RENDER_FLAG_TOP) + sampleFormat = DXVA2_SampleFieldInterleavedEvenFirst; + else if (flags & RENDER_FLAG_FIELD1 && flags & RENDER_FLAG_BOT) + sampleFormat = DXVA2_SampleFieldInterleavedEvenFirst; + if (flags & RENDER_FLAG_FIELD0 && flags & RENDER_FLAG_BOT) + sampleFormat = DXVA2_SampleFieldInterleavedOddFirst; + if (flags & RENDER_FLAG_FIELD1 && flags & RENDER_FLAG_TOP) + sampleFormat = DXVA2_SampleFieldInterleavedOddFirst; // How to prepare the samples array for VideoProcessBlt // - always provide current picture + the number of forward and backward references required by the current processor. // - provide the surfaces in the array in increasing temporal order // - at the start of playback, there may not be enough samples available. Use SampleFormat.SampleFormat = DXVA2_SampleUnknown for the missing samples. - int count = 1 + m_caps.NumBackwardRefSamples + m_caps.NumForwardRefSamples; - int valid = 0; - auto_aptr<DXVA2_VideoSample> samp(new DXVA2_VideoSample[count]); - - for (int i = 0; i < count; i++) - samp[i].SampleFormat.SampleFormat = DXVA2_SampleUnknown; - - for(it = m_sample.begin(); it != m_sample.end() && valid < count; ++it) + unsigned int providedPast = 0; + for (int i = 3; i < 8; i++) { - if (it->sample.Start >= MinTime && it->sample.Start <= MaxTime) - { - DXVA2_VideoSample& vs = samp[(it->sample.Start - MinTime) / 2]; - vs = it->sample; - vs.SrcRect = sourceRECT; - vs.DstRect = dstRECT; - if(vs.End == 0) - vs.End = vs.Start + 2; - - // Override the sample format when the processor doesn't need to deinterlace or when deinterlacing is forced and flags are missing. - if (m_progressive) - vs.SampleFormat.SampleFormat = DXVA2_SampleProgressiveFrame; - else if (m_deinterlace_mode == VS_DEINTERLACEMODE_FORCE && vs.SampleFormat.SampleFormat == DXVA2_SampleProgressiveFrame) - vs.SampleFormat.SampleFormat = DXVA2_SampleFieldInterleavedEvenFirst; - - valid++; - } + if (source[i]) + providedPast++; } - - // MS' guidelines above don't work. The blit fails when the processor is given DXVA2_SampleUnknown samples (with ATI at least). - // The ATI driver works with a reduced number of samples though, support that for now. - // Problem is an ambiguity if there are future refs requested by the processor. There are no such implementations at the moment. - int offset = 0; - if(valid < count) + unsigned int providedFuture = 0; + for (int i = 1; i >= 0; i--) + { + if (source[i]) + providedFuture++; + } + int futureFrames = std::min(providedFuture, m_caps.NumForwardRefSamples); + int pastFrames = std::min(providedPast, m_caps.NumBackwardRefSamples); + + int count = 1 + pastFrames + futureFrames; + auto_aptr<DXVA2_VideoSample> samp(new DXVA2_VideoSample[count]); + + int start = 2 - futureFrames; + int end = 2 + pastFrames; + int sampIdx = 0; + for (int i = end; i >= start; i--) { - CLog::Log(LOGWARNING, __FUNCTION__" - did not find all required samples, adjusting the sample array."); + if (!source[i]) + continue; + + DXVA2_VideoSample& vs = samp[sampIdx]; + vs.SrcSurface = source[i]; + vs.SrcRect = sourceRECT; + vs.DstRect = dstRECT; + vs.SampleData = 0; + vs.Start = frameIdx + (sampIdx - pastFrames) * 2; + vs.End = vs.Start + 2; + vs.PlanarAlpha = DXVA2_Fixed32OpaqueAlpha(); + vs.SampleFormat.SampleFormat = sampleFormat; + + // Override the sample format when the processor doesn't need to deinterlace or when deinterlacing is forced and flags are missing. + if (m_progressive) + vs.SampleFormat.SampleFormat = DXVA2_SampleProgressiveFrame; + else if (m_deinterlace_mode == VS_DEINTERLACEMODE_FORCE && vs.SampleFormat.SampleFormat == DXVA2_SampleProgressiveFrame) + vs.SampleFormat.SampleFormat = DXVA2_SampleFieldInterleavedEvenFirst; - for (int i = 0; i < count; i++) - { - if (samp[i].SampleFormat.SampleFormat == DXVA2_SampleUnknown) - offset = i+1; - } - count -= offset; - if (count == 0) - { - CLog::Log(LOGWARNING, __FUNCTION__" - no usable samples."); - return false; - } + sampIdx++; } + DXVA2_VideoProcessBltParams blt = {}; - blt.TargetFrame = time; + blt.TargetFrame = frameIdx; if (flags & RENDER_FLAG_FIELD1) blt.TargetFrame += 1; blt.TargetRect = dstRECT; @@ -787,7 +710,7 @@ bool CProcessor::Render(CRect src, CRect dst, IDirect3DSurface9* target, REFEREN float verts[2][3]= {}; g_Windowing.Get3DDevice()->DrawPrimitiveUP(D3DPT_TRIANGLEFAN, 1, verts, 3*sizeof(float)); - CHECK(m_process->VideoProcessBlt(target, &blt, &samp[offset], count, NULL)); + CHECK(m_process->VideoProcessBlt(target, &blt, &samp[0], count, NULL)); return true; } diff --git a/xbmc/cores/VideoRenderers/DXVA.h b/xbmc/cores/VideoRenderers/DXVA.h index 38da6f7209..460e665e40 100644 --- a/xbmc/cores/VideoRenderers/DXVA.h +++ b/xbmc/cores/VideoRenderers/DXVA.h @@ -44,9 +44,10 @@ public: virtual void UnInit(); virtual bool Open(UINT width, UINT height, unsigned int flags, unsigned int format, unsigned int extended_format); virtual void Close(); - virtual REFERENCE_TIME Add(DVDVideoPicture* picture); - virtual bool Render(CRect src, CRect dst, IDirect3DSurface9* target, const REFERENCE_TIME time, DWORD flags); + virtual CRenderPicture *Convert(DVDVideoPicture* picture); + virtual bool Render(CRect src, CRect dst, IDirect3DSurface9* target, IDirect3DSurface9** source, DWORD flags, UINT frameIdx); virtual unsigned Size() { if (m_service) return m_size; return 0; } + virtual unsigned PastRefs() { return m_max_back_refs; } virtual void OnCreateDevice() {} virtual void OnDestroyDevice() { CSingleLock lock(m_section); Close(); } @@ -72,25 +73,14 @@ protected: DXVA2_ValueRange m_contrast; DXVA2_ValueRange m_hue; DXVA2_ValueRange m_saturation; - REFERENCE_TIME m_time; unsigned m_size; unsigned m_max_back_refs; unsigned m_max_fwd_refs; EDEINTERLACEMODE m_deinterlace_mode; EINTERLACEMETHOD m_interlace_method; bool m_progressive; // true for progressive source or to force ignoring interlacing flags. - unsigned m_index; - - struct SVideoSample - { - DXVA2_VideoSample sample; - CSurfaceContext* context; - }; - typedef std::deque<SVideoSample> SSamples; - SSamples m_sample; CCriticalSection m_section; - LPDIRECT3DSURFACE9* m_surfaces; CSurfaceContext* m_context; bool m_quirk_nodeintprocforprog; static CCriticalSection m_dlSection; diff --git a/xbmc/cores/VideoRenderers/DXVAHD.cpp b/xbmc/cores/VideoRenderers/DXVAHD.cpp index e9ac51c26f..357a19d726 100644 --- a/xbmc/cores/VideoRenderers/DXVAHD.cpp +++ b/xbmc/cores/VideoRenderers/DXVAHD.cpp @@ -84,11 +84,8 @@ CProcessorHD::CProcessorHD() { m_pDXVAHD = NULL; m_pDXVAVP = NULL; - m_index = 0; - m_frame = 0; g_Windowing.Register(this); - m_surfaces = NULL; m_context = NULL; } @@ -109,24 +106,7 @@ void CProcessorHD::Close() { CSingleLock lock(m_section); SAFE_RELEASE(m_pDXVAVP); - - for(unsigned i = 0; i < m_frames.size(); i++) - { - SAFE_RELEASE(m_frames[i].context); - SAFE_RELEASE(m_frames[i].pSurface); - } - m_frames.clear(); - SAFE_RELEASE(m_context); - if (m_surfaces) - { - for (unsigned i = 0; i < m_size; i++) - { - SAFE_RELEASE(m_surfaces[i]); - } - free(m_surfaces); - m_surfaces = NULL; - } } bool CProcessorHD::UpdateSize(const DXVA2_VideoDesc& dsc) @@ -275,8 +255,6 @@ bool CProcessorHD::Open(UINT width, UINT height, unsigned int flags, unsigned in return false; } - m_frame = 0; - return true; } @@ -300,8 +278,8 @@ bool CProcessorHD::OpenProcessor() CHECK(m_pDXVAHD->CreateVideoProcessor(&m_device, &m_pDXVAVP)); DXVAHD_STREAM_STATE_D3DFORMAT_DATA d3dformat = { m_format }; - LOGIFERROR(m_pDXVAVP->SetVideoProcessStreamState( 0, DXVAHD_STREAM_STATE_D3DFORMAT - , sizeof(d3dformat), &d3dformat )); + CHECK(m_pDXVAVP->SetVideoProcessStreamState( 0, DXVAHD_STREAM_STATE_D3DFORMAT + , sizeof(d3dformat), &d3dformat )); DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA data = { @@ -310,19 +288,19 @@ bool CProcessorHD::OpenProcessor() m_flags & CONF_FLAGS_YUVCOEF_BT709 ? 1 : 0, // YCbCr_Matrix: 0=BT.601, 1=BT.709 m_flags & CONF_FLAGS_YUV_FULLRANGE ? 1 : 0 // YCbCr_xvYCC: 0=Conventional YCbCr, 1=xvYCC }; - LOGIFERROR(m_pDXVAVP->SetVideoProcessStreamState( 0, DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE - , sizeof(data), &data )); + CHECK(m_pDXVAVP->SetVideoProcessStreamState( 0, DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE + , sizeof(data), &data )); DXVAHD_COLOR_YCbCrA bgColor = { 0.0625f, 0.5f, 0.5f, 1.0f }; // black color DXVAHD_COLOR backgroundColor; backgroundColor.YCbCr = bgColor; DXVAHD_BLT_STATE_BACKGROUND_COLOR_DATA backgroundData = { true, backgroundColor }; // {YCbCr, DXVAHD_COLOR} - LOGIFERROR(m_pDXVAVP->SetVideoProcessBltState( DXVAHD_BLT_STATE_BACKGROUND_COLOR - , sizeof (backgroundData), &backgroundData )); + CHECK(m_pDXVAVP->SetVideoProcessBltState( DXVAHD_BLT_STATE_BACKGROUND_COLOR + , sizeof (backgroundData), &backgroundData )); DXVAHD_STREAM_STATE_ALPHA_DATA alpha = { true, 1.0f }; - LOGIFERROR(m_pDXVAVP->SetVideoProcessStreamState( 0, DXVAHD_STREAM_STATE_ALPHA - , sizeof(alpha), &alpha )); + CHECK(m_pDXVAVP->SetVideoProcessStreamState( 0, DXVAHD_STREAM_STATE_ALPHA + , sizeof(alpha), &alpha )); return true; } @@ -330,139 +308,25 @@ bool CProcessorHD::OpenProcessor() bool CProcessorHD::CreateSurfaces() { LPDIRECT3DDEVICE9 pD3DDevice = g_Windowing.Get3DDevice(); - m_surfaces = (LPDIRECT3DSURFACE9*)calloc(m_size, sizeof(LPDIRECT3DSURFACE9)); + LPDIRECT3DSURFACE9 surfaces[32]; for (unsigned idx = 0; idx < m_size; idx++) - CHECK(pD3DDevice->CreateOffscreenPlainSurface( - (m_width + 15) & ~15, - (m_height + 15) & ~15, - m_format, - m_VPDevCaps.InputPool, - &m_surfaces[idx], - NULL)); - - m_context = new CSurfaceContext(); - - return true; -} - -REFERENCE_TIME CProcessorHD::Add(DVDVideoPicture* picture) -{ - CSingleLock lock(m_section); - - IDirect3DSurface9* surface = NULL; - CSurfaceContext* context = NULL; - - if (picture->iFlags & DVP_FLAG_DROPPED) { - return 0; - } - - switch (picture->format) - { - case RENDER_FMT_DXVA: - { - surface = (IDirect3DSurface9*)picture->data[3]; - context = picture->context; - break; - } - - case RENDER_FMT_YUV420P: - { - if (!m_surfaces) - { - CLog::Log(LOGWARNING, __FUNCTION__" - not initialized."); - return 0; - } - - surface = m_surfaces[m_index]; - m_index = (m_index + 1) % m_size; - - context = m_context; - - D3DLOCKED_RECT rectangle; - if (FAILED(surface->LockRect(&rectangle, NULL, 0))) - { - return 0; - } - - // Convert to NV12 - Luma - // TODO: Optimize this later using shaders/swscale/etc. - uint8_t *s = picture->data[0]; - uint8_t* bits = (uint8_t*)(rectangle.pBits); - for (unsigned y = 0; y < picture->iHeight; y++) - { - memcpy(bits, s, picture->iWidth); - s += picture->iLineSize[0]; - bits += rectangle.Pitch; - } - - D3DSURFACE_DESC desc; - if (FAILED(surface->GetDesc(&desc))) - { - return 0; - } - - // Convert to NV12 - Chroma - uint8_t *s_u, *s_v, *d_uv; - for (unsigned y = 0; y < picture->iHeight/2; y++) - { - s_u = picture->data[1] + (y * picture->iLineSize[1]); - s_v = picture->data[2] + (y * picture->iLineSize[2]); - d_uv = ((uint8_t*)(rectangle.pBits)) + (desc.Height + y) * rectangle.Pitch; - for (unsigned x = 0; x < picture->iWidth/2; x++) - { - *d_uv++ = *s_u++; - *d_uv++ = *s_v++; - } - } - - if (FAILED(surface->UnlockRect())) - { - return 0; - } - break; - } - - default: - { - CLog::Log(LOGWARNING, __FUNCTION__" - colorspace not supported by processor, skipping frame."); - return 0; - } - } - - if (!surface || !context) - { - return 0; - } - m_frame += 2; - - surface->AddRef(); - context->Acquire(); - - SFrame frame = {}; - frame.index = m_frame; - frame.pSurface = surface; - frame.context = context; - frame.format = DXVAHD_FRAME_FORMAT_PROGRESSIVE; - - if (picture->iFlags & DVP_FLAG_INTERLACED) - { - frame.format = picture->iFlags & DVP_FLAG_TOP_FIELD_FIRST - ? DXVAHD_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST - : DXVAHD_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST; + CHECK(pD3DDevice->CreateOffscreenPlainSurface( + (m_width + 15) & ~15, + (m_height + 15) & ~15, + m_format, + m_VPDevCaps.InputPool, + &surfaces[idx], + NULL)); } - m_frames.push_back(frame); - - if (m_frames.size() > m_size) + m_context = new CSurfaceContext(); + for (int i = 0; i < m_size; i++) { - SAFE_RELEASE(m_frames.front().context); - SAFE_RELEASE(m_frames.front().pSurface); - - m_frames.pop_front(); + m_context->AddSurface(surfaces[i]); } - return m_frame; + return true; } bool CProcessorHD::ApplyFilter(DXVAHD_FILTER filter, int value, int min, int max, int def) @@ -499,7 +363,7 @@ bool CProcessorHD::ApplyFilter(DXVAHD_FILTER filter, int value, int min, int max return !FAILED( m_pDXVAVP->SetVideoProcessStreamState( 0, state, sizeof(data), &data ) ); } -bool CProcessorHD::Render(CRect src, CRect dst, IDirect3DSurface9* target, REFERENCE_TIME frame, DWORD flags) +bool CProcessorHD::Render(CRect src, CRect dst, IDirect3DSurface9* target, IDirect3DSurface9** source, DWORD flags, UINT frameIdx) { CSingleLock lock(m_section); @@ -509,6 +373,9 @@ bool CProcessorHD::Render(CRect src, CRect dst, IDirect3DSurface9* target, REFER return false; } + if (!source[2]) + return false; + EDEINTERLACEMODE deinterlace_mode = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode; if (g_advancedSettings.m_DXVANoDeintProcForProgressive) deinterlace_mode = (flags & RENDER_FLAG_FIELD0 || flags & RENDER_FLAG_FIELD1) ? VS_DEINTERLACEMODE_FORCE : VS_DEINTERLACEMODE_OFF; @@ -518,27 +385,6 @@ bool CProcessorHD::Render(CRect src, CRect dst, IDirect3DSurface9* target, REFER || ( interlace_method != VS_INTERLACEMETHOD_DXVA_BOB && interlace_method != VS_INTERLACEMETHOD_DXVA_BEST); - // minFrame is the first samples to keep. Delete the rest. - REFERENCE_TIME minFrame = frame - m_max_back_refs * 2; - - SFrames::iterator it = m_frames.begin(); - while (it != m_frames.end()) - { - if (it->index < minFrame) - { - SAFE_RELEASE(it->context); - SAFE_RELEASE(it->pSurface); - it = m_frames.erase(it); - } - else - ++it; - } - - if(m_frames.empty()) - { - return false; - } - D3DSURFACE_DESC desc; CHECK(target->GetDesc(&desc)); CRect rectTarget(0, 0, desc.Width, desc.Height); @@ -546,51 +392,62 @@ bool CProcessorHD::Render(CRect src, CRect dst, IDirect3DSurface9* target, REFER RECT sourceRECT = { src.x1, src.y1, src.x2, src.y2 }; RECT dstRECT = { dst.x1, dst.y1, dst.x2, dst.y2 }; - // MinTime and MaxTime are now the first and last samples to feed the processor. - minFrame = frame - m_VPCaps.PastFrames * 2; - REFERENCE_TIME maxFrame = frame + m_VPCaps.FutureFrames * 2; - - bool isValid(false); DXVAHD_FRAME_FORMAT dxvaFrameFormat = DXVAHD_FRAME_FORMAT_PROGRESSIVE; + unsigned int providedPast = 0; + for (int i = 3; i < 8; i++) + { + if (source[i]) + providedPast++; + } + unsigned int providedFuture = 0; + for (int i = 1; i >= 0; i--) + { + if (source[i]) + providedFuture++; + } + int futureFrames = std::min(providedFuture, m_VPCaps.FutureFrames); + int pastFrames = std::min(providedPast, m_VPCaps.PastFrames); + DXVAHD_STREAM_DATA stream_data = { 0 }; stream_data.Enable = TRUE; - stream_data.PastFrames = 0; - stream_data.FutureFrames = 0; - stream_data.ppPastSurfaces = new IDirect3DSurface9*[m_VPCaps.PastFrames]; - stream_data.ppFutureSurfaces = new IDirect3DSurface9*[m_VPCaps.FutureFrames]; + stream_data.PastFrames = pastFrames; + stream_data.FutureFrames = futureFrames; + stream_data.ppPastSurfaces = new IDirect3DSurface9*[pastFrames]; + stream_data.ppFutureSurfaces = new IDirect3DSurface9*[futureFrames]; - for(it = m_frames.begin(); it != m_frames.end(); ++it) + int start = 2 - futureFrames; + int end = 2 + pastFrames; + + for (int i = start; i <= end; i++) { - if (it->index >= minFrame && it->index <= maxFrame) + if (!source[i]) + continue; + + if (i > 2) { - if (it->index < frame) - { - // frames order should be { .., T-1, T-2, T-3 } - stream_data.ppPastSurfaces[(frame - it->index)/2 - 1] = it->pSurface; - stream_data.PastFrames++; - } - else if (it->index == frame) - { - stream_data.pInputSurface = it->pSurface; - dxvaFrameFormat = (DXVAHD_FRAME_FORMAT) it->format; - isValid = true; - } - else if (it->index > frame) - { - // frames order should be { T+1, T+2, T+3, .. } - stream_data.ppFutureSurfaces[(it->index - frame)/2 - 1] = it->pSurface; - stream_data.FutureFrames++; - } + // frames order should be { ?, T-3, T-2, T-1 } + stream_data.ppPastSurfaces[2+pastFrames-i] = source[i]; + } + else if (i == 2) + { + stream_data.pInputSurface = source[2]; + } + else if (i < 2) + { + // frames order should be { T+1, T+2, T+3, .. } + stream_data.ppFutureSurfaces[1-i] = source[i]; } } - // no present frame, skip - if (!isValid) - { - CLog::Log(LOGWARNING, __FUNCTION__" - uncomplete stream data, skipping frame."); - return false; - } + if (flags & RENDER_FLAG_FIELD0 && flags & RENDER_FLAG_TOP) + dxvaFrameFormat = DXVAHD_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST; + else if (flags & RENDER_FLAG_FIELD1 && flags & RENDER_FLAG_BOT) + dxvaFrameFormat = DXVAHD_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST; + if (flags & RENDER_FLAG_FIELD0 && flags & RENDER_FLAG_BOT) + dxvaFrameFormat = DXVAHD_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST; + if (flags & RENDER_FLAG_FIELD1 && flags & RENDER_FLAG_TOP) + dxvaFrameFormat = DXVAHD_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST; // Override the sample format when the processor doesn't need to deinterlace or when deinterlacing is forced and flags are missing. if (progressive) @@ -606,7 +463,7 @@ bool CProcessorHD::Render(CRect src, CRect dst, IDirect3DSurface9* target, REFER bool frameProgressive = dxvaFrameFormat == DXVAHD_FRAME_FORMAT_PROGRESSIVE; // Progressive or Interlaced video at normal rate. - stream_data.InputFrameOrField = frame + (flags & RENDER_FLAG_FIELD1 ? 1 : 0); + stream_data.InputFrameOrField = frameIdx; stream_data.OutputIndex = flags & RENDER_FLAG_FIELD1 && !frameProgressive ? 1 : 0; DXVAHD_STREAM_STATE_FRAME_FORMAT_DATA frame_format = { dxvaFrameFormat }; @@ -642,7 +499,7 @@ bool CProcessorHD::Render(CRect src, CRect dst, IDirect3DSurface9* target, REFER LOGIFERROR( m_pDXVAVP->SetVideoProcessBltState( DXVAHD_BLT_STATE_TARGET_RECT , sizeof(targetRect), &targetRect ) ); - HRESULT hr = m_pDXVAVP->VideoProcessBltHD(target, frame, 1, &stream_data); + HRESULT hr = m_pDXVAVP->VideoProcessBltHD(target, frameIdx, 1, &stream_data); if(FAILED(hr)) { CLog::Log(LOGERROR, __FUNCTION__" - failed executing VideoProcessBltHD with error %x", hr); diff --git a/xbmc/cores/VideoRenderers/DXVAHD.h b/xbmc/cores/VideoRenderers/DXVAHD.h index 11cb194e0d..00b6948f40 100644 --- a/xbmc/cores/VideoRenderers/DXVAHD.h +++ b/xbmc/cores/VideoRenderers/DXVAHD.h @@ -59,9 +59,9 @@ public: virtual void UnInit(); virtual bool Open(UINT width, UINT height, unsigned int flags, unsigned int format, unsigned int extended_format); virtual void Close(); - virtual REFERENCE_TIME Add(DVDVideoPicture* picture); - virtual bool Render(CRect src, CRect dst, IDirect3DSurface9* target, const REFERENCE_TIME time, DWORD flags); + virtual bool Render(CRect src, CRect dst, IDirect3DSurface9* target, IDirect3DSurface9 **source, DWORD flags, UINT frameIdx); virtual unsigned Size() { if (m_pDXVAHD) return m_size; return 0; } + virtual unsigned PastRefs() { return m_max_back_refs; } virtual void OnCreateDevice() {} virtual void OnDestroyDevice() { CSingleLock lock(m_section); UnInit(); } @@ -83,7 +83,6 @@ protected: unsigned int m_width; unsigned int m_height; D3DFORMAT m_format; - REFERENCE_TIME m_frame; unsigned int m_flags; unsigned int m_renderFormat; @@ -94,15 +93,6 @@ protected: }; ProcAmpInfo m_Filters[NUM_FILTERS]; - struct SFrame - { - IDirect3DSurface9* pSurface; - CSurfaceContext* context; - unsigned int index; - unsigned format; - }; - typedef std::deque<SFrame> SFrames; - SFrames m_frames; static DXVAHDCreateVideoServicePtr m_DXVAHDCreateVideoService; }; diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp index 417577d17f..e1219d4fe6 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp @@ -3496,16 +3496,17 @@ void CLinuxRendererGL::UnBindPbo(YUVBUFFER& buff) glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0); } -unsigned int CLinuxRendererGL::GetProcessorSize() -{ - if(m_format == RENDER_FMT_VDPAU - || m_format == RENDER_FMT_VDPAU_420 - || m_format == RENDER_FMT_VAAPI - || m_format == RENDER_FMT_VAAPINV12 - || m_format == RENDER_FMT_CVBREF) - return 1; +unsigned int CLinuxRendererGL::GetOptimalBufferSize() +{ + if(m_format == RENDER_FMT_CVBREF) + return 2; + else if (m_format == RENDER_FMT_VAAPI || + m_format == RENDER_FMT_VAAPINV12 || + m_format == RENDER_FMT_VDPAU || + m_format == RENDER_FMT_VDPAU_420) + return 5; else - return 0; + return 3; } #ifdef HAVE_LIBVDPAU diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.h b/xbmc/cores/VideoRenderers/LinuxRendererGL.h index 1e46940c78..813ca686f9 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGL.h +++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.h @@ -136,7 +136,7 @@ public: virtual void ReleaseBuffer(int idx); virtual void SetBufferSize(int numBuffers) { m_NumYV12Buffers = numBuffers; } virtual unsigned int GetMaxBufferSize() { return NUM_BUFFERS; } - virtual unsigned int GetProcessorSize(); + virtual unsigned int GetOptimalBufferSize(); #ifdef HAVE_LIBVDPAU virtual void AddProcessor(VDPAU::CVdpauRenderPicture* vdpau, int index); diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp index 8db4ea1538..88292d4a1d 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp +++ b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp @@ -2893,15 +2893,9 @@ EINTERLACEMETHOD CLinuxRendererGLES::AutoInterlaceMethod() #endif } -unsigned int CLinuxRendererGLES::GetProcessorSize() +unsigned int CLinuxRendererGLES::GetOptimalBufferSize() { - if(m_format == RENDER_FMT_OMXEGL - || m_format == RENDER_FMT_CVBREF - || m_format == RENDER_FMT_EGLIMG - || m_format == RENDER_FMT_MEDIACODEC) - return 1; - else - return 0; + return 2; } #ifdef HAVE_LIBOPENMAX diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGLES.h b/xbmc/cores/VideoRenderers/LinuxRendererGLES.h index 1e89ecf71d..4be992d413 100644 --- a/xbmc/cores/VideoRenderers/LinuxRendererGLES.h +++ b/xbmc/cores/VideoRenderers/LinuxRendererGLES.h @@ -143,7 +143,7 @@ public: virtual void ReleaseBuffer(int idx); virtual void SetBufferSize(int numBuffers) { m_NumYV12Buffers = numBuffers; } virtual unsigned int GetMaxBufferSize() { return NUM_BUFFERS; } - virtual unsigned int GetProcessorSize(); + virtual unsigned int GetOptimalBufferSize(); virtual void RenderUpdate(bool clear, DWORD flags = 0, DWORD alpha = 255); diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp index b2f2d1f20e..64273f8be8 100644 --- a/xbmc/cores/VideoRenderers/RenderManager.cpp +++ b/xbmc/cores/VideoRenderers/RenderManager.cpp @@ -261,20 +261,14 @@ bool CXBMCRenderManager::Configure(unsigned int width, unsigned int height, unsi lock2.Enter(); m_format = format; - int processor = m_pRenderer->GetProcessorSize(); - if(processor > buffers) /* DXVA-HD returns processor size 6 */ - m_QueueSize = 3; /* we need queue size of 3 to get future frames in the processor */ - else if(processor) - m_QueueSize = buffers - processor + 1; /* respect maximum refs */ - else - m_QueueSize = m_pRenderer->GetMaxBufferSize(); /* no refs to data */ - + int renderbuffers = m_pRenderer->GetOptimalBufferSize(); + m_QueueSize = std::min(buffers, renderbuffers); m_QueueSize = std::min(m_QueueSize, (int)m_pRenderer->GetMaxBufferSize()); m_QueueSize = std::min(m_QueueSize, NUM_BUFFERS); if(m_QueueSize < 2) { m_QueueSize = 2; - CLog::Log(LOGWARNING, "CXBMCRenderManager::Configure - queue size too small (%d, %d, %d)", m_QueueSize, processor, buffers); + CLog::Log(LOGWARNING, "CXBMCRenderManager::Configure - queue size too small (%d, %d, %d)", m_QueueSize, renderbuffers, buffers); } m_pRenderer->SetBufferSize(m_QueueSize); @@ -365,11 +359,16 @@ void CXBMCRenderManager::FrameMove() /* release all previous */ for(std::deque<int>::iterator it = m_discard.begin(); it != m_discard.end(); ) { - // TODO check for fence - m_pRenderer->ReleaseBuffer(*it); - m_overlays.Release(*it); - m_free.push_back(*it); - it = m_discard.erase(it); + // renderer may want to keep the frame for postprocessing + if (!m_pRenderer->NeedBufferForRef(*it)) + { + m_pRenderer->ReleaseBuffer(*it); + m_overlays.Release(*it); + m_free.push_back(*it); + it = m_discard.erase(it); + } + else + ++it; } } } @@ -856,10 +855,14 @@ void CXBMCRenderManager::UpdateResolution() } -unsigned int CXBMCRenderManager::GetProcessorSize() +unsigned int CXBMCRenderManager::GetOptimalBufferSize() { CSharedLock lock(m_sharedSection); - return std::max(4, NUM_BUFFERS); + if (!m_pRenderer) + { + CLog::Log(LOGERROR, "%s - renderer is NULL", __FUNCTION__); + } + return m_pRenderer->GetMaxBufferSize(); } // Supported pixel formats, can be called before configure diff --git a/xbmc/cores/VideoRenderers/RenderManager.h b/xbmc/cores/VideoRenderers/RenderManager.h index 8b237fb6c0..8b6b79a707 100644 --- a/xbmc/cores/VideoRenderers/RenderManager.h +++ b/xbmc/cores/VideoRenderers/RenderManager.h @@ -153,7 +153,7 @@ public: CLinuxRenderer *m_pRenderer; #endif - unsigned int GetProcessorSize(); + unsigned int GetOptimalBufferSize(); // Supported pixel formats, can be called before configure std::vector<ERenderFormat> SupportedFormats(); diff --git a/xbmc/cores/VideoRenderers/WinRenderer.cpp b/xbmc/cores/VideoRenderers/WinRenderer.cpp index d76c6b0b65..39fe9d1596 100644 --- a/xbmc/cores/VideoRenderers/WinRenderer.cpp +++ b/xbmc/cores/VideoRenderers/WinRenderer.cpp @@ -198,6 +198,7 @@ void CWinRenderer::SelectRenderMethod() RenderMethodDetail *rmdet = FindRenderMethod(m_renderMethod); CLog::Log(LOGDEBUG, __FUNCTION__": Selected render method %d: %s", m_renderMethod, rmdet != NULL ? rmdet->name : "unknown"); + m_frameIdx = 0; } bool CWinRenderer::UpdateRenderMethod() @@ -270,6 +271,11 @@ int CWinRenderer::NextYV12Texture() bool CWinRenderer::AddVideoPicture(DVDVideoPicture* picture, int index) { + if (!m_NumYV12Buffers) + { + return false; + } + if (m_renderMethod == RENDER_DXVA) { int source = index; @@ -277,7 +283,17 @@ bool CWinRenderer::AddVideoPicture(DVDVideoPicture* picture, int index) return false; DXVABuffer *buf = (DXVABuffer*)m_VideoBuffers[source]; - buf->id = m_processor->Add(picture); + SAFE_RELEASE(buf->pic); + if (picture->format == RENDER_FMT_DXVA) + { + buf->pic = picture->dxva->Acquire(); + } + else + { + buf->pic = m_processor->Convert(picture); + } + buf->frameIdx = m_frameIdx; + m_frameIdx += 2; return true; } return false; @@ -341,7 +357,9 @@ void CWinRenderer::RenderUpdate(bool clear, DWORD flags, DWORD alpha) else pD3DDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, FALSE ); - if (!m_bConfigured) return; + if (!m_bConfigured) + return; + ManageTextures(); CSingleLock lock(g_graphicsContext); @@ -998,6 +1016,9 @@ void CWinRenderer::RenderProcessor(DWORD flags) DXVABuffer *image = (DXVABuffer*)m_VideoBuffers[m_iYV12RenderBuffer]; + if (!image->pic) + return; + IDirect3DSurface9* target; if ( m_bUseHQScaler || g_graphicsContext.GetStereoMode() == RENDER_STEREO_MODE_ANAGLYPH_RED_CYAN @@ -1014,7 +1035,50 @@ void CWinRenderer::RenderProcessor(DWORD flags) } } - m_processor->Render(m_sourceRect, destRect, target, image->id, flags); + IDirect3DSurface9 *source[8]; + memset(source, 0, 8 * sizeof(IDirect3DSurface9*)); + source[2] = image->pic->surface; + + int past = 0; + int future = 0; + DXVABuffer **buffers = (DXVABuffer**)m_VideoBuffers; + + // set future frames + while (future < 2) + { + bool found = false; + for (int i = 0; i < m_NumYV12Buffers; i++) + { + if (buffers[i] && buffers[i]->pic && buffers[i]->frameIdx == image->frameIdx + (future*2 + 2)) + { + source[1 - future++] = buffers[i]->pic->surface; + found = true; + break; + } + } + if (!found) + break; + } + + // set past frames + while (past < 4) + { + bool found = false; + for (int i = 0; i < m_NumYV12Buffers; i++) + { + if (buffers[i] && buffers[i]->pic && buffers[i]->frameIdx == image->frameIdx - (past*2 + 2)) + { + source[3 + past++] = buffers[i]->pic->surface; + found = true; + break; + } + } + if (!found) + break; + } + + + m_processor->Render(m_sourceRect, destRect, target, source, flags, image->frameIdx); target->Release(); @@ -1199,8 +1263,14 @@ bool CWinRenderer::Supports(ESCALINGMETHOD method) { if (m_renderMethod == RENDER_PS || m_renderMethod == RENDER_DXVA) { - if(m_renderMethod == RENDER_DXVA && method == VS_SCALINGMETHOD_DXVA_HARDWARE) - return true; + if (m_renderMethod == RENDER_DXVA) + { + if (method == VS_SCALINGMETHOD_DXVA_HARDWARE || + method == VS_SCALINGMETHOD_AUTO) + return true; + else + return false; + } if(m_deviceCaps.PixelShaderVersion >= D3DPS_VERSION(2, 0) && ( method == VS_SCALINGMETHOD_AUTO @@ -1247,12 +1317,35 @@ EINTERLACEMETHOD CWinRenderer::AutoInterlaceMethod() return VS_INTERLACEMETHOD_DEINTERLACE_HALF; } -unsigned int CWinRenderer::GetProcessorSize() +unsigned int CWinRenderer::GetOptimalBufferSize() { if (m_format == RENDER_FMT_DXVA && m_processor) return m_processor->Size(); else - return 0; + return 2; +} + +void CWinRenderer::ReleaseBuffer(int idx) +{ + if (m_renderMethod == RENDER_DXVA && m_VideoBuffers[idx]) + SAFE_RELEASE(((DXVABuffer*)m_VideoBuffers[idx])->pic); +} + +bool CWinRenderer::NeedBufferForRef(int idx) +{ + // check if processor wants to keep past frames + if (m_format == RENDER_FMT_DXVA && m_processor) + { + DXVABuffer** buffers = (DXVABuffer**)m_VideoBuffers; + + int numPast = m_processor->PastRefs(); + if (buffers[idx] && buffers[idx]->pic) + { + if (buffers[idx]->frameIdx + numPast*2 >= buffers[m_iYV12RenderBuffer]->frameIdx) + return true; + } + } + return false; } //============================================ @@ -1405,21 +1498,4 @@ void YUVBuffer::Clear() } } - -//================================== - -DXVABuffer::~DXVABuffer() -{ - Release(); -} - -void DXVABuffer::Release() -{ - id = 0; -} - -void DXVABuffer::StartDecode() -{ - Release(); -} #endif diff --git a/xbmc/cores/VideoRenderers/WinRenderer.h b/xbmc/cores/VideoRenderers/WinRenderer.h index 10d7613d4c..e0f76f4944 100644 --- a/xbmc/cores/VideoRenderers/WinRenderer.h +++ b/xbmc/cores/VideoRenderers/WinRenderer.h @@ -128,13 +128,11 @@ struct DXVABuffer : SVideoBuffer { DXVABuffer() { - id = 0; + pic = NULL; } - ~DXVABuffer(); - virtual void Release(); - virtual void StartDecode(); - - int64_t id; + ~DXVABuffer() { SAFE_RELEASE(pic); } + DXVA::CRenderPicture *pic; + unsigned int frameIdx; }; class CWinRenderer : public CBaseRenderer @@ -170,9 +168,11 @@ public: void RenderUpdate(bool clear, DWORD flags = 0, DWORD alpha = 255); - virtual unsigned int GetProcessorSize(); + virtual unsigned int GetOptimalBufferSize(); virtual void SetBufferSize(int numBuffers) { m_neededBuffers = numBuffers; } virtual unsigned int GetMaxBufferSize() { return NUM_BUFFERS; } + virtual void ReleaseBuffer(int idx); + virtual bool NeedBufferForRef(int idx); protected: virtual void Render(DWORD flags); @@ -240,6 +240,7 @@ protected: unsigned int m_destHeight; int m_neededBuffers; + unsigned int m_frameIdx; }; #else diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodec.h index a935db7fd9..5543eaab58 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodec.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodec.h @@ -130,7 +130,7 @@ public: /* * returns the nr of channels for the encoded audio stream */ - virtual int GetEncodedChannels() { return 0; } + virtual int GetEncodedChannels() { return GetChannels(); } /* * returns the channel mapping diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h index 37c1c07188..8333fb4177 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h @@ -47,7 +47,7 @@ struct DVDCodecAvailableType #define FRAME_TYPE_B 3 #define FRAME_TYPE_D 4 -namespace DXVA { class CSurfaceContext; } +namespace DXVA { class CRenderPicture; } namespace VAAPI { class CVaapiRenderPicture; } namespace VDPAU { class CVdpauRenderPicture; } class COpenMax; @@ -72,7 +72,7 @@ struct DVDVideoPicture int iLineSize[4]; // [4] = alpha channel, currently not used }; struct { - DXVA::CSurfaceContext* context; + DXVA::CRenderPicture* dxva; }; struct { VDPAU::CVdpauRenderPicture* vdpau; diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp index aea738ef91..718d781d23 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp @@ -101,6 +101,7 @@ enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx #ifdef HAS_DX if(DXVA::CDecoder::Supports(*cur) && CSettings::Get().GetBool("videoplayer.usedxva2")) { + CLog::Log(LOGNOTICE, "CDVDVideoCodecFFmpeg::GetFormat - Creating DXVA(%ix%i)", avctx->width, avctx->height); DXVA::CDecoder* dec = new DXVA::CDecoder(); if(dec->Open(avctx, *cur, ctx->m_uSurfacesCount)) { @@ -162,7 +163,12 @@ CDVDVideoCodecFFmpeg::CDVDVideoCodecFFmpeg() : CDVDVideoCodec() m_iScreenHeight = 0; m_iOrientation = 0; m_bSoftware = false; +#if defined(TARGET_ANDROID) || defined(TARGET_DARWIN_IOS) + // If we get here on Android or iOS, it's always software + m_isSWCodec = true; +#else m_isSWCodec = false; +#endif m_pHardware = NULL; m_iLastKeyframe = 0; m_dts = DVD_NOPTS_VALUE; @@ -237,16 +243,8 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options /* Only allow slice threading, since frame threading is more * sensitive to changes in frame sizes, and it causes crashes * during HW accell - so we unset it in this case. - * - * When we detect a pure SW codec and user did not disable SWmultithreading - * via advancedsettings.xml we keep the ffmpeg default thread type. * */ - if(m_isSWCodec && !g_advancedSettings.m_videoDisableSWMultithreading) - { - CLog::Log(LOGDEBUG,"CDVDVideoCodecFFmpeg::Open() Keep default threading for swcodec: %d", - m_pCodecContext->thread_type); - } - else if ((EDECODEMETHOD) CSettings::Get().GetInt("videoplayer.decodingmethod") == VS_DECODEMETHOD_SOFTWARE && CSettings::Get().GetBool("videoplayer.useframemtdec")) + if (((EDECODEMETHOD) CSettings::Get().GetInt("videoplayer.decodingmethod") == VS_DECODEMETHOD_SOFTWARE || m_isSWCodec) && CSettings::Get().GetBool("videoplayer.useframemtdec")) { CLog::Log(LOGDEBUG,"CDVDVideoCodecFFmpeg::Open() Keep default threading %d by videoplayer.useframemtdec", m_pCodecContext->thread_type); diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp index 65959bdaec..065b643828 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp @@ -218,6 +218,10 @@ static const dxva2_mode_t *dxva2_find_mode(const GUID *guid) return NULL; } +//----------------------------------------------------------------------------- +// DXVA Context +//----------------------------------------------------------------------------- + CDXVAContext *CDXVAContext::m_context = NULL; CCriticalSection CDXVAContext::m_section; HMODULE CDXVAContext::m_dlHandle = NULL; @@ -227,6 +231,7 @@ CDXVAContext::CDXVAContext() m_context = NULL; m_refCount = 0; m_service = NULL; + m_atiWorkaround = false; } void CDXVAContext::Release(CDecoder *decoder) @@ -299,6 +304,15 @@ bool CDXVAContext::CreateContext() { m_DXVA2CreateVideoService(g_Windowing.Get3DDevice(), IID_IDirectXVideoDecoderService, (void**)&m_service); QueryCaps(); + + // Some older Ati devices can only open a single decoder at a given time + std::string renderer = g_Windowing.GetRenderRenderer(); + if (renderer.find("Radeon HD 2") != std::string::npos || + renderer.find("Radeon HD 3") != std::string::npos) + { + m_atiWorkaround = true; + } + return true; } @@ -433,15 +447,18 @@ bool CDXVAContext::CreateDecoder(GUID &inGuid, DXVA2_VideoDesc *format, const DX int retry = 0; while (retry < 2) { - HRESULT res = m_service->CreateVideoDecoder(inGuid, format, config, surfaces, count, decoder); - if (!FAILED(res)) + if (!m_atiWorkaround || retry > 0) { - return true; + HRESULT res = m_service->CreateVideoDecoder(inGuid, format, config, surfaces, count, decoder); + if (!FAILED(res)) + { + return true; + } } if (retry == 0) { - CLog::Log(LOGERROR, "%s - hw may not support multiple decoders, releasing existing ones", __FUNCTION__); + CLog::Log(LOGNOTICE, "%s - hw may not support multiple decoders, releasing existing ones", __FUNCTION__); std::vector<CDecoder*>::iterator it; for (it = m_decoders.begin(); it != m_decoders.end(); ++it) { @@ -464,40 +481,176 @@ bool CDXVAContext::IsValidDecoder(CDecoder *decoder) return false; } +//----------------------------------------------------------------------------- +// DXVA Video Surface states +//----------------------------------------------------------------------------- +#define SURFACE_USED_FOR_REFERENCE 0x01 +#define SURFACE_USED_FOR_RENDER 0x02 + CSurfaceContext::CSurfaceContext() { } CSurfaceContext::~CSurfaceContext() { - for (vector<IDirect3DSurface9*>::iterator it = m_heldsurfaces.begin(); it != m_heldsurfaces.end(); ++it) - SAFE_RELEASE(*it); + CLog::Log(LOGDEBUG, "%s - destructing surface context", __FUNCTION__); + Reset(); +} + +void CSurfaceContext::AddSurface(IDirect3DSurface9* surf) +{ + CSingleLock lock(m_section); + surf->AddRef(); + m_state[surf] = 0; + m_freeSurfaces.push_back(surf); +} + +void CSurfaceContext::ClearReference(IDirect3DSurface9* surf) +{ + CSingleLock lock(m_section); + if (m_state.find(surf) == m_state.end()) + { + CLog::Log(LOGWARNING, "%s - surface invalid", __FUNCTION__); + return; + } + m_state[surf] &= ~SURFACE_USED_FOR_REFERENCE; + if (m_state[surf] == 0) + { + m_freeSurfaces.push_back(surf); + } +} + +bool CSurfaceContext::MarkRender(IDirect3DSurface9* surf) +{ + CSingleLock lock(m_section); + if (m_state.find(surf) == m_state.end()) + { + CLog::Log(LOGWARNING, "%s - surface invalid", __FUNCTION__); + return false; + } + std::list<IDirect3DSurface9*>::iterator it; + it = std::find(m_freeSurfaces.begin(), m_freeSurfaces.end(), surf); + if (it != m_freeSurfaces.end()) + { + m_freeSurfaces.erase(it); + } + m_state[surf] |= SURFACE_USED_FOR_RENDER; + return true; +} + +void CSurfaceContext::ClearRender(IDirect3DSurface9* surf) +{ + CSingleLock lock(m_section); + if (m_state.find(surf) == m_state.end()) + { + CLog::Log(LOGWARNING, "%s - surface invalid", __FUNCTION__); + return; + } + m_state[surf] &= ~SURFACE_USED_FOR_RENDER; + if (m_state[surf] == 0) + { + m_freeSurfaces.push_back(surf); + } +} + +bool CSurfaceContext::IsValid(IDirect3DSurface9* surf) +{ + CSingleLock lock(m_section); + if (m_state.find(surf) != m_state.end()) + return true; + else + return false; +} + +IDirect3DSurface9* CSurfaceContext::GetFree(IDirect3DSurface9* surf) +{ + CSingleLock lock(m_section); + if (m_state.find(surf) != m_state.end()) + { + std::list<IDirect3DSurface9*>::iterator it; + it = std::find(m_freeSurfaces.begin(), m_freeSurfaces.end(), surf); + if (it == m_freeSurfaces.end()) + { + CLog::Log(LOGWARNING, "%s - surface not free", __FUNCTION__); + } + else + { + m_freeSurfaces.erase(it); + m_state[surf] = SURFACE_USED_FOR_REFERENCE; + return surf; + } + } + if (!m_freeSurfaces.empty()) + { + IDirect3DSurface9* freeSurf = m_freeSurfaces.front(); + m_freeSurfaces.pop_front(); + m_state[freeSurf] = SURFACE_USED_FOR_REFERENCE; + return freeSurf; + } + return NULL; +} + +IDirect3DSurface9* CSurfaceContext::GetAtIndex(unsigned int idx) +{ + if (idx >= m_state.size()) + return NULL; + std::map<IDirect3DSurface9*, int>::iterator it = m_state.begin(); + for (unsigned int i = 0; i < idx; i++) + ++it; + return it->first; +} + +void CSurfaceContext::Reset() +{ + CSingleLock lock(m_section); + for (map<IDirect3DSurface9*, int>::iterator it = m_state.begin(); it != m_state.end(); ++it) + it->first->Release(); + m_freeSurfaces.clear(); + m_state.clear(); } -void CSurfaceContext::HoldSurface(IDirect3DSurface9* surface) +int CSurfaceContext::Size() { - surface->AddRef(); - m_heldsurfaces.push_back(surface); + CSingleLock lock(m_section); + return m_state.size(); } -CDecoder::SVideoBuffer::SVideoBuffer() +bool CSurfaceContext::HasFree() { - surface = NULL; - Clear(); + CSingleLock lock(m_section); + return !m_freeSurfaces.empty(); } -CDecoder::SVideoBuffer::~SVideoBuffer() +bool CSurfaceContext::HasRefs() { - Clear(); + CSingleLock lock(m_section); + for (map<IDirect3DSurface9*, int>::iterator it = m_state.begin(); it != m_state.end(); ++it) + { + if (it->second & SURFACE_USED_FOR_REFERENCE) + return true; + } + return false; } -void CDecoder::SVideoBuffer::Clear() +//----------------------------------------------------------------------------- +// DXVA RednerPictures +//----------------------------------------------------------------------------- + +CRenderPicture::CRenderPicture(CSurfaceContext *context) { - SAFE_RELEASE(surface); - age = 0; - used = 0; + surface_context = context->Acquire(); } +CRenderPicture::~CRenderPicture() +{ + surface_context->ClearRender(surface); + surface_context->Release(); +} + +//----------------------------------------------------------------------------- +// DXVA Decoder +//----------------------------------------------------------------------------- + CDecoder::CDecoder() : m_event(true) { @@ -505,21 +658,21 @@ CDecoder::CDecoder() m_state = DXVA_OPEN; m_device = NULL; m_decoder = NULL; - m_buffer_count = 0; - m_buffer_age = 0; m_refs = 0; m_shared = 0; m_surface_context = NULL; + m_presentPicture = NULL; m_dxva_context = NULL; memset(&m_format, 0, sizeof(m_format)); m_context = (dxva_context*)calloc(1, sizeof(dxva_context)); m_context->cfg = (DXVA2_ConfigPictureDecode*)calloc(1, sizeof(DXVA2_ConfigPictureDecode)); - m_context->surface = (IDirect3DSurface9**)calloc(m_buffer_max, sizeof(IDirect3DSurface9*)); + m_context->surface = (IDirect3DSurface9**)calloc(32, sizeof(IDirect3DSurface9*)); g_Windowing.Register(this); } CDecoder::~CDecoder() { + CLog::Log(LOGDEBUG, "%s - destructing decoder, %ld", __FUNCTION__, this); g_Windowing.Unregister(this); Close(); free(m_context->surface); @@ -527,18 +680,29 @@ CDecoder::~CDecoder() free(m_context); } +long CDecoder::Release() +{ + // if ffmpeg holds any references, flush buffers + if (m_surface_context && m_surface_context->HasRefs()) + { + avcodec_flush_buffers(m_avctx); + } + return IHardwareDecoder::Release(); +} + void CDecoder::Close() { CSingleLock lock(m_section); SAFE_RELEASE(m_decoder); SAFE_RELEASE(m_surface_context); - for(unsigned i = 0; i < m_buffer_count; i++) - m_buffer[i].Clear(); - m_buffer_count = 0; + SAFE_RELEASE(m_presentPicture); memset(&m_format, 0, sizeof(m_format)); if (m_dxva_context) + { + CLog::Log(LOGNOTICE, "%s - closing decoder", __FUNCTION__); m_dxva_context->Release(this); + } m_dxva_context = NULL; } @@ -769,9 +933,11 @@ bool CDecoder::Open(AVCodecContext *avctx, enum PixelFormat fmt, unsigned int su if(!OpenDecoder()) return false; - avctx->get_buffer2 = GetBufferS; + avctx->get_buffer2 = GetBufferS; avctx->hwaccel_context = m_context; + m_avctx = avctx; + D3DADAPTER_IDENTIFIER9 AIdentifier = g_Windowing.GetAIdentifier(); if (AIdentifier.VendorId == PCIV_Intel && m_input == DXVADDI_Intel_ModeH264_E) { @@ -801,12 +967,16 @@ int CDecoder::Decode(AVCodecContext* avctx, AVFrame* frame) if(result) return result; + SAFE_RELEASE(m_presentPicture); + if(frame) { - for(unsigned i = 0; i < m_buffer_count; i++) + if (m_surface_context->IsValid((IDirect3DSurface9*)frame->data[3])) { - if(m_buffer[i].surface == (IDirect3DSurface9*)frame->data[3]) - return VC_BUFFER | VC_PICTURE; + m_presentPicture = new CRenderPicture(m_surface_context); + m_presentPicture->surface = (IDirect3DSurface9*)frame->data[3]; + m_surface_context->MarkRender(m_presentPicture->surface); + return VC_BUFFER | VC_PICTURE; } CLog::Log(LOGWARNING, "DXVA - ignoring invalid surface"); return VC_BUFFER; @@ -819,10 +989,10 @@ bool CDecoder::GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture { ((CDVDVideoCodecFFmpeg*)avctx->opaque)->GetPictureCommon(picture); CSingleLock lock(m_section); + + picture->dxva = m_presentPicture; picture->format = RENDER_FMT_DXVA; picture->extended_format = (unsigned int)m_format.Format; - picture->context = m_surface_context; - picture->data[3]= frame->data[3]; return true; } @@ -922,21 +1092,15 @@ bool CDecoder::OpenDecoder() m_context->surface_count = m_refs + 1 + 1 + m_shared; // refs + 1 decode + 1 libavcodec safety + processor buffer - if(m_context->surface_count > m_buffer_count) - { - CLog::Log(LOGDEBUG, "DXVA - allocating %d surfaces", m_context->surface_count - m_buffer_count); - - if (!m_dxva_context->CreateSurfaces(m_format.SampleWidth, m_format.SampleHeight, m_format.Format, - m_context->surface_count - 1 - m_buffer_count, m_context->surface + m_buffer_count)) - return false; + CLog::Log(LOGDEBUG, "DXVA - allocating %d surfaces", m_context->surface_count); - for(unsigned i = m_buffer_count; i < m_context->surface_count; i++) - { - m_buffer[i].surface = m_context->surface[i]; - m_surface_context->HoldSurface(m_context->surface[i]); - } + if (!m_dxva_context->CreateSurfaces(m_format.SampleWidth, m_format.SampleHeight, m_format.Format, + m_context->surface_count - 1, m_context->surface)) + return false; - m_buffer_count = m_context->surface_count; + for(unsigned i = 0; i < m_context->surface_count; i++) + { + m_surface_context->AddSurface(m_context->surface[i]); } if (!m_dxva_context->CreateDecoder(m_input, &m_format, m_context->cfg, m_context->surface, m_context->surface_count, &m_decoder)) @@ -957,19 +1121,15 @@ bool CDecoder::Supports(enum PixelFormat fmt) void CDecoder::RelBuffer(uint8_t *data) { CSingleLock lock(m_section); - IDirect3DSurface9* surface = (IDirect3DSurface9*)data; + IDirect3DSurface9* surface = (IDirect3DSurface9*)(uintptr_t)data; - for(unsigned i = 0; i < m_buffer_count; i++) + if (!m_surface_context->IsValid(surface)) { - if(m_buffer[i].surface == surface) - { - m_buffer[i].used = false; - m_buffer[i].age = ++m_buffer_age; - break; - } + CLog::Log(LOGWARNING, "%s - return of invalid surface", __FUNCTION__); } + m_surface_context->ClearReference(surface); - Release(); + IHardwareDecoder::Release(); } int CDecoder::GetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags) @@ -979,46 +1139,12 @@ int CDecoder::GetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags) if (!m_decoder) return -1; - if(avctx->coded_width != m_format.SampleWidth - || avctx->coded_height != m_format.SampleHeight) - { - Close(); - if(!Open(avctx, avctx->pix_fmt, m_shared)) - { - Close(); - return -1; - } - } - - int count = 0; - SVideoBuffer* buf = NULL; - for(unsigned i = 0; i < m_buffer_count; i++) - { - if(m_buffer[i].used) - count++; - else - { - if(!buf || buf->age > m_buffer[i].age) - buf = m_buffer+i; - } - } - - if(count >= m_refs+2) - { - m_refs++; -#if ALLOW_ADDING_SURFACES - if(!OpenDecoder()) - return -1; - return GetBuffer(avctx, pic); -#else - Close(); - return -1; -#endif - } - - if(!buf) + IDirect3DSurface9* surf = (IDirect3DSurface9*)(uintptr_t)pic->data[3]; + surf = m_surface_context->GetFree(surf != 0 ? surf : NULL); + if (surf == NULL) { - CLog::Log(LOGERROR, "DXVA - unable to find new unused buffer"); + CLog::Log(LOGERROR, "%s - no surface available - dec: %d, render: %d", __FUNCTION__); + m_state = DXVA_LOST; return -1; } @@ -1030,8 +1156,8 @@ int CDecoder::GetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags) pic->linesize[i] = 0; } - pic->data[0] = (uint8_t*)buf->surface; - pic->data[3] = (uint8_t*)buf->surface; + pic->data[0] = (uint8_t*)surf; + pic->data[3] = (uint8_t*)surf; AVBufferRef *buffer = av_buffer_create(pic->data[3], 0, RelBufferS, this, 0); if (!buffer) { @@ -1039,7 +1165,6 @@ int CDecoder::GetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags) return -1; } pic->buf[0] = buffer; - buf->used = true; Acquire(); diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h index fa24556d39..ca3495de77 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h @@ -27,6 +27,7 @@ #include <dxva2api.h> #include <deque> #include <vector> +#include <list> #include "settings/VideoSettings.h" #include "guilib/Geometry.h" @@ -49,10 +50,33 @@ public: CSurfaceContext(); ~CSurfaceContext(); - void HoldSurface(IDirect3DSurface9* surface); + void AddSurface(IDirect3DSurface9* surf); + void ClearReference(IDirect3DSurface9* surf); + bool MarkRender(IDirect3DSurface9* surf); + void ClearRender(IDirect3DSurface9* surf); + bool IsValid(IDirect3DSurface9* surf); + IDirect3DSurface9* GetFree(IDirect3DSurface9* surf); + IDirect3DSurface9* GetAtIndex(unsigned int idx); + void Reset(); + int Size(); + bool HasFree(); + bool HasRefs(); protected: - std::vector<IDirect3DSurface9*> m_heldsurfaces; + std::map<IDirect3DSurface9*, int> m_state; + std::list<IDirect3DSurface9*> m_freeSurfaces; + CCriticalSection m_section; +}; + +class CRenderPicture + : public IDVDResourceCounted<CRenderPicture> +{ +public: + CRenderPicture(CSurfaceContext *context); + ~CRenderPicture(); + IDirect3DSurface9* surface; +protected: + CSurfaceContext *surface_context; }; typedef HRESULT(__stdcall *DXVA2CreateVideoServicePtr)(IDirect3DDevice9* pDD, REFIID riid, void** ppService); @@ -83,6 +107,7 @@ private: UINT m_input_count; GUID *m_input_list; std::vector<CDecoder*> m_decoders; + bool m_atiWorkaround; }; class CDecoder @@ -99,6 +124,7 @@ public: virtual void Close(); virtual const std::string Name() { return "dxva2"; } virtual unsigned GetAllowedReferences(); + virtual long Release(); bool OpenTarget(const GUID &guid); bool OpenDecoder(); @@ -121,31 +147,18 @@ protected: virtual void OnLostDevice() { CSingleLock lock(m_section); m_state = DXVA_LOST; m_event.Reset(); } virtual void OnResetDevice() { CSingleLock lock(m_section); m_state = DXVA_RESET; m_event.Set(); } - struct SVideoBuffer - { - SVideoBuffer(); - ~SVideoBuffer(); - void Clear(); - - IDirect3DSurface9* surface; - bool used; - int age; - }; - IDirectXVideoDecoder* m_decoder; HANDLE m_device; GUID m_input; DXVA2_VideoDesc m_format; - static const unsigned m_buffer_max = 32; - SVideoBuffer m_buffer[m_buffer_max]; - unsigned m_buffer_count; - unsigned m_buffer_age; int m_refs; + CRenderPicture *m_presentPicture; struct dxva_context* m_context; CSurfaceContext* m_surface_context; CDXVAContext* m_dxva_context; + AVCodecContext* m_avctx; unsigned int m_shared; diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp index 6685877b7a..3cbc681ae0 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp @@ -417,6 +417,17 @@ bool CVideoSurfaces::HasFree() return !m_freeSurfaces.empty(); } +bool CVideoSurfaces::HasRefs() +{ + CSingleLock lock(m_section); + for (std::map<VASurfaceID, int>::iterator it = m_state.begin(); it != m_state.end(); ++it) + { + if (it->second & SURFACE_USED_FOR_REFERENCE) + return true; + } + return false; +} + //----------------------------------------------------------------------------- // VAAPI //----------------------------------------------------------------------------- @@ -440,6 +451,7 @@ CDecoder::CDecoder() : m_vaapiOutput(&m_inMsgEvent) m_vaapiConfig.context = 0; m_vaapiConfig.contextId = VA_INVALID_ID; m_vaapiConfig.configId = VA_INVALID_ID; + m_avctx = NULL; } CDecoder::~CDecoder() @@ -483,7 +495,6 @@ bool CDecoder::Open(AVCodecContext* avctx, const enum PixelFormat fmt, unsigned m_vaapiConfig.surfaceWidth = avctx->width; m_vaapiConfig.surfaceHeight = avctx->height; m_vaapiConfig.aspect = avctx->sample_aspect_ratio; - m_vaapiConfig.numRenderBuffers = surfaces; m_decoderThread = CThread::GetCurrentThreadId(); m_DisplayState = VAAPI_OPEN; m_vaapiConfigured = false; @@ -568,6 +579,8 @@ bool CDecoder::Open(AVCodecContext* avctx, const enum PixelFormat fmt, unsigned avctx->hwaccel_context = &m_hwContext; avctx->get_buffer2 = CDecoder::FFGetBuffer; avctx->slice_flags = SLICE_FLAG_CODED_ORDER|SLICE_FLAG_ALLOW_FIELD; + + m_avctx = avctx; return true; } @@ -586,6 +599,12 @@ void CDecoder::Close() long CDecoder::Release() { + // if ffmpeg holds any references, flush buffers + if (m_avctx && m_videoSurfaces.HasRefs()) + { + avcodec_flush_buffers(m_avctx); + } + // check if we should do some pre-cleanup here // a second decoder might need resources if (m_vaapiConfigured == true) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h index d937eea3b0..c5a0071fe9 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h @@ -116,7 +116,6 @@ struct CVaapiConfig CDecoder *vaapi; int upscale; CVideoSurfaces *videoSurfaces; - int numRenderBuffers; uint32_t maxReferences; bool useInteropYuv; CVAAPIContext *context; @@ -331,6 +330,7 @@ public: void Reset(); int Size(); bool HasFree(); + bool HasRefs(); protected: std::map<VASurfaceID, int> m_state; std::list<VASurfaceID> m_freeSurfaces; @@ -427,6 +427,7 @@ protected: CVaapiConfig m_vaapiConfig; CVideoSurfaces m_videoSurfaces; vaapi_context m_hwContext; + AVCodecContext* m_avctx; COutput m_vaapiOutput; CVaapiBufferStats m_bufferStats; diff --git a/xbmc/cores/dvdplayer/DVDMessageQueue.cpp b/xbmc/cores/dvdplayer/DVDMessageQueue.cpp index 369a6a3a04..f20695bc2e 100644 --- a/xbmc/cores/dvdplayer/DVDMessageQueue.cpp +++ b/xbmc/cores/dvdplayer/DVDMessageQueue.cpp @@ -249,6 +249,8 @@ void CDVDMessageQueue::WaitUntilEmpty() int CDVDMessageQueue::GetLevel() const { + CSingleLock lock(m_section); + if(m_iDataSize > m_iMaxDataSize) return 100; if(m_iDataSize == 0) @@ -262,6 +264,8 @@ int CDVDMessageQueue::GetLevel() const int CDVDMessageQueue::GetTimeSize() const { + CSingleLock lock(m_section); + if(IsDataBased()) return 0; else diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp index e85c989b6e..9e3471db8f 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp @@ -592,8 +592,8 @@ bool CDVDPlayer::OpenFile(const CFileItem& file, const CPlayerOptions &options) m_State.Clear(); m_UpdateApplication = 0; m_offset_pts = 0; - m_CurrentAudio.correction = 0.0; - m_CurrentVideo.correction = 0.0; + m_CurrentAudio.originaldts = DVD_NOPTS_VALUE; + m_CurrentVideo.originaldts = DVD_NOPTS_VALUE; m_PlayerOptions = options; m_item = file; @@ -2031,13 +2031,17 @@ void CDVDPlayer::CheckContinuity(CCurrentStream& current, DemuxPacket* pPacket) if(correction != 0.0) { - current.correction = correction; - if (m_CurrentAudio.correction != 0.0 && m_CurrentVideo.correction != 0.0 && fabs(m_CurrentAudio.correction - m_CurrentVideo.correction) < DVD_MSEC_TO_TIME(1000)) + // we want the dts values of two streams to close, or for one to be invalid (e.g. from a missing audio stream) + double this_dts = pPacket->dts; + double that_dts = current.type == STREAM_AUDIO ? m_CurrentVideo.originaldts : m_CurrentAudio.originaldts; + + if (m_CurrentAudio.id == -1 || m_CurrentVideo.id == -1 || + current.originaldts == DVD_NOPTS_VALUE || + fabs(this_dts - that_dts) < DVD_MSEC_TO_TIME(1000)) { m_offset_pts += correction; UpdateCorrection(pPacket, correction); - m_CurrentAudio.correction = 0.0; - m_CurrentVideo.correction = 0.0; + current.originaldts = pPacket->dts; } else { @@ -2046,6 +2050,8 @@ void CDVDPlayer::CheckContinuity(CCurrentStream& current, DemuxPacket* pPacket) pPacket->pts = DVD_NOPTS_VALUE; } } + else + current.originaldts = pPacket->dts; } bool CDVDPlayer::CheckSceneSkip(CCurrentStream& current) @@ -3207,6 +3213,7 @@ bool CDVDPlayer::OpenStream(CCurrentStream& current, int iStream, int source, bo current.hint = hint; current.stream = (void*)stream; current.started = false; + current.originaldts = DVD_NOPTS_VALUE; if(stream) current.changes = stream->changes; diff --git a/xbmc/cores/dvdplayer/DVDPlayer.h b/xbmc/cores/dvdplayer/DVDPlayer.h index 951382c2f7..450366eac0 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.h +++ b/xbmc/cores/dvdplayer/DVDPlayer.h @@ -105,7 +105,7 @@ public: const int player; // stuff to handle starting after seek double startpts; - double correction; + double originaldts; CCurrentStream(StreamType t, int i) : type(t) @@ -127,7 +127,7 @@ public: inited = false; started = false; startpts = DVD_NOPTS_VALUE; - correction = 0.0; + originaldts = DVD_NOPTS_VALUE; } double dts_end() diff --git a/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp b/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp index 120cdde389..98da461d3b 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp @@ -165,7 +165,7 @@ void CDVDPlayerAudio::OpenStream( CDVDStreamInfo &hints, CDVDAudioCodec* codec ) m_streaminfo = hints; /* update codec information from what codec gave out, if any */ - int channelsFromCodec = m_pAudioCodec->GetChannels(); + int channelsFromCodec = m_pAudioCodec->GetEncodedChannels(); int samplerateFromCodec = m_pAudioCodec->GetEncodedSampleRate(); if (channelsFromCodec > 0) @@ -553,7 +553,7 @@ void CDVDPlayerAudio::Process() if(!m_dvdAudio.Create(audioframe, m_streaminfo.codec, m_setsynctype == SYNC_RESAMPLE)) CLog::Log(LOGERROR, "%s - failed to create audio renderer", __FUNCTION__); - m_streaminfo.channels = audioframe.channel_count; + m_streaminfo.channels = audioframe.passthrough ? audioframe.encoded_channel_count : audioframe.channel_count; } // Zero out the frame data if we are supposed to silence the audio diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp index 3ad22e8135..21afca1c08 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp @@ -186,7 +186,7 @@ bool CDVDPlayerVideo::OpenStream( CDVDStreamInfo &hint ) unsigned int surfaces = 0; std::vector<ERenderFormat> formats; #ifdef HAS_VIDEO_PLAYBACK - surfaces = g_renderManager.GetProcessorSize(); + surfaces = g_renderManager.GetOptimalBufferSize(); formats = g_renderManager.SupportedFormats(); #endif diff --git a/xbmc/interfaces/legacy/AddonClass.cpp b/xbmc/interfaces/legacy/AddonClass.cpp index a4a9d0ca35..57ba3aa276 100644 --- a/xbmc/interfaces/legacy/AddonClass.cpp +++ b/xbmc/interfaces/legacy/AddonClass.cpp @@ -72,7 +72,7 @@ namespace XBMCAddon long ct = AtomicDecrement((long*)&refs); #ifdef LOG_LIFECYCLE_EVENTS - CLog::Log(LOGDEBUG,"NEWADDON REFCNT decrementing to %ld on %s 0x%lx", GetClassname(), (long)(((void*)this))); + CLog::Log(LOGDEBUG,"NEWADDON REFCNT decrementing to %ld on %s 0x%lx", refs, GetClassname(), (long)(((void*)this))); #endif if(ct == 0) { diff --git a/xbmc/interfaces/legacy/CallbackFunction.cpp b/xbmc/interfaces/legacy/CallbackFunction.cpp index 55486db8ea..03497f9cf4 100644 --- a/xbmc/interfaces/legacy/CallbackFunction.cpp +++ b/xbmc/interfaces/legacy/CallbackFunction.cpp @@ -22,5 +22,5 @@ namespace XBMCAddon { - Callback::~Callback() { deallocating(); } + Callback::~Callback() { XBMC_TRACE; deallocating(); } } diff --git a/xbmc/interfaces/legacy/CallbackFunction.h b/xbmc/interfaces/legacy/CallbackFunction.h index f928e73731..9482865aac 100644 --- a/xbmc/interfaces/legacy/CallbackFunction.h +++ b/xbmc/interfaces/legacy/CallbackFunction.h @@ -38,13 +38,13 @@ namespace XBMCAddon { protected: AddonClass* addonClassObject; - Callback(AddonClass* _object) : addonClassObject(_object) {} + Callback(AddonClass* _object) : addonClassObject(_object) { XBMC_TRACE; } public: virtual void executeCallback() = 0; virtual ~Callback(); - AddonClass* getObject() { return addonClassObject; } + AddonClass* getObject() { XBMC_TRACE; return addonClassObject; } }; struct cb_null_type {}; @@ -70,9 +70,9 @@ namespace XBMCAddon public: CallbackFunction(M* object, MemberFunction method) : - Callback(object), meth(method), obj(object) {} + Callback(object), meth(method), obj(object) { XBMC_TRACE; } - virtual ~CallbackFunction() { deallocating(); } + virtual ~CallbackFunction() { XBMC_TRACE; deallocating(); } virtual void executeCallback() { XBMC_TRACE; ((*obj).*(meth))(); } }; @@ -94,9 +94,9 @@ namespace XBMCAddon public: CallbackFunction(M* object, MemberFunction method, P1 parameter) : Callback(object), meth(method), obj(object), - param(parameter) {} + param(parameter) { XBMC_TRACE; } - virtual ~CallbackFunction() { deallocating(); } + virtual ~CallbackFunction() { XBMC_TRACE; deallocating(); } virtual void executeCallback() { XBMC_TRACE; ((*obj).*(meth))(param); } }; @@ -119,9 +119,9 @@ namespace XBMCAddon public: CallbackFunction(M* object, MemberFunction method, P1* parameter) : Callback(object), meth(method), obj(object), - param(parameter) {} + param(parameter) { XBMC_TRACE; } - virtual ~CallbackFunction() { deallocating(); } + virtual ~CallbackFunction() { XBMC_TRACE; deallocating(); } virtual void executeCallback() { XBMC_TRACE; ((*obj).*(meth))(param); } }; @@ -145,9 +145,9 @@ namespace XBMCAddon public: CallbackFunction(M* object, MemberFunction method, P1 parameter, P2 parameter2) : Callback(object), meth(method), obj(object), - param1(parameter), param2(parameter2) {} + param1(parameter), param2(parameter2) { XBMC_TRACE; } - virtual ~CallbackFunction() { deallocating(); } + virtual ~CallbackFunction() { XBMC_TRACE; deallocating(); } virtual void executeCallback() { XBMC_TRACE; ((*obj).*(meth))(param1,param2); } }; @@ -172,9 +172,9 @@ namespace XBMCAddon public: CallbackFunction(M* object, MemberFunction method, P1 parameter, P2 parameter2, P3 parameter3) : Callback(object), meth(method), obj(object), - param1(parameter), param2(parameter2), param3(parameter3) {} + param1(parameter), param2(parameter2), param3(parameter3) { XBMC_TRACE; } - virtual ~CallbackFunction() { deallocating(); } + virtual ~CallbackFunction() { XBMC_TRACE; deallocating(); } virtual void executeCallback() { XBMC_TRACE; ((*obj).*(meth))(param1,param2,param3); } }; diff --git a/xbmc/interfaces/legacy/CallbackHandler.cpp b/xbmc/interfaces/legacy/CallbackHandler.cpp index 12146450d1..fae0e96fe5 100644 --- a/xbmc/interfaces/legacy/CallbackHandler.cpp +++ b/xbmc/interfaces/legacy/CallbackHandler.cpp @@ -30,7 +30,7 @@ namespace XBMCAddon { public: AddonClass::Ref<Callback> cb; - RetardedAsynchCallbackHandler* handler; + AddonClass::Ref<RetardedAsynchCallbackHandler> handler; AsynchCallbackMessage(Callback* _cb, RetardedAsynchCallbackHandler* _handler) : cb(_cb), handler(_handler) { XBMC_TRACE; } }; @@ -62,7 +62,7 @@ namespace XBMCAddon { AddonClass::Ref<AsynchCallbackMessage> cur(*iter); { - if (cur->handler == this) // then this message is because of me + if (cur->handler.get() == this) // then this message is because of me { g_callQueue.erase(iter); iter = g_callQueue.begin(); @@ -103,7 +103,9 @@ namespace XBMCAddon #ifdef ENABLE_XBMC_TRACE_API CLog::Log(LOGDEBUG,"%sNEWADDON executing callback 0x%lx",_tg.getSpaces(),(long)(p->cb.get())); #endif - CSingleLock lock2(*(p->cb->getObject())); + AddonClass* obj = (p->cb->getObject()); + AddonClass::Ref<AddonClass> ref(obj); + CSingleLock lock2(*obj); if (!p->cb->getObject()->isDeallocating()) { try diff --git a/xbmc/interfaces/legacy/Monitor.cpp b/xbmc/interfaces/legacy/Monitor.cpp index da844e5fc7..5f992a568c 100644 --- a/xbmc/interfaces/legacy/Monitor.cpp +++ b/xbmc/interfaces/legacy/Monitor.cpp @@ -27,6 +27,7 @@ namespace XBMCAddon { Monitor::Monitor(): abortEvent(true) { + XBMC_TRACE; if (languageHook) { Id = languageHook->GetAddonId(); @@ -68,6 +69,7 @@ namespace XBMCAddon Monitor::~Monitor() { + XBMC_TRACE; deallocating(); DelayedCallGuard dg(languageHook); // we're shutting down so unregister me. diff --git a/xbmc/interfaces/legacy/Monitor.h b/xbmc/interfaces/legacy/Monitor.h index 79347b1b4d..fa94c494ca 100644 --- a/xbmc/interfaces/legacy/Monitor.h +++ b/xbmc/interfaces/legacy/Monitor.h @@ -148,9 +148,7 @@ namespace XBMCAddon virtual void onCleanFinished(const String library) { XBMC_TRACE; } /** - * onAbortRequested() -- onAbortRequested method.\n - * \n - * Will be called when XBMC requests Abort\n + * onAbortRequested() -- Deprecated, use waitForAbort() to be notified about this event.\n */ virtual void onAbortRequested() { XBMC_TRACE; } diff --git a/xbmc/pvr/PVRDatabase.cpp b/xbmc/pvr/PVRDatabase.cpp index 975f31d563..62f927005f 100644 --- a/xbmc/pvr/PVRDatabase.cpp +++ b/xbmc/pvr/PVRDatabase.cpp @@ -256,7 +256,7 @@ int CPVRDatabase::Get(CPVRChannelGroupInternal &results) "channels.iClientChannelNumber, channels.iClientSubChannelNumber, channels.sInputFormat, channels.sInputFormat, channels.sStreamURL, channels.iEncryptionSystem, map_channelgroups_channels.iChannelNumber, channels.idEpg " "FROM map_channelgroups_channels " "LEFT JOIN channels ON channels.idChannel = map_channelgroups_channels.idChannel " - "WHERE map_channelgroups_channels.idGroup = %u", results.IsRadio() ? XBMC_INTERNAL_GROUP_RADIO : XBMC_INTERNAL_GROUP_TV); + "WHERE map_channelgroups_channels.idGroup = %u", results.IsRadio() ? PVR_INTERNAL_GROUP_ID_RADIO : PVR_INTERNAL_GROUP_ID_TV); if (ResultQuery(strQuery)) { try diff --git a/xbmc/pvr/channels/PVRChannelGroup.h b/xbmc/pvr/channels/PVRChannelGroup.h index f6a13de9eb..da88c0579c 100644 --- a/xbmc/pvr/channels/PVRChannelGroup.h +++ b/xbmc/pvr/channels/PVRChannelGroup.h @@ -34,8 +34,8 @@ namespace EPG namespace PVR { -#define XBMC_INTERNAL_GROUP_RADIO 1 -#define XBMC_INTERNAL_GROUP_TV 2 +#define PVR_INTERNAL_GROUP_ID_RADIO 1 +#define PVR_INTERNAL_GROUP_ID_TV 2 #define PVR_GROUP_TYPE_DEFAULT 0 #define PVR_GROUP_TYPE_INTERNAL 1 diff --git a/xbmc/pvr/channels/PVRChannelGroupInternal.cpp b/xbmc/pvr/channels/PVRChannelGroupInternal.cpp index 8f52c9c2e6..29088ff008 100644 --- a/xbmc/pvr/channels/PVRChannelGroupInternal.cpp +++ b/xbmc/pvr/channels/PVRChannelGroupInternal.cpp @@ -37,7 +37,7 @@ using namespace PVR; using namespace EPG; CPVRChannelGroupInternal::CPVRChannelGroupInternal(bool bRadio) : - CPVRChannelGroup(bRadio, bRadio ? XBMC_INTERNAL_GROUP_RADIO : XBMC_INTERNAL_GROUP_TV, g_localizeStrings.Get(19287)) + CPVRChannelGroup(bRadio, bRadio ? PVR_INTERNAL_GROUP_ID_RADIO : PVR_INTERNAL_GROUP_ID_TV, g_localizeStrings.Get(19287)) { m_iHiddenChannels = 0; m_iGroupType = PVR_GROUP_TYPE_INTERNAL; diff --git a/xbmc/pvr/channels/PVRChannelGroups.cpp b/xbmc/pvr/channels/PVRChannelGroups.cpp index 86cd5c2409..15cd414c7a 100644 --- a/xbmc/pvr/channels/PVRChannelGroups.cpp +++ b/xbmc/pvr/channels/PVRChannelGroups.cpp @@ -216,21 +216,12 @@ bool CPVRChannelGroups::UpdateGroupsEntries(const CPVRChannelGroups &groups) bool CPVRChannelGroups::LoadUserDefinedChannelGroups(void) { - CPVRDatabase *database = GetPVRDatabase(); - if (!database) - return false; - bool bSyncWithBackends = CSettings::Get().GetBool("pvrmanager.syncchannelgroups"); CSingleLock lock(m_critSection); - // load the other groups from the database - int iSize = m_groups.size(); - database->Get(*this); - CLog::Log(LOGDEBUG, "PVR - %s - %d user defined %s channel groups fetched from the database", __FUNCTION__, (int) (m_groups.size() - iSize), m_bRadio ? "radio" : "TV"); - // load groups from the backends if the option is enabled - iSize = m_groups.size(); + int iSize = m_groups.size(); if (bSyncWithBackends) { GetGroupsFromClients(); @@ -271,6 +262,10 @@ bool CPVRChannelGroups::LoadUserDefinedChannelGroups(void) bool CPVRChannelGroups::Load(void) { + CPVRDatabase *database = GetPVRDatabase(); + if (!database) + return false; + CSingleLock lock(m_critSection); // remove previous contents @@ -278,10 +273,16 @@ bool CPVRChannelGroups::Load(void) CLog::Log(LOGDEBUG, "PVR - %s - loading all %s channel groups", __FUNCTION__, m_bRadio ? "radio" : "TV"); - // create and load the internal channel group - CPVRChannelGroupPtr internalChannels = CPVRChannelGroupPtr(new CPVRChannelGroupInternal(m_bRadio)); - m_groups.push_back(internalChannels); - if (!internalChannels->Load()) + // create the internal channel group + CPVRChannelGroupPtr internalGroup = CPVRChannelGroupPtr(new CPVRChannelGroupInternal(m_bRadio)); + m_groups.push_back(internalGroup); + + // load groups from the database + database->Get(*this); + CLog::Log(LOGDEBUG, "PVR - %s - %d %s groups fetched from the database", __FUNCTION__, m_groups.size(), m_bRadio ? "radio" : "TV"); + + // load channels of internal group + if (!internalGroup->Load()) { CLog::Log(LOGERROR, "PVR - %s - failed to load channels", __FUNCTION__); return false; @@ -296,7 +297,7 @@ bool CPVRChannelGroups::Load(void) // set the last played group as selected group at startup CPVRChannelGroupPtr lastPlayedGroup = GetLastPlayedGroup(); - SetSelectedGroup(lastPlayedGroup ? lastPlayedGroup : internalChannels); + SetSelectedGroup(lastPlayedGroup ? lastPlayedGroup : internalGroup); CLog::Log(LOGDEBUG, "PVR - %s - %d %s channel groups loaded", __FUNCTION__, (int) m_groups.size(), m_bRadio ? "radio" : "TV"); diff --git a/xbmc/pvr/windows/GUIWindowPVRBase.cpp b/xbmc/pvr/windows/GUIWindowPVRBase.cpp index 4119289e4f..4f08b23884 100644 --- a/xbmc/pvr/windows/GUIWindowPVRBase.cpp +++ b/xbmc/pvr/windows/GUIWindowPVRBase.cpp @@ -64,6 +64,7 @@ CGUIWindowPVRBase::~CGUIWindowPVRBase(void) void CGUIWindowPVRBase::Notify(const Observable &obs, const ObservableMessage msg) { + UpdateSelectedItemPath(); CGUIMessage m(GUI_MSG_REFRESH_LIST, GetID(), 0, msg); CApplicationMessenger::Get().SendGUIMessage(m); } @@ -121,13 +122,7 @@ void CGUIWindowPVRBase::OnInitWindow(void) void CGUIWindowPVRBase::OnDeinitWindow(int nextWindowID) { - int selectedItem = m_viewControl.GetSelectedItem(); - if (selectedItem > -1) - { - CFileItemPtr fileItem = m_vecItems->Get(selectedItem); - if (fileItem) - m_selectedItemPaths.at(m_bRadio) = fileItem->GetPath(); - } + UpdateSelectedItemPath(); } bool CGUIWindowPVRBase::OnMessage(CGUIMessage& message) @@ -705,5 +700,16 @@ bool CGUIWindowPVRBase::Update(const std::string &strDirectory, bool updateFilte void CGUIWindowPVRBase::UpdateButtons(void) { CGUIMediaWindow::UpdateButtons(); - SET_CONTROL_LABEL(CONTROL_BTNCHANNELGROUPS, g_localizeStrings.Get(19141) + ": " + (m_group->GroupType() == PVR_GROUP_TYPE_INTERNAL ? g_localizeStrings.Get(19287) : m_group->GroupName())); + SET_CONTROL_LABEL(CONTROL_BTNCHANNELGROUPS, g_localizeStrings.Get(19141) + ": " + m_group->GroupName()); +} + +void CGUIWindowPVRBase::UpdateSelectedItemPath() +{ + int selectedItem = m_viewControl.GetSelectedItem(); + if (selectedItem > -1) + { + CFileItemPtr fileItem = m_vecItems->Get(selectedItem); + if (fileItem) + m_selectedItemPaths.at(m_bRadio) = fileItem->GetPath(); + } } diff --git a/xbmc/pvr/windows/GUIWindowPVRBase.h b/xbmc/pvr/windows/GUIWindowPVRBase.h index 13cb9eeacc..1599c1e748 100644 --- a/xbmc/pvr/windows/GUIWindowPVRBase.h +++ b/xbmc/pvr/windows/GUIWindowPVRBase.h @@ -89,6 +89,7 @@ namespace PVR virtual void ShowEPGInfo(CFileItem *item); virtual void ShowRecordingInfo(CFileItem *item); virtual bool UpdateEpgForChannel(CFileItem *item); + virtual void UpdateSelectedItemPath(); static std::map<bool, std::string> m_selectedItemPaths; diff --git a/xbmc/pvr/windows/GUIWindowPVRGuide.cpp b/xbmc/pvr/windows/GUIWindowPVRGuide.cpp index be091444a7..a7cce2b99d 100644 --- a/xbmc/pvr/windows/GUIWindowPVRGuide.cpp +++ b/xbmc/pvr/windows/GUIWindowPVRGuide.cpp @@ -102,7 +102,7 @@ void CGUIWindowPVRGuide::GetContextButtons(int itemNumber, CContextButtons &butt buttons.Add(CONTEXT_BUTTON_MENU_HOOKS, 19195); /* PVR client specific action */ } -void CGUIWindowPVRGuide::OnDeinitWindow(int nextWindowID) +void CGUIWindowPVRGuide::UpdateSelectedItemPath() { if (m_viewControl.GetCurrentControl() == GUIDE_VIEW_TIMELINE) { @@ -115,7 +115,7 @@ void CGUIWindowPVRGuide::OnDeinitWindow(int nextWindowID) } } else - CGUIWindowPVRBase::OnDeinitWindow(nextWindowID); + CGUIWindowPVRBase::UpdateSelectedItemPath(); } bool CGUIWindowPVRGuide::OnAction(const CAction &action) diff --git a/xbmc/pvr/windows/GUIWindowPVRGuide.h b/xbmc/pvr/windows/GUIWindowPVRGuide.h index 81f927026a..964f6a2a38 100644 --- a/xbmc/pvr/windows/GUIWindowPVRGuide.h +++ b/xbmc/pvr/windows/GUIWindowPVRGuide.h @@ -35,7 +35,6 @@ namespace PVR CGUIWindowPVRGuide(bool bRadio); virtual ~CGUIWindowPVRGuide(void); - void OnDeinitWindow(int nextWindowID); bool OnMessage(CGUIMessage& message); bool OnAction(const CAction &action); void GetContextButtons(int itemNumber, CContextButtons &buttons); @@ -44,6 +43,9 @@ namespace PVR void ResetObservers(void); void UnregisterObservers(void); + protected: + void UpdateSelectedItemPath(); + private: bool SelectPlayingFile(void); diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp index 4af3c7a92b..237e903240 100644 --- a/xbmc/settings/AdvancedSettings.cpp +++ b/xbmc/settings/AdvancedSettings.cpp @@ -175,7 +175,6 @@ void CAdvancedSettings::Initialize() m_mediacodecForceSoftwareRendring = false; m_videoDefaultLatency = 0.0; - m_videoDisableSWMultithreading = false; m_musicUseTimeSeeking = true; m_musicTimeSeekForward = 10; @@ -587,7 +586,6 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file) XMLUtils::GetFloat(pElement, "nonlinearstretchratio", m_videoNonLinStretchRatio, 0.01f, 1.0f); XMLUtils::GetBoolean(pElement,"enablehighqualityhwscalers", m_videoEnableHighQualityHwScalers); XMLUtils::GetFloat(pElement,"autoscalemaxfps",m_videoAutoScaleMaxFps, 0.0f, 1000.0f); - XMLUtils::GetBoolean(pElement,"disableswmultithreading",m_videoDisableSWMultithreading); XMLUtils::GetBoolean(pElement, "disablebackgrounddeinterlace", m_videoDisableBackgroundDeinterlace); XMLUtils::GetInt(pElement, "useocclusionquery", m_videoCaptureUseOcclusionQuery, -1, 1); XMLUtils::GetBoolean(pElement,"vdpauInvTelecine",m_videoVDPAUtelecine); diff --git a/xbmc/settings/AdvancedSettings.h b/xbmc/settings/AdvancedSettings.h index 7e50a63507..f58142fdb2 100644 --- a/xbmc/settings/AdvancedSettings.h +++ b/xbmc/settings/AdvancedSettings.h @@ -193,7 +193,6 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler bool m_DXVANoDeintProcForProgressive; int m_videoFpsDetect; int m_videoBusyDialogDelay_ms; - bool m_videoDisableSWMultithreading; StagefrightConfig m_stagefrightConfig; bool m_mediacodecForceSoftwareRendring; diff --git a/xbmc/settings/SettingConditions.cpp b/xbmc/settings/SettingConditions.cpp index c1cdfc1c0f..11d393f2ae 100644 --- a/xbmc/settings/SettingConditions.cpp +++ b/xbmc/settings/SettingConditions.cpp @@ -212,8 +212,8 @@ void CSettingConditions::Initialize() #ifdef HAS_SDL_JOYSTICK m_simpleConditions.insert("has_sdl_joystick"); #endif -#ifdef HAS_SKIN_TOUCHED - m_simpleConditions.insert("has_skin_touched"); +#ifdef HAS_TOUCH_SKIN + m_simpleConditions.insert("has_touch_skin"); #endif #ifdef HAS_TIME_SERVER m_simpleConditions.insert("has_time_server"); diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp index 797e91a553..b87e984e8c 100644 --- a/xbmc/settings/Settings.cpp +++ b/xbmc/settings/Settings.cpp @@ -522,8 +522,8 @@ void CSettings::InitializeVisibility() void CSettings::InitializeDefaults() { // set some default values if necessary -#if defined(HAS_SKIN_TOUCHED) && defined(TARGET_DARWIN_IOS) && !defined(TARGET_DARWIN_IOS_ATV2) - ((CSettingAddon*)m_settingsManager->GetSetting("lookandfeel.skin"))->SetDefault("skin.touched"); +#if defined(HAS_TOUCH_SKIN) && defined(TARGET_DARWIN_IOS) && !defined(TARGET_DARWIN_IOS_ATV2) + ((CSettingAddon*)m_settingsManager->GetSetting("lookandfeel.skin"))->SetDefault("skin.re-touched"); #endif #if defined(TARGET_POSIX) diff --git a/xbmc/system.h b/xbmc/system.h index 1ca58d02fe..41c1f5ded1 100644 --- a/xbmc/system.h +++ b/xbmc/system.h @@ -272,8 +272,8 @@ /**************** * default skin ****************/ -#if defined(HAS_SKIN_TOUCHED) && defined(TARGET_DARWIN_IOS) && !defined(TARGET_DARWIN_IOS_ATV2) -#define DEFAULT_SKIN "skin.touched" +#if defined(HAS_TOUCH_SKIN) && defined(TARGET_DARWIN_IOS) && !defined(TARGET_DARWIN_IOS_ATV2) +#define DEFAULT_SKIN "skin.re-touched" #else #define DEFAULT_SKIN "skin.confluence" #endif diff --git a/xbmc/utils/LangCodeExpander.cpp b/xbmc/utils/LangCodeExpander.cpp index faf413cd51..67dc2d4c04 100644 --- a/xbmc/utils/LangCodeExpander.cpp +++ b/xbmc/utils/LangCodeExpander.cpp @@ -1259,7 +1259,7 @@ const CharCodeConvertionWithHack CharCode2To3[189] = { "br", "bre", NULL }, { "bg", "bul", NULL }, { "ca", "cat", NULL }, - { "cs", "cze", "csy" }, + { "cs", "cze", "ces" }, { "ch", "cha", NULL }, { "ce", "che", NULL }, { "cu", "chu", NULL }, @@ -1419,7 +1419,7 @@ const CharCodeConvertionWithHack CharCode2To3[189] = { "yi", "yid", NULL }, { "yo", "yor", NULL }, { "za", "zha", NULL }, - { "zh", "chi", NULL }, + { "zh", "chi", "zho" }, { "zu", "zul", NULL }, { "zv", "und", NULL }, // XBMC intern mapping for missing "Undetermined" iso639-1 code { "zx", "zxx", NULL }, // XBMC intern mapping for missing "No linguistic content" iso639-1 code diff --git a/xbmc/win32/WIN32Util.cpp b/xbmc/win32/WIN32Util.cpp index 15d0e40c63..542c211435 100644 --- a/xbmc/win32/WIN32Util.cpp +++ b/xbmc/win32/WIN32Util.cpp @@ -408,7 +408,7 @@ std::string CWIN32Util::GetProfilePath() CUtil::GetHomePath(strHomePath); if(g_application.PlatformDirectoriesEnabled()) - strProfilePath = URIUtils::AddFileToFolder(GetSpecialFolder(CSIDL_APPDATA|CSIDL_FLAG_CREATE), "XBMC"); + strProfilePath = URIUtils::AddFileToFolder(GetSpecialFolder(CSIDL_APPDATA|CSIDL_FLAG_CREATE), "Kodi"); else strProfilePath = URIUtils::AddFileToFolder(strHomePath , "portable_data"); diff --git a/xbmc/win32/Win32DelayedDllLoad.cpp b/xbmc/win32/Win32DelayedDllLoad.cpp index 61bdbb27eb..be3130f9d3 100644 --- a/xbmc/win32/Win32DelayedDllLoad.cpp +++ b/xbmc/win32/Win32DelayedDllLoad.cpp @@ -60,45 +60,45 @@ FARPROC WINAPI delayHookNotifyFunc (unsigned dliNotify, PDelayLoadInfo pdli) HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH); return (FARPROC)hMod; } - if (stricmp(pdli->szDll, "avcodec-55.dll") == 0) + if (stricmp(pdli->szDll, "avcodec-56.dll") == 0) { - CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/players/dvdplayer/avcodec-55.dll"); + CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/players/dvdplayer/avcodec-56.dll"); HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH); return (FARPROC)hMod; } - if (stricmp(pdli->szDll, "avfilter-4.dll") == 0) + if (stricmp(pdli->szDll, "avfilter-5.dll") == 0) { - CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/players/dvdplayer/avfilter-4.dll"); + CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/players/dvdplayer/avfilter-5.dll"); HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH); return (FARPROC)hMod; } - if (stricmp(pdli->szDll, "avformat-55.dll") == 0) + if (stricmp(pdli->szDll, "avformat-56.dll") == 0) { - CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/players/dvdplayer/avformat-55.dll"); + CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/players/dvdplayer/avformat-56.dll"); HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH); return (FARPROC)hMod; } - if (stricmp(pdli->szDll, "avutil-52.dll") == 0) + if (stricmp(pdli->szDll, "avutil-54.dll") == 0) { - CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/players/dvdplayer/avutil-52.dll"); + CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/players/dvdplayer/avutil-54.dll"); HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH); return (FARPROC)hMod; } - if (stricmp(pdli->szDll, "postproc-52.dll") == 0) + if (stricmp(pdli->szDll, "postproc-53.dll") == 0) { - CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/players/dvdplayer/postproc-52.dll"); + CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/players/dvdplayer/postproc-53.dll"); HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH); return (FARPROC)hMod; } - if (stricmp(pdli->szDll, "swresample-0.dll") == 0) + if (stricmp(pdli->szDll, "swresample-1.dll") == 0) { - CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/players/dvdplayer/swresample-0.dll"); + CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/players/dvdplayer/swresample-1.dll"); HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH); return (FARPROC)hMod; } - if (stricmp(pdli->szDll, "swscale-2.dll") == 0) + if (stricmp(pdli->szDll, "swscale-3.dll") == 0) { - CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/players/dvdplayer/swscale-2.dll"); + CStdString strDll = CSpecialProtocol::TranslatePath("special://xbmcbin/system/players/dvdplayer/swscale-3.dll"); HMODULE hMod = LoadLibraryEx(strDll.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH); return (FARPROC)hMod; } diff --git a/xbmc/win32/XBMC_PC.rc.in b/xbmc/win32/XBMC_PC.rc.in index 923a1514fb..00194064e8 100644 --- a/xbmc/win32/XBMC_PC.rc.in +++ b/xbmc/win32/XBMC_PC.rc.in @@ -72,9 +72,9 @@ BEGIN VALUE "CompanyName", "@COMPANY_NAME@" VALUE "FileDescription", "@APP_NAME@" VALUE "FileVersion", "@APP_VERSION_MAJOR@.@APP_VERSION_MINOR@-@APP_VERSION_TAG@" - VALUE "InternalName", "XBMC.exe" - VALUE "LegalCopyright", "Copyright (c) Team XBMC. All rights reserved." - VALUE "OriginalFilename", "XBMC.exe" + VALUE "InternalName", "@APP_NAME@.exe" + VALUE "LegalCopyright", "Copyright (c) @COMPANY_NAME@. All rights reserved." + VALUE "OriginalFilename", "@APP_NAME@.exe" VALUE "ProductName", "@APP_NAME@ for Windows" VALUE "ProductVersion", "@APP_VERSION_MAJOR@.@APP_VERSION_MINOR@-@APP_VERSION_TAG@" END |