Renamed mock.StreamingCamera to MockStreamer
This commit is contained in:
parent
4715726e9c
commit
a3a63a14e6
1 changed files with 7 additions and 7 deletions
|
|
@ -19,13 +19,13 @@ from .base import BaseCamera, CaptureObject
|
||||||
|
|
||||||
|
|
||||||
# MAIN CLASS
|
# MAIN CLASS
|
||||||
class StreamingCamera(BaseCamera):
|
class MockStreamer(BaseCamera):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# Run BaseCamera init
|
# Run BaseCamera init
|
||||||
BaseCamera.__init__(self)
|
BaseCamera.__init__(self)
|
||||||
|
|
||||||
# Store state of StreamingCamera
|
# Store state of PiCameraStreamer
|
||||||
self.state.update({
|
self.state.update({
|
||||||
'stream_active': False,
|
'stream_active': False,
|
||||||
'record_active': False
|
'record_active': False
|
||||||
|
|
@ -49,14 +49,14 @@ class StreamingCamera(BaseCamera):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
"""Close the Raspberry Pi StreamingCamera."""
|
"""Close the Raspberry Pi PiCameraStreamer."""
|
||||||
# Run BaseCamera close method
|
# Run BaseCamera close method
|
||||||
BaseCamera.close(self)
|
BaseCamera.close(self)
|
||||||
|
|
||||||
# HANDLE SETTINGS
|
# HANDLE SETTINGS
|
||||||
def read_config(self) -> dict:
|
def read_config(self) -> dict:
|
||||||
"""
|
"""
|
||||||
Return config dictionary of the StreamingCamera.
|
Return config dictionary of the PiCameraStreamer.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
conf_dict = {
|
conf_dict = {
|
||||||
|
|
@ -70,7 +70,7 @@ class StreamingCamera(BaseCamera):
|
||||||
|
|
||||||
def apply_config(self, config: dict):
|
def apply_config(self, config: dict):
|
||||||
"""
|
"""
|
||||||
Write a config dictionary to the StreamingCamera config.
|
Write a config dictionary to the PiCameraStreamer config.
|
||||||
|
|
||||||
The passed dictionary may contain other parameters not relevant to
|
The passed dictionary may contain other parameters not relevant to
|
||||||
camera config. Eg. Passing a general config file will work fine.
|
camera config. Eg. Passing a general config file will work fine.
|
||||||
|
|
@ -81,7 +81,7 @@ class StreamingCamera(BaseCamera):
|
||||||
# TODO: Include timing and batching logic when applying PiCamera settings
|
# TODO: Include timing and batching logic when applying PiCamera settings
|
||||||
|
|
||||||
paused_stream = False
|
paused_stream = False
|
||||||
logging.debug("StreamingCamera: Applying config:")
|
logging.debug("PiCameraStreamer: Applying config:")
|
||||||
logging.debug(config)
|
logging.debug(config)
|
||||||
|
|
||||||
with self.lock:
|
with self.lock:
|
||||||
|
|
@ -89,7 +89,7 @@ class StreamingCamera(BaseCamera):
|
||||||
# Apply valid config params to Picamera object
|
# Apply valid config params to Picamera object
|
||||||
if not self.state['record_active']: # If not recording a video
|
if not self.state['record_active']: # If not recording a video
|
||||||
|
|
||||||
# StreamingCamera parameters
|
# PiCameraStreamer parameters
|
||||||
for key, value in config.items(): # For each provided setting
|
for key, value in config.items(): # For each provided setting
|
||||||
if hasattr(self, key):
|
if hasattr(self, key):
|
||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue