/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2008.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: include/sgx/video/videostream.hpp

*/

#ifndef SGX_VIDEO_HPP
#define SGX_VIDEO_HPP	1

class CVideo  {
public:
	// For initialisation
	class CMovieParameters {
	public:
		CMovieParameters(const tBOOL loopFlag = TRUE);
		tBOOL	bLooping;
		tBOOL	bBilearFiltering;
		tREAL32	fInitialVolume;

		tBOOL	bUseImageData;
		CImageData *pImageData;
	};

	virtual ~CVideo();
	
	virtual tBOOL create(const sgxString &filename, const CMovieParameters &params=CMovieParameters());
	virtual tBOOL play();
	virtual void  pause();
	virtual void  unpause();
	virtual tBOOL isPlaying();
	virtual tBOOL isPaused();
	virtual void  rewind();
	virtual void  seek(const tREAL32 time);
	virtual void  update(const tREAL32 telaps);
	virtual void  buildImage(CImageData &data);
	virtual void  draw() const;
	virtual void  draw(const tINT32 x, const tINT32 y) const;

protected:
	CVideo() : m_bPaused(FALSE), m_fTimecum(0) {}

	tBOOL			m_bPaused;
	tREAL32			m_fTimecum;
};

#endif /* SGX_VIDEO_HPP */
