rewrite dtdemux with bind&function