video_worker

Classes

VideoWorker(path)

Worker class for decoding video frames in a separate thread.

class VideoWorker(path: str)[source]

Bases: object

Worker class for decoding video frames in a separate thread.

Uses OpenCV to read frames and serves them as QImages for display. Maintains synchronization with real-time based on the video’s FPS.

finished = <MockSignal object>
run() None[source]

Main loop for reading and processing video frames.

get_latest_qimage() <MagicMock name='mock.QImage' id='140286155962256'> | None[source]

Returns the most appropriate video frame for the current time.

Calculates the target frame based on elapsed time since start.

Returns:

The current video frame.

Return type:

Optional[QImage]

stop() None[source]

Stops the video decoding loop.