[FFmpeg] version bump to n1.2 (rev e820e3a) - xbmc files
authorFlyingRat <flyingrat@outlook.com>
Sun, 7 Apr 2013 14:40:12 +0000 (16:40 +0200)
committerFlyingRat <flyingrat@outlook.com>
Sun, 7 Apr 2013 14:40:12 +0000 (16:40 +0200)
lib/DllAvFormat.h
lib/Makefile.in
lib/ffmpeg/build_xbmc_win32.sh
project/Win32BuildSetup/BuildSetup.bat
project/Win32BuildSetup/buildmingwlibs.sh
tools/depends/native/gas-preprocessor-native/gas-preprocessor.pl
xbmc/DllPaths_win32.h
xbmc/cores/dvdplayer/DVDAudio.h
xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.h
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecLibMpeg2.cpp
xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
xbmc/cores/dvdplayer/DVDPlayerAudio.h
xbmc/cores/dvdplayer/DVDStreamInfo.h

16 files changed:
lib/DllAvFormat.h
lib/Makefile.in
lib/ffmpeg/build_xbmc_win32.sh [new file with mode: 0755]
project/Win32BuildSetup/BuildSetup.bat
project/Win32BuildSetup/buildmingwlibs.sh
tools/depends/native/gas-preprocessor-native/gas-preprocessor.pl
xbmc/DllPaths_win32.h
xbmc/cores/dvdplayer/DVDAudio.h
xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.h
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecLibMpeg2.cpp
xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
xbmc/cores/dvdplayer/DVDPlayerAudio.h
xbmc/cores/dvdplayer/DVDStreamInfo.h

index 58462c5..7fc831e 100644 (file)
@@ -43,9 +43,12 @@ extern "C" {
     #include <ffmpeg/avformat.h>
   #endif
   /* av_read_frame_flush() is defined for us in lib/xbmc-dll-symbols/DllAvFormat.c */
-  void av_read_frame_flush(AVFormatContext *s);
+  // void av_read_frame_flush(AVFormatContext *s); // av_read_frame_flush decrepated
+  void ff_read_frame_flush(AVFormatContext *s);    // internal replacement
 #else
   #include "libavformat/avformat.h"
+  void ff_read_frame_flush(AVFormatContext *s);    // internal replacement
+
 #endif
 }
 
@@ -115,7 +118,7 @@ public:
   virtual AVInputFormat *av_find_input_format(const char *short_name) { return ::av_find_input_format(short_name); }
   virtual void avformat_close_input(AVFormatContext **s) { ::avformat_close_input(s); }
   virtual int av_read_frame(AVFormatContext *s, AVPacket *pkt) { return ::av_read_frame(s, pkt); }
-  virtual void av_read_frame_flush(AVFormatContext *s) { ::av_read_frame_flush(s); }
+  virtual void av_read_frame_flush(AVFormatContext *s) { ::ff_read_frame_flush(s); } // av_read_frame_flush decrepated 
   virtual int av_read_play(AVFormatContext *s) { return ::av_read_play(s); }
   virtual int av_read_pause(AVFormatContext *s) { return ::av_read_pause(s); }
   virtual int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { return ::av_seek_frame(s, stream_index, timestamp, flags); }
index 37e2d2f..9ac0c06 100644 (file)
@@ -75,7 +75,9 @@ endif
 ffmpeg:
        $(MAKE) -C $@
 ifeq ($(findstring osx,$(ARCH)), osx)
-       -$(AR) d ffmpeg/libavcodec/libavcodec.a inverse.o
+       -$(AR) d ffmpeg/libavcodec/libavcodec.a log2_tab.o
+       -$(AR) d ffmpeg/libavformat/libavformat.a log2_tab.o
+       -$(AR) d ffmpeg/libswresample/libswresample.a log2_tab.o
 endif
 
 clean:
diff --git a/lib/ffmpeg/build_xbmc_win32.sh b/lib/ffmpeg/build_xbmc_win32.sh
new file mode 100755 (executable)
index 0000000..fdb00c6
--- /dev/null
@@ -0,0 +1,131 @@
+#!/bin/bash
+
+#
+# build_xbmc_win32.sh (v1.1)
+# Version agnostic win32 build script adjusted for ffmpeg n1.1 and onwards...
+# 
+
+MAKEFLAGS=""
+
+# add --enable-debug (remove --disable-debug ofc) to get ffmpeg log messages in xbmc.log
+# the resulting debug dll's are twice to fourth time the size of the release binaries
+
+OPTIONS="
+--enable-shared \
+--enable-memalign-hack \
+--enable-gpl \
+--enable-w32threads \
+--enable-postproc \
+--enable-zlib \
+--disable-static \
+--disable-altivec \
+--disable-muxers \
+--disable-encoders \
+--disable-debug \
+--disable-ffplay \
+--disable-ffserver \
+--disable-ffmpeg \
+--disable-ffprobe \
+--disable-devices \
+--disable-crystalhd \
+--enable-muxer=spdif \
+--enable-muxer=adts \
+--enable-encoder=ac3 \
+--enable-encoder=aac \
+--enable-runtime-cpudetect \
+--enable-avfilter \
+--disable-doc"
+
+#
+# Flag when ffmpeg is configured 
+#
+
+WIN32CONF=.win32configured
+DLLPATHS_INCLUDE=/xbmc/xbmc/DllPaths_generated_win32_ffmpeg.h
+
+
+#
+# Set parallel build mode
+#
+
+if [ $NUMBER_OF_PROCESSORS > 1 ]
+then
+  MAKEFLAGS=-j$NUMBER_OF_PROCESSORS
+fi
+
+
+#
+# Clean object files and libraries
+#
+
+if [ "$1" == "clean" ]
+then
+  make distclean
+  rm -f $WIN32CONF $DLLPATHS_INCLUDE
+fi
+
+
+#
+# Only run configure when neccesary and break if configure fails.
+#
+
+if [ ! -f $WIN32CONF ]; then
+
+  echo "$0: Running ffmpeg configure..."
+
+  if ./configure --extra-cflags="-fno-common -Iinclude-xbmc-win32/dxva2 -DNDEBUG" \
+                               --extra-ldflags="-L/xbmc/system/players/dvdplayer" ${OPTIONS}; then
+       touch $WIN32CONF
+  else
+       echo "$0: configure failed."
+       exit 1
+  fi
+fi
+
+
+#
+# version agnostic build, copy and generate DLL-paths include file.
+# 
+
+# enable break on error:
+set -e
+
+make $MAKEFLAGS 
+
+DLL_PATH_LIBAVCODEC=$(set -- libavcodec/avcodec-[0-9]*.dll; echo $1)
+DLL_PATH_LIBAVFORMAT=$(set -- libavformat/avformat-[0-9]*.dll; echo $1)
+DLL_PATH_LIBAVUTIL=$(set -- libavutil/avutil-[0-9]*.dll; echo $1)
+DLL_PATH_LIBAVFILTER=$(set -- libavfilter/avfilter-[0-9]*.dll; echo $1)
+DLL_PATH_LIBPOSTPROC=$(set -- libpostproc/postproc-[0-9]*.dll; echo $1)
+DLL_PATH_LIBSWSCALE=$(set -- libswscale/swscale-[0-9]*.dll; echo $1)
+DLL_PATH_LIBSWRESAMPLE=$(set -- libswresample/swresample-[0-9]*.dll; echo $1)
+
+#
+# Generate dll path defintion file $DLLPATHS_INCLUDE
+#
+
+cat <<EOF > $DLLPATHS_INCLUDE
+/*
+** Definitions auto generated by $0 
+** Date: $(date)
+*/
+EOF
+
+for DLL in     DLL_PATH_LIBAVCODEC DLL_PATH_LIBAVFORMAT DLL_PATH_LIBAVUTIL \
+               DLL_PATH_LIBAVFILTER DLL_PATH_LIBPOSTPROC DLL_PATH_LIBSWSCALE \
+               DLL_PATH_LIBSWRESAMPLE
+do
+       echo "#define $DLL              \"special://xbmcbin/system/players/dvdplayer/$(basename ${!DLL})\""
+done >> $DLLPATHS_INCLUDE
+
+#
+# Copy dll's to system player folder
+#
+
+cp $DLL_PATH_LIBAVCODEC                /xbmc/system/players/dvdplayer/
+cp $DLL_PATH_LIBAVFORMAT       /xbmc/system/players/dvdplayer/
+cp $DLL_PATH_LIBAVUTIL         /xbmc/system/players/dvdplayer/ 
+cp $DLL_PATH_LIBAVFILTER       /xbmc/system/players/dvdplayer/ 
+cp $DLL_PATH_LIBPOSTPROC       /xbmc/system/players/dvdplayer/ 
+cp $DLL_PATH_LIBSWSCALE                /xbmc/system/players/dvdplayer/ 
+cp $DLL_PATH_LIBSWRESAMPLE     /xbmc/system/players/dvdplayer/ 
index ef1dc2a..da9734e 100644 (file)
 @ECHO OFF
-rem ----Usage----
-rem BuildSetup [gl|dx] [clean|noclean]
-rem vs2010 for compiling with visual studio 2010
-rem gl for opengl build (default)
-rem dx for directx build
-rem clean to force a full rebuild
-rem noclean to force a build without clean
-rem noprompt to avoid all prompts
-rem nomingwlibs to skip building all libs built with mingw
+@setlocal 
+
+rem
+rem BuildSetup.sh (v1.1)
+rem
+rem PURPOSE - BuildSetup creates a complete XBMC installer package 
+rem
+rem Usage:
+rem   BuildSetup [options] - Default options: dx noclean vs2010 errpromp mingwlibs
+rem
+rem Option     Explanation
+rem ---------   -----------------------------------------------
+rem dx         Build for DirectX (default)
+rem noclean    Build without clean (default)
+rem vs2010     Compile with Visual Studio 2010 (default)
+rem errprompt  Only pause or prompt on error (default)
+rem mingwlibs  Build or rebuil mingwlibs only when neccesary (default) 
+rem
+rem gl         Build for OpenGL (not supported)
+rem clean      Force a full rebuild i.e. rebuilds everything
+rem prompt     Always prompt
+rem noprompt   Avoid all prompts
+rem nomingwlibs        Skip nomingwlibs 
+
+
 CLS
 COLOR 1B
 TITLE XBMC for Windows Build Script
-rem ----PURPOSE----
-rem - Create a working XBMC 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.
-rem -------------------------------------------------------------
-rem    CONFIG START
+
+::
+:: Set default options
+::
+
 SET comp=vs2010
-SET target=dx
-SET buildmode=ask
-SET promptlevel=prompt
+SET graphics=dx
+SET buildmode=noclean
+SET promptlevel=errprompt
 SET buildmingwlibs=true
 SET exitcode=0
-SET useshell=rxvt
-FOR %%b in (%1, %2, %3, %4, %5) DO (
+
+::
+:: Check command line options
+:: 
+FOR %%b in (%*) DO (
        IF %%b==vs2010 SET comp=vs2010
-       IF %%b==dx SET target=dx
-       IF %%b==gl SET target=gl
+       IF %%b==dx SET videmode=dx
+       IF %%b==gl echo "%0%: option gl currently not supported" 
        IF %%b==clean SET buildmode=clean
-       IF %%b==noclean SET buildmode=noclean
        IF %%b==noprompt SET promptlevel=noprompt
+       IF %%b==prompt SET promptlevel=prompt
        IF %%b==nomingwlibs SET buildmingwlibs=false
-    IF %%b==sh SET useshell=sh
 )
 
-SET buildconfig=Release (DirectX)
-IF %target%==gl SET buildconfig=Release (OpenGL)
+::
+:: Clean up section
+::
+       
+IF EXIST buildlog.html del buildlog.html /q
+IF EXIST errormingw del errormingw /q 
+IF EXIST prompt del prompt /q 
+IF EXIST makeclean del makeclean /q 
+
+::
+:: Check for Visual Studio and select solution target 
+::
 
 IF %comp%==vs2010 (
   IF "%VS100COMNTOOLS%"=="" (
-               set NET="%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe"
-       ) ELSE IF EXIST "%VS100COMNTOOLS%\..\IDE\VCExpress.exe" (
-               set NET="%VS100COMNTOOLS%\..\IDE\VCExpress.exe"
-       ) ELSE IF EXIST "%VS100COMNTOOLS%\..\IDE\devenv.exe" (
-               set NET="%VS100COMNTOOLS%\..\IDE\devenv.exe"
+       set VS_EXE="%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe"
+  ) ELSE IF EXIST  "%VS100COMNTOOLS%..\IDE\devenv.exe" (
+       SET VS_EXE="%VS100COMNTOOLS%..\IDE\devenv.exe"
+  ) ELSE IF EXIST  "%VS100COMNTOOLS%..\IDE\VCExpress.exe" (
+       SET VS_EXE="%VS100COMNTOOLS%..\IDE\VCExpress.exe"
+  )
+
+  IF NOT EXIST %VS_EXE% (
+       SET DIETEXT="Visual Studio 2010 Express not installed"
+       goto DIE
+  )
+) ELSE (
+       SET DIETEXT="Unsupported Compiler: %comp%"
+       GOTO DIE
+)
+
+::
+:: Check for existing xbcmc.exe 
+:: 
+
+IF %graphics%==dx SET RELEASE=Release (DirectX)
+IF %graphics%==gl SET RELEASE=Release (OpenGL)
+
+set XBMC_EXE="..\VS2010Express\XBMC\%RELEASE%\XBMC.exe"
+
+IF EXIST %XBMC_EXE% IF "%promptlevel%"=="prompt" (
+       ECHO ------------------------------------------------------------
+       ECHO Found a previous Compiled XBMC.EXE
+       ECHO 1. Rebuild changed files only. [default]
+       ECHO 2. Force rebuild everything.
+       ECHO ------------------------------------------------------------
+       SET ANSWER=1 
+       set /P ANSWER="Compile mode: 1/2? [1]:"
+
+       if /I "%ANSWER%" EQU 2 (
+               set buildmode=clean
+       ) else (
+               set buildmode=noclean
        )
 )
 
-  IF NOT EXIST %NET% (
-     set DIETEXT=Visual Studio .NET 2010 Express was not found.
-        goto DIE
-  )
-  
-  set OPTS_EXE="..\VS2010Express\XBMC for Windows.sln" /build "%buildconfig%"
-  set CLEAN_EXE="..\VS2010Express\XBMC for Windows.sln" /clean "%buildconfig%"
-  set EXE= "..\VS2010Express\XBMC\%buildconfig%\XBMC.exe"
-  set PDB= "..\VS2010Express\XBMC\%buildconfig%\XBMC.pdb"
-       
-  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
-  IF EXIST buildlog.html del buildlog.html /q
-  IF %buildmode%==clean goto COMPILE_EXE
-  IF %buildmode%==noclean goto COMPILE_NO_CLEAN_EXE
-  rem ---------------------------------------------
-  rem  check for existing exe
-  rem ---------------------------------------------
-  
-  IF EXIST %EXE% (
-    goto EXE_EXIST
-  )
-  goto COMPILE_EXE
 
-:EXE_EXIST
-  IF %promptlevel%==noprompt goto COMPILE_EXE
-  ECHO ------------------------------------------------------------
-  ECHO Found a previous Compiled WIN32 EXE!
-  ECHO [1] a NEW EXE will be compiled for the BUILD_WIN32
-  ECHO [2] existing EXE will be updated (quick mode compile) for the BUILD_WIN32
-  ECHO ------------------------------------------------------------
-  set /P XBMC_COMPILE_ANSWER=Compile a new EXE? [1/2]:
-  if /I %XBMC_COMPILE_ANSWER% EQU 1 goto COMPILE_EXE
-  if /I %XBMC_COMPILE_ANSWER% EQU 2 goto COMPILE_NO_CLEAN_EXE
-  
-:COMPILE_EXE
-  ECHO Wait while preparing the build.
-  ECHO ------------------------------------------------------------
-  ECHO Cleaning Solution...
-  %NET% %CLEAN_EXE%
-  ECHO Compiling XBMC...
-  %NET% %OPTS_EXE%
-  IF NOT EXIST %EXE% (
-       set DIETEXT="XBMC.EXE failed to build!  See %CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
-       IF %promptlevel%==noprompt (
-               type "%CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
+::
+:: Build MinGWlibs
+::
+
+IF %buildmingwlibs%==true (
+       IF %buildmode%==clean (
+               echo Force rebuild of MinGWlibs
+       ) else IF EXIST mingwlibsok (
+               :: echo MinGWlibs already exists [skipping...]
+               SET buildmingwlibs=false
        )
+)
+
+IF %buildmingwlibs%==true (
+  ECHO ------------------------------------------------------------
+  ECHO Compiling MinGWlibs libraries...
+
+  IF %buildmode%==clean ECHO makeclean>makeclean
+  IF %promptlevel%==prompt ECHO prompt>prompt
+
+  call buildmingwlibs.bat
+
+  IF NOT EXIST mingwlibsok (
+       set DIETEXT="failed to build mingw libs"
        goto DIE
   )
-  ECHO Done!
-  ECHO ------------------------------------------------------------
-  set buildmode=clean
-  GOTO MAKE_BUILD_EXE
-  
-:COMPILE_NO_CLEAN_EXE
-  ECHO Wait while preparing the build.
-  ECHO ------------------------------------------------------------
-  ECHO Compiling Solution...
-  %NET% %OPTS_EXE%
-  IF NOT EXIST %EXE% (
-       set DIETEXT="XBMC.EXE failed to build!  See %CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
-       IF %promptlevel%==noprompt (
-               type "%CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
-       )
+
+  IF EXIST errormingw (
+       set DIETEXT="failed to build mingw libs"
        goto DIE
   )
-  ECHO Done!
-  ECHO ------------------------------------------------------------
-  GOTO MAKE_BUILD_EXE
-
-:MAKE_BUILD_EXE
-  IF %buildmingwlibs%==true (
-    ECHO Compiling mingw libs
-    ECHO bla>noprompt
-    IF EXIST errormingw del errormingw > NUL
-       IF %buildmode%==clean (
-         ECHO bla>makeclean
+)
+
+::
+:: Build the XBMC solution with Visual Studio command line
+::
+
+IF %buildmode%==clean (
+       set BUILDFLAG=/rebuild
+) else (
+       set BUILDFLAG=/build
+)
+
+ECHO ------------------------------------------------------------
+ECHO Compiling XBMC %BUILDFLAG% %RELEASE% ...
+
+%VS_EXE% "..\VS2010Express\XBMC for Windows.sln" %BUILDFLAG% "%RELEASE%"
+
+::
+:: Check that target exists
+::
+
+IF NOT EXIST %XBMC_EXE% (
+       set DIETEXT="XBMC.EXE failed to build!  See %CD%\..\vs2010express\XBMC\%RELEASE%\objs\XBMC.log"
+       IF %promptlevel%==noprompt (
+               type "%CD%\..\vs2010express\XBMC\%RELEASE%\objs\XBMC.log"
        )
-    rem only use sh to please jenkins
-    IF %useshell%==sh (
-      call buildmingwlibs.bat sh
-    ) ELSE (
-      call buildmingwlibs.bat
-    )
-    IF EXIST errormingw (
-       set DIETEXT="failed to build mingw libs"
-       goto DIE
-    )
-  )
-  
-  ECHO Copying files...
-  IF EXIST BUILD_WIN32 rmdir BUILD_WIN32 /S /Q
-
-  Echo .svn>exclude.txt
-  Echo CVS>>exclude.txt
-  Echo Thumbs.db>>exclude.txt
-  Echo Desktop.ini>>exclude.txt
-  Echo dsstdfx.bin>>exclude.txt
-  Echo exclude.txt>>exclude.txt
-  rem and exclude potential leftovers
-  Echo mediasources.xml>>exclude.txt
-  Echo advancedsettings.xml>>exclude.txt
-  Echo guisettings.xml>>exclude.txt
-  Echo profiles.xml>>exclude.txt
-  Echo sources.xml>>exclude.txt
-  Echo userdata\cache\>>exclude.txt
-  Echo userdata\database\>>exclude.txt
-  Echo userdata\playlists\>>exclude.txt
-  Echo userdata\script_data\>>exclude.txt
-  Echo userdata\thumbnails\>>exclude.txt
-  rem UserData\visualisations contains currently only xbox visualisationfiles
-  Echo userdata\visualisations\>>exclude.txt
-  rem other platform stuff
-  Echo lib-osx>>exclude.txt
-  Echo players\mplayer>>exclude.txt
-  Echo FileZilla Server.xml>>exclude.txt
-  Echo asound.conf>>exclude.txt
-  Echo voicemasks.xml>>exclude.txt
-  Echo Lircmap.xml>>exclude.txt
-  
-  md BUILD_WIN32\Xbmc
-
-  xcopy %EXE% BUILD_WIN32\Xbmc > NUL
-  xcopy ..\..\userdata BUILD_WIN32\Xbmc\userdata /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
-  copy ..\..\copying.txt BUILD_WIN32\Xbmc > NUL
-  copy ..\..\LICENSE.GPL BUILD_WIN32\Xbmc > NUL
-  copy ..\..\known_issues.txt BUILD_WIN32\Xbmc > NUL
-  xcopy dependencies\*.* BUILD_WIN32\Xbmc /Q /I /Y /EXCLUDE:exclude.txt  > NUL
-  copy sources.xml BUILD_WIN32\Xbmc\userdata > NUL
-  
-  xcopy ..\..\language BUILD_WIN32\Xbmc\language /E /Q /I /Y /EXCLUDE:exclude.txt  > NUL
-  xcopy ..\..\addons BUILD_WIN32\Xbmc\addons /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
-  xcopy ..\..\system BUILD_WIN32\Xbmc\system /E /Q /I /Y /EXCLUDE:exclude.txt  > NUL
-  xcopy ..\..\media BUILD_WIN32\Xbmc\media /E /Q /I /Y /EXCLUDE:exclude.txt  > NUL
-  xcopy ..\..\sounds BUILD_WIN32\Xbmc\sounds /E /Q /I /Y /EXCLUDE:exclude.txt  > NUL
+       goto DIE
+)
+
+::
+:: Copy installer package files
+::
+
+ECHO ------------------------------------------------------------
+ECHO Copying files...
+(
+       echo .svn
+       echo CVS
+       echo Thumbs.db
+       echo Desktop.ini
+       echo dsstdfx.bin
+       echo exclude.txt
+       :: and exclude potential leftovers
+       echo mediasources.xml
+       echo advancedsettings.xml
+       echo guisettings.xml
+       echo profiles.xml
+       echo sources.xml
+       echo userdata\cache\
+       echo userdata\database\
+       echo userdata\playlists\
+       echo userdata\script_data\
+       echo userdata\thumbnails\
+       :: UserData\visualisations contains currently only xbox visualisationfiles
+       echo userdata\visualisations\
+       :: other platform stuff
+       echo lib-osx
+       echo players\mplayer
+       echo FileZilla Server.xml
+       echo asound.conf
+       echo voicemasks.xml
+       echo Lircmap.xml
+
+) > exclude.txt
+
+IF EXIST BUILD_WIN32 rmdir BUILD_WIN32 /S /Q
+md BUILD_WIN32\Xbmc
+
+xcopy %XBMC_EXE% BUILD_WIN32\Xbmc > NUL
+xcopy ..\..\userdata BUILD_WIN32\Xbmc\userdata /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
+copy ..\..\copying.txt BUILD_WIN32\Xbmc > NUL
+copy ..\..\LICENSE.GPL BUILD_WIN32\Xbmc > NUL
+copy ..\..\known_issues.txt BUILD_WIN32\Xbmc > NUL
+xcopy dependencies\*.* BUILD_WIN32\Xbmc /Q /I /Y /EXCLUDE:exclude.txt  > NUL
+copy sources.xml BUILD_WIN32\Xbmc\userdata > NUL
+
+xcopy ..\..\language BUILD_WIN32\Xbmc\language /E /Q /I /Y /EXCLUDE:exclude.txt  > NUL
+xcopy ..\..\addons BUILD_WIN32\Xbmc\addons /E /Q /I /Y /EXCLUDE:exclude.txt > NUL
+xcopy ..\..\system BUILD_WIN32\Xbmc\system /E /Q /I /Y /EXCLUDE:exclude.txt  > NUL
+xcopy ..\..\media BUILD_WIN32\Xbmc\media /E /Q /I /Y /EXCLUDE:exclude.txt  > NUL
+xcopy ..\..\sounds BUILD_WIN32\Xbmc\sounds /E /Q /I /Y /EXCLUDE:exclude.txt  > NUL
+
+ECHO ------------------------------------------------------------
+ECHO Building PVR add ons...
+call buildpvraddons.bat %NET%
   
-  ECHO ------------------------------------------------------------
-  call buildpvraddons.bat %NET%
+IF EXIST error.log del /q error.log 2> NUL
+SET build_path=%CD%
+ECHO ------------------------------------------------------------
+ECHO Building Confluence Skin...
+cd ..\..\addons\skin.confluence
+call build.bat 2>&1 > NUL  
+cd %build_path%
+:: restore color and title, some scripts mess these up
+COLOR 1B
+TITLE XBMC for Windows Build Script
+
+IF EXIST exclude.txt del exclude.txt  2> NUL
+del /s /q /f BUILD_WIN32\Xbmc\*.so    2> NUL
+del /s /q /f BUILD_WIN32\Xbmc\*.h     2> NUL
+del /s /q /f BUILD_WIN32\Xbmc\*.cpp   2> NUL
+del /s /q /f BUILD_WIN32\Xbmc\*.exp   2> NUL
+del /s /q /f BUILD_WIN32\Xbmc\*.lib   2> NUL
+
+ECHO ------------------------------------------------------------
+ECHO Creating installer includes, deploy dependencies and git info
+call genNsisIncludes.bat
+call getdeploydependencies.bat
+call extract_git_rev.bat > NUL
+ECHO ------------------------------------------------------------
+SET XBMC_SETUPFILE=XBMCSetup-%GIT_REV%-%graphics%.exe
+ECHO Generating XBMC package installer: %XBMC_SETUPFILE%...
+
+
+IF EXIST %XBMC_SETUPFILE% del %XBMC_SETUPFILE% > NUL
+:: get path to makensis.exe from registry, first try tab delim
+FOR /F "tokens=2* delims=      " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B
+
+IF NOT EXIST "%NSISExePath%" (
+  :: try with space delim instead of tab
+  FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B
+)
     
-  IF EXIST error.log del error.log > NUL
-  SET build_path=%CD%
-  ECHO ------------------------------------------------------------
-  ECHO Building Confluence Skin...
-  cd ..\..\addons\skin.confluence
-  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
-
-  IF EXIST exclude.txt del exclude.txt  > NUL
-  del /s /q /f BUILD_WIN32\Xbmc\*.so  > NUL
-  del /s /q /f BUILD_WIN32\Xbmc\*.h  > NUL
-  del /s /q /f BUILD_WIN32\Xbmc\*.cpp  > NUL
-  del /s /q /f BUILD_WIN32\Xbmc\*.exp  > NUL
-  del /s /q /f BUILD_WIN32\Xbmc\*.lib  > NUL
-  
-  ECHO ------------------------------------------------------------
-  ECHO Build Succeeded!
-  GOTO NSIS_EXE
+IF NOT EXIST "%NSISExePath%" (
+  :: fails on localized windows (Default) becomes (Par D�faut)
+  FOR /F "tokens=3* delims=    " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B
+)
 
-:NSIS_EXE
-  ECHO ------------------------------------------------------------
-  ECHO Generating installer includes...
-  call genNsisIncludes.bat
-  ECHO ------------------------------------------------------------
-  call getdeploydependencies.bat
-  CALL extract_git_rev.bat > NUL
-  SET XBMC_SETUPFILE=XBMCSetup-%GIT_REV%-%target%.exe
-  SET XBMC_PDBFILE=XBMCSetup-%GIT_REV%-%target%.pdb
-  ECHO Creating installer %XBMC_SETUPFILE%...
-  IF EXIST %XBMC_SETUPFILE% del %XBMC_SETUPFILE% > NUL
-  rem get path to makensis.exe from registry, first try tab delim
-  FOR /F "tokens=2* delims=    " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B
-
-  IF NOT EXIST "%NSISExePath%" (
-    rem try with space delim instead of tab
-    FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B
-  )
-      
-  IF NOT EXIST "%NSISExePath%" (
-    rem fails on localized windows (Default) becomes (Par Défaut)
-    FOR /F "tokens=3* delims=  " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B
-  )
+IF NOT EXIST "%NSISExePath%" (
+  FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B
+)
 
-  IF NOT EXIST "%NSISExePath%" (
-    FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B
-  )
-  
-  rem proper x64 registry checks
-  IF NOT EXIST "%NSISExePath%" (
-    ECHO using x64 registry entries
-    FOR /F "tokens=2* delims=  " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B
-  )
-  IF NOT EXIST "%NSISExePath%" (
-    rem try with space delim instead of tab
-    FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B
-  )
-  IF NOT EXIST "%NSISExePath%" (
-    rem on win 7 x64, the previous fails
-    FOR /F "tokens=3* delims=  " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B
-  )
-  IF NOT EXIST "%NSISExePath%" (
-    rem try with space delim instead of tab
-    FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B
-  )
+:: proper x64 registry checks
+IF NOT EXIST "%NSISExePath%" (
+  ECHO using x64 registry entries
+  FOR /F "tokens=2* delims=    " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B
+)
+IF NOT EXIST "%NSISExePath%" (
+  :: try with space delim instead of tab
+  FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B
+)
+IF NOT EXIST "%NSISExePath%" (
+  :: on win 7 x64, the previous fails
+  FOR /F "tokens=3* delims=    " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B
+)
+IF NOT EXIST "%NSISExePath%" (
+  :: try with space delim instead of tab
+  FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B
+)
 
-  SET NSISExe=%NSISExePath%\makensis.exe
-  "%NSISExe%" /V1 /X"SetCompressor /FINAL lzma" /Dxbmc_root="%CD%\BUILD_WIN32" /Dxbmc_revision="%GIT_REV%" /Dxbmc_target="%target%" "XBMC for Windows.nsi"
-  IF NOT EXIST "%XBMC_SETUPFILE%" (
+SET NSISExe=%NSISExePath%\makensis.exe
+"%NSISExe%" /V1 /X"SetCompressor /FINAL lzma" /Dxbmc_root="%CD%\BUILD_WIN32" /Dxbmc_revision="%GIT_REV%" /Dxbmc_target="%graphics%" "XBMC for Windows.nsi"
+IF NOT EXIST "%XBMC_SETUPFILE%" (
          set DIETEXT=Failed to create %XBMC_SETUPFILE%. NSIS installed?
          goto DIE
-  )
-  copy %PDB% %XBMC_PDBFILE% > nul
-  ECHO ------------------------------------------------------------
-  ECHO Done!
-  ECHO Setup is located at %CD%\%XBMC_SETUPFILE%
-  ECHO ------------------------------------------------------------
-  GOTO VIEWLOG_EXE
+)
+
+ECHO Done!
+ECHO Setup is located at: %CD%\%XBMC_SETUPFILE%
+ECHO ------------------------------------------------------------
+GOTO VIEWLOG_EXE
   
 :DIE
   ECHO ------------------------------------------------------------
@@ -303,26 +313,27 @@ IF %comp%==vs2010 (
   ECHO ------------------------------------------------------------
 
 :VIEWLOG_EXE
-  SET log="%CD%\..\vs2010express\XBMC\%buildconfig%\objs\XBMC.log"
-  IF NOT EXIST %log% goto END
-  
-  copy %log% ./buildlog.html > NUL
+  SET log="%CD%\..\vs2010express\XBMC\%RELEASE%\objs\XBMC.log"
 
-  IF %promptlevel%==noprompt (
-  goto END
-  )
+  IF EXIST %log% (
+       echo "Log: %log%"
 
-  set /P XBMC_BUILD_ANSWER=View the build log in your HTML browser? [y/n]
-  if /I %XBMC_BUILD_ANSWER% NEQ y goto END
-  
-  SET log="%CD%\..\vs2010express\XBMC\%buildconfig%\objs\" XBMC.log
-  
-  start /D%log%
-  goto END
+       IF "%promptlevel%"=="prompt" (
+
+         set /P XBMC_BUILD_ANSWER=View the build log in your HTML browser? y/n? [n]:
+         if /I "%XBMC_BUILD_ANSWER%"=="y" (
+                 copy %log% buildlog.html > NUL
+                 set log=buildlog.html 
+
+         start /D%log%
+       )
+  )
 
 :END
-  IF %promptlevel% NEQ noprompt (
-  ECHO Press any key to exit...
-  pause > NUL
+  IF "%promptlevel%"=="prompt" (
+       ECHO Press any key to exit...
+       pause > NUL
   )
-  EXIT /B %exitcode%
\ No newline at end of file
+  ENDLOCAL
+  EXIT /B %exitcode%
index 6fdb9a5..8043734 100644 (file)
@@ -1,47 +1,62 @@
+#
+# buildmingwlibs.sh (v1.1) - updated to support ffmpeg bump to 1.2
+#
+
+WIN32SETUP=/xbmc/project/Win32BuildSetup
+ERRORFILE=$WIN32SETUP/errormingw
+PROMPTFILE=$WIN32SETUP/noprompt
+MAKECLEANFILE=$WIN32SETUP/makeclean
+MINGWLIBSOK=$WIN32SETUP/mingwlibsok
 
-ERRORFILE=/xbmc/project/Win32BuildSetup/errormingw
-NOPFILE=/xbmc/project/Win32BuildSetup/noprompt
-MAKECLEANFILE=/xbmc/project/Win32BuildSetup/makeclean
 TOUCH=/bin/touch
 RM=/bin/rm
-NOPROMPT=0
+PROMPT=0
 MAKECLEAN=""
 MAKEFLAGS=""
 
+#
+# Function declarations. (start)
+#
+
 function throwerror ()
 {
-  $TOUCH $ERRORFILE
-  echo failed to compile $1
-  if [ $NOPROMPT == 0 ]; then
+  echo failed to compile $FILEPATH/$1 | tee -a $ERRORFILE
+
+  if [ $PROMPT == 1 ]; then
        read
   fi
 }
 
-function setfilepath ()
-{
-  FILEPATH=$1
-}
-
 function checkfiles ()
 {
-  for i in $@; do
-  FILE=$FILEPATH/$i
-  if [ ! -f $FILE ]; then
-    throwerror "$FILE"
-    exit 1
-  fi
+  for FILE in $@
+  do
+     if [ ! -f $FILE ]; then
+       rm -f $MINGWLIBSOK
+       throwerror "$FILE"
+       exit 1
+     fi
   done
 }
+#
+# Function declarations. (end)
+#
+
+
+
+#
+# Main...
+#
 
 # cleanup
 if [ -f $ERRORFILE ]; then
   $RM $ERRORFILE
 fi
 
-# check for noprompt
-if [ -f $NOPFILE ]; then
-  $RM $NOPFILE
-  NOPROMPT=1
+# check for prompt file
+if [ -f $PROMPTFILE ]; then
+  $RM $PROMPTFILE
+  PROMPT=1
 fi
 
 if [ -f $MAKECLEANFILE ]; then
@@ -56,28 +71,43 @@ fi
 # compile our mingw dlls
 echo "################################"
 echo "## compiling mingw libs"
-echo "## NOPROMPT  = $NOPROMPT"
+echo "## PROMPT    = $PROMPT"
 echo "## MAKECLEAN = $MAKECLEAN"
 echo "################################"
 
 echo "##### building ffmpeg dlls #####"
-cd /xbmc/lib/ffmpeg/
-sh ./build_xbmc_win32.sh $MAKECLEAN
-setfilepath /xbmc/system/players/dvdplayer
-checkfiles avcodec-53.dll avformat-53.dll avutil-51.dll postproc-52.dll swscale-2.dll avfilter-2.dll swresample-0.dll
-echo "##### building of ffmpeg dlls done #####"
+cd /xbmc/lib/ffmpeg
+if sh ./build_xbmc_win32.sh $MAKECLEAN
+then
+   echo "##### building of ffmpeg dlls done #####"
+else
+   throwerror "building the ffmpeg dlls failed!"
+   exit 1
+fi
+
+cd /xbmc/system/players/dvdplayer
+
+LIBAVCODEC=$(set -- avcodec-[0-9]*.dll; echo $1)
+LIBAVFORMAT=$(set -- avformat-[0-9]*.dll; echo $1)
+LIBAVUTIL=$(set --  avutil-[0-9]*.dll; echo $1)
+LIBAVFILTER=$(set -- avfilter-[0-9]*.dll; echo $1)
+LIBPOSTPROC=$(set -- postproc-[0-9]*.dll; echo $1)
+LIBSWSCALE=$(set -- swscale-[0-9]*.dll; echo $1)
+LIBSWRESAMPLE=$(set -- swresample-[0-9]*.dll; echo $1)
+
+checkfiles $LIBAVCODEC $LIBAVFORMAT $LIBAVUTIL $LIBAVFILTER $LIBPOSTPROC $LIBSWSCALE $LIBSWRESAMPLE
 
 echo "##### building libdvd dlls #####"
 cd /xbmc/lib/libdvd/
 sh ./build-xbmc-win32.sh $MAKECLEAN
-setfilepath /xbmc/system/players/dvdplayer
+cd /xbmc/system/players/dvdplayer
 checkfiles libdvdcss-2.dll libdvdnav.dll
 echo "##### building of libdvd dlls done #####"
 
 echo "##### building libmpeg2 dlls #####"
 cd /xbmc/lib/libmpeg2/
 sh ./make-xbmc-lib-win32.sh $MAKECLEAN
-setfilepath /xbmc/system/players/dvdplayer
+cd /xbmc/system/players/dvdplayer
 checkfiles libmpeg2-0.dll
 echo "##### building of libmpeg2 dlls done #####"
 
@@ -87,19 +117,21 @@ if  [ "$MAKECLEAN" == "clean" ]; then
   make -f Makefile.win32 clean
 fi
 make -f Makefile.win32 $MAKEFLAGS
-setfilepath /xbmc/system/players/paplayer
+cd /xbmc/system/players/paplayer
 checkfiles timidity.dll
 echo "##### building of timidity dlls done #####"
 
 echo "##### building asap dlls #####"
 cd /xbmc/lib/asap/win32
 sh ./build_xbmc_win32.sh $MAKECLEAN
-setfilepath /xbmc/system/players/paplayer
+cd /xbmc/system/players/paplayer
 checkfiles xbmc_asap.dll
 echo "##### building of asap dlls done #####"
 
+touch $MINGWLIBSOK
+
 # wait for key press
-if [ $NOPROMPT == 0 ]; then
+if [ $PROMPT == 1 ]; then
   echo press a key to close the window
   read
 fi
index b9decc2..57ad637 100755 (executable)
@@ -367,8 +367,11 @@ sub expand_macros {
 }
 
 close(ASMFILE) or exit 1;
-open(ASMFILE, "|-", @gcc_cmd) or die "Error running assembler";
-#open(ASMFILE, ">/tmp/a.S") or die "Error running assembler";
+if ($ENV{GASPP_DEBUG}) {
+    open(ASMFILE, ">&STDOUT");
+} else {
+    open(ASMFILE, "|-", @gcc_cmd) or die "Error running assembler";
+}
 
 my @sections;
 my $num_repts;
@@ -377,6 +380,11 @@ my $rept_lines;
 my %literal_labels;     # for ldr <reg>, =<expr>
 my $literal_num = 0;
 
+my $thumb = 0;
+
+my %thumb_labels;
+my %call_targets;
+
 my $in_irp = 0;
 my @irp_args;
 my $irp_param;
@@ -396,22 +404,46 @@ foreach my $line (@pass1_lines) {
         push(@sections, $line);
     }
 
+    $thumb = 1 if $line =~ /\.code\s+16|\.thumb/;
+    $thumb = 0 if $line =~ /\.code\s+32|\.arm/;
+
     # handle ldr <reg>, =<expr>
     if ($line =~ /(.*)\s*ldr([\w\s\d]+)\s*,\s*=(.*)/) {
         my $label = $literal_labels{$3};
         if (!$label) {
-            $label = ".Literal_$literal_num";
+            $label = "Literal_$literal_num";
             $literal_num++;
             $literal_labels{$3} = $label;
         }
         $line = "$1 ldr$2, $label\n";
     } elsif ($line =~ /\.ltorg/) {
+        $line .= ".align 2\n";
         foreach my $literal (keys %literal_labels) {
             $line .= "$literal_labels{$literal}:\n .word $literal\n";
         }
         %literal_labels = ();
     }
 
+    # thumb add with large immediate needs explicit add.w
+    if ($thumb and $line =~ /add\s+.*#([^@]+)/) {
+        $line =~ s/add/add.w/ if eval_expr($1) > 255;
+    }
+
+    # mach-o local symbol names start with L (no dot)
+    $line =~ s/(?<!\w)\.(L\w+)/$1/g;
+
+    if ($thumb and $line =~ /^\s*(\w+)\s*:/) {
+        $thumb_labels{$1}++;
+    }
+
+    if ($line =~ /^\s*((\w+\s*:\s*)?bl?x?(?:..)?(?:\.w)?|\.globl)\s+(\w+)/) {
+        if (exists $thumb_labels{$3}) {
+            print ASMFILE ".thumb_func $3\n";
+        } else {
+            $call_targets{$3}++;
+        }
+    }
+
     # @l -> lo16()  @ha -> ha16()
     $line =~ s/,\s+([^,]+)\@l\b/, lo16($1)/g;
     $line =~ s/,\s+([^,]+)\@ha\b/, ha16($1)/g;
@@ -489,9 +521,15 @@ foreach my $line (@pass1_lines) {
 }
 
 print ASMFILE ".text\n";
+print ASMFILE ".align 2\n";
 foreach my $literal (keys %literal_labels) {
-    print ASMFILE "$literal_labels{$literal}:\n .word $literal\n";
+    my $label = $literal_labels{$literal};
+    print ASMFILE ".set Lval_$label, $literal\n";
+    print ASMFILE "$label: .word Lval_$label\n";
 }
 
+map print(ASMFILE ".thumb_func $_\n"),
+    grep exists $thumb_labels{$_}, keys %call_targets;
+
 close(ASMFILE) or exit 1;
 #exit 1
index 6e53b3a..e9a4a04 100644 (file)
 #define DLL_PATH_LIBRTMP       "special://xbmcbin/system/players/dvdplayer/librtmp.dll"
 
 /* ffmpeg */
-#define DLL_PATH_LIBAVCODEC    "special://xbmcbin/system/players/dvdplayer/avcodec-53.dll"
-#define DLL_PATH_LIBAVFORMAT   "special://xbmcbin/system/players/dvdplayer/avformat-53.dll"
-#define DLL_PATH_LIBAVUTIL     "special://xbmcbin/system/players/dvdplayer/avutil-51.dll"
-#define DLL_PATH_LIBAVFILTER   "special://xbmcbin/system/players/dvdplayer/avfilter-2.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"
+
+/*
+** "DllPaths_generated_win32_ffmpeg.h" is generated by the win32 build
+** script: "$XBMC_SRC_ROOT/xbmc/lib/ffmpeg/build_xbmc_win32.sh" called
+** by BuildSetup.bat through buildmingwlibs.sh* 
+*/
+
+#include "DllPaths_generated_win32_ffmpeg.h"
+
 
 /* cdrip */
 #define DLL_PATH_LAME_ENC      "special://xbmcbin/system/cdrip/lame_enc.dll"
index 700bce0..e76d443 100644 (file)
@@ -30,9 +30,6 @@
 #include "cores/AudioEngine/Utils/AEChannelInfo.h"
 class IAEStream;
 
-#ifndef _LINUX
-enum CodecID;
-#else
 extern "C" {
 #if (defined USE_EXTERNAL_FFMPEG)
   #if (defined HAVE_LIBAVCODEC_AVCODEC_H)
@@ -44,9 +41,8 @@ extern "C" {
   #include "libavcodec/avcodec.h"
 #endif
 }
-#endif
-typedef struct stDVDAudioFrame DVDAudioFrame;
 
+typedef struct stDVDAudioFrame DVDAudioFrame;
 
 class CPTSOutputQueue
 {
index 2e68e7d..7de708c 100644 (file)
@@ -23,7 +23,6 @@
 #if (defined HAVE_CONFIG_H) && (!defined WIN32)
   #include "config.h"
 #endif
-// enum CodecID
 
 #include <string>
 #include <vector>
index aa7de02..d614e39 100644 (file)
@@ -28,6 +28,7 @@
 #include "DVDClock.h"
 #include "DVDCodecs/DVDCodecs.h"
 #include "DVDCodecs/DVDCodecUtils.h"
+#include "DVDVideoPPFFmpeg.h"
 #if defined(_LINUX) || defined(_WIN32)
 #include "utils/CPUInfo.h"
 #endif
@@ -162,6 +163,7 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options
   if(!m_dllAvUtil.Load()
   || !m_dllAvCodec.Load()
   || !m_dllSwScale.Load()
+  || !m_dllPostProc.Load()
   || !m_dllAvFilter.Load()
   ) return false;
 
@@ -350,6 +352,7 @@ void CDVDVideoCodecFFmpeg::Dispose()
   m_dllAvCodec.Unload();
   m_dllAvUtil.Unload();
   m_dllAvFilter.Unload();
+  m_dllPostProc.Unload();
 }
 
 void CDVDVideoCodecFFmpeg::SetDropState(bool bDrop)
index e857a24..75135ef 100644 (file)
@@ -27,6 +27,7 @@
 #include "DllAvUtil.h"
 #include "DllSwScale.h"
 #include "DllAvFilter.h"
+#include "DllPostProc.h"
 
 class CVDPAU;
 class CCriticalSection;
@@ -111,6 +112,7 @@ protected:
   DllAvUtil  m_dllAvUtil;
   DllSwScale m_dllSwScale;
   DllAvFilter m_dllAvFilter;
+  DllPostProc m_dllPostProc;
 
   std::string m_name;
   bool              m_bSoftware;
index f5d0584..7af9599 100644 (file)
 #include "DVDStreamInfo.h"
 #include "utils/log.h"
 
-/* I really don't want to include ffmpeg headers here, could */
-/* potentially interfere with libmpeg2's, so let's just define this */
-#ifndef _LINUX
-const int CODEC_ID_MPEG1VIDEO = 1;
-#endif
-
 enum MPEGProfile
 {
   MPEG_422_HL = 0x82,
index 257c096..4ae2aba 100644 (file)
@@ -940,7 +940,7 @@ int CDecoder::GetBuffer(AVCodecContext *avctx, AVFrame *pic)
 
   pic->reordered_opaque = avctx->reordered_opaque;
   pic->type = FF_BUFFER_TYPE_USER;
-  pic->age  = 256*256*256*64; // as everybody else, i've got no idea about this one
+  // pic->age  = 256*256*256*64;       // decrepated.
   for(unsigned i = 0; i < 4; i++)
   {
     pic->data[i] = NULL;
index f4111e9..b4e3ca4 100644 (file)
@@ -35,7 +35,7 @@ class CDVDInputStream;
   #include "config.h"
 #endif
 #ifndef _LINUX
-enum CodecID;
+// enum CodecID; // auto defined when neccesary
 #include <libavcodec/avcodec.h>
 #else
 extern "C" {
index c463182..f6aba9f 100644 (file)
@@ -38,8 +38,6 @@ class CDVDAudioCodec;
 class IAudioCallback;
 class CDVDAudioCodec;
 
-enum CodecID;
-
 #define DECODE_FLAG_DROP    1
 #define DECODE_FLAG_RESYNC  2
 #define DECODE_FLAG_ERROR   4
index 0b33d94..e7234e1 100644 (file)
 #if (defined HAVE_CONFIG_H) && (!defined WIN32)
   #include "config.h"
 #endif
-#ifndef _LINUX
-enum StreamType;
-enum CodecID;
-#else
+
 #include "DVDDemuxers/DVDDemux.h"
 extern "C" {
 #if (defined USE_EXTERNAL_FFMPEG)
@@ -39,7 +36,6 @@ extern "C" {
   #include "libavcodec/avcodec.h"
 #endif
 }
-#endif
 
 class CDemuxStream;