Feature/video in #3

Merged
itten merged 12 commits from feature/video-in into main 2026-07-05 12:57:40 +03:00
5 changed files with 8 additions and 8 deletions
Showing only changes of commit 1496cc2e1e - Show all commits
+2 -2
View File
@@ -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 }
},
{
+1 -1
View File
@@ -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<std::string>();
const int fps_num = flow_info.value("fps_num", 25);
const int fps_den = flow_info.value("fps_den", 1);
+1 -1
View File
@@ -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<std::string>();
const int width = flow_info.value("width", 1920);
const int height = flow_info.value("height", 1080);
+1 -1
View File
@@ -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": "<uuid>", ...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 }
+3 -3
View File
@@ -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;