add getRefCount to evaluate if a demux is in use