VideoFile.waitForPreview Method¶
Module: VideoFile
Definition¶
Blocks until a new frame is available or a timeout occurs.
This function is useful for synchronizing with the preview process.
bool waitForPreview(int timeout, bool doEvent)
Parameters
timeout intin The maximum time (in milliseconds) to wait for a new frame to become available. A value of 0 can be used to wait indefinitely.
doEvent boolin Call doEvent() in the wait loop.
Returns
boolOutputs a boolean value indicating whether a new frame is available after the wait period. true if a new frame is available, false otherwise.
Exceptions
An error has occurred during Devices Library execution.