#ifndef __ORDEVICE_RECLIST_DEVICE_H__
#define __ORDEVICE_RECLIST_DEVICE_H__
#define RECLIST_RECFLAG_PLAY 1
#define RECLIST_RECFLAG_REC 2
class FBPlayListEntry
{
public:
FBTime GetStartTime();
FBTime GetStopTime();
FBString mName;
FBTime mInTime;
FBTime mOutTime;
int mPreroll;
int mPostroll;
int mTakeNumber;
FBPlayListEntry()
{
mName = "NoName";
mInTime = 0;
mOutTime = 0;
mPreroll = 0;
mPostroll = 0;
mTakeNumber = 1;
}
~FBPlayListEntry()
{
}
};
#define ORDEVICERECORDLIST__CLASSNAME ORDeviceRecordList
#define ORDEVICERECORDLIST__CLASSSTR "ORDeviceRecordList"
class ORDeviceRecordList : public FBDevice
{
public:
virtual bool FBCreate();
virtual void FBDestroy();
virtual void DeviceIONotify ( kDeviceIOs pAction,FBDeviceNotifyInfo &pDeviceNotifyInfo);
virtual bool DeviceOperation( kDeviceOperations pOperation );
virtual bool FbxStore ( FBFbxObject* pFbxObject,
kFbxObjectStore pStoreWhat);
virtual bool FbxRetrieve ( FBFbxObject* pFbxObject,
kFbxObjectStore pStoreWhat);
void Play ();
void Stop ();
void Cue (FBTime pStart);
bool GetPlayStatus ();
bool PrepareToRecord ();
bool PrepareToPlay ();
void ClearList ();
FBPlayListEntry* GetListEntry (
int i);
int GetListCount ();
FBTime GetReferenceTime ();
FBTime GetCurrentStartTime ();
FBTime GetCurrentStopTime ();
void SetRecFlag (bool pFlag) { mRecFlag = pFlag; }
bool GetRecFlag () { return mRecFlag; }
bool GetStandbyState () { return mStandby; }
void SetStandbyState (bool pState) { mStandby = pState; }
void SetCurrentTakeIndex (int pTake) { mCurrentTakeIndex = pTake; }
int GetCurrentTakeIndex () { return mCurrentTakeIndex; }
void LoadFile(const char *pFileName);
bool CreateNewTake(char *pName);
bool ChangeTake(char *pName);
bool SetCurrentTakeTimeSpan(FBTime pStart, FBTime pStop);
protected:
FBArrayTemplate<FBPlayListEntry *> mPlayList;
int mCurrentTakeIndex;
bool mRecFlag;
bool mIsPlaying;
bool mStandby;
FBPlayerControl mPlayerControl;
FBReferenceTime mRefTime;
FBSystem mSystem;
};
#endif