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.
wait_for_preview(self, timeout: int) -> bool
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.
Returns
bool
Outputs 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.
bool waitForPreview(int timeout)
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.
Returns
bool
Outputs 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.
public bool WaitForPreview(int timeout)
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.
Returns
bool
Outputs 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.
public boolean waitForPreview(int timeout) throws DevicesException
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.
Returns
boolean
Outputs 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.
int id3DevicesVideoFile_WaitForPreview (
ID3_DEVICES_VIDEO_FILE hVideoFile,
int timeout,
bool * available)
Parameters
hVideoFile
ID3_DEVICES_VIDEO_FILEin Handle to the VideoFile object.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.available
bool *out Outputs a boolean value indicating whether a new frame is available after the wait period. true if a new frame is available, false otherwise.
Returns