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.
31 lines
714 B
Python
31 lines
714 B
Python
import os
|
|
import stat
|
|
|
|
from h264_fifo import hold_fifo
|
|
|
|
|
|
def test_hold_fifo_creates_rdwr_pipe(tmp_path):
|
|
path = str(tmp_path / "cam-01.h264")
|
|
fd = hold_fifo(path)
|
|
try:
|
|
st = os.stat(path)
|
|
assert stat.S_ISFIFO(st.st_mode)
|
|
os.write(fd, b"\x00\x01")
|
|
assert os.read(fd, 2) == b"\x00\x01"
|
|
finally:
|
|
os.close(fd)
|
|
|
|
|
|
def test_hold_fifo_does_not_replace_existing_fifo(tmp_path):
|
|
path = str(tmp_path / "cam-02.h264")
|
|
a = hold_fifo(path)
|
|
ino = os.stat(path).st_ino
|
|
b = hold_fifo(path)
|
|
try:
|
|
assert os.stat(path).st_ino == ino
|
|
os.write(a, b"ab")
|
|
assert os.read(b, 2) == b"ab"
|
|
finally:
|
|
os.close(a)
|
|
os.close(b)
|