Good day. I add effects to mediaCapture: await _mediaCapture.AddVideoEffectAsync(new VideoEffectDefinition(typeName),MediaStreamType.VideoPreview); , everything works and the effect is added, but the problem with cleaning effects:
await _mediaCapture.ClearEffectsAsync(MediaStreamType.VideoPreview); await Task.Delay(200); await _mediaCapture.GetPreviewFrameAsync(previewFrame); On the last line goes to catch with the error:
Invalid subtype at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Task task) at System.Runtime.CompilerServices. .MoveNext ()
Why is this happening? Moreover, if the effects are not clear, then everything is fine. Thank you in advance