FFDSHOW

Compilation

 

Compiling with MinGW

 

Needed software

  1. MinGW packages
    Can be downloaded from http://sourceforge.net/project/showfiles.php?group_id=2435. Always download the latest versions. These packages should be sufficient for building ffdshow: binutils, gcc, make, mingw-runtime, w32api. You can download and install MSYS too, because make clean target uses it.
  2. Nasm
    Download newest version from http://sourceforge.net/project/showfiles.php?group_id=6208 and put nasm.exe to some directory which is included in the PATH variable.
  3. Platform SDK from Microsoft or at least DirectX SDK. Platform SDK Update Site is located at http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

Preparing baseclasses directory

    I don't want to include all needed Platform SDK files here (I think it wouln't be legal too), so you have to install latest copy of Microsoft Platform SDK (preferably May 2002 Edition) and copy all listed files to ffdshow\src\baseclasses directory:

      amextra.cpp

      amfilter.cpp

      amvideo.cpp

      combase.cpp

      cprop.cpp

      ctlutil.cpp

      ddmm.cpp

      dllentry.cpp

      dllsetup.cpp

      mtype.cpp

      outputq.cpp

      pstream.cpp

      pullpin.cpp

      refclock.cpp

      renbase.cpp

      schedule.cpp

      seekpt.cpp

      source.cpp

      strmctl.cpp

      sysclock.cpp

      transfrm.cpp

      transip.cpp

      videoctl.cpp

      vtrans.cpp

      winctrl.cpp

      winutil.cpp

      wxdebug.cpp

      wxlist.cpp

      wxutil.cpp

      amextra.h

      amfilter.h

      Amvideo.h

      audevcod.h

      cache.h

      combase.h

      comlite.h

      control.h

      cprop.h

      ctlutil.h

      ddmm.h

      ddraw.h

      dinput.h

      dllsetup.h

      dsschedule.h

      dvdmedia.h

      edevdefs.h

      errors.h

      evcode.h

      fourcc.h

      ks.h

      ksmedia.h

      ksuuids.h

      measure.h

      MMReg.h

      mpconfig.h

      msgthrd.h

      mtype.h

      outputq.h

      pstream.h

      pullpin.h

      refclock.h

      reftime.h

      renbase.h

      seekpt.h

      source.h

      streams.h

      strmctl.h

      strmif.h

      sysclock.h

      transfrm.h

      transip.h

      uuids.h

      vfwmsgs.h

      videoctl.h

      vtrans.h

      winctrl.h

      winutil.h

      wxdebug.h

      wxlist.h

      wxutil.h

     

    Most of these files are located in samples\multimedia\directshow\baseclasses directory of Platform SDK and some are in include directory. Then apply baseclasses.diff patch (patch.exe is distributed with cygwin or MSYS). Hopefully this should be all and you just have to run make and wait. For compiling this you will need GCC 3.1 or higher, because GCC 2.95.3 reported an internal error. If you have problems or don't want to download Platform SDK, send me a message and I will send you complete content of this directory.

Compiling project

    Go to ffdshow\src directory, run make command and wait. Resulting file (ffdshow.ax) should be placed to ffdshow\bin directory. If will be quite big, but you can run strip ffdshow.ax command to reduce it's size. If you want to modify ffdshow source files you can run make dep comamnd too to generate dependency information useful when modifying header files.

 

Compiling with Visual Studio

 

Needed software

  1. Visual Studio 6 with Service Pack 5 and Processor Pack or Visual Studio .NET
  2. MinGW or Cygwin
    MinGW can be downloaded from http://sourceforge.net/project/showfiles.php?group_id=2435. Always download the latest versions. These packages should be sufficient for building ffdshow: binutils, gcc, make, mingw-runtime, w32api. You can download and install MSYS too, because make clean target uses it.
    Cygwin homesite is http://www.cygwin.com. It's setup program is located there, which you can use to download and install required packages. There are same as for MigGW. Instead of MSYS you will need fileutils and patch packages.
  3. Nasm
    Download newest version from http://sourceforge.net/project/showfiles.php?group_id=6208 and put nasm.exe to some directory which is included in the PATH variable.
  4. Platform SDK from Microsoft or at least DirectX SDK. Platform SDK Update Site is located at http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
  5. STLport from http://www.stlport.org is needed if you are using Visual Studio 6, because Microsoft STL implementation is buggy. Install it to C:\Program Files\STLport directory or wherever you want, but then you would have to modify include directories in VC6 project.

Compiling project

  1. Go to ffdshow directory, open ffdshow.sln (in Visual Studio .NET) or ffdshow.dsw (in Visual Studio 6) and build the project.
  2. Go to ffdshow\src\ffmpeg directory and run make. libavcodec.dll should be created.
  3. Go to ffdshow\src\mplayer directory and run make. libpostproc.dll should be created.

 

Installing compiled files

 

In both cases you should end with three importand files: ffdshow.ax located in ffdshow\bin, libavcodec.dll in ffdshow\src\ffmpeg and libpostproc.dll in ffdshow\src\mplayer. You can download NSIS install system from Nullsoft (http://www.nullsoft.com/free/nsis/index.html#download) and create self-extracting install package. It's description is in ffdshow\bin\distib\ffdshow.nsi file. Or you can copy these three file to single directory (it could be Windows system directory but it's not required) and run regsvr32 ffdshow.ax command in that directory.