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

import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import androidx.lifecycle.LifecycleService; import androidx.lifecycle.LifecycleService;


import java.io.File;

@ExperimentalGetImage @ExperimentalGetImage
public class DetectorService extends LifecycleService { public class DetectorService extends LifecycleService {


return videoDetector.isRecording(); return videoDetector.isRecording();
return false; return false;
} }
public void setVideoRecordingDir(File outputDir) {
if (videoDetector != null)
videoDetector.setOutputDir(outputDir);
}


/** Audio Recording */ /** Audio Recording */
public void startAudioRecording() { public void startAudioRecording() {
return audioRecorder.isRecording(); return audioRecorder.isRecording();
return false; return false;
} }
public void setAudioRecordingDir(File outputDir) {
if (audioRecorder != null)
audioRecorder.setOutputDir(outputDir);
}






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

Loading…
Cancel
Save