|
Reading Streams from an AVI File
The following subroutine obtains stream information from an AVI file and
determines the stream type from the AVISTREAMINFO structure returned by the AVIStreamInfo function.
// StreamTypes - opens the streams in an AVI file and determines
// stream types.
//
// Global variables
// gcpavi - count of streams in an AVI file
// gapavi[] = array of stream-interface pointers
- oid StreamTypes(HWND hwnd)
{
AVISTREAMINFO avis;
LONG r, lHeight = 0;
WORD w;
int i;
RECT rc;
// Walk through all streams.
for (i = 0; i < gcpavi; i++) {
AVIStreamInfo(gapavi[i], &avis, sizeof(avis));
if (avis.fccType == streamtypeVIDEO) {
// Place video-processing functions here.
}
else if (avis.fccType == streamtypeAUDIO) {
// Place audio-processing functions here.
}
else if (avis.fccType == streamtypeTEXT) {
// Place text-processing functions here.
}
}
}
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps
Win32 Programmer's Reference (win32.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|