Expose NDI discovery error details
This commit is contained in:
@@ -36,7 +36,7 @@ class NDIReceiver(threading.Thread):
|
||||
except Exception as exc:
|
||||
self.state.ndi_connected = False
|
||||
self.state.error_code = "NDI_DISCONNECTED"
|
||||
LOG.warning("NDI receive session ended: %s", type(exc).__name__)
|
||||
LOG.warning("NDI receive session ended: %s: %s", type(exc).__name__, str(exc)[:300])
|
||||
self.stop_event.wait(2.0)
|
||||
|
||||
def _receive_session(self) -> None:
|
||||
@@ -66,7 +66,7 @@ class NDIReceiver(threading.Thread):
|
||||
source = finder.get_source(self.source_name)
|
||||
break
|
||||
if source is None:
|
||||
raise RuntimeError("configured NDI source not discovered")
|
||||
raise RuntimeError(f"configured NDI source not discovered; last_sources={names}")
|
||||
receiver = Receiver(color_format=RecvColorFormat.BGRX_BGRA,
|
||||
bandwidth=RecvBandwidth.highest)
|
||||
video = VideoFrameSync()
|
||||
@@ -94,4 +94,3 @@ class NDIReceiver(threading.Thread):
|
||||
if receiver is not None and receiver.is_connected():
|
||||
receiver.disconnect()
|
||||
finder.close()
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ services:
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import json,pathlib,urllib.request; t=pathlib.Path('/run/secrets/api-token').read_text().strip(); r=urllib.request.Request('http://127.0.0.1:18120/v1/health',headers={'Authorization':'Bearer '+t}); raise SystemExit(0 if json.load(urllib.request.urlopen(r,timeout=3))['ready'] else 1)"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
timeout: 10s
|
||||
retries: 6
|
||||
start_period: 180s
|
||||
|
||||
|
||||
Reference in New Issue
Block a user