Publish and subscribe over wss://livekit.uni-wh.de:7800 and refuse cleartext ws://. Conference room is uwh-telhai. Includes the uncommitted encoded H.264 publish path, Rally hairpin, and KMS wall overlay.
48 lines
1.6 KiB
Python
48 lines
1.6 KiB
Python
"""DRM connector discovery for the 3-display LiveKit wall."""
|
|
from drm_outputs import list_outputs, select_outputs
|
|
|
|
|
|
def test_lists_arc_hdmi():
|
|
outs = list_outputs()
|
|
assert outs, "expected at least one DRM connector"
|
|
names = {o.name for o in outs}
|
|
assert "HDMI-A-7" in names
|
|
hdmi7 = next(o for o in outs if o.name == "HDMI-A-7")
|
|
assert hdmi7.connector_id > 0
|
|
assert hdmi7.driver in ("xe", "i915")
|
|
assert hdmi7.node.startswith("/dev/dri/card")
|
|
|
|
|
|
def test_select_three_prefers_xe_hdmi():
|
|
three = select_outputs(n=3)
|
|
assert len(three) == 3
|
|
assert three[0].name == "HDMI-A-7" or three[0].connected
|
|
ids = [o.connector_id for o in three]
|
|
assert len(set(ids)) == 3
|
|
|
|
|
|
def test_named_disconnected_falls_back_to_connected_xe():
|
|
from drm_outputs import DrmOutput, pick_outputs
|
|
|
|
wall = DrmOutput(
|
|
name="HDMI-A-7", sysfs="card0-HDMI-A-7", node="/dev/dri/card0",
|
|
driver="xe", connector_id=538, status="connected", width=3840, height=2160,
|
|
)
|
|
stale_grid = DrmOutput(
|
|
name="HDMI-A-3", sysfs="card1-HDMI-A-3", node="/dev/dri/card1",
|
|
driver="i915", connector_id=530, status="disconnected",
|
|
)
|
|
stale_spk = DrmOutput(
|
|
name="HDMI-A-5", sysfs="card0-HDMI-A-5", node="/dev/dri/card0",
|
|
driver="xe", connector_id=520, status="disconnected",
|
|
)
|
|
picked = pick_outputs(
|
|
[stale_grid, stale_spk, wall],
|
|
n=2,
|
|
names=["HDMI-A-3", "HDMI-A-5"],
|
|
)
|
|
assert len(picked) == 1
|
|
assert picked[0].name == "HDMI-A-7"
|
|
assert picked[0].connected
|
|
assert picked[0].driver == "xe"
|