#include "dshow.h"
#include "wine/strmbase.h"
#include "uuids.h"
#include "wine/debug.h"
#include <assert.h>
Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (strmbase) |
|
static SourceSeeking * | impl_from_IMediaSeeking (IMediaSeeking *iface) |
|
HRESULT | SourceSeeking_Init (SourceSeeking *pSeeking, const IMediaSeekingVtbl *Vtbl, SourceSeeking_ChangeStop fnChangeStop, SourceSeeking_ChangeStart fnChangeStart, SourceSeeking_ChangeRate fnChangeRate, PCRITICAL_SECTION crit_sect) |
|
HRESULT WINAPI | SourceSeekingImpl_GetCapabilities (IMediaSeeking *iface, DWORD *pCapabilities) |
|
HRESULT WINAPI | SourceSeekingImpl_CheckCapabilities (IMediaSeeking *iface, DWORD *pCapabilities) |
|
HRESULT WINAPI | SourceSeekingImpl_IsFormatSupported (IMediaSeeking *iface, const GUID *pFormat) |
|
HRESULT WINAPI | SourceSeekingImpl_QueryPreferredFormat (IMediaSeeking *iface, GUID *pFormat) |
|
HRESULT WINAPI | SourceSeekingImpl_GetTimeFormat (IMediaSeeking *iface, GUID *pFormat) |
|
HRESULT WINAPI | SourceSeekingImpl_IsUsingTimeFormat (IMediaSeeking *iface, const GUID *pFormat) |
|
HRESULT WINAPI | SourceSeekingImpl_SetTimeFormat (IMediaSeeking *iface, const GUID *pFormat) |
|
HRESULT WINAPI | SourceSeekingImpl_GetDuration (IMediaSeeking *iface, LONGLONG *pDuration) |
|
HRESULT WINAPI | SourceSeekingImpl_GetStopPosition (IMediaSeeking *iface, LONGLONG *pStop) |
|
HRESULT WINAPI | SourceSeekingImpl_GetCurrentPosition (IMediaSeeking *iface, LONGLONG *pCurrent) |
|
HRESULT WINAPI | SourceSeekingImpl_ConvertTimeFormat (IMediaSeeking *iface, LONGLONG *pTarget, const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat) |
|
static LONGLONG | Adjust (LONGLONG value, const LONGLONG *pModifier, DWORD dwFlags) |
|
HRESULT WINAPI | SourceSeekingImpl_SetPositions (IMediaSeeking *iface, LONGLONG *pCurrent, DWORD dwCurrentFlags, LONGLONG *pStop, DWORD dwStopFlags) |
|
HRESULT WINAPI | SourceSeekingImpl_GetPositions (IMediaSeeking *iface, LONGLONG *pCurrent, LONGLONG *pStop) |
|
HRESULT WINAPI | SourceSeekingImpl_GetAvailable (IMediaSeeking *iface, LONGLONG *pEarliest, LONGLONG *pLatest) |
|
HRESULT WINAPI | SourceSeekingImpl_SetRate (IMediaSeeking *iface, double dRate) |
|
HRESULT WINAPI | SourceSeekingImpl_GetRate (IMediaSeeking *iface, double *dRate) |
|
HRESULT WINAPI | SourceSeekingImpl_GetPreroll (IMediaSeeking *iface, LONGLONG *pPreroll) |
|
◆ COBJMACROS
◆ Adjust()
Definition at line 201 of file seeking.c.
202{
204 {
208 return *pModifier;
211 return value + *pModifier;
212 default:
214 return 0;
215 }
216}
@ AM_SEEKING_RelativePositioning
@ AM_SEEKING_IncrementalPositioning
@ AM_SEEKING_NoPositioning
@ AM_SEEKING_PositioningBitsMask
@ AM_SEEKING_AbsolutePositioning
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Referenced by AdjustPacket(), and SourceSeekingImpl_SetPositions().
◆ impl_from_IMediaSeeking()
Definition at line 35 of file seeking.c.
36{
38}
#define CONTAINING_RECORD(address, type, field)
Referenced by SourceSeekingImpl_CheckCapabilities(), SourceSeekingImpl_ConvertTimeFormat(), SourceSeekingImpl_GetAvailable(), SourceSeekingImpl_GetCapabilities(), SourceSeekingImpl_GetCurrentPosition(), SourceSeekingImpl_GetDuration(), SourceSeekingImpl_GetPositions(), SourceSeekingImpl_GetRate(), SourceSeekingImpl_GetStopPosition(), SourceSeekingImpl_GetTimeFormat(), SourceSeekingImpl_IsUsingTimeFormat(), SourceSeekingImpl_SetPositions(), SourceSeekingImpl_SetRate(), and SourceSeekingImpl_SetTimeFormat().
◆ SourceSeeking_Init()
Definition at line 40 of file seeking.c.
41{
42 assert(fnChangeStop && fnChangeStart && fnChangeRate);
43
57 pSeeking->
dRate = 1.0;
59 pSeeking->
crst = crit_sect;
61}
@ AM_SEEKING_CanGetDuration
@ AM_SEEKING_CanSeekBackwards
@ AM_SEEKING_CanSeekForwards
@ AM_SEEKING_CanSeekAbsolute
@ AM_SEEKING_CanGetStopPos
SourceSeeking_ChangeRate fnChangeRate
SourceSeeking_ChangeStart fnChangeStart
SourceSeeking_ChangeStop fnChangeStop
IMediaSeeking IMediaSeeking_iface
Referenced by Parser_Create().
◆ SourceSeekingImpl_CheckCapabilities()
Definition at line 74 of file seeking.c.
75{
79
80 TRACE(
"(%p)\n", pCapabilities);
81
82 if (!pCapabilities)
84
85 dwCommonCaps = *pCapabilities &
This->dwCapabilities;
86
87 if (!dwCommonCaps)
89 else
91 *pCapabilities = dwCommonCaps;
93}
static SourceSeeking * impl_from_IMediaSeeking(IMediaSeeking *iface)
◆ SourceSeekingImpl_ConvertTimeFormat()
Definition at line 185 of file seeking.c.
186{
188 if (!pTargetFormat)
189 pTargetFormat = &
This->timeformat;
190 if (!pSourceFormat)
191 pSourceFormat = &
This->timeformat;
192 if (
IsEqualIID(pTargetFormat, &TIME_FORMAT_MEDIA_TIME) &&
IsEqualIID(pSourceFormat, &TIME_FORMAT_MEDIA_TIME))
193 {
196 }
197
199}
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
#define IsEqualIID(riid1, riid2)
◆ SourceSeekingImpl_GetAvailable()
Definition at line 268 of file seeking.c.
269{
271
272 TRACE(
"(%p, %p)\n", pEarliest, pLatest);
273
275 *pEarliest = 0;
276 *pLatest =
This->llDuration;
278
280}
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
◆ SourceSeekingImpl_GetCapabilities()
Definition at line 63 of file seeking.c.
64{
66
67 TRACE(
"(%p)\n", pCapabilities);
68
69 *pCapabilities =
This->dwCapabilities;
70
72}
◆ SourceSeekingImpl_GetCurrentPosition()
Definition at line 172 of file seeking.c.
173{
175
176 TRACE(
"(%p)\n", pCurrent);
177
179 *pCurrent =
This->llCurrent;
181
183}
◆ SourceSeekingImpl_GetDuration()
Definition at line 145 of file seeking.c.
146{
148
149 TRACE(
"(%p)\n", pDuration);
150
152 *pDuration =
This->llDuration;
154
156}
◆ SourceSeekingImpl_GetPositions()
Definition at line 254 of file seeking.c.
255{
257
258 TRACE(
"(%p, %p)\n", pCurrent, pStop);
259
261 IMediaSeeking_GetCurrentPosition(iface, pCurrent);
262 IMediaSeeking_GetStopPosition(iface, pStop);
264
266}
◆ SourceSeekingImpl_GetPreroll()
Definition at line 319 of file seeking.c.
320{
321 TRACE(
"(%p)\n", pPreroll);
322
323 *pPreroll = 0;
325}
◆ SourceSeekingImpl_GetRate()
Definition at line 305 of file seeking.c.
306{
308
309 TRACE(
"(%p)\n", dRate);
310
312
313 *dRate =
This->dRate;
315
317}
◆ SourceSeekingImpl_GetStopPosition()
Definition at line 158 of file seeking.c.
159{
161
162 TRACE(
"(%p)\n", pStop);
163
165 *pStop =
This->llStop;
167
169}
◆ SourceSeekingImpl_GetTimeFormat()
Definition at line 110 of file seeking.c.
111{
114
116 *pFormat =
This->timeformat;
118
120}
◆ SourceSeekingImpl_IsFormatSupported()
◆ SourceSeekingImpl_IsUsingTimeFormat()
◆ SourceSeekingImpl_QueryPreferredFormat()
Definition at line 102 of file seeking.c.
103{
105
106 *pFormat = TIME_FORMAT_MEDIA_TIME;
108}
◆ SourceSeekingImpl_SetPositions()
Definition at line 218 of file seeking.c.
219{
223
224 TRACE(
"(%p, %x, %p, %x)\n", pCurrent, dwCurrentFlags, pStop, dwStopFlags);
226
227 llNewCurrent =
Adjust(
This->llCurrent, pCurrent, dwCurrentFlags);
228 llNewStop =
Adjust(
This->llStop, pStop, dwStopFlags);
229
230 if (pCurrent)
231 bChangeCurrent =
TRUE;
232 if (llNewStop !=
This->llStop)
234
235 TRACE(
"Old: %u, New: %u\n", (
DWORD)(
This->llCurrent/10000000), (
DWORD)(llNewCurrent/10000000));
236
237 This->llCurrent = llNewCurrent;
238 This->llStop = llNewStop;
239
241 *pCurrent = llNewCurrent;
243 *pStop = llNewStop;
245
246 if (bChangeCurrent)
247 This->fnChangeStart(iface);
248 if (bChangeStop)
249 This->fnChangeStop(iface);
250
252}
static LONGLONG Adjust(LONGLONG value, const LONGLONG *pModifier, DWORD dwFlags)
◆ SourceSeekingImpl_SetRate()
Definition at line 282 of file seeking.c.
283{
285 BOOL bChangeRate = (dRate !=
This->dRate);
287
288 TRACE(
"(%e)\n", dRate);
289
290 if (dRate > 100 || dRate < .001)
291 {
292 FIXME(
"Excessive rate %e, ignoring\n", dRate);
294 }
295
298 if (bChangeRate)
299 hr =
This->fnChangeRate(iface);
301
303}
#define VFW_E_UNSUPPORTED_AUDIO
◆ SourceSeekingImpl_SetTimeFormat()
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
strmbase |
| ) |
|