// CodeGear C++Builder
// Copyright (c) 1995, 2015 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ievfw.pas' rev: 30.00 (Windows)

#ifndef IevfwHPP
#define IevfwHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <Winapi.Windows.hpp>
#include <System.Types.hpp>

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

namespace Ievfw
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS IUnknown;
struct TAviStreamInfoA;
struct TAviStreamInfoW;
struct TAviFileInfoA;
struct TAviFileInfoW;
struct TAviCompressOptions;
class DELPHICLASS IAVIStream;
class DELPHICLASS IAVIEditStream;
class DELPHICLASS IAVIFile;
class DELPHICLASS IGetFrame;
//-- type declarations -------------------------------------------------------
typedef System::PGUID PCLSID;

typedef GUID TIID;

#pragma pack(push,4)
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 */ inline __fastcall IUnknown(void) : System::TObject() { }
	/* TObject.Destroy */ inline __fastcall virtual ~IUnknown(void) { }
	
};

#pragma pack(pop)

typedef int LONG;

typedef void * PVOID;

typedef TAviStreamInfoA *PAviStreamInfoA;

struct DECLSPEC_DRECORD TAviStreamInfoA
{
public:
	unsigned fccType;
	unsigned fccHandler;
	unsigned dwFlags;
	unsigned dwCaps;
	System::Word wPriority;
	System::Word wLanguage;
	unsigned dwScale;
	unsigned dwRate;
	unsigned dwStart;
	unsigned dwLength;
	unsigned dwInitialFrames;
	unsigned dwSuggestedBufferSize;
	unsigned dwQuality;
	unsigned dwSampleSize;
	System::Types::TRect rcFrame;
	unsigned dwEditCount;
	unsigned dwFormatChangeCount;
	System::StaticArray<char, 64> szName;
};


typedef TAviStreamInfoW *PAviStreamInfoW;

struct DECLSPEC_DRECORD TAviStreamInfoW
{
public:
	unsigned fccType;
	unsigned fccHandler;
	unsigned dwFlags;
	unsigned dwCaps;
	System::Word wPriority;
	System::Word wLanguage;
	unsigned dwScale;
	unsigned dwRate;
	unsigned dwStart;
	unsigned dwLength;
	unsigned dwInitialFrames;
	unsigned dwSuggestedBufferSize;
	unsigned dwQuality;
	unsigned dwSampleSize;
	System::Types::TRect rcFrame;
	unsigned dwEditCount;
	unsigned dwFormatChangeCount;
	System::StaticArray<System::WideChar, 64> szName;
};


typedef TAviStreamInfoW TAviStreamInfo;

typedef TAviFileInfoA *PAviFileInfoA;

struct DECLSPEC_DRECORD TAviFileInfoA
{
public:
	unsigned dwMaxBytesPerSec;
	unsigned dwFlags;
	unsigned dwCaps;
	unsigned dwStreams;
	unsigned dwSuggestedBufferSize;
	unsigned dwWidth;
	unsigned dwHeight;
	unsigned dwScale;
	unsigned dwRate;
	unsigned dwLength;
	unsigned dwEditCount;
	System::StaticArray<char, 64> szFileType;
};


typedef TAviFileInfoA TAviFileInfo;

typedef TAviFileInfoW *PAviFileInfoW;

struct DECLSPEC_DRECORD TAviFileInfoW
{
public:
	unsigned dwMaxBytesPerSec;
	unsigned dwFlags;
	unsigned dwCaps;
	unsigned dwStreams;
	unsigned dwSuggestedBufferSize;
	unsigned dwWidth;
	unsigned dwHeight;
	unsigned dwScale;
	unsigned dwRate;
	unsigned dwLength;
	unsigned dwEditCount;
	System::StaticArray<System::WideChar, 64> szFileType;
};


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

typedef TAVISaveCallBack *AVISaveCallBack;

typedef TAviCompressOptions *PAviCompressOptions;

struct DECLSPEC_DRECORD TAviCompressOptions
{
public:
	unsigned fccType;
	unsigned fccHandler;
	unsigned dwKeyFrameEvery;
	unsigned dwQuality;
	unsigned dwBytesPerSecond;
	unsigned dwFlags;
	void *lpFormat;
	unsigned cbFormat;
	void *lpParms;
	unsigned cbParms;
	unsigned dwInterleaveEvery;
};


#pragma pack(push,4)
class PASCALIMPLEMENTATION IAVIStream : public IUnknown
{
	typedef IUnknown inherited;
	
public:
	HIDESBASE virtual HRESULT __stdcall Create(NativeInt lParam1, NativeInt 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, unsigned dwFlags, int &plSampWritten, int &plBytesWritten) = 0 ;
	virtual HRESULT __stdcall Delete(int lStart, int lSamples) = 0 ;
	virtual HRESULT __stdcall ReadData(unsigned fcc, void * lp, int &lpcb) = 0 ;
	virtual HRESULT __stdcall WriteData(unsigned fcc, void * lp, int cb) = 0 ;
	virtual HRESULT __stdcall SetInfo(TAviStreamInfoW &lpInfo, int cbInfo) = 0 ;
public:
	/* TObject.Create */ inline __fastcall IAVIStream(void) : IUnknown() { }
	/* TObject.Destroy */ inline __fastcall virtual ~IAVIStream(void) { }
	
};

#pragma pack(pop)

typedef IAVIStream* *PAVIStream;

#pragma pack(push,4)
class PASCALIMPLEMENTATION IAVIEditStream : public IUnknown
{
	typedef 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 */ inline __fastcall IAVIEditStream(void) : IUnknown() { }
	/* TObject.Destroy */ inline __fastcall virtual ~IAVIEditStream(void) { }
	
};

#pragma pack(pop)

typedef IAVIEditStream* *PAVIEditStream;

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

#pragma pack(pop)

typedef IAVIFile* *PAVIFile;

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

#pragma pack(pop)

typedef IGetFrame* *PGetFrame;

//-- var, const, procedure ---------------------------------------------------
static const int streamtypeVIDEO = int(0x73646976);
static const int streamtypeAUDIO = int(0x73647561);
static const int streamtypeMIDI = int(0x7364696d);
static const int streamtypeTEXT = int(0x73747874);
static const int comptypeDIB = int(0x20424944);
static const System::Int8 AVIIF_KEYFRAME = System::Int8(0x10);
static const System::Int8 AVISTREAMINFO_DISABLED = System::Int8(0x1);
static const int AVISTREAMINFO_FORMATCHANGES = int(0x10000);
static const System::Int8 AVIFILEINFO_HASINDEX = System::Int8(0x10);
static const System::Int8 AVIFILEINFO_MUSTUSEINDEX = System::Int8(0x20);
static const System::Word AVIFILEINFO_ISINTERLEAVED = System::Word(0x100);
static const int AVIFILEINFO_WASCAPTUREFILE = int(0x10000);
static const int AVIFILEINFO_COPYRIGHTED = int(0x20000);
static const System::Int8 AVIFILECAPS_CANREAD = System::Int8(0x1);
static const System::Int8 AVIFILECAPS_CANWRITE = System::Int8(0x2);
static const System::Int8 AVIFILECAPS_ALLKEYFRAMES = System::Int8(0x10);
static const System::Int8 AVIFILECAPS_NOCOMPRESSION = System::Int8(0x20);
static const System::Int8 ICMF_CHOOSE_KEYFRAME = System::Int8(0x1);
static const System::Int8 ICMF_CHOOSE_DATARATE = System::Int8(0x2);
static const System::Int8 ICMF_CHOOSE_PREVIEW = System::Int8(0x4);
static const System::Int8 ICMF_CHOOSE_ALLCOMPRESSORS = System::Int8(0x8);
static const System::Int8 AVICOMPRESSF_INTERLEAVE = System::Int8(0x1);
static const System::Int8 AVICOMPRESSF_DATARATE = System::Int8(0x2);
static const System::Int8 AVICOMPRESSF_KEYFRAMES = System::Int8(0x4);
static const System::Int8 AVICOMPRESSF_VALID = System::Int8(0x8);
extern DELPHI_PACKAGE GUID IID_IAVIFile;
extern DELPHI_PACKAGE GUID IID_IAVIStream;
extern DELPHI_PACKAGE GUID IID_IAVIStreaming;
extern DELPHI_PACKAGE GUID IID_IGetFrame;
extern DELPHI_PACKAGE GUID IID_IAVIEditStream;
extern DELPHI_PACKAGE GUID CLSID_AVISimpleUnMarshal;
extern DELPHI_PACKAGE GUID CLSID_AVIFile;
static const System::Int8 AVIFILEHANDLER_CANREAD = System::Int8(0x1);
static const System::Int8 AVIFILEHANDLER_CANWRITE = System::Int8(0x2);
static const System::Int8 AVIFILEHANDLER_CANACCEPTNONRGB = System::Int8(0x4);
static const System::Int8 FIND_DIR = System::Int8(0xf);
static const System::Int8 FIND_NEXT = System::Int8(0x1);
static const System::Int8 FIND_PREV = System::Int8(0x4);
static const System::Byte FIND_TYPE = System::Byte(0xf0);
static const System::Int8 FIND_KEY = System::Int8(0x10);
static const System::Int8 FIND_ANY = System::Int8(0x20);
static const System::Int8 FIND_FORMAT = System::Int8(0x40);
static const System::Word FIND_RET = System::Word(0xf000);
static const System::Int8 FIND_POS = System::Int8(0x0);
static const System::Word FIND_LENGTH = System::Word(0x1000);
static const System::Word FIND_OFFSET = System::Word(0x2000);
static const System::Word FIND_SIZE = System::Word(0x3000);
static const System::Word FIND_INDEX = System::Word(0x4000);
static const System::Int8 AVIERR_OK = System::Int8(0x0);
static const System::Int8 AVIIF_LIST = System::Int8(0x1);
static const System::Int8 AVIIF_TWOCC = System::Int8(0x2);
extern DELPHI_PACKAGE HRESULT AVIERR_NOCOMPRESSOR;
extern DELPHI_PACKAGE HRESULT AVIERR_MEMORY;
extern DELPHI_PACKAGE HRESULT AVIERR_UNSUPPORTED;
extern "C" void __stdcall AVIFileInit(void);
extern "C" void __stdcall AVIFileExit(void);
extern "C" unsigned __stdcall AVIFileAddRef(PAVIFile pfile);
extern "C" unsigned __stdcall AVIFileRelease(PAVIFile pfile);
extern "C" HRESULT __stdcall AVIFileOpen(PAVIFile &ppfile, System::WideChar * szFile, unsigned uMode, System::PGUID lpHandler);
extern "C" HRESULT __stdcall AVIFileOpenW(PAVIFile &ppfile, System::WideChar * szFile, unsigned uMode, System::PGUID lpHandler);
extern "C" HRESULT __stdcall AVIFileInfo(PAVIFile pfile, TAviFileInfoA &pfi, int lSize);
extern "C" HRESULT __stdcall AVIFileGetStream(PAVIFile pfile, PAVIStream &ppavi, unsigned fccType, int lParam);
extern "C" HRESULT __stdcall AVIFileCreateStream(PAVIFile pfile, PAVIStream &ppavi, TAviStreamInfoW &psi);
extern "C" HRESULT __stdcall AVIFileCreateStreamW(PAVIFile pfile, PAVIStream &ppavi, TAviStreamInfoW &psi);
extern "C" HRESULT __stdcall AVIFileWriteData(PAVIFile pfile, unsigned ckid, void * lpData, int cbData);
extern "C" HRESULT __stdcall AVIFileReadData(unsigned ckid, void * lpData, int &lpcbData);
extern "C" HRESULT __stdcall AVIFileEndRecord(PAVIFile pfile);
extern "C" unsigned __stdcall AVIStreamAddRef(PAVIStream pavi);
extern "C" unsigned __stdcall AVIStreamRelease(PAVIStream pavi);
extern "C" HRESULT __stdcall AVIStreamInfo(PAVIStream pavi, TAviStreamInfoW &psi, int lSize);
extern "C" HRESULT __stdcall AVIStreamInfoW(PAVIStream pavi, TAviStreamInfoW &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, unsigned fcc, void * lp, int &lpcb);
extern "C" HRESULT __stdcall AVIStreamWriteData(PAVIStream pavi, unsigned 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, unsigned 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, Winapi::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, System::WideChar * szFile, unsigned fccType, int lParam, unsigned mode, System::PGUID pclsidHandler);
extern "C" HRESULT __stdcall AVIStreamOpenFromFileW(PAVIStream &ppavi, System::WideChar * szFile, unsigned fccType, int lParam, unsigned mode, System::PGUID pclsidHandler);
extern "C" HRESULT __stdcall AVIStreamCreate(PAVIStream &ppavi, int lParam1, int lParam2, System::PGUID pclsidHandler);
extern "C" HRESULT __stdcall AVISaveV(System::WideChar * szFile, System::PGUID pclsidHandler, AVISaveCallBack lpfnCallback, int nStreams, PAVIStream &ppavi, PAviCompressOptions &plpOptions);
extern "C" bool __stdcall AVISaveOptions(HWND hwnd, unsigned 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 DELPHI_PACKAGE int __fastcall mmioFOURCC(System::AnsiString cc);
}	/* namespace Ievfw */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_IEVFW)
using namespace Ievfw;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// IevfwHPP
