示例#1
0
        private void TestCountOfType()
        {
            int            hr;
            int            c, c1;
            IAMTimelineObj pTrack1Obj;

            hr = m_pTimeline.AddGroup((IAMTimelineObj)m_pVideoGroup);
            DESError.ThrowExceptionForHR(hr);

            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);

            hr = m_pTimeline.GetCountOfType(0, out c, out c1, TimelineMajorType.Track);
            DESError.ThrowExceptionForHR(hr);

            Debug.Assert(c == 1 && c1 == 2, "GetCountOfType");
        }