2 * Copyright (C) Hidenori TAKESHIMA
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef WINE_DSHOW_SYSCLOCK_H
20 #define WINE_DSHOW_SYSCLOCK_H
23 implements CLSID_SystemClock.
25 - At least, the following interfaces should be implemented:
34 typedef struct SC_IReferenceClockImpl
36 ICOM_VFIELD(IReferenceClock);
37 } SC_IReferenceClockImpl;
40 /* implementation limit */
41 #define WINE_QUARTZ_SYSCLOCK_TIMER_MAX 64
43 typedef struct QUARTZ_TimerEntry
48 REFERENCE_TIME rtStart;
49 REFERENCE_TIME rtInterval;
52 typedef struct CSystemClock
55 SC_IReferenceClockImpl refclk;
57 /* IReferenceClock fields. */
58 CRITICAL_SECTION m_csClock;
60 REFERENCE_TIME m_rtLast;
61 HANDLE m_hThreadTimer;
63 DWORD m_idThreadTimer;
65 DWORD m_dwAdvCookieNext;
66 QUARTZ_TimerEntry m_timerEntries[WINE_QUARTZ_SYSCLOCK_TIMER_MAX];
69 #define CSystemClock_THIS(iface,member) CSystemClock* This = ((CSystemClock*)(((char*)iface)-offsetof(CSystemClock,member)))
71 HRESULT QUARTZ_CreateSystemClock(IUnknown* punkOuter,void** ppobj);
73 HRESULT CSystemClock_InitIReferenceClock( CSystemClock* psc );
74 void CSystemClock_UninitIReferenceClock( CSystemClock* psc );
77 #endif /* WINE_DSHOW_SYSCLOCK_H */