Sign in to follow this  

DirectShow: Clear the timeline?

Recommended Posts

Hi, how can i clear a timeline of all tracks? I want to leave the default group(s) on the timeline, and only remove the tracks which ive added to those groups. Cheers
CoCreateInstance(CLSID_AMTimeline, NULL, CLSCTX_INPROC_SERVER, IID_IAMTimeline, reinterpret_cast<void **>(&m_pTimeline));

m_pTimeline->CreateEmptyNode(&m_pVideoGroupObj, TIMELINE_MAJOR_TYPE_GROUP);

CComQIPtr<IAMTimelineGroup, &IID_IAMTimelineGroup> pVideoGroup(m_pVideoGroupObj);
  // Set the media type
  this->SetMediaType(pVideoGroup, MEDIATYPE_Video);

  // Add group to timeline

// Now i add the track items on, so i only want to remove the things that are placed onto the timeline after here...
m_pTimeline->CreateEmptyNode(&pTrackObj, TIMELINE_MAJOR_TYPE_TRACK);

pRootComp->VTrackInsBefore(pTrackObj, -1);

m_pTimeline->CreateEmptyNode(&pSourceObj, TIMELINE_MAJOR_TYPE_SOURCE);



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this