42 assert(fnChangeStop && fnChangeStart && fnChangeRate);
57 pSeeking->
dRate = 1.0;
59 pSeeking->
crst = crit_sect;
67 TRACE(
"(%p)\n", pCapabilities);
69 *pCapabilities =
This->dwCapabilities;
80 TRACE(
"(%p)\n", pCapabilities);
85 dwCommonCaps = *pCapabilities &
This->dwCapabilities;
91 *pCapabilities = dwCommonCaps;
106 *pFormat = TIME_FORMAT_MEDIA_TIME;
116 *pFormat =
This->timeformat;
149 TRACE(
"(%p)\n", pDuration);
152 *pDuration =
This->llDuration;
162 TRACE(
"(%p)\n", pStop);
165 *pStop =
This->llStop;
176 TRACE(
"(%p)\n", pCurrent);
179 *pCurrent =
This->llCurrent;
189 pTargetFormat = &
This->timeformat;
191 pSourceFormat = &
This->timeformat;
192 if (
IsEqualIID(pTargetFormat, &TIME_FORMAT_MEDIA_TIME) &&
IsEqualIID(pSourceFormat, &TIME_FORMAT_MEDIA_TIME))
211 return value + *pModifier;
224 TRACE(
"(%p, %x, %p, %x)\n", pCurrent, dwCurrentFlags, pStop, dwStopFlags);
227 llNewCurrent =
Adjust(
This->llCurrent, pCurrent, dwCurrentFlags);
228 llNewStop =
Adjust(
This->llStop, pStop, dwStopFlags);
231 bChangeCurrent =
TRUE;
232 if (llNewStop !=
This->llStop)
235 TRACE(
"Old: %u, New: %u\n", (
DWORD)(
This->llCurrent/10000000), (
DWORD)(llNewCurrent/10000000));
237 This->llCurrent = llNewCurrent;
238 This->llStop = llNewStop;
241 *pCurrent = llNewCurrent;
247 This->fnChangeStart(iface);
249 This->fnChangeStop(iface);
258 TRACE(
"(%p, %p)\n", pCurrent, pStop);
261 IMediaSeeking_GetCurrentPosition(iface, pCurrent);
262 IMediaSeeking_GetStopPosition(iface, pStop);
272 TRACE(
"(%p, %p)\n", pEarliest, pLatest);
276 *pLatest =
This->llDuration;
285 BOOL bChangeRate = (dRate !=
This->dRate);
288 TRACE(
"(%e)\n", dRate);
290 if (dRate > 100 || dRate < .001)
292 FIXME(
"Excessive rate %e, ignoring\n", dRate);
299 hr =
This->fnChangeRate(iface);
309 TRACE(
"(%p)\n", dRate);
313 *dRate =
This->dRate;
321 TRACE(
"(%p)\n", pPreroll);
@ AM_SEEKING_CanGetDuration
@ AM_SEEKING_CanSeekBackwards
@ AM_SEEKING_CanSeekForwards
@ AM_SEEKING_CanSeekAbsolute
@ AM_SEEKING_CanGetStopPos
@ AM_SEEKING_RelativePositioning
@ AM_SEEKING_IncrementalPositioning
@ AM_SEEKING_NoPositioning
@ AM_SEEKING_PositioningBitsMask
@ AM_SEEKING_AbsolutePositioning
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
#define IsEqualIID(riid1, riid2)
HRESULT WINAPI SourceSeekingImpl_SetTimeFormat(IMediaSeeking *iface, const GUID *pFormat)
HRESULT WINAPI SourceSeekingImpl_SetPositions(IMediaSeeking *iface, LONGLONG *pCurrent, DWORD dwCurrentFlags, LONGLONG *pStop, DWORD dwStopFlags)
HRESULT SourceSeeking_Init(SourceSeeking *pSeeking, const IMediaSeekingVtbl *Vtbl, SourceSeeking_ChangeStop fnChangeStop, SourceSeeking_ChangeStart fnChangeStart, SourceSeeking_ChangeRate fnChangeRate, PCRITICAL_SECTION crit_sect)
HRESULT WINAPI SourceSeekingImpl_IsUsingTimeFormat(IMediaSeeking *iface, const GUID *pFormat)
static LONGLONG Adjust(LONGLONG value, const LONGLONG *pModifier, DWORD dwFlags)
HRESULT WINAPI SourceSeekingImpl_GetRate(IMediaSeeking *iface, double *dRate)
HRESULT WINAPI SourceSeekingImpl_GetTimeFormat(IMediaSeeking *iface, GUID *pFormat)
HRESULT WINAPI SourceSeekingImpl_GetCapabilities(IMediaSeeking *iface, DWORD *pCapabilities)
HRESULT WINAPI SourceSeekingImpl_GetCurrentPosition(IMediaSeeking *iface, LONGLONG *pCurrent)
HRESULT WINAPI SourceSeekingImpl_GetPreroll(IMediaSeeking *iface, LONGLONG *pPreroll)
HRESULT WINAPI SourceSeekingImpl_SetRate(IMediaSeeking *iface, double dRate)
HRESULT WINAPI SourceSeekingImpl_ConvertTimeFormat(IMediaSeeking *iface, LONGLONG *pTarget, const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat)
HRESULT WINAPI SourceSeekingImpl_IsFormatSupported(IMediaSeeking *iface, const GUID *pFormat)
HRESULT WINAPI SourceSeekingImpl_GetStopPosition(IMediaSeeking *iface, LONGLONG *pStop)
HRESULT WINAPI SourceSeekingImpl_GetDuration(IMediaSeeking *iface, LONGLONG *pDuration)
HRESULT WINAPI SourceSeekingImpl_GetPositions(IMediaSeeking *iface, LONGLONG *pCurrent, LONGLONG *pStop)
HRESULT WINAPI SourceSeekingImpl_CheckCapabilities(IMediaSeeking *iface, DWORD *pCapabilities)
HRESULT WINAPI SourceSeekingImpl_QueryPreferredFormat(IMediaSeeking *iface, GUID *pFormat)
HRESULT WINAPI SourceSeekingImpl_GetAvailable(IMediaSeeking *iface, LONGLONG *pEarliest, LONGLONG *pLatest)
static SourceSeeking * impl_from_IMediaSeeking(IMediaSeeking *iface)
HRESULT(WINAPI * SourceSeeking_ChangeStop)(IMediaSeeking *iface)
HRESULT(WINAPI * SourceSeeking_ChangeRate)(IMediaSeeking *iface)
HRESULT(WINAPI * SourceSeeking_ChangeStart)(IMediaSeeking *iface)
SourceSeeking_ChangeRate fnChangeRate
SourceSeeking_ChangeStart fnChangeStart
SourceSeeking_ChangeStop fnChangeStop
IMediaSeeking IMediaSeeking_iface
#define CONTAINING_RECORD(address, type, field)
#define VFW_E_UNSUPPORTED_AUDIO
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags