From 1496cc2e1e2abb5314a9bd64bfd6c363b95394be Mon Sep 17 00:00:00 2001 From: JohannesItten Date: Sun, 5 Jul 2026 12:52:48 +0300 Subject: [PATCH] =?UTF-8?q?refactor:=20rename=20video=20port=20flow=5Fid?= =?UTF-8?q?=20=E2=86=92=20video=5Fflow=5Fid=20everywhere?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All nodes now use video_flow_id/audio_flow_id consistently: - nodes/testpattern: flow_id → video_flow_id - nodes/fakesink: flow_id → video_flow_id - graph.json: from_port/to_port flow_id → video_flow_id - studio-manager: hardcoded build_graph edges + FlowGraph.hpp comment Co-Authored-By: Claude Sonnet 4.6 --- graph.json | 4 ++-- nodes/fakesink/main.cpp | 2 +- nodes/testpattern/main.cpp | 2 +- studio-manager/FlowGraph.hpp | 2 +- studio-manager/main.cpp | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/graph.json b/graph.json index 66daf64..ebd40da 100644 --- a/graph.json +++ b/graph.json @@ -5,8 +5,8 @@ ], "edges": [ { - "from": "testpattern", "from_port": "flow_id", - "to": "ndiout", "to_port": "flow_id", + "from": "testpattern", "from_port": "video_flow_id", + "to": "ndiout", "to_port": "video_flow_id", "format": { "kind": "video", "width": 1920, "height": 1080, "fps_num": 25, "fps_den": 1 } }, { diff --git a/nodes/fakesink/main.cpp b/nodes/fakesink/main.cpp index 8cebc37..8210205 100644 --- a/nodes/fakesink/main.cpp +++ b/nodes/fakesink/main.cpp @@ -6,7 +6,7 @@ class FakeSinkNode : public dmf::NodeBase { void run() override { - const auto flow_info = config().at("flow_id"); + const auto flow_info = config().at("video_flow_id"); const auto flow_id = flow_info.at("id").get(); const int fps_num = flow_info.value("fps_num", 25); const int fps_den = flow_info.value("fps_den", 1); diff --git a/nodes/testpattern/main.cpp b/nodes/testpattern/main.cpp index 27e8974..84ca0fa 100644 --- a/nodes/testpattern/main.cpp +++ b/nodes/testpattern/main.cpp @@ -10,7 +10,7 @@ class TestPatternNode : public dmf::NodeBase { void run() override { // --- video flow --- - const auto flow_info = config().at("flow_id"); + const auto flow_info = config().at("video_flow_id"); const auto flow_id = flow_info.at("id").get(); const int width = flow_info.value("width", 1920); const int height = flow_info.value("height", 1080); diff --git a/studio-manager/FlowGraph.hpp b/studio-manager/FlowGraph.hpp index 398c693..8c0bb25 100644 --- a/studio-manager/FlowGraph.hpp +++ b/studio-manager/FlowGraph.hpp @@ -17,7 +17,7 @@ struct NodeDef { // // from_port / to_port are the NODE_CONFIG keys each end receives the flow descriptor under. // The injected value is a JSON object: { "id": "", ...format fields }. -// Nodes read the UUID as cfg["flow_id"]["id"] and format fields as cfg["flow_id"]["fps_num"] etc. +// Nodes read the UUID as cfg["video_flow_id"]["id"] and format fields as cfg["video_flow_id"]["fps_num"] etc. // // format examples: // video: { "kind":"video", "width":1920, "height":1080, "fps_num":25, "fps_den":1 } diff --git a/studio-manager/main.cpp b/studio-manager/main.cpp index e5007e7..a7591b9 100644 --- a/studio-manager/main.cpp +++ b/studio-manager/main.cpp @@ -106,11 +106,11 @@ static dmf::FlowGraph build_graph() { {"kind","audio"}, {"sample_rate",48000}, {"channels",2}, {"bit_depth",32} }; g.edges = { - // { tp_video_flow, "testpattern", "flow_id", "fakesink", "flow_id", video_fmt }, + // { tp_video_flow, "testpattern", "video_flow_id", "fakesink", "video_flow_id", video_fmt }, // { tp_audio_flow, "testpattern", "audio_flow_id", "", "", audio_fmt }, - // { ndi_video_flow, "ndiin", "video_flow_id", "ndiout", "flow_id", video_fmt }, + // { ndi_video_flow, "ndiin", "video_flow_id", "ndiout", "video_flow_id", video_fmt }, // { ndi_audio_flow, "ndiin", "audio_flow_id", "", "", audio_fmt }, - { tp_video_flow, "testpattern", "flow_id", "ndiout", "flow_id", video_fmt }, + { tp_video_flow, "testpattern", "video_flow_id", "ndiout", "video_flow_id", video_fmt }, { tp_audio_flow, "testpattern", "audio_flow_id", "ndiout", "audio_flow_id", audio_fmt }, }; return g;