Added start_worker and get_frame for compatibility
This commit is contained in:
parent
249e3014cb
commit
bc9b80d11a
1 changed files with 14 additions and 0 deletions
|
|
@ -170,6 +170,20 @@ class BaseCamera(metaclass=ABCMeta):
|
|||
thumbnail: Dimensions and quality (x, y, quality) of a thumbnail to generate, if supported
|
||||
"""
|
||||
|
||||
def start_worker(self, **_) -> bool:
|
||||
"""Start the background camera thread if it isn't running yet."""
|
||||
logging.debug(
|
||||
"`start_worker` method has been deprecated and is no longer required. Please avoid calling this method."
|
||||
)
|
||||
return True
|
||||
|
||||
def get_frame(self):
|
||||
"""Return the current camera frame."""
|
||||
logging.debug(
|
||||
"`camera.get_frame` method has been deprecated. Please use `camera.stream.getframe()."
|
||||
)
|
||||
return self.stream.getframe()
|
||||
|
||||
def __enter__(self):
|
||||
"""Create camera on context enter."""
|
||||
return self
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue