Commit f352d9de authored by Chris Robinson's avatar Chris Robinson Committed by Alexandre Julliard

quartz: Send a notification when the filter graph clock changes.

parent d51098ef
...@@ -190,6 +190,7 @@ typedef struct _IFilterGraphImpl { ...@@ -190,6 +190,7 @@ typedef struct _IFilterGraphImpl {
int EcCompleteCount; int EcCompleteCount;
int HandleEcComplete; int HandleEcComplete;
int HandleEcRepaint; int HandleEcRepaint;
int HandleEcClockChanged;
OAFilterState state; OAFilterState state;
CRITICAL_SECTION cs; CRITICAL_SECTION cs;
ITF_CACHE_ENTRY ItfCacheEntries[MAX_ITF_CACHE_ENTRIES]; ITF_CACHE_ENTRY ItfCacheEntries[MAX_ITF_CACHE_ENTRIES];
...@@ -4109,6 +4110,8 @@ static HRESULT WINAPI MediaEvent_CancelDefaultHandling(IMediaEventEx *iface, ...@@ -4109,6 +4110,8 @@ static HRESULT WINAPI MediaEvent_CancelDefaultHandling(IMediaEventEx *iface,
This->HandleEcComplete = FALSE; This->HandleEcComplete = FALSE;
else if (lEvCode == EC_REPAINT) else if (lEvCode == EC_REPAINT)
This->HandleEcRepaint = FALSE; This->HandleEcRepaint = FALSE;
else if (lEvCode == EC_CLOCK_CHANGED)
This->HandleEcClockChanged = FALSE;
else else
return S_FALSE; return S_FALSE;
...@@ -4125,6 +4128,8 @@ static HRESULT WINAPI MediaEvent_RestoreDefaultHandling(IMediaEventEx *iface, ...@@ -4125,6 +4128,8 @@ static HRESULT WINAPI MediaEvent_RestoreDefaultHandling(IMediaEventEx *iface,
This->HandleEcComplete = TRUE; This->HandleEcComplete = TRUE;
else if (lEvCode == EC_REPAINT) else if (lEvCode == EC_REPAINT)
This->HandleEcRepaint = TRUE; This->HandleEcRepaint = TRUE;
else if (lEvCode == EC_CLOCK_CHANGED)
This->HandleEcClockChanged = TRUE;
else else
return S_FALSE; return S_FALSE;
...@@ -4293,6 +4298,19 @@ static HRESULT WINAPI MediaFilter_SetSyncSource(IMediaFilter *iface, IReferenceC ...@@ -4293,6 +4298,19 @@ static HRESULT WINAPI MediaFilter_SetSyncSource(IMediaFilter *iface, IReferenceC
This->refClock = pClock; This->refClock = pClock;
if (This->refClock) if (This->refClock)
IReferenceClock_AddRef(This->refClock); IReferenceClock_AddRef(This->refClock);
if (This->HandleEcClockChanged)
{
IMediaEventSink *pEventSink;
HRESULT eshr;
eshr = IMediaFilter_QueryInterface(iface, &IID_IMediaEventSink, (LPVOID)&pEventSink);
if (SUCCEEDED(eshr))
{
IMediaEventSink_Notify(pEventSink, EC_CLOCK_CHANGED, 0, 0);
IMediaEventSink_Release(pEventSink);
}
}
} }
} }
LeaveCriticalSection(&This->cs); LeaveCriticalSection(&This->cs);
...@@ -4594,6 +4612,7 @@ HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj) ...@@ -4594,6 +4612,7 @@ HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj)
fimpl->hEventCompletion = CreateEventW(0, TRUE, FALSE, 0); fimpl->hEventCompletion = CreateEventW(0, TRUE, FALSE, 0);
fimpl->HandleEcComplete = TRUE; fimpl->HandleEcComplete = TRUE;
fimpl->HandleEcRepaint = TRUE; fimpl->HandleEcRepaint = TRUE;
fimpl->HandleEcClockChanged = TRUE;
fimpl->notif.hWnd = 0; fimpl->notif.hWnd = 0;
fimpl->notif.disabled = FALSE; fimpl->notif.disabled = FALSE;
fimpl->nRenderers = 0; fimpl->nRenderers = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment