use actual logger

This commit is contained in:
Blake Blackshear 2021-06-11 19:08:15 -05:00
parent 9c5b0d4138
commit cbd418b8de

View File

@ -1,5 +1,5 @@
import cv2
import datetime import datetime
import logging
import math import math
import multiprocessing as mp import multiprocessing as mp
import queue import queue
@ -9,6 +9,7 @@ import threading
from multiprocessing import shared_memory from multiprocessing import shared_memory
from wsgiref.simple_server import make_server from wsgiref.simple_server import make_server
import cv2
import numpy as np import numpy as np
from setproctitle import setproctitle from setproctitle import setproctitle
from ws4py.server.wsgirefserver import ( from ws4py.server.wsgirefserver import (
@ -20,7 +21,9 @@ from ws4py.server.wsgiutils import WebSocketWSGIApplication
from ws4py.websocket import WebSocket from ws4py.websocket import WebSocket
from frigate.config import FrigateConfig from frigate.config import FrigateConfig
from frigate.util import SharedMemoryFrameManager, get_yuv_crop, copy_yuv_to_position from frigate.util import SharedMemoryFrameManager, copy_yuv_to_position, get_yuv_crop
logger = logging.getLogger(__name__)
class FFMpegConverter: class FFMpegConverter:
@ -31,7 +34,6 @@ class FFMpegConverter:
self.process = sp.Popen( self.process = sp.Popen(
ffmpeg_cmd, ffmpeg_cmd,
stdout=sp.PIPE, stdout=sp.PIPE,
# TODO: logging
stderr=sp.DEVNULL, stderr=sp.DEVNULL,
stdin=sp.PIPE, stdin=sp.PIPE,
start_new_session=True, start_new_session=True,
@ -392,5 +394,4 @@ def output_frames(config: FrigateConfig, video_output_queue):
websocket_server.manager.join() websocket_server.manager.join()
websocket_server.shutdown() websocket_server.shutdown()
websocket_thread.join() websocket_thread.join()
# TODO: use actual logger logger.info("exiting output process...")
print("exiting output process...")