source: XIOS/trunk/src/filter/filter.cpp @ 639

Last change on this file since 639 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
Line 
1#include "filter.hpp"
2
3namespace xios
4{
5  CFilter::CFilter(CGarbageCollector& gc, size_t inputSlotsCount, IFilterEngine* engine)
6    : CInputPin(gc, inputSlotsCount)
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.