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 int
in 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 int
in 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 int
in 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 int
in 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

in Handle to the VideoFile object.

timeout int
in 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

int
An error code.
See id3DevicesError file for the list of possible error codes.