Feature/video in #3
+2
-2
@@ -5,8 +5,8 @@
|
|||||||
],
|
],
|
||||||
"edges": [
|
"edges": [
|
||||||
{
|
{
|
||||||
"from": "testpattern", "from_port": "flow_id",
|
"from": "testpattern", "from_port": "video_flow_id",
|
||||||
"to": "ndiout", "to_port": "flow_id",
|
"to": "ndiout", "to_port": "video_flow_id",
|
||||||
"format": { "kind": "video", "width": 1920, "height": 1080, "fps_num": 25, "fps_den": 1 }
|
"format": { "kind": "video", "width": 1920, "height": 1080, "fps_num": 25, "fps_den": 1 }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
class FakeSinkNode : public dmf::NodeBase {
|
class FakeSinkNode : public dmf::NodeBase {
|
||||||
void run() override {
|
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 auto flow_id = flow_info.at("id").get<std::string>();
|
||||||
const int fps_num = flow_info.value("fps_num", 25);
|
const int fps_num = flow_info.value("fps_num", 25);
|
||||||
const int fps_den = flow_info.value("fps_den", 1);
|
const int fps_den = flow_info.value("fps_den", 1);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
class TestPatternNode : public dmf::NodeBase {
|
class TestPatternNode : public dmf::NodeBase {
|
||||||
void run() override {
|
void run() override {
|
||||||
// --- video flow ---
|
// --- 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 auto flow_id = flow_info.at("id").get<std::string>();
|
||||||
const int width = flow_info.value("width", 1920);
|
const int width = flow_info.value("width", 1920);
|
||||||
const int height = flow_info.value("height", 1080);
|
const int height = flow_info.value("height", 1080);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ struct NodeDef {
|
|||||||
//
|
//
|
||||||
// from_port / to_port are the NODE_CONFIG keys each end receives the flow descriptor under.
|
// 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 }.
|
// 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:
|
// format examples:
|
||||||
// video: { "kind":"video", "width":1920, "height":1080, "fps_num":25, "fps_den":1 }
|
// video: { "kind":"video", "width":1920, "height":1080, "fps_num":25, "fps_den":1 }
|
||||||
|
|||||||
@@ -106,11 +106,11 @@ static dmf::FlowGraph build_graph() {
|
|||||||
{"kind","audio"}, {"sample_rate",48000}, {"channels",2}, {"bit_depth",32}
|
{"kind","audio"}, {"sample_rate",48000}, {"channels",2}, {"bit_depth",32}
|
||||||
};
|
};
|
||||||
g.edges = {
|
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 },
|
// { 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 },
|
// { 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 },
|
{ tp_audio_flow, "testpattern", "audio_flow_id", "ndiout", "audio_flow_id", audio_fmt },
|
||||||
};
|
};
|
||||||
return g;
|
return g;
|
||||||
|
|||||||
Reference in New Issue
Block a user