mirror of
https://github.com/koush/scrypted.git
synced 2026-05-25 14:10:30 +01:00
videoanalysis: add pipeline hang logging
This commit is contained in:
4
plugins/objectdetector/package-lock.json
generated
4
plugins/objectdetector/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/objectdetector",
|
||||
"version": "0.0.152",
|
||||
"version": "0.0.153",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/objectdetector",
|
||||
"version": "0.0.152",
|
||||
"version": "0.0.153",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@scrypted/common": "file:../../common",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/objectdetector",
|
||||
"version": "0.0.152",
|
||||
"version": "0.0.153",
|
||||
"description": "Scrypted Video Analysis Plugin. Installed alongside a detection service like OpenCV or TensorFlow.",
|
||||
"author": "Scrypted",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -279,7 +279,7 @@ class ObjectDetectionMixin extends SettingsMixinDeviceBase<VideoCamera & Camera
|
||||
}
|
||||
}
|
||||
|
||||
getCurrrentFrameGenerator(snapshotPipeline: boolean) {
|
||||
getCurrentFrameGenerator(snapshotPipeline: boolean) {
|
||||
let frameGenerator: string = this.frameGenerator;
|
||||
if (!this.hasMotionType && snapshotPipeline) {
|
||||
frameGenerator = 'Snapshot';
|
||||
@@ -356,18 +356,24 @@ class ObjectDetectionMixin extends SettingsMixinDeviceBase<VideoCamera & Camera
|
||||
// ask rebroadcast to mute audio, not needed.
|
||||
audio: null,
|
||||
});
|
||||
updatePipelineStatus('generateVideoFrames');
|
||||
|
||||
return await videoFrameGenerator.generateVideoFrames(stream, {
|
||||
queue: 0,
|
||||
fps: this.hasMotionType ? 4 : undefined,
|
||||
// this seems to be unused now?
|
||||
resize: this.model?.inputSize ? {
|
||||
width: this.model.inputSize[0],
|
||||
height: this.model.inputSize[1],
|
||||
} : undefined,
|
||||
// this seems to be unused now?
|
||||
format: this.model?.inputFormat,
|
||||
});
|
||||
try {
|
||||
return await videoFrameGenerator.generateVideoFrames(stream, {
|
||||
queue: 0,
|
||||
fps: this.hasMotionType ? 4 : undefined,
|
||||
// this seems to be unused now?
|
||||
resize: this.model?.inputSize ? {
|
||||
width: this.model.inputSize[0],
|
||||
height: this.model.inputSize[1],
|
||||
} : undefined,
|
||||
// this seems to be unused now?
|
||||
format: this.model?.inputFormat,
|
||||
});
|
||||
}
|
||||
finally {
|
||||
updatePipelineStatus('waiting first result');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,7 +425,7 @@ class ObjectDetectionMixin extends SettingsMixinDeviceBase<VideoCamera & Camera
|
||||
|
||||
let longObjectDetectionWarning = false;
|
||||
|
||||
const frameGenerator = this.getCurrrentFrameGenerator(options.snapshotPipeline);
|
||||
const frameGenerator = this.getCurrentFrameGenerator(options.snapshotPipeline);
|
||||
for await (const detected of
|
||||
await sdk.connectRPCObject(
|
||||
await this.objectDetection.generateObjectDetections(
|
||||
|
||||
Reference in New Issue
Block a user