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:
@@ -28,7 +28,7 @@ class TestPatternNode : public dmf::NodeBase {
|
||||
instance(),
|
||||
dmf::make_video_flow_def(flow_id, node_id(), width, height, fps_num, fps_den).c_str(),
|
||||
nullptr, &video_writer, &video_cfg, &created);
|
||||
if (vst != MXL_STATUS_OK) { log("video mxlCreateFlowWriter failed (status=%d)", vst); return; }
|
||||
if (vst != MXL_STATUS_OK) { log("video mxlCreateFlowWriter failed (%s)", dmf::mxl_status_str(vst)); return; }
|
||||
|
||||
const uint32_t video_stride = video_cfg.discrete.sliceSizes[0];
|
||||
log("video stride=%u B/line grain=%u B ring=%u grains",
|
||||
@@ -55,7 +55,7 @@ class TestPatternNode : 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",
|
||||
@@ -85,7 +85,7 @@ class TestPatternNode : public dmf::NodeBase {
|
||||
uint8_t* video_buf = nullptr;
|
||||
vst = mxlFlowWriterOpenGrain(video_writer, video_index, &video_grain, &video_buf);
|
||||
if (vst != MXL_STATUS_OK) {
|
||||
log("OpenGrain failed (status=%d), skipping index=%llu", vst, video_index);
|
||||
log("OpenGrain failed (%s) at index=%llu", dmf::mxl_status_str(vst), video_index);
|
||||
video_index++;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user