Skip to content
Snippets Groups Projects
Commit abef581b authored by Mathieu Beligon's avatar Mathieu Beligon
Browse files

[common] (frame generators) add ABC

parent d540f9f2
No related branches found
No related tags found
No related merge requests found
from abc import ABC, abstractmethod
from typing import Generator
from polystar.common.models.image import Image
class FrameGeneratorABC(ABC):
@abstractmethod
def generate(self) -> Generator[Image]:
pass
......@@ -3,8 +3,10 @@ from pathlib import Path
import cv2
import ffmpeg
from polystar.common.frame_generators.frames_generator_abc import FrameGeneratorABC
class VideoFrameGenerator:
class VideoFrameGenerator(FrameGeneratorABC):
def __init__(self, video_path: Path, desired_fps: int):
self.video_path: Path = video_path
self.desired_fps: int = desired_fps
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment