diff options
Diffstat (limited to 'src/Flowgraph.cpp')
-rw-r--r-- | src/Flowgraph.cpp | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/src/Flowgraph.cpp b/src/Flowgraph.cpp index 0eb1c60..ae75808 100644 --- a/src/Flowgraph.cpp +++ b/src/Flowgraph.cpp @@ -111,32 +111,6 @@ void Node::removeInputBuffer(Buffer::sptr& buffer) } } -Edge::Edge(shared_ptr<Node>& srcNode, shared_ptr<Node>& dstNode) : - mySrcNode(srcNode), - myDstNode(dstNode) -{ - PDEBUG("Edge::Edge(srcNode(%s): %p, dstNode(%s): %p) @ %p\n", - srcNode->plugin()->name(), srcNode.get(), - dstNode->plugin()->name(), dstNode.get(), - this); - - myBuffer = make_shared<Buffer>(); - srcNode->addOutputBuffer(myBuffer); - dstNode->addInputBuffer(myBuffer); -} - - -Edge::~Edge() -{ - PDEBUG("Edge::~Edge() @ %p\n", this); - - if (myBuffer) { - mySrcNode->removeOutputBuffer(myBuffer); - myDstNode->removeInputBuffer(myBuffer); - } -} - - int Node::process() { PDEBUG("Node::process()\n"); @@ -178,12 +152,37 @@ int Node::process() return ret; } +Edge::Edge(shared_ptr<Node>& srcNode, shared_ptr<Node>& dstNode) : + mySrcNode(srcNode), + myDstNode(dstNode) +{ + PDEBUG("Edge::Edge(srcNode(%s): %p, dstNode(%s): %p) @ %p\n", + srcNode->plugin()->name(), srcNode.get(), + dstNode->plugin()->name(), dstNode.get(), + this); + + myBuffer = make_shared<Buffer>(); + srcNode->addOutputBuffer(myBuffer); + dstNode->addInputBuffer(myBuffer); +} + + +Edge::~Edge() +{ + PDEBUG("Edge::~Edge() @ %p\n", this); + + if (myBuffer) { + mySrcNode->removeOutputBuffer(myBuffer); + myDstNode->removeInputBuffer(myBuffer); + } +} + + Flowgraph::Flowgraph() : myProcessTime(0) { PDEBUG("Flowgraph::Flowgraph() @ %p\n", this); - } |