private void TestDuration() { int hr; long l; double d; IAMTimelineObj pTrack1Obj; hr = m_pTimeline.CreateEmptyNode(out pTrack1Obj, TimelineMajorType.Track); DESError.ThrowExceptionForHR(hr); // tell the composition about the track IAMTimelineComp pRootComp = (IAMTimelineComp)m_pVideoGroup; hr = pRootComp.VTrackInsBefore(pTrack1Obj, -1); DESError.ThrowExceptionForHR(hr); m_VideoTrack = (IAMTimelineTrack)pTrack1Obj; AddVideo("foo.avi"); AddVideo("foxo.avi"); hr = m_pTimeline.GetDuration(out l); DESError.ThrowExceptionForHR(hr); Debug.Assert(l == 10000000000, "Duration"); hr = m_pTimeline.GetDuration2(out d); DESError.ThrowExceptionForHR(hr); Debug.Assert(d == 1000.0, "GetDuration2"); hr = m_pTimeline.ValidateSourceNames(SFNValidateFlags.Replace | SFNValidateFlags.Check | SFNValidateFlags.Popup, this, IntPtr.Zero); DESError.ThrowExceptionForHR(hr); }