///////////////////////////////////////////////////////////
//
//		     Free Speed Decoder API
//			Southern.Liang
//			  1998.1.10
///////////////////////////////////////////////////////////

#ifndef	__WINDOWS_H
#include <windows.h>
#endif

int	APIENTRY	MPEGOpenFile(LPSTR FileName);

//Close the file
void	APIENTRY	MPEGCloseFile(void);

//Start Video play,when play to the end,
//will auto restart at the begin.
void	APIENTRY	StartPlay(void);

//Stop Video
void	APIENTRY	StopPlay(void);

//Control the speed of frames per second.
void	APIENTRY	ControlFrameSpeed(int Frames);

//Video Window hwnd,with this hwnd main program can
//set the position,style,etc.
//This hwnd can't be destory by program,but it can be
//closed or hided when main program want to hide it.
//It can auto destory when main program exit.
HWND	APIENTRY	GetVideoWnd(void);

//Video Window Proc,If the program hook Video Window Proc,
//this proc must be call at last,because this proc will 
//fix up the video display method.
WNDPROC	APIENTRY	GetVideoProc(void);

//////////////////////////////////////////////////////////
//
//		Low Level API
//
//////////////////////////////////////////////////////////
typedef	struct	FRAMEBUFFERtag
	{
	BYTE	YBuffer[352*288];
	BYTE	UBuffer[176*144];
	BYTE	VBuffer[176*144];
	}FRAMEBUFFER;

int	APIENTRY	TestMPEGFile(LPSTR FileName);
//	Decode And Display on VideoWindow
void	APIENTRY	StepVideo(void);
//	Skip the Frame
void	APIENTRY	SkipVideo(void);
//	Test If had End of the Stream
int	APIENTRY	BeEnd(void);
//	Get Current Display Frame Buffer Address
FRAMEBUFFER * APIENTRY	GetDisplayFrameBuffer(void);
//	Display The Frame
void	APIENTRY	DisplayTheFrame(FRAMEBUFFER *FrameBufferPtr);
//	Seek MPEG File Pointer to
DWORD	APIENTRY	MPEGSeekVideo(long Position,int FormWhere);
