16 stream.register_managed_flow_set_pool(100)
17 print(
"Buffers allocated: {}".format(stream.flow_set_count))
18 stream.deregister_flow_set_pool()
19 stream.register_managed_flow_set_pool(200)
20 print(
"Buffers allocated: {}".format(stream.flow_set_count))
23 image, status, node_maps = stream.wait()
25 print(
"Acquired image: {}".format(i))
Union[cvb.GenICamDevice, cvb.VinDevice, cvb.EmuDevice, cvb.VideoDevice, cvb.NonStreamingDevice] open(str provider, int acquisition_stack=cvb.AcquisitionStack.PreferVin)
Opens a device with the given provider and acquisition stack.
Definition: __init__.py:1629
List[cvb.DiscoveryInformation] discover_from_root(int flags=cvb.DiscoverFlags.FindAll, int time_span=300)
Discovers available devices / nodes depending on the given flags.
Definition: __init__.py:1609
The image stream class.
Definition: __init__.py:2521
17 stream = device.stream()
18 stream.ring_buffer.change_count(5, cvb.DeviceUpdateMode.UpdateDeviceImage)
19 stream.ring_buffer.lock_mode = cvb.RingBufferLockMode.On
20 print(
"Buffers allocated: {0} | Lock mode: {1}".format(stream.ring_buffer.count, stream.ring_buffer.lock_mode))
24 image, status = stream.wait_for(5000)
25 if status == cvb.WaitStatus.Ok:
27 print(
"Image list size: {}".format(len(images)))
28 elif (status == cvb.WaitStatus.Timeout
and len(images) > 0):
31 print(
"Image unlocked")