docstr: Get next frame. For a file, this will be the next frame, whereas for a camera
  source, it will be the next available frame.
docstr_tok: ["Get","next","frame",".","For","a","file",",","this","will","be","the","next","frame",",","whereas","for","a","camera","source",",","it","will","be","the","next","available","frame","."]
code: def get_frame(self) -> Any:
      """Get next frame. For a file, this will be the next frame, whereas for a camera
      source, it will be the next available frame."""
      ret, frame = self._get_cap().read()
      if not ret:
          raise RuntimeError("Failed to read frame.")
      # Switch color order if desired
      if self.color_order == ColorOrder.RGB:
          frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
      # move channel dim
      frame = np.moveaxis(frame, -1, self.channel_dim)
      return (
          self.transform(frame) if self.transform is not None else frame
      )
  
imports: from __future__ import annotations
  import os
  import sys
  import tempfile
  from collections.abc import Callable
  from typing import TYPE_CHECKING, Any
  import numpy
  from torch.utils.data import Dataset, IterableDataset
  from monai.utils.enums import ColorOrder
  from monai.utils.module import optional_import
label_desc: Use image node_id 5 for calling the VideoDataset obj's underlying member method code with example usage: obj.get_frame() and returns: unknown