public HResult GetEvent(MFEventFlag dwFlags, out IMFMediaEvent ppEvent) { // NOTE: // GetEvent can block indefinitely, so we don't hold the lock. // This requires some juggling with the event queue pointer. HResult hr = HResult.S_OK; IMFMediaEventQueue spQueue = null; ppEvent = null; lock (_spSource) { // Check shutdown hr = CheckShutdown(); // Get the pointer to the event queue. if (MFError.Succeeded(hr)) { spQueue = _spEventQueue; } } // Now get the event. if (MFError.Succeeded(hr)) { hr = spQueue.GetEvent(dwFlags, out ppEvent); } return(hr); }
public HResult GetEvent(MFEventFlag dwFlags, out IMFMediaEvent ppEvent) { HResult hr; hr = m_events.GetEvent(dwFlags, out ppEvent); return(hr); }