Last active
May 31, 2023 09:23
-
-
Save DennySORA/97a6c2bd04e3088d79fc1c4dc701846e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abc import ABC, abstractmethod | |
class IVodeoEngine(ABC): | |
@abstractmethod | |
def split_video(self, video_path: str, destination_folder: str): | |
pass | |
@abstractmethod | |
def check_video_image(self, destination_folder: str): | |
pass | |
@abstractmethod | |
def merge_videos(self, images_path: str, destination_folder: str): | |
pass | |
class VideoEngine1(object): | |
def split_video(self, video_path: str, destination_folder: str): | |
pass | |
def check_video_image(self, destination_folder: str): | |
pass | |
def merge_videos(self, images_path: str, destination_folder: str): | |
pass | |
class VideoEngine2(object): | |
def split_video(self, video_path: str, destination_folder: str): | |
pass | |
def check_video_image(self, destination_folder: str): | |
pass | |
def merge_videos(self, images_path: str, destination_folder: str): | |
pass | |
class DeepLearning: | |
def __init__(self, video_engine: IVodeoEngine): | |
self.video_engine = video_engine | |
def do_some_thing(self, image_path: str): | |
image_status = self.video_engine.check_video_image("destination_folder") | |
def process(self): | |
image_path = self.video_engine.split_video("video_path", "destination_folder") | |
self.do_some_thing(image_path) | |
data = self.video_engine.merge_videos("images_path", "destination_folder") | |
return data | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment