Last change
on this file since 787 was
639,
checked in by rlacroix, 9 years ago
|
Add a basic garbage collector to ensure no packets linger in the filter graph.
|
File size:
435 bytes
|
Rev | Line | |
---|
[637] | 1 | #include "filter.hpp" |
---|
| 2 | |
---|
| 3 | namespace xios |
---|
| 4 | { |
---|
[639] | 5 | CFilter::CFilter(CGarbageCollector& gc, size_t inputSlotsCount, IFilterEngine* engine) |
---|
| 6 | : CInputPin(gc, inputSlotsCount) |
---|
[637] | 7 | , COutputPin() |
---|
| 8 | , engine(engine) |
---|
| 9 | { /* Nothing to do */ } |
---|
| 10 | |
---|
| 11 | void CFilter::onInputReady(std::vector<CDataPacketPtr> data) |
---|
| 12 | { |
---|
| 13 | CDataPacketPtr outputPacket = engine->apply(data); |
---|
| 14 | if (outputPacket) |
---|
| 15 | deliverOuput(outputPacket); |
---|
| 16 | } |
---|
| 17 | } // namespace xios |
---|
Note: See
TracBrowser
for help on using the repository browser.