mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-09-28 10:28:58 +03:00
Debug replay (#22212)
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
* debug replay implementation * fix masks after dev rebase * fix squash merge issues * fix * fix * fix * no need to write debug replay camera to config * camera and filter button and dropdown * add filters * add ability to edit motion and object config for debug replay * add debug draw overlay to debug replay * add guard to prevent crash when camera is no longer in camera_states * fix overflow due to radix absolutely positioned elements * increase number of messages * ensure deep_merge replaces existing list values when override is true * add back button * add debug replay to explore and review menus * clean up * clean up * update instructions to prevent exposing exception info * fix typing * refactor output logic * refactor with helper function * move init to function for consistency
This commit is contained in:
@@ -26,7 +26,7 @@ type useCameraActivityReturn = {
|
||||
};
|
||||
|
||||
export function useCameraActivity(
|
||||
camera: CameraConfig,
|
||||
camera: CameraConfig | undefined,
|
||||
revalidateOnFocus: boolean = true,
|
||||
): useCameraActivityReturn {
|
||||
const { data: config } = useSWR<FrigateConfig>("config", {
|
||||
@@ -47,7 +47,7 @@ export function useCameraActivity(
|
||||
// init camera activity
|
||||
|
||||
const { payload: updatedCameraState } = useInitialCameraState(
|
||||
camera.name,
|
||||
camera?.name ?? "",
|
||||
revalidateOnFocus,
|
||||
);
|
||||
useEffect(() => {
|
||||
@@ -60,7 +60,7 @@ export function useCameraActivity(
|
||||
const memoizedAudioState = useDeepMemo(updatedAudioState);
|
||||
|
||||
useEffect(() => {
|
||||
if (memoizedAudioState) {
|
||||
if (memoizedAudioState && camera?.name) {
|
||||
setAudioDetections(memoizedAudioState[camera.name]);
|
||||
}
|
||||
}, [memoizedAudioState, camera]);
|
||||
@@ -72,8 +72,8 @@ export function useCameraActivity(
|
||||
[objects],
|
||||
);
|
||||
|
||||
const { payload: cameraEnabled } = useEnabledState(camera.name);
|
||||
const { payload: detectingMotion } = useMotionActivity(camera.name);
|
||||
const { payload: cameraEnabled } = useEnabledState(camera?.name ?? "");
|
||||
const { payload: detectingMotion } = useMotionActivity(camera?.name ?? "");
|
||||
const { payload: event } = useFrigateEvents();
|
||||
const updatedEvent = useDeepMemo(event);
|
||||
|
||||
@@ -91,7 +91,7 @@ export function useCameraActivity(
|
||||
return;
|
||||
}
|
||||
|
||||
if (updatedEvent.after.camera !== camera.name) {
|
||||
if (!camera?.name || updatedEvent.after.camera !== camera.name) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -158,6 +158,10 @@ export function useCameraActivity(
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!camera?.name) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (
|
||||
cameras[camera.name]?.camera_fps == 0 && stats["service"].uptime > 60
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user