• Advertisement
Sign in to follow this  

DirectShow: Clear the timeline?

This topic is 4835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement