/****************************************************************************************

		BasicMovie.h

		Copyright: (c) 2001 Eovia Corp. All rights reserved.

		Author:	Emil (from RD code)
		Date:	1/21/99

		Revision History

		when		who			what & why
		==========	==========	======================================================
		
*****************************************************************************************/

#ifndef __BasicMovie__
#define __BasicMovie__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "BasicCOMImplementations.h"
#include "IExMovie.h"

/// \addtogroup BaseClass
/// \{
/*****************************************************************************\
*                                                                             *
*  Class TBasicMovie                                                          *
*                                                                             *
\*****************************************************************************/
/// Basic Movie class.  Derive from this for a basic implementation of IExMovie
/// \see IExMovie
class TBasicMovie : public IExMovie, public TBasicDataExchanger
{
public:
	virtual MCCOMErr MCCOMAPI QueryInterface		(const MCIID& riid, void** ppvObj);
	virtual uint32 	 MCCOMAPI AddRef				();

	//movie playing
	virtual MCCOMErr MCCOMAPI CreateMovieController	(IMFPart** movieController);
	virtual MCCOMErr MCCOMAPI SelfStartPlaying		(uint32 frameIndex);
	virtual MCCOMErr MCCOMAPI SelfStopPlaying		(uint32 frameIndex);

	//methods for reading
	virtual MCCOMErr MCCOMAPI Initialize			(const TMCString& fullPathName, const TSequencedMovieInfos* infos= NULL);
	virtual MCCOMErr MCCOMAPI BeginRead				();
	virtual MCCOMErr MCCOMAPI GetFrameRate			(real32& frameRate);
	virtual MCCOMErr MCCOMAPI GetFrameCount			(uint32& frameCount);
	virtual MCCOMErr MCCOMAPI GetFrame				(IShRasterLayer** rasterLayer, uint32 frameIndex);
	virtual MCCOMErr MCCOMAPI GetFrame				(IShLayerList** layerList, uint32 frameIndex, boolean forceLoad);
	virtual MCCOMErr MCCOMAPI EndRead				();
	

	//methods for writing
	virtual boolean	 MCCOMAPI HasOptionsDialog		();
	virtual MCCOMErr MCCOMAPI ShowOptionsDialog		(uint32 depth, real32 & frameRate);
	virtual MCCOMErr MCCOMAPI BeginWrite			(const TMCString& fullPathName, uint32 sizeH, uint32 sizeV, uint32 depth, real32 frameRate, boolean append);
	virtual MCCOMErr MCCOMAPI PutFrame				(IShRasterLayer* rasterLayer,const TGBuffer32List* gBuffers, uint32 frameIndex);
	virtual MCCOMErr MCCOMAPI PutFrame				(IShLayerList* layerList,const TGBuffer32List* gBuffers, uint32 frameIndex);
	virtual MCCOMErr MCCOMAPI Flush					();
	virtual MCCOMErr MCCOMAPI GetMovieFullPathName	(TMCString& fullPathName);
	virtual MCCOMErr MCCOMAPI EndWrite				();
	virtual MCCOMErr MCCOMAPI MakeCopy				(const TMCString& fullPathName, TMCString& outFirstFileName);
	virtual void	 MCCOMAPI GetCapabilities(ImageExportCapabilities& capabitilities);

	//Deletion
	virtual MCCOMErr MCCOMAPI DeleteMovie			();

	virtual void	 MCCOMAPI GetCompressionOptions(IExMovieCompressionOptions** movieOptions);
	virtual void	 MCCOMAPI SetCompressionOptions(IExMovieCompressionOptions* movieOptions);
};

/// \}

#endif