Read and decode the next frame as a np.ndarray. Returns False when video ends. Arguments: decode: Return the frame image itself. If False, a boolean indicating if the stream was advanced to the next frame or not. This can improve performance by reducing
(self, decode: bool = True)
| 171 | |
| 172 | @abstractmethod |
| 173 | def read(self, decode: bool = True) -> np.ndarray | bool: |
| 174 | """Read and decode the next frame as a np.ndarray. Returns False when video ends. |
| 175 | |
| 176 | Arguments: |
| 177 | decode: Return the frame image itself. If False, a boolean indicating if the stream |
| 178 | was advanced to the next frame or not. This can improve performance by reducing |
| 179 | memory copying and colorspace conversions when a given frame's data is not required. |
| 180 | |
| 181 | Returns: |
| 182 | If decode = True, the decoded frame (np.ndarray), or False (bool) if end of video. |
| 183 | If decode = False, a bool indicating if advancing to the the next frame succeeded. |
| 184 | """ |
| 185 | ... |
| 186 | |
| 187 | @abstractmethod |
| 188 | def reset(self) -> None: |
no outgoing calls