Files
cuframes-composer/docker/templates.json
T
gx 9d2a0b2bd7 Phase 11b: fill свободных camera-cells остальными drawable камерами
User: "смущает чёрная ячейка в сетке". Причина: asymmetric templates
имели widget cells (placeholder тёмно-серый Y=40) + при недостатке active
camera cells оставались BlankCell (чёрный).

Два изменения:

1. templates.json — оставили только 16:9 layouts (tpl_1/tpl_4/tpl_9/tpl_16).
   Все camera-cells, никаких widget-областей. Cells full 16:9 (cs==rs
   микроячейки), полностью покрывают output 1920×1080 без чёрных полос.
   Asymmetric layouts (main + satellites) удалены — вернуть в Phase 12
   когда widget'ы будут реальными (HA-chat, temperature graph).

2. composer::maybe_relayout — заполнить свободные camera-cells остальными
   drawable камерами из pool (по priority), если template имеет больше
   cells чем motion-active. Условие: cap > active.size().

Производство при 4 источниках в pool:
  - 1 motion → tpl_1 (1 cell full screen)
  - 2 motion → tpl_4 (2 motion + 2 not-active drawable = 4 cells заняты)
  - 4 motion → tpl_4 (все 4 motion)
  - При добавлении новых камер (до 16) — tpl_9 при 5..9, tpl_16 при 10..16

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 09:15:20 +01:00

64 lines
3.7 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"version": 1,
"grid_cols": 8,
"grid_rows": 8,
"_doc": "Phase 11b — только пропорциональные 16:9 layouts (cs == rs микроячеек). Полностью заполняют output 1920×1080 без widget-областей. При недостатке active-камер по motion свободные camera-cells заполняются остальными drawable-камерами из pool (по priority). См. cfc::Composer::maybe_relayout().",
"templates": [
{
"name": "tpl_1",
"_desc": "1 камера во весь экран.",
"cells": [
{"col": 0, "row": 0, "cs": 8, "rs": 8, "role": "camera", "order": 0}
]
},
{
"name": "tpl_4",
"_desc": "Quad 2×2 — 4 камеры 960×540 (16:9). order=0 — top-left (главная).",
"cells": [
{"col": 0, "row": 0, "cs": 4, "rs": 4, "role": "camera", "order": 0},
{"col": 4, "row": 0, "cs": 4, "rs": 4, "role": "camera", "order": 1},
{"col": 0, "row": 4, "cs": 4, "rs": 4, "role": "camera", "order": 2},
{"col": 4, "row": 4, "cs": 4, "rs": 4, "role": "camera", "order": 3}
]
},
{
"name": "tpl_9",
"_desc": "3×3 grid — 9 камер... только cells 2×2 микроячейки по 6×6 области. ВНИМАНИЕ: 8×8 не делится на 3 без остатка; используем 6×6 камер + bottom/right остаток как background. Если потом будут asymmetric с widget'ами — выделим Phase 12.",
"cells": [
{"col": 0, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 0},
{"col": 2, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 1},
{"col": 4, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 2},
{"col": 0, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 3},
{"col": 2, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 4},
{"col": 4, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 5},
{"col": 0, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 6},
{"col": 2, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 7},
{"col": 4, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 8}
]
},
{
"name": "tpl_16",
"_desc": "4×4 grid — 16 камер по 480×270 (16:9). Полностью покрывает 8×8 без остатка.",
"cells": [
{"col": 0, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 0},
{"col": 2, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 1},
{"col": 4, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 2},
{"col": 6, "row": 0, "cs": 2, "rs": 2, "role": "camera", "order": 3},
{"col": 0, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 4},
{"col": 2, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 5},
{"col": 4, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 6},
{"col": 6, "row": 2, "cs": 2, "rs": 2, "role": "camera", "order": 7},
{"col": 0, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 8},
{"col": 2, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 9},
{"col": 4, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 10},
{"col": 6, "row": 4, "cs": 2, "rs": 2, "role": "camera", "order": 11},
{"col": 0, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 12},
{"col": 2, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 13},
{"col": 4, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 14},
{"col": 6, "row": 6, "cs": 2, "rs": 2, "role": "camera", "order": 15}
]
}
]
}