Browse Source

Refactor of DetectorService

bk_video
Bastian Kohler 1 year ago
parent
commit
bc5227ba4f

+ 12
- 0
app/src/main/java/com/example/ueberwachungssystem/Detection/DetectorService.java View File

@@ -16,6 +16,8 @@ import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.lifecycle.LifecycleService;

import java.io.File;

@ExperimentalGetImage
public class DetectorService extends LifecycleService {

@@ -117,6 +119,10 @@ public class DetectorService extends LifecycleService {
return videoDetector.isRecording();
return false;
}
public void setVideoRecordingDir(File outputDir) {
if (videoDetector != null)
videoDetector.setOutputDir(outputDir);
}

/** Audio Recording */
public void startAudioRecording() {
@@ -132,6 +138,12 @@ public class DetectorService extends LifecycleService {
return audioRecorder.isRecording();
return false;
}
public void setAudioRecordingDir(File outputDir) {
if (audioRecorder != null)
audioRecorder.setOutputDir(outputDir);
}




/** pass Detection Report to Service Detection Listener and trigger it */

Loading…
Cancel
Save