src/foggycam.py
def capture_images(self, config=None):
        """Starts the multi-threaded image capture process."""

        print ('INFO: Capturing images...')

        self.is_capturing = True

        if not os.path.exists('capture'):
            os.makedirs('capture')

        self.nest_camera_buffer_threshold = config.threshold

        for camera in self.nest_camera_array:
            camera_path = ''
            video_path = ''

            # Determine whether the entries should be copied to a custom path
            # or not.
            if not config.path:
                camera_path = os.path.join(self.local_path, 'capture', camera, 'images')
                video_path = os.path.join(self.local_path, 'capture', camera, 'video')
            else:
                camera_path = os.path.join(config.path, 'capture', camera, 'images')
                video_path = os.path.join(config.path, 'capture', camera, 'video')

            # Provision the necessary folders for images and videos.
            if not os.path.exists(camera_path):
                os.makedirs(camera_path)

            if not os.path.exists(video_path):
                os.makedirs(video_path)

            image_thread = threading.Thread(target=self.perform_capture, args=(config, camera, camera_path, video_path))
            image_thread.daemon = True
            image_thread.start()

        while True:
            time.sleep(1)
Starts the multi-threaded image capture process.
Starts the multi-threaded image capture process.
Starts the multi - threaded image capture process .
def capture_images(self, config=None):
        print ('INFO: Capturing images...')
        self.is_capturing = True
        if not os.path.exists('capture'):
            os.makedirs('capture')
        self.nest_camera_buffer_threshold = config.threshold
        for camera in self.nest_camera_array:
            camera_path = ''
            video_path = ''
            if not config.path:
                camera_path = os.path.join(self.local_path, 'capture', camera, 'images')
                video_path = os.path.join(self.local_path, 'capture', camera, 'video')
            else:
                camera_path = os.path.join(config.path, 'capture', camera, 'images')
                video_path = os.path.join(config.path, 'capture', camera, 'video')
            if not os.path.exists(camera_path):
                os.makedirs(camera_path)
            if not os.path.exists(video_path):
                os.makedirs(video_path)
            image_thread = threading.Thread(target=self.perform_capture, args=(config, camera, camera_path, video_path))
            image_thread.daemon = True
            image_thread.start()
        while True:
            time.sleep(1)
def capture_images ( self , config = None ) : print ( 'INFO: Capturing images...' ) self . is_capturing = True if not os . path . exists ( 'capture' ) : os . makedirs ( 'capture' ) self . nest_camera_buffer_threshold = config . threshold for camera in self . nest_camera_array : camera_path = '' video_path = '' if not config . path : camera_path = os . path . join ( self . local_path , 'capture' , camera , 'images' ) video_path = os . path . join ( self . local_path , 'capture' , camera , 'video' ) else : camera_path = os . path . join ( config . path , 'capture' , camera , 'images' ) video_path = os . path . join ( config . path , 'capture' , camera , 'video' ) if not os . path . exists ( camera_path ) : os . makedirs ( camera_path ) if not os . path . exists ( video_path ) : os . makedirs ( video_path ) image_thread = threading . Thread ( target = self . perform_capture , args = ( config , camera , camera_path , video_path ) ) image_thread . daemon = True image_thread . start ( ) while True : time . sleep ( 1 )
Starts the multi-threaded image capture process.
Starts the multi - threaded image capture process .
"""Starts the multi-threaded image capture process.""" # Determine whether the entries should be copied to a custom path # or not. # Provision the necessary folders for images and videos.
self
config