Amnon82
11th October 2005, 16:47
http://www.koders.com/delphi/fidF901E0AEC29ECBF67266B86173AA1121B5BB4430.aspx
I'm coding in delphi. I want to ask you guys if I can use VWF.pas to check if the avs-script is progressive. FPS, Resolution I've already. I only need a option to detect the flags.
I did this till now:
{The GetAVSFrames function will give You the Info about the AVS-File
(C) 2005 by Amnon}
function GETAVSFRAMES(avifn: string): Boolean;
var
Error: Integer;
pFile: PAVIFile;
AviInfo: TAVIFILEINFOW;
sError: string;
begin
Result := False;
// Initialize the AVIFile library.
AVIFileInit;
// The AVIFileOpen function opens an AVI file
Error := AVIFileOpen(pFile, PChar(avifn), 0, nil);
if Error <> 0 then
begin
AVIFileExit;
sError:='Error: This file is not an AVISynth-Script. Check it!';
Messagebox(Application.Handle, pchar(sError), pchar('Error'),
MB_ICONERROR);
Exit;
end;
// AVIFileInfo obtains information about an AVI file
if AVIFileInfo(pFile, @AVIINFO, SizeOf(AVIINFO)) <> AVIERR_OK then
begin
// Clean up and exit
AVIFileRelease(pFile);
AVIFileExit;
Exit;
end;
// Show some information about the AVI
Form1.AVSFRAMES.text:=IntToStr(AVIINFO.dwLength);
Form1.avsheight.text:=IntToStr(AVIINFO.dwheight);
Form1.avswidth.text:=IntToStr(AVIINFO.dwWidth);
Form1.rate.text:=formatfloat('0.000',AVIINFO.dwRate/AVIINFO.dwScale);
form1.flags.text:=inttostr(aviinfo.dwFlags);
end;
with dwFlags I got 272. Stands this for PFF?
I'm coding in delphi. I want to ask you guys if I can use VWF.pas to check if the avs-script is progressive. FPS, Resolution I've already. I only need a option to detect the flags.
I did this till now:
{The GetAVSFrames function will give You the Info about the AVS-File
(C) 2005 by Amnon}
function GETAVSFRAMES(avifn: string): Boolean;
var
Error: Integer;
pFile: PAVIFile;
AviInfo: TAVIFILEINFOW;
sError: string;
begin
Result := False;
// Initialize the AVIFile library.
AVIFileInit;
// The AVIFileOpen function opens an AVI file
Error := AVIFileOpen(pFile, PChar(avifn), 0, nil);
if Error <> 0 then
begin
AVIFileExit;
sError:='Error: This file is not an AVISynth-Script. Check it!';
Messagebox(Application.Handle, pchar(sError), pchar('Error'),
MB_ICONERROR);
Exit;
end;
// AVIFileInfo obtains information about an AVI file
if AVIFileInfo(pFile, @AVIINFO, SizeOf(AVIINFO)) <> AVIERR_OK then
begin
// Clean up and exit
AVIFileRelease(pFile);
AVIFileExit;
Exit;
end;
// Show some information about the AVI
Form1.AVSFRAMES.text:=IntToStr(AVIINFO.dwLength);
Form1.avsheight.text:=IntToStr(AVIINFO.dwheight);
Form1.avswidth.text:=IntToStr(AVIINFO.dwWidth);
Form1.rate.text:=formatfloat('0.000',AVIINFO.dwRate/AVIINFO.dwScale);
form1.flags.text:=inttostr(aviinfo.dwFlags);
end;
with dwFlags I got 272. Stands this for PFF?