diplomat.wx_gui.video_player.video_loader

diplomat.wx_gui.video_player.video_loader(video_hdl: VideoCapture, future_frame_queue: ControlDeque, past_frame_queue: ControlDeque, time_loc: Connection)[source]

The core video loading function. Loads the video on a separate thread in the background for smooth performance.

Parameters:
  • video_hdl – The cv2 VideoCapture object to read frames from.

  • future_frame_queue – The ControlDeque to append frames to for the future.

  • past_frame_queue – The ControlDeque to append frames to for the past.

  • time_loc – A multiprocessing Connection object, used to control this video loader. Sending a -1 through the pipe pauses the loader, sending a positive integer sets the offset of this video loader to the passed integer in milliseconds, and sending None closes this video loader and its associated thread.