Grab always returns success on stream sender

Python - While loop grab always returns success, even when I unplug camera. How do I make grab return something other than success when sending stream?

Hello,

Can you show us your code, so that we can see were the problem is ?

Antoine

Even the example returns success, Stereolabs has confirmed the bug, but no timeline to fix this. So I am not going to use streaming as I need a robust solution.

import sys
import pyzed.sl as sl

def main():

init = sl.InitParameters()
init.camera_resolution = sl.RESOLUTION.HD720
init.depth_mode = sl.DEPTH_MODE.NONE
cam = sl.Camera()
status = cam.open(init)
if status != sl.ERROR_CODE.SUCCESS:
    print(repr(status))
    exit(1)

runtime = sl.RuntimeParameters()

stream = sl.StreamingParameters()
stream.codec = sl.STREAMING_CODEC.H264
stream.bitrate = 4000
status = cam.enable_streaming(stream)
if status != sl.ERROR_CODE.SUCCESS:
    print(repr(status))
    exit(1)

print("  Quit : CTRL+C\n")
while True:
    err = cam.grab(runtime)

cam.disable_streaming()
cam.close()

Hello,

This bug occurs in 3.8.0 / 3.8.1 and will be fixed in 3.8.2. The return code also return always SUCCESS without the streaming feature. 3.8.2 will be out soon.

In the meantime you can use 3.7.7.

Sorry for the inconvenience,
Antoine