Added DirectShow functions for calculating duration.