MCL Source Code - C Part, Programmer's Manual

 

About MCL Source Code - C Part

C part of MCL Source Code consist of more then 500,000 lines of source code in part written by us (HAV and CVR) but mostly are gathered from various publicly available multimedia software libraries written in C with some optimizations in assembler. Original code is improved and changed making it easier to integrate into MCL or any other software product which needs support for various multimedia file formats.

 

Included in the C Part

Support for the following multimedia formats (in equally named folders):

  • cvr - Vision Research CINE (decode uncompressed only); Bayer encoded images are decoded via Bayer code in Delphi part.
  • dsw - DirectShow decoder Supports large number of formats like AVI, MOV, WMV, WMA, MPEG-2, etc. Unlike with other file formats, a coresponding codec for DirectShow must be installed (read only).
  • gif - Graphics Interchange Format (write only - can be modified for decoding); There's also GIF reader in Delphi part.
  • hav - High Quality Audio Video
  • jp2 - JPEG-2000 File Format / Code Stream
  • jpg - Joint Photographic Expert Group, JFIF 1.02
  • mpg - Moving Pictures Expert Group
    • video:
      • MPEG-1/2 
      • MPEG-4 (write only)
    • audio:
      • Layer II/III (MP3 read only)
      • AC3 compatible 
      • AAC (write only)
  • ogg - Ogg Vorbis Audio
  • png - Portable Network Graphics
  • tif - Tagged Image File Format
  • wmv/wma - Window Media 8 compatible (wrapper around WM encoder installed in Windows)
    • video (write only)
    • audio (write only)
  • xpm - X-Pixmap 

Development tools included:

  • devtools/mingw - GNU C compiler, version 3.4.2
  • devtools/msys - Bash shell 3.1 and many Unix tools
  • devtools/nasm - Netwide assembler, version 0.98.36

 

Installation

After unpacking run MAKEVARS.EXE

That will generate VARS.BAT batch file

Put the contents of VARS.BAT at the end of AUTOEXEC.BAT or run VARS.BAT in command prompt before compiling.

 

Compiling

All DLLs, static libraries and object files are already precompiled, but if you make changes to C or assembler code you'll need to recompile them.

In each folder mentioned above find MAKEFILE for GCC compiler. To compile say MAKE from command prompt. To start command-prompt from Windows Explorer double-click the COMMAND PROMPT.BAT file.

DLLs are automatically copyed to _DLL_ folder. Delphi include files are copied to _DELPHI_INCLUDE_ folder. FFmpeg and OGG libraries can only be compiled inside MSYS unix shell. Because of that they are not automatically compiled, just their wrappers. Start MSYS unix shell with MSYS.BAT

Linux (Unix) developers: Makefiles are optimized for GCC on Windows. With a few modifications they will work on any x86 platform with GCC and NASM.

Porting to other C compilers should be very easy except for parts containing assembler code. These shoud be converted from GCC assembler syntax to other compiler's syntax.

 

Gromada.com