From ad097a744759c6a78e1b33ea9d2b4b2af01c529d Mon Sep 17 00:00:00 2001 From: Konstantin Date: Wed, 18 Jan 2023 19:55:25 +0100 Subject: Consistent cancellation API across the library: S_OK = continue, S_FALSE = stop --- Whisper/API/MfStructs.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Whisper/API/MfStructs.h') diff --git a/Whisper/API/MfStructs.h b/Whisper/API/MfStructs.h index cd27659..39255de 100644 --- a/Whisper/API/MfStructs.h +++ b/Whisper/API/MfStructs.h @@ -40,8 +40,11 @@ namespace Whisper Stalled = 0x80, }; + // Return S_OK to continue, or S_FALSE to stop the capture session using pfnShouldCancel = HRESULT( __stdcall* )( void* pv ) noexcept; + using pfnCaptureStatus = HRESULT( __stdcall* )( void* pv, eCaptureStatus status ) noexcept; + struct sCaptureCallbacks { pfnShouldCancel shouldCancel; -- cgit v1.2.3