|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Video Detection */ |
|
|
|
|
|
public void startVideoDetection() { |
|
|
|
|
|
if(videoDetector != null) |
|
|
|
|
|
videoDetector.startDetection(); |
|
|
|
|
|
} |
|
|
|
|
|
public void stopVideoDetection() { |
|
|
|
|
|
if(videoDetector != null) |
|
|
|
|
|
videoDetector.stopDetection(); |
|
|
|
|
|
} |
|
|
|
|
|
public boolean isVideoDetectionRunning() { |
|
|
|
|
|
if(videoDetector != null) |
|
|
|
|
|
return videoDetector.isDetecting(); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
public void debugVideoProcessing(ImageView input, ImageView output) { |
|
|
|
|
|
if(videoDetector != null) |
|
|
|
|
|
videoDetector.debugProcessing(input, output); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** Audio Detection */ |
|
|
|
|
|
public void startAudioDetection() { |
|
|
|
|
|
if(audioDetector != null) |
|
|
|
|
|
audioDetector.startDetection(); |
|
|
|
|
|
} |
|
|
|
|
|
public void stopAudioDetection() { |
|
|
|
|
|
if(audioDetector != null) |
|
|
|
|
|
audioDetector.stopDetection(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** Motion Detection */ |
|
|
|
|
|
public void startMotionDetection() { |
|
|
|
|
|
if(motionDetector != null) |
|
|
|
|
|
motionDetector.startDetection(); |
|
|
|
|
|
} |
|
|
|
|
|
public void stopMotionDetection() { |
|
|
|
|
|
if(motionDetector != null) |
|
|
|
|
|
motionDetector.stopDetection(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** Video Recording */ |
|
|
|
|
|
public void startVideoRecording() { |
|
|
|
|
|
if(videoDetector != null) |
|
|
|
|
|
videoDetector.startRecording(); |
|
|
|
|
|
} |
|
|
|
|
|
public void stopVideoRecording() { |
|
|
|
|
|
if(videoDetector != null) |
|
|
|
|
|
videoDetector.stopRecording(); |
|
|
|
|
|
} |
|
|
|
|
|
public boolean isVideoRecordingRunning() { |
|
|
|
|
|
if(videoDetector != null) |
|
|
|
|
|
return videoDetector.isRecording(); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
public void setVideoRecordingDir(File outputDir) { |
|
|
|
|
|
if (videoDetector != null) |
|
|
|
|
|
videoDetector.setOutputDir(outputDir); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** Audio Recording */ |
|
|
|
|
|
public void startAudioRecording() { |
|
|
|
|
|
if(audioRecorder != null) |
|
|
|
|
|
audioRecorder.startRecording(); |
|
|
|
|
|
} |
|
|
|
|
|
public void stopAudioRecording() { |
|
|
|
|
|
if(audioRecorder != null) |
|
|
|
|
|
audioRecorder.stopRecording(); |
|
|
|
|
|
} |
|
|
|
|
|
public boolean isAudioRecordingRunning() { |
|
|
|
|
|
if(videoDetector != null) |
|
|
|
|
|
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 */ |
|
|
/** Pass Detection Report to Service Detection Listener and trigger it */ |
|
|
public void passToServiceListener(DetectionReport detectionReport) { |
|
|
public void passToServiceListener(DetectionReport detectionReport) { |
|
|
if (listener != null) { |
|
|
if (listener != null) { |