chnaged start dely to 2 seconds

This commit is contained in:
Bastian Kohler 2023-06-23 16:21:04 +02:00
parent 5b52dfc6e5
commit 0c808f1daa
2 changed files with 5 additions and 5 deletions

View File

@ -49,7 +49,7 @@ public class MicrophoneDetector extends Detector {
private final int channelConfig = AudioFormat.CHANNEL_IN_MONO;
private final int audioFormat = AudioFormat.ENCODING_PCM_16BIT;
private final int startDelay = 20000;
private final int startDelay = 2000;
private final int threadSleeptime = 10;
private int minPufferGroesseInBytes;
private int pufferGroesseInBytes;

View File

@ -76,7 +76,7 @@ public class VideoDetector extends Detector {
private static final float ALARM_THRESHOLD = 0f; // Percent of pixels changed
private static final float AREA_THRESHOLD = 10f;
private static final int DILATE_ITERATIONS = 2;
private static final float START_DELAY = 20000; // milliseconds
private static final float START_DELAY = 2000; // milliseconds
private static final android.util.Size IMAGE_RES = new android.util.Size(640, 480);
@ -134,7 +134,7 @@ public class VideoDetector extends Detector {
if (isRecording){
return;
}
Toast.makeText(context, "video recording started", Toast.LENGTH_SHORT).show();
Toast.makeText(context, "Aufnahme gestartet", Toast.LENGTH_SHORT).show();
videoCapture = setupVideoCapture();
final ListenableFuture<ProcessCameraProvider> cameraProviderFuture = ProcessCameraProvider.getInstance(context);
@ -155,12 +155,12 @@ public class VideoDetector extends Detector {
@Override
public void onVideoSaved(@NonNull VideoCapture.OutputFileResults outputFileResults) {
isRecording = false;
Toast.makeText(context, "video recording saved", Toast.LENGTH_SHORT).show();
Toast.makeText(context, "Aufnahme gespeichert", Toast.LENGTH_SHORT).show();
}
@Override
public void onError(int videoCaptureError, @NonNull String message, @Nullable Throwable cause) {
isRecording = false;
Toast.makeText(context, "video recording failed", Toast.LENGTH_SHORT).show();
Toast.makeText(context, "Aufnahme fehlgeschlagen", Toast.LENGTH_SHORT).show();
}
}
);