This commit is contained in:
remilia 2025-05-25 15:59:31 +08:00
parent 404ce769b6
commit 2cd7c4ee35
2 changed files with 11 additions and 3 deletions

View File

@ -60,7 +60,7 @@ class SoftwareConfig:
video_height: int = 1080
video_width: int = 960
live_ip: str = 'vmaosmax.as'
live_ip: str = 'vmaosmax'
live_push_port: int = 5555
live_rep_port: int = 5556
device_py_rep_port: int = 5558

View File

@ -191,7 +191,10 @@ dd: Device = None
@entrypoint.group()
def device():
@click.option('--ip', default=None)
def device(ip):
if ip is not None:
C.live_ip = ip
global device_req
ctx = zmq.Context()
device_req = ctx.socket(zmq.REQ)
@ -243,10 +246,15 @@ def device_recvmonitor():
ctx = zmq.Context()
pull = ctx.socket(zmq.PULL)
pull.connect(C.live_push_socket)
last_device_ts_low = 0
last_host_ts = 0
while True:
b = pull.recv()
seq, encoder, host_ts, device_ts_low, device_ts_high, buffer = b2t(b)
print(f'S={seq} E={encoder} HT={host_ts} DTL={device_ts_low} BS={buffer.__len__()}')
print(
f'S={seq} E={encoder} HT={host_ts} DTL={device_ts_low} HTDF={host_ts - last_host_ts} DTLDF={device_ts_low - last_device_ts_low} DTH={device_ts_high} BS={buffer.__len__()}')
last_device_ts_low = device_ts_low
last_host_ts = host_ts
@device.command('recvplot')