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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user