feat: garbage collection on startup, readable status strings, audio/float32

studio-manager: call mxlGarbageCollectFlows before launching nodes to
clean up stale flow directories left by previous crashed runs.

shared/NodeBase.hpp: add mxl_status_str(mxlStatus) — converts error
codes to readable names (e.g. MXL_ERR_OUT_OF_RANGE_TOO_LATE). All
nodes now log these names instead of raw integers.

shared/FlowDef.hpp: use "audio/float32" as media_type for 32-bit audio
flows, matching the MXL SDK examples. audio/L{n} kept for other depths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
JohannesItten
2026-07-03 10:20:53 +03:00
parent 39ba8add1a
commit 21a8ee4ba0
7 changed files with 52 additions and 12 deletions
+3 -3
View File
@@ -42,7 +42,7 @@ class NDIInNode : public dmf::NodeBase {
instance(),
dmf::make_video_flow_def(video_flow_id, node_id(), width, height, fps_num, fps_den).c_str(),
nullptr, &video_writer, &video_cfg, &created);
if (st != MXL_STATUS_OK) { log("video mxlCreateFlowWriter failed (status=%d)", st); return; }
if (st != MXL_STATUS_OK) { log("video mxlCreateFlowWriter failed (%s)", dmf::mxl_status_str(st)); return; }
const uint32_t video_stride = video_cfg.discrete.sliceSizes[0];
log("video stride=%u B/line grain=%u B ring=%u grains",
@@ -71,7 +71,7 @@ class NDIInNode : public dmf::NodeBase {
fps_num, fps_den).c_str(),
nullptr, &audio_writer, &audio_cfg, &created);
if (ast != MXL_STATUS_OK) {
log("audio mxlCreateFlowWriter failed (status=%d) — continuing without audio", ast);
log("audio mxlCreateFlowWriter failed (%s) — continuing without audio", dmf::mxl_status_str(ast));
has_audio = false;
} else {
log("audio channels=%u buffer=%u samples",
@@ -146,7 +146,7 @@ class NDIInNode : public dmf::NodeBase {
grain.validSlices = grain.totalSlices;
mxlFlowWriterCommitGrain(video_writer, &grain);
} else {
log("video OpenGrain failed (status=%d) at index=%llu", st, video_index);
log("video OpenGrain failed (%s) at index=%llu", dmf::mxl_status_str(st), video_index);
}
video_index = current + 1;
}