Annwan
3 months ago
10 changed files with 63 additions and 108 deletions
-
35src/Application.cppm
-
25src/Node.cppm
-
13src/Nodes/ConstantNode.cpp
-
7src/Nodes/InputNode.cpp
-
11src/Nodes/OutputNode.cpp
-
4src/Nodes/SplitterNode.cpp
-
34src/Nodes/StreamSpecConstantNode.cpp
-
13src/Nodes/StringConstantNode.cpp
-
26src/Port.cppm
-
3src/Ports/OutputPort.cpp
@ -0,0 +1,13 @@ |
|||||
|
module Node; |
||||
|
using namespace ffmpegraph; |
||||
|
|
||||
|
ConstantNode::ConstantNode() |
||||
|
: label("Constant", this), in("Text", this), out("Out", this, PortTypeE::CONSTANT) { |
||||
|
ports.push_back(&label); |
||||
|
ports.push_back(&in); |
||||
|
ports.push_back(&out); |
||||
|
} |
||||
|
Result<> ConstantNode::Run() { |
||||
|
out.SetValue(in.data); |
||||
|
return {}; |
||||
|
} |
@ -1,34 +0,0 @@ |
|||||
module Node; |
|
||||
using namespace ffmpegraph; |
|
||||
|
|
||||
StreamSpecConstantNode::StreamSpecConstantNode() |
|
||||
: label("Stream Specifier Constant", this), in("Stream Specifier", this), out("Out", this, PortTypeE::STREAM) { |
|
||||
ports.push_back(&label); |
|
||||
ports.push_back(&in); |
|
||||
ports.push_back(&out); |
|
||||
} |
|
||||
Result<> StreamSpecConstantNode::Run() { |
|
||||
// TODO validate that
|
|
||||
// <stream_specifier> →
|
|
||||
// <index>
|
|
||||
// [vVasdt](:<stream_specifier>)?
|
|
||||
// g:<group_specifier>(:<stream_specifier>)?
|
|
||||
// p:<id>(:<stream_specifier>)?
|
|
||||
// #<id>
|
|
||||
// i:<id>
|
|
||||
// m:<id>(:<id>)?
|
|
||||
// disp:<dispositions>(:<stream_specifier>)?
|
|
||||
// u
|
|
||||
// <index> → [1-9][0-9]*
|
|
||||
// <group_specifier> →
|
|
||||
// <index>
|
|
||||
// #<id>
|
|
||||
// i:<id>
|
|
||||
// <id> → [a-zA-Z0-9_-]+
|
|
||||
// <dispositions> →
|
|
||||
// <id>
|
|
||||
// <dispositions>+<id>
|
|
||||
|
|
||||
out.SetValue(in.data); |
|
||||
return {}; |
|
||||
} |
|
@ -1,13 +0,0 @@ |
|||||
module Node; |
|
||||
using namespace ffmpegraph; |
|
||||
|
|
||||
StringConstantNode::StringConstantNode() |
|
||||
: label("String Constant", this), in("Text", this), out("Out", this, PortTypeE::STRING) { |
|
||||
ports.push_back(&label); |
|
||||
ports.push_back(&in); |
|
||||
ports.push_back(&out); |
|
||||
} |
|
||||
Result<> StringConstantNode::Run() { |
|
||||
out.SetValue(in.data); |
|
||||
return {}; |
|
||||
} |
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue