feat: implement camera management with GPhotoCamera and CameraManager classes
This commit is contained in:
22
core/camera/base_camera.py
Normal file
22
core/camera/base_camera.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from PySide6.QtCore import Signal
|
||||
|
||||
|
||||
class BaseCamera(ABC):
|
||||
def __init__(self) -> None:
|
||||
self.error_msg = None
|
||||
|
||||
@abstractmethod
|
||||
def connect(self) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def disconnect(self) -> None:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def get_frame(self):
|
||||
raise NotImplementedError
|
||||
|
||||
def get_error_msg(self):
|
||||
return str(self.error_msg)
|
||||
Reference in New Issue
Block a user