Example #1
0
        private void TestGroupCount()
        {
            int            hr;
            int            c;
            IAMTimelineObj pGroup;

            hr = m_pTimeline.GetGroupCount(out c);
            DESError.ThrowExceptionForHR(hr);

            Debug.Assert(c == 1, "GetGroupCount");

            hr = m_pTimeline.ClearAllGroups();
            DESError.ThrowExceptionForHR(hr);

            hr = m_pTimeline.GetGroupCount(out c);
            DESError.ThrowExceptionForHR(hr);

            Debug.Assert(c == 0, "ClearAllGroups");

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

            hr = m_pTimeline.GetGroup(out pGroup, 0);
            DESError.ThrowExceptionForHR(hr);

            hr = m_pTimeline.RemGroupFromList((IAMTimelineObj)pGroup);
            DESError.ThrowExceptionForHR(hr);

            hr = m_pTimeline.GetGroupCount(out c);
            DESError.ThrowExceptionForHR(hr);

            Debug.Assert(c == 0, "RemGroupFromList");
        }