mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-07 03:11:15 +03:00
Disabled camera output (#16920)
* Fix live cameras not showing on refresh * Fix live dashboard when birdseye is added * Handle cameras that are offline / disabled * Use black instead of green frame * Fix missing mqtt topics
This commit is contained in:
@@ -632,6 +632,22 @@ def copy_yuv_to_position(
|
||||
)
|
||||
|
||||
|
||||
def get_blank_yuv_frame(width: int, height: int) -> np.ndarray:
|
||||
"""Creates a black YUV 4:2:0 frame."""
|
||||
yuv_height = height * 3 // 2
|
||||
yuv_frame = np.zeros((yuv_height, width), dtype=np.uint8)
|
||||
|
||||
uv_height = height // 2
|
||||
|
||||
# The U and V planes are stored after the Y plane.
|
||||
u_start = height # U plane starts right after Y plane
|
||||
v_start = u_start + uv_height // 2 # V plane starts after U plane
|
||||
yuv_frame[u_start : u_start + uv_height, :width] = 128
|
||||
yuv_frame[v_start : v_start + uv_height, :width] = 128
|
||||
|
||||
return yuv_frame
|
||||
|
||||
|
||||
def yuv_region_2_yuv(frame, region):
|
||||
try:
|
||||
# TODO: does this copy the numpy array?
|
||||
|
||||
Reference in New Issue
Block a user