stop inference on stop pressed

small fixes
This commit is contained in:
Alex Bezdieniezhnykh
2025-03-24 10:52:32 +02:00
parent 6429ad62c2
commit 73c2ab5374
11 changed files with 40 additions and 29 deletions
+3 -1
View File
@@ -25,7 +25,8 @@ public class AnnotatorEventHandler(
FormState formState,
AnnotationService annotationService,
ILogger<AnnotatorEventHandler> logger,
IOptions<DirectoriesConfig> dirConfig)
IOptions<DirectoriesConfig> dirConfig,
IInferenceService inferenceService)
:
INotificationHandler<KeyEvent>,
INotificationHandler<AnnClassSelectedEvent>,
@@ -141,6 +142,7 @@ public class AnnotatorEventHandler(
}
break;
case PlaybackControlEnum.Stop:
inferenceService.StopInference();
await mainWindow.DetectionCancellationSource.CancelAsync();
mediaPlayer.Stop();
break;