function ReadAVITags(File_Name: OleVariant; Parse_Mode: CParse_Mode; Max_Entries: SYSINT;
out AVI_Info: OleVariant): HResult; safecall;
Description
The ReadAVITags method reads information from the external AVI file File_Name, including techinical info, RIFF INFO tags, MovieID tags and IDivX tags. File mustn't be in exclusive use by the another programme. Read process takes less then one second usually even for big files on CD. You can adjust mode of parsing by the Parse_Mode flags variable:
PM_Lite_Mode
|
the fastest mode - read INFO tags only
|
PM_Ignore_Errors
|
try to parse AVI file in spite of errors
|
PM_Build_Tree
|
build tree of AVI structure
|
PM_Parse_Index
|
parse idx1 and indx chunks (slower but more precisely bitrate calculations)
|
PM_Parse_movi
|
don't skip movi list (if you want to see the audio/video interleaving in the tree of structure); see Max_Entries parameter.
|
PM_Parse_JUNK
|
try to extract info from JUNK chunks
|
PM_Tech_Info
|
extract and calculate technical information on video and audio streams
|
PM_Read_IDivX
|
read IDivX tags if exist
|
PM_Read_MovieID
|
read MovieID tags if exist
|
PM_Parse_Premier
|
try to extract the information from Adobe Premier chunk
|
If you want to apply several flags, use 'and' operator, for example: 'PM_Ignore_Errors and PM_Parse_Index'.
Use Max_Entries parameter to set the limitation on similar elements in tree of AVI structure. If you want to set no actual limitation, use zero value. Note, parsing of big AVI files with no limitation and building tree of AVI structure may be very slow. For example 4Gb file is scanned for 3 minutes on Athlon 1000, 512 DIMM, HDD UDMA 133. Max_Entries parameter doesn't influence on parsing of index chunks and bitrate calculations, it's used for limitation in tree of structure subroutine only (mapping of movi list(s), idx1 and indx chunks).
All the read information is returned in AVI_Info variable. Use GetInfo procedure to extract desired information from AVI_Info variable.
ReadAVITags returns error code: it could be decoded by use of ErrorCodeToStr function. In success ReadAVITags returns zero (PE_Ok). See error codes.
Comments
If you set flag PM_Parse_Index and AVI file has index section, audio and video bitrates are calculated by the precise algorithm. In opposite case ReadAVITags use approximate calculations based on data from AVI header only.