class_docstr: VideoManager object for getting frames from video source for inference.
class_docstr_tok: ["VideoManager","object","for","getting","frames","from","video","source","for","inference","."]
docstr: Either display a single frame (BGR image) to a window or write to
  an output file if output path is provided.
  Args:
      task (TaskInfo object): task object that contain
          the necessary information for prediction visualization. (e.g. visualized frames.)
docstr_tok: ["Either","display","a","single","frame","(","BGR","image",")","to","a","window","or","write","to","an","output","file","if","output","path","is","provided",".","Args",":","task","(","TaskInfo","object",")",":","task","object","that","contain","the","necessary","information","for","prediction","visualization",".","(","e.g",".","visualized","frames",".",")"]
code: def display(self, task):
      """
      Either display a single frame (BGR image) to a window or write to
      an output file if output path is provided.
      Args:
          task (TaskInfo object): task object that contain
              the necessary information for prediction visualization. (e.g. visualized frames.)
      """
      for frame in task.frames[task.num_buffer_frames :]:
          if self.output_file is None:
              cv2.imshow("SlowFast", frame)
              time.sleep(1 / self.output_fps)
          else:
              self.output_file.write(frame)
  
imports: import atexit
  import copy
  import queue
  import threading
  import time
  import cv2
  import slowfast.utils.logging
  from slowfast.visualization.utils import TaskInfo
label_desc: Use image node_id 5 for calling the VideoManager obj's underlying member method code with example usage: obj.display(task) without return types