// Borland C++ Builder
// Copyright (c) 1995, 1998 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'IEVFW.pas' rev: 3.00

#ifndef IEVFWHPP
#define IEVFWHPP
#include <Windows.hpp>
#include <SysInit.hpp>
#include <System.hpp>

//-- user supplied -----------------------------------------------------------

namespace Ievfw
{
//-- type declarations -------------------------------------------------------
typedef GUID *PCLSID;

typedef GUID  TIID;

class DELPHICLASS IUnknown;
class PASCALIMPLEMENTATION IUnknown : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	virtual HRESULT __stdcall QueryInterface(const GUID &iid, void *obj) = 0;
	virtual int __stdcall AddRef(void) = 0;
	virtual int __stdcall Release(void) = 0;
public:
	/* TObject.Create */ __fastcall IUnknown(void) : System::TObject() { }
	/* TObject.Destroy */ __fastcall virtual ~IUnknown(void) { }
	
};

typedef int LONG;

typedef void *PVOID;

struct TAviStreamInfoA;
typedef TAviStreamInfoA *PAviStreamInfoA;

struct TAviStreamInfoA
{
	int fccType;
	int fccHandler;
	int dwFlags;
	int dwCaps;
	Word wPriority;
	Word wLanguage;
	int dwScale;
	int dwRate;
	int dwStart;
	int dwLength;
	int dwInitialFrames;
	int dwSuggestedBufferSize;
	int dwQuality;
	int dwSampleSize;
	Windows::TRect rcFrame;
	int dwEditCount;
	int dwFormatChangeCount;
	char szName[64];
} ;

typedef TAviStreamInfoA  TAviStreamInfo;

struct TAviStreamInfoW;
typedef TAviStreamInfoW *PAviStreamInfoW;

struct TAviStreamInfoW
{
	int fccType;
	int fccHandler;
	int dwFlags;
	int dwCaps;
	Word wPriority;
	Word wLanguage;
	int dwScale;
	int dwRate;
	int dwStart;
	int dwLength;
	int dwInitialFrames;
	int dwSuggestedBufferSize;
	int dwQuality;
	int dwSampleSize;
	Windows::TRect rcFrame;
	int dwEditCount;
	int dwFormatChangeCount;
	wchar_t szName[64];
} ;

struct TAviFileInfoA;
typedef TAviFileInfoA *PAviFileInfoA;

struct TAviFileInfoA
{
	int dwMaxBytesPerSec;
	int dwFlags;
	int dwCaps;
	int dwStreams;
	int dwSuggestedBufferSize;
	int dwWidth;
	int dwHeight;
	int dwScale;
	int dwRate;
	int dwLength;
	int dwEditCount;
	char szFileType[64];
} ;

typedef TAviFileInfoA  TAviFileInfo;

struct TAviFileInfoW;
typedef TAviFileInfoW *PAviFileInfoW;

struct TAviFileInfoW
{
	int dwMaxBytesPerSec;
	int dwFlags;
	int dwCaps;
	int dwStreams;
	int dwSuggestedBufferSize;
	int dwWidth;
	int dwHeight;
	int dwScale;
	int dwRate;
	int dwLength;
	int dwEditCount;
	wchar_t szFileType[64];
} ;

typedef bool __stdcall (*TAVISaveCallBack)(int Percentage);

typedef TAVISaveCallBack *AVISaveCallBack;

struct TAviCompressOptions;
typedef TAviCompressOptions *PAviCompressOptions;

struct TAviCompressOptions
{
	int fccType;
	int fccHandler;
	int dwKeyFrameEvery;
	int dwQuality;
	int dwBytesPerSecond;
	int dwFlags;
	void *lpFormat;
	int cbFormat;
	void *lpParms;
	int cbParms;
	int dwInterleaveEvery;
} ;

class DELPHICLASS IAVIStream;
class PASCALIMPLEMENTATION IAVIStream : public Ievfw::IUnknown 
{
	typedef Ievfw::IUnknown inherited;
	
public:
	HIDESBASE virtual HRESULT __stdcall Create(int lParam1, int lParam2) = 0;
	virtual HRESULT __stdcall Info(TAviStreamInfoW &psi, int lSize) = 0;
	virtual int __stdcall FindSample(int lPos, int lFlags) = 0;
	virtual HRESULT __stdcall ReadFormat(int lPos, void * lpFormat, int &lpcbFormat) = 0;
	virtual HRESULT __stdcall SetFormat(int lPos, void * lpFormat, int lpcbFormat) = 0;
	virtual HRESULT __stdcall Read(int lStart, int lSamples, void * lpBuffer, int cbBuffer, int &plBytes
		, int &plSamples) = 0;
	virtual HRESULT __stdcall Write(int lStart, int lSamples, void * lpBuffer, int cbBuffer, int dwFlags
		, int &plSampWritten, int &plBytesWritten) = 0;
	virtual HRESULT __stdcall Delete(int lStart, int lSamples) = 0;
	virtual HRESULT __stdcall ReadData(int fcc, void * lp, int &lpcb) = 0;
	virtual HRESULT __stdcall WriteData(int fcc, void * lp, int cb) = 0;
	virtual HRESULT __stdcall SetInfo(TAviStreamInfoW &lpInfo, int cbInfo) = 0;
public:
	/* TObject.Create */ __fastcall IAVIStream(void) : Ievfw::IUnknown() { }
	/* TObject.Destroy */ __fastcall virtual ~IAVIStream(void) { }
	
};

typedef IAVIStream* *PAVIStream;

class DELPHICLASS IAVIEditStream;
class PASCALIMPLEMENTATION IAVIEditStream : public Ievfw::IUnknown 
{
	typedef Ievfw::IUnknown inherited;
	
public:
	virtual HRESULT __stdcall Info(TAviFileInfoW &pfi, int lSize) = 0;
	virtual HRESULT __stdcall Cut(int &plStart, int &plLength, PAVIStream &ppResult) = 0;
	virtual HRESULT __stdcall Copy(int &plLength, PAVIStream &ppResult) = 0;
	virtual HRESULT __stdcall Paste(int &plLength, PAVIStream pstream, int lStart, int lEnd) = 0;
	virtual HRESULT __stdcall Clone(PAVIStream &ppResult) = 0;
	virtual HRESULT __stdcall SetInfo(TAviStreamInfoW &lpInfo, int cbInfo) = 0;
public:
	/* TObject.Create */ __fastcall IAVIEditStream(void) : Ievfw::IUnknown() { }
	/* TObject.Destroy */ __fastcall virtual ~IAVIEditStream(void) { }
	
};

typedef IAVIEditStream* *PAVIEditStream;

class DELPHICLASS IAVIFile;
class PASCALIMPLEMENTATION IAVIFile : public Ievfw::IUnknown 
{
	typedef Ievfw::IUnknown inherited;
	
public:
	virtual HRESULT __stdcall Open(char * szFile, int mode) = 0;
	virtual HRESULT __stdcall Info(TAviFileInfoA &pfi, int lSize) = 0;
	virtual HRESULT __stdcall GetStream(PAVIStream &ppStream, int fccType, int lParam) = 0;
	virtual HRESULT __stdcall CreateStream(PAVIStream &ppStream, const TAviStreamInfoA psi) = 0;
	virtual HRESULT __stdcall Save(char * szFile, TAviCompressOptions &lpOptions, AVISaveCallBack lpfnCallback
		) = 0;
	virtual HRESULT __stdcall WriteData(int ckid, void * lpData, int cbData) = 0;
	virtual HRESULT __stdcall ReadData(int ckid, void * lpData, int &lpcbData) = 0;
	virtual HRESULT __stdcall EndRecord(void) = 0;
public:
	/* TObject.Create */ __fastcall IAVIFile(void) : Ievfw::IUnknown() { }
	/* TObject.Destroy */ __fastcall virtual ~IAVIFile(void) { }
	
};

typedef IAVIFile* *PAVIFile;

class DELPHICLASS IGetFrame;
class PASCALIMPLEMENTATION IGetFrame : public Ievfw::IUnknown 
{
	typedef Ievfw::IUnknown inherited;
	
public:
	virtual void * __stdcall GetFrame(int lPos) = 0;
	virtual HRESULT __stdcall SetFormat(Windows::PBitmapInfoHeader lpbi, void * lpBits, int x, int y, int 
		dx, int dy) = 0;
public:
	/* TObject.Create */ __fastcall IGetFrame(void) : Ievfw::IUnknown() { }
	/* TObject.Destroy */ __fastcall virtual ~IGetFrame(void) { }
	
};

typedef IGetFrame* *PGetFrame;

//-- var, const, procedure ---------------------------------------------------
#define streamtypeVIDEO (int)(1935960438)
#define streamtypeAUDIO (int)(1935963489)
#define streamtypeMIDI (int)(1935960429)
#define streamtypeTEXT (int)(1937012852)
#define comptypeDIB (int)(541215044)
#define AVIIF_KEYFRAME (Byte)(16)
#define AVISTREAMINFO_DISABLED (Byte)(1)
#define AVISTREAMINFO_FORMATCHANGES (int)(65536)
#define AVIFILEINFO_HASINDEX (Byte)(16)
#define AVIFILEINFO_MUSTUSEINDEX (Byte)(32)
#define AVIFILEINFO_ISINTERLEAVED (Word)(256)
#define AVIFILEINFO_WASCAPTUREFILE (int)(65536)
#define AVIFILEINFO_COPYRIGHTED (int)(131072)
#define AVIFILECAPS_CANREAD (Byte)(1)
#define AVIFILECAPS_CANWRITE (Byte)(2)
#define AVIFILECAPS_ALLKEYFRAMES (Byte)(16)
#define AVIFILECAPS_NOCOMPRESSION (Byte)(32)
#define ICMF_CHOOSE_KEYFRAME (Byte)(1)
#define ICMF_CHOOSE_DATARATE (Byte)(2)
#define ICMF_CHOOSE_PREVIEW (Byte)(4)
#define ICMF_CHOOSE_ALLCOMPRESSORS (Byte)(8)
#define AVICOMPRESSF_INTERLEAVE (Byte)(1)
#define AVICOMPRESSF_DATARATE (Byte)(2)
#define AVICOMPRESSF_KEYFRAMES (Byte)(4)
#define AVICOMPRESSF_VALID (Byte)(8)
extern PACKAGE GUID IID_IAVIFile;
extern PACKAGE GUID IID_IAVIStream;
extern PACKAGE GUID IID_IAVIStreaming;
extern PACKAGE GUID IID_IGetFrame;
extern PACKAGE GUID IID_IAVIEditStream;
extern PACKAGE GUID CLSID_AVISimpleUnMarshal;
extern PACKAGE GUID CLSID_AVIFile;
#define AVIFILEHANDLER_CANREAD (Byte)(1)
#define AVIFILEHANDLER_CANWRITE (Byte)(2)
#define AVIFILEHANDLER_CANACCEPTNONRGB (Byte)(4)
#define FIND_DIR (Byte)(15)
#define FIND_NEXT (Byte)(1)
#define FIND_PREV (Byte)(4)
#define FIND_TYPE (Byte)(240)
#define FIND_KEY (Byte)(16)
#define FIND_ANY (Byte)(32)
#define FIND_FORMAT (Byte)(64)
#define FIND_RET (int)(61440)
#define FIND_POS (Byte)(0)
#define FIND_LENGTH (Word)(4096)
#define FIND_OFFSET (Word)(8192)
#define FIND_SIZE (Word)(12288)
#define FIND_INDEX (Word)(16384)
#define AVIERR_OK (Byte)(0)
#define AVIIF_LIST (Byte)(1)
#define AVIIF_TWOCC (Byte)(2)
extern "C" void __stdcall AVIFileInit(void);
extern "C" void __stdcall AVIFileExit(void);
extern "C" Cardinal __stdcall AVIFileAddRef(PAVIFile pfile);
extern "C" Cardinal __stdcall AVIFileRelease(PAVIFile pfile);
extern "C" HRESULT __stdcall AVIFileOpen(PAVIFile &ppfile, char * szFile, int uMode, System::PGUID lpHandler
	);
extern "C" HRESULT __stdcall AVIFileInfo(PAVIFile pfile, TAviFileInfoA &pfi, int lSize);
extern "C" HRESULT __stdcall AVIFileGetStream(PAVIFile pfile, PAVIStream &ppavi, int fccType, int lParam
	);
extern "C" HRESULT __stdcall AVIFileCreateStream(PAVIFile pfile, PAVIStream &ppavi, TAviStreamInfoA 
	&psi);
extern "C" HRESULT __stdcall AVIFileWriteData(PAVIFile pfile, int ckid, void * lpData, int cbData);
extern "C" HRESULT __stdcall AVIFileReadData(int ckid, void * lpData, int &lpcbData);
extern "C" HRESULT __stdcall AVIFileEndRecord(PAVIFile pfile);
extern "C" Cardinal __stdcall AVIStreamAddRef(PAVIStream pavi);
extern "C" Cardinal __stdcall AVIStreamRelease(PAVIStream pavi);
extern "C" HRESULT __stdcall AVIStreamInfo(PAVIStream pavi, TAviStreamInfoA &psi, int lSize);
extern "C" int __stdcall AVIStreamFindSample(PAVIStream pavi, int lPos, int lFlags);
extern "C" HRESULT __stdcall AVIStreamReadFormat(PAVIStream pavi, int lPos, void * lpFormat, int &lpcbFormat
	);
extern "C" HRESULT __stdcall AVIStreamSetFormat(PAVIStream pavi, int lPos, void * lpFormat, int cbFormat
	);
extern "C" HRESULT __stdcall AVIStreamReadData(PAVIStream pavi, int fcc, void * lp, int &lpcb);
extern "C" HRESULT __stdcall AVIStreamWriteData(PAVIStream pavi, int fcc, void * lp, int cb);
extern "C" HRESULT __stdcall AVIStreamRead(PAVIStream pavi, int lStart, int lSamples, void * lpBuffer
	, int cbBuffer, int &plBytes, int &plSamples);
extern "C" HRESULT __stdcall AVIStreamWrite(PAVIStream pavi, int lStart, int lSamples, void * lpBuffer
	, int cbBuffer, int dwFlags, void * plSampWritten, void * plBytesWritten);
extern "C" int __stdcall AVIStreamStart(PAVIStream pavi);
extern "C" int __stdcall AVIStreamLength(PAVIStream pavi);
extern "C" int __stdcall AVIStreamTimeToSample(PAVIStream pavi, int lTime);
extern "C" int __stdcall AVIStreamSampleToTime(PAVIStream pavi, int lSample);
extern "C" int __stdcall AVIStreamBeginStreaming(PAVIStream pavi, int lStart, int lEnd, int lRate);
extern "C" int __stdcall AVIStreamEndStreaming(PAVIStream pavi);
extern "C" PGetFrame __stdcall AVIStreamGetFrameOpen(PAVIStream pavi, Windows::PBitmapInfoHeader lpbiWanted
	);
extern "C" void * __stdcall AVIStreamGetFrame(PGetFrame pg, int lPos);
extern "C" HRESULT __stdcall AVIStreamGetFrameClose(PGetFrame pg);
extern "C" HRESULT __stdcall AVIStreamOpenFromFile(PAVIStream &ppavi, char * szFile, int fccType, int 
	lParam, int mode, System::PGUID pclsidHandler);
extern "C" HRESULT __stdcall AVIStreamCreate(PAVIStream &ppavi, int lParam1, int lParam2, System::PGUID 
	pclsidHandler);
extern "C" HRESULT __stdcall AVISaveV(char * szFile, System::PGUID pclsidHandler, AVISaveCallBack lpfnCallback
	, int nStreams, PAVIStream &ppavi, PAviCompressOptions &plpOptions);
extern "C" bool __stdcall AVISaveOptions(HWND hwnd, int uiFlags, int nStreams, void * pavi, void * plpOptions
	);
extern "C" bool __stdcall AVISaveOptionsFree(int nStreams, PAviCompressOptions &plpOptions);
extern "C" HRESULT __stdcall CreateEditableStream(PAVIStream &ppsEditable, PAVIStream psSource);
extern "C" HRESULT __stdcall EditStreamSetInfo(PAVIStream pavi, PAviStreamInfoA lpinfo, int cbinfo);
	
extern "C" HRESULT __stdcall AVIMakeCompressedStream(PAVIStream &ppsCompressed, PAVIStream psSource, 
	PAviCompressOptions lpOptions, System::PGUID pclsid);
extern PACKAGE int __fastcall mmioFOURCC(System::AnsiString cc);
inline HRESULT __stdcall AVIFileOpen(PAVIFile &ppfile, char * szFile, int uMode, System::PGUID lpHandler
	)
{
	return AVIFileOpenA(ppfile, szFile, uMode, lpHandler);
}

inline HRESULT __stdcall AVIFileCreateStream(PAVIFile pfile, PAVIStream &ppavi, TAviStreamInfoA &psi
	)
{
	return AVIFileCreateStreamA(pfile, ppavi, psi);
}


}	/* namespace Ievfw */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Ievfw;
#endif
//-- end unit ----------------------------------------------------------------
#endif	// IEVFW
