mirror of
https://github.com/koush/scrypted.git
synced 2026-02-10 09:12:03 +00:00
tensorflow-lite: fix pipeline to not queue and lag on buffers
This commit is contained in:
4
plugins/tensorflow-lite/package-lock.json
generated
4
plugins/tensorflow-lite/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/tensorflow-lite",
|
||||
"version": "0.0.58",
|
||||
"version": "0.0.59",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/tensorflow-lite",
|
||||
"version": "0.0.58",
|
||||
"version": "0.0.59",
|
||||
"hasInstallScript": true,
|
||||
"devDependencies": {
|
||||
"@scrypted/sdk": "file:../../sdk"
|
||||
|
||||
@@ -44,5 +44,5 @@
|
||||
"devDependencies": {
|
||||
"@scrypted/sdk": "file:../../sdk"
|
||||
},
|
||||
"version": "0.0.58"
|
||||
"version": "0.0.59"
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ def create_pipeline_sink(
|
||||
appsink_size,
|
||||
pixel_format,
|
||||
crop=False):
|
||||
SINK_ELEMENT = 'appsink name={appsink_name} emit-signals=true max-buffers=0 drop=true sync=false'.format(
|
||||
SINK_ELEMENT = 'appsink name={appsink_name} emit-signals=true max-buffers=-1 drop=true sync=false'.format(
|
||||
appsink_name=appsink_name)
|
||||
|
||||
(width, height) = appsink_size
|
||||
@@ -249,11 +249,11 @@ def create_pipeline(
|
||||
sink = create_pipeline_sink(
|
||||
appsink_name, appsink_size, pixel_format, crop=crop)
|
||||
if crop:
|
||||
PIPELINE = """ {video_input} ! videoconvert name=videoconvert ! aspectratiocrop aspect-ratio=1/1 ! videoscale name=videoscale ! queue leaky=downstream max-size-buffers=0
|
||||
PIPELINE = """ {video_input} ! queue leaky=downstream max-size-buffers=0 ! videoconvert name=videoconvert ! aspectratiocrop aspect-ratio=1/1 ! videoscale name=videoscale
|
||||
! {sink}
|
||||
"""
|
||||
else:
|
||||
PIPELINE = """ {video_input} ! videoconvert name=videoconvert ! videoscale name=videoscale ! queue leaky=downstream max-size-buffers=0
|
||||
PIPELINE = """ {video_input} ! queue leaky=downstream max-size-buffers=0 ! videoconvert name=videoconvert ! videoscale name=videoscale
|
||||
! {sink}
|
||||
"""
|
||||
pipeline = PIPELINE.format(video_input=video_input, sink=sink)
|
||||
|
||||
Reference in New Issue
Block a user