2001-08-15 21:26:52 +02:00
|
|
|
#ifndef WINE_DSHOW_SYSCLOCK_H
|
|
|
|
#define WINE_DSHOW_SYSCLOCK_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
implements CLSID_SystemClock.
|
|
|
|
|
|
|
|
- At least, the following interfaces should be implemented:
|
|
|
|
|
|
|
|
IUnknown
|
|
|
|
+ IReferenceClock
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "iunk.h"
|
|
|
|
|
|
|
|
typedef struct SC_IReferenceClockImpl
|
|
|
|
{
|
|
|
|
ICOM_VFIELD(IReferenceClock);
|
|
|
|
} SC_IReferenceClockImpl;
|
|
|
|
|
|
|
|
|
2001-09-11 02:29:03 +02:00
|
|
|
/* implementation limit */
|
|
|
|
#define WINE_QUARTZ_SYSCLOCK_TIMER_MAX 64
|
|
|
|
|
|
|
|
typedef struct QUARTZ_TimerEntry
|
|
|
|
{
|
|
|
|
DWORD dwAdvCookie;
|
|
|
|
BOOL fPeriodic;
|
|
|
|
HANDLE hEvent;
|
|
|
|
REFERENCE_TIME rtStart;
|
|
|
|
REFERENCE_TIME rtInterval;
|
|
|
|
} QUARTZ_TimerEntry;
|
|
|
|
|
2001-08-15 21:26:52 +02:00
|
|
|
typedef struct CSystemClock
|
|
|
|
{
|
|
|
|
QUARTZ_IUnkImpl unk;
|
|
|
|
SC_IReferenceClockImpl refclk;
|
|
|
|
|
|
|
|
/* IReferenceClock fields. */
|
2001-09-11 02:29:03 +02:00
|
|
|
CRITICAL_SECTION m_csClock;
|
|
|
|
DWORD m_dwTimeLast;
|
|
|
|
REFERENCE_TIME m_rtLast;
|
|
|
|
HANDLE m_hThreadTimer;
|
|
|
|
HANDLE m_hEventInit;
|
|
|
|
DWORD m_idThreadTimer;
|
|
|
|
|
|
|
|
DWORD m_dwAdvCookieNext;
|
|
|
|
QUARTZ_TimerEntry m_timerEntries[WINE_QUARTZ_SYSCLOCK_TIMER_MAX];
|
2001-08-15 21:26:52 +02:00
|
|
|
} CSystemClock;
|
|
|
|
|
|
|
|
#define CSystemClock_THIS(iface,member) CSystemClock* This = ((CSystemClock*)(((char*)iface)-offsetof(CSystemClock,member)))
|
|
|
|
|
|
|
|
HRESULT QUARTZ_CreateSystemClock(IUnknown* punkOuter,void** ppobj);
|
|
|
|
|
2001-09-07 21:46:49 +02:00
|
|
|
HRESULT CSystemClock_InitIReferenceClock( CSystemClock* psc );
|
|
|
|
void CSystemClock_UninitIReferenceClock( CSystemClock* psc );
|
2001-08-15 21:26:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* WINE_DSHOW_SYSCLOCK_H */
|