predict: new detection pipeline around 50% faster!

This commit is contained in:
Koushik Dutta
2023-03-13 10:17:38 -07:00
parent 98096845dc
commit d5157fb868
4 changed files with 5 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ class Callback:
self.callback = callback
def createPipelineIterator(pipeline: str):
pipeline = '{pipeline} ! appsink name=appsink emit-signals=true sync=false'.format(pipeline=pipeline)
pipeline = '{pipeline} ! queue leaky=downstream max-size-buffers=0 ! appsink name=appsink emit-signals=true sync=false max-buffers=-1 drop=true'.format(pipeline=pipeline)
print(pipeline)
gst = Gst.parse_launch(pipeline)
bus = gst.get_bus()

View File

@@ -115,7 +115,7 @@ class PythonCodecs(scrypted_sdk.ScryptedDeviceBase, scrypted_sdk.VideoFrameGener
if videoCodec == 'h264':
videosrc += ' ! rtph264depay ! h264parse'
videosrc += ' ! decodebin ! videoconvert ! video/x-raw,format=RGB'
videosrc += ' ! decodebin ! queue leaky=downstream max-size-buffers=0 ! videoconvert ! video/x-raw,format=RGB'
try:
gst, gen = createPipelineIterator(videosrc)