Initial commit: testpattern → fakesink pipeline over MXL shared memory
- NodeBase, Signal, FlowDef, V210 shared headers - testpattern node: SMPTE 75% color bars writer at 25fps - fakesink node: non-blocking MXL reader with per-second stats - studio-manager: FlowGraph data model, graph-driven fork/exec launcher - mxl pinned as submodule at 0ae1dc5 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace dmf {
|
||||
|
||||
// Generates a minimal but valid NMOS IS-04 flow definition JSON string
|
||||
// for a video/v210 flow. MXL uses this to set up the ring buffer geometry.
|
||||
inline std::string make_video_flow_def(
|
||||
const std::string& flow_id,
|
||||
const std::string& label,
|
||||
int width, int height,
|
||||
int fps_num, int fps_den = 1)
|
||||
{
|
||||
using json = nlohmann::json;
|
||||
return json{
|
||||
{"id", flow_id},
|
||||
{"format", "urn:x-nmos:format:video"},
|
||||
{"label", label},
|
||||
{"description", label + " MXL Video Flow"},
|
||||
{"media_type", "video/v210"},
|
||||
{"parents", json::array()},
|
||||
{"grain_rate", {{"numerator", fps_num}, {"denominator", fps_den}}},
|
||||
{"frame_width", width},
|
||||
{"frame_height", height},
|
||||
{"interlace_mode", "progressive"},
|
||||
{"colorspace", "BT709"},
|
||||
{"tags", {
|
||||
{"urn:x-nmos:tag:grouphint/v1.0", json::array({label + ":Video"})}
|
||||
}},
|
||||
{"components", json::array({
|
||||
{{"name","Y"}, {"width",width}, {"height",height}, {"bit_depth",10}},
|
||||
{{"name","Cb"}, {"width",width/2}, {"height",height}, {"bit_depth",10}},
|
||||
{{"name","Cr"}, {"width",width/2}, {"height",height}, {"bit_depth",10}}
|
||||
})}
|
||||
}.dump();
|
||||
}
|
||||
|
||||
} // namespace dmf
|
||||
Reference in New Issue
Block a user