diff --git a/setup.py b/setup.py index fa1fd38..1f2c2e8 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='webcam', - version='1.15', + version='1.16', author='Eric-Canas', author_email='eric@ericcanas.com', url='https://github.com/Eric-Canas/webcam', diff --git a/webcam/_video_webcam.py b/webcam/_video_webcam.py index 3c6c2e5..71e1309 100644 --- a/webcam/_video_webcam.py +++ b/webcam/_video_webcam.py @@ -42,6 +42,7 @@ def read(self): current_frame = int((time.time() - self.start_timestamp) * self.fps) % self.video_length return self.get_required_frame(target_frame=current_frame) else: + # TODO: Adjust the frame rate if max_fps is set return self.cap.read() def get_required_frame(self, target_frame: int) -> tuple[bool, None | np.ndarray]: diff --git a/webcam/webcam.py b/webcam/webcam.py index d796c07..06a381e 100644 --- a/webcam/webcam.py +++ b/webcam/webcam.py @@ -40,9 +40,8 @@ def __init__( on_aspect_ratio_lost: str = CROP, homography_matrix: np.ndarray | list[list[float], ...] | None = None, crop_on_warping: bool = True, - boundaries_color: tuple[int, int, int] | list[int, int, int] = (0, 0, 0) - simulate_webcam: bool = True - ): + boundaries_color: tuple[int, int, int] | list[int, int, int] = (0, 0, 0), + simulate_webcam: bool = True): """ Initialize the WebcamReader.