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: Read and return the required number of frames for 1 clip.
  Returns:
      was_read (bool): False if not enough frames to return.
      task (TaskInfo object): object contains metadata for the current clips.
docstr_tok: ["Read","and","return","the","required","number","of","frames","for","1","clip",".","Returns",":","was_read","(","bool",")",":","False","if","not","enough","frames","to","return",".","task","(","TaskInfo","object",")",":","object","contains","metadata","for","the","current","clips","."]
code: def __next__(self):
      """
      Read and return the required number of frames for 1 clip.
      Returns:
          was_read (bool): False if not enough frames to return.
          task (TaskInfo object): object contains metadata for the current clips.
      """
      self.id += 1
      task = TaskInfo()
  
      task.img_height = self.display_height
      task.img_width = self.display_width
      task.crop_size = self.test_crop_size
      task.clip_vis_size = self.clip_vis_size
  
      frames = []
      if len(self.buffer) != 0:
          frames = self.buffer
      was_read = True
      while was_read and len(frames) < self.seq_length:
          was_read, frame = self.cap.read()
          frames.append(frame)
      if was_read and self.buffer_size != 0:
          self.buffer = frames[-self.buffer_size :]
  
      task.add_frames(self.id, frames)
      task.num_buffer_frames = 0 if self.id == 0 else self.buffer_size
  
      return was_read, task
  
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 3 for calling the VideoManager obj's underlying member method code with example usage: obj.__next__() and returns: was_read,  task