Windows Multimedia
Windows Multimedia
Before DirectX was Windows Multimedia and can still offer some good stuff
even if you are using DirectX and OpenGL. Windows Multimedia is made up
of 3 different components: Video for Windows, Multimedia Audio and
Multimedia Input.
If your program needs to show videos can you use smacker
if you have to convert the video to another format. You can use allegro
this way and let smacker convert to
the FLC format to create a high performance DirectX accelerated application.
Mingw32 has the necessary import libraries but libvfw32.a is broken
and you must get some fixed libraries
it is split up in 3 libraries because it links to 3 different dlls.
It is also necessary to get some header files.
File name
|
Comment
|
| msacmh.h |
Audio Compression Manager |
| mmreg.h |
Multimedia Registration |
| vfw.h |
Video for windows |
| vfwmsgs.h |
error codes |
| verinfo.h |
version info |
| verinfo.ver |
used by resource files has to be changed see the windres
page |
| digitalv.h |
MCI Digital Video Command Set |
I copied them from the
Borland compiler include directory you should also be able to
get them from MSDN. They are part of the Platform
SDK. Not everything of the above is absolutely necessary and I do not
know if the list is complete. You must also make some modifications
before you start:
-
DWORD_PTR is not defined so somewhere should this be added #define DWORD_PTR
DWORD if you do not find a better place can you put it at top of the complaining
file.
-
I replaced INT_PTR with void * in vfw.h but probably can this be
solved better.
-
In case you want to avoid some redefinition warnings can you get this slightly
edited mmsystem.h the changes is just some definitions.
-
In the header files for windows is constructs like this not unusual "typedef
struct {... sometype f_name[] }" . Mingw32 does not allow the open [] and
the common way to handle this is to replace it with [1] . Do that in vfw.h
it can always be changed later if required.
-
The sample code from Microsoft is rather old and is using HANDLE instead
of HINSTANCE in some places, mingw32 does not like that. Another problem
with the sample code is the resource files. Often can you use the .res
file instead of the .rc file in case of trouble but this seems to be harder
with the files from the samples. Some type casts may also be necessary.
For legal reasons is it a bad idea to distribute your program with
files in the mp3 format. By changing the output plugin in winamp
can you convert them to standard wav format. If you also want to do some
editing is cooledit a good program.
Allegro also has functions for audio streaming and datafiles that can be
useful.
Not much to say about the input functions in Windows Multimedia so I
give you some lnks instead.
Start
page for Windows Multimedia at MSDN with link to on-line documentation
for Video
for Windows , Multimedia
Audio and Multimedia
Input
The
Platform SDK has the above information ready for downloading
Video
for Windows samples
Multimedia
Audio samples
Multimedia
Input samples
Makefiles for building some Windows
Multimedia examples with mingw32
back to main OpenGL page
|