Updated docstrings and todo

This commit is contained in:
Joel Collins 2019-01-08 15:59:47 +00:00
parent 9f259b7f3e
commit 4c5728b182
3 changed files with 21 additions and 4 deletions

View file

@ -234,7 +234,15 @@ class BaseCamera(object):
fmt: str='jpeg', fmt: str='jpeg',
shunt_others: bool=True): shunt_others: bool=True):
"""Add a new capture to the image list, and shunt all others.""" """
Create a new image capture object. Adds to the image list, and shunt all others.
Args:
write_to_file (bool): Should the StreamObject write to a file, or an in-memory byte stream.
keep_on_disk (bool): Should the data be kept on disk after session ends. Creating the capture with a content manager sets this to false.
filename (str): Name of the stored file. Defaults to timestamp.
fmt (str): Format of the capture.
"""
if not filename: if not filename:
filename = self.generate_basename(self.images) filename = self.generate_basename(self.images)
@ -258,10 +266,17 @@ class BaseCamera(object):
keep_on_disk: bool=True, keep_on_disk: bool=True,
filename: str=None, filename: str=None,
fmt: str='h264', fmt: str='h264',
quality: int=15,
shunt_others: bool=True): shunt_others: bool=True):
"""Add a new capture to the video list, and shunt all others.""" """
Create a new video capture object. Adds to the image list, and shunt all others.
Args:
write_to_file (bool): Should the StreamObject write to a file, or an in-memory byte stream.
keep_on_disk (bool): Should the data be kept on disk after session ends. Creating the capture with a content manager sets this to false.
filename (str): Name of the stored file. Defaults to timestamp.
fmt (str): Format of the capture.
"""
if not filename: if not filename:
filename = self.generate_basename(self.videos) filename = self.generate_basename(self.videos)

View file

@ -26,7 +26,7 @@ class CaptureObject(object):
folder: str='', folder: str='',
fmt: str='') -> None: fmt: str='') -> None:
"""Create a new StreamObject, to manage capture data.""" """Create a new StreamObject, to manage capture data."""
# Store a nice ID # Store a nice ID
self.id = uuid.uuid4().hex self.id = uuid.uuid4().hex
logging.info("Created StreamObject {}".format(self.id)) logging.info("Created StreamObject {}".format(self.id))

View file

@ -418,6 +418,8 @@ class StreamingCamera(BaseCamera):
logging.info("Capturing to {}".format(output)) logging.info("Capturing to {}".format(output))
# TODO: Do we really always want bayer data for full captures?
if not use_video_port: if not use_video_port:
# Pause video splitter port 1 # Pause video splitter port 1