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

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

		Author:	Arnaud
		Date:	9/13/2005

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

#ifndef __MovieTypes__
#define __MovieTypes__

#if CP_PRAGMA_ONCE
#pragma once
#endif


#include "MCBasicTypes.h"
#include "MCCompObj.h"

class TMCiostream;
struct IShTokenStream;

/// \addtogroup MCImage
/// \{

///Sequenced movie numbering options
enum ENumbering
{
	kPremiereNumbering = 0, kRazorNumbering = 1, kNumberAfterName = 2
};

///unknown frame rate
static const real32 kInvalidFrameRate		= 0;
static const uint32 kInvalidFirstIndex		= kUInt32Minus1; ///unknown first index (will be guessed)
static const uint32 kInvalidNumberOfDigits	= kUInt32Minus1; ///unknown number of digits (will be guessed)

//Constants used in streams to read/write
const IDType kFrameRate				= 'FRat';
const IDType kFirstIndex			= 'fFra';
const IDType kNumberingType			= 'ntyp';
const IDType kNumberOfDigits		= 'ndig';


struct TSequencedMovieInfos
{
	uint32		fFrameRate;			///the fps of the movie
	uint32		fFirstIndex;		///the number for the first frame
	ENumbering	fNumberingType;		///the naming scheme
	uint32		fNumberOfDigits;	///the number of digits for padding (1 means no padding, 0 means still image, -1 means try to guess)

	TSequencedMovieInfos()
	{
		fFrameRate		= kInvalidFrameRate;
		fFirstIndex		= 0;
		fNumberingType	= kNumberAfterName;
		fNumberOfDigits	= 1;
	}

	void Read			(TMCiostream& settingsStream);
	void WriteAttributes(TMCiostream& settingsStream);
};


MCDEFINE_GUID_H(IID_ISequencedMovie);

struct ISequencedMovie : public IMCUnknown
{
	virtual void MCCOMAPI WriteSequencedMovieInfos(IShTokenStream* stream) = 0;
};

/// \}








#endif
