[vdr] AttachFilter need's a ref not an Object

Patrick Fischer patrick_fischer at gmx.de
Mon Oct 17 17:46:48 CEST 2005


Hello
Today I tryed to play with vdr filters.
After reading the PLUGIN.html I found a Problem.

Example out of the Howto:
cMyFilter Filter;
cDevice::ActualDevice()->AttachFilter(Filter);

The Problem is that AttachFilter(...) needs a Ref not an Object.
So I made
cMyFilter Filter;
cDevice::ActualDevice()->AttachFilter(&Filter);

That is not very nice.

After a look at the VDR/pat.c I decide to use this piece of code:

  Filter = new cMyFilter();
  cDevice::ActualDevice()->AttachFilter(Filter);

Im not secure if I need to delete the Filter or if the cDevece handel it.

Maybe Klaus can fix this in the next howto.


Patrick



More information about the vdr mailing list