You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Implemented the Close() method, so it closes all clips' readers on the timeline
This commit is contained in:
@@ -34,9 +34,12 @@ int main()
|
||||
t.AddClip(&c3);
|
||||
|
||||
// Request frames
|
||||
for (int x=0; x<330; x++)
|
||||
for (int x=0; x<133; x++)
|
||||
t.GetFrame(x);
|
||||
|
||||
// Close timeline
|
||||
t.Close();
|
||||
|
||||
cout << "Successfully Finished Timeline DEMO" << endl;
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -70,7 +70,16 @@ void Timeline::SortClips()
|
||||
// Close the reader (and any resources it was consuming)
|
||||
void Timeline::Close()
|
||||
{
|
||||
// Close all open clips
|
||||
list<Clip*>::iterator clip_itr;
|
||||
for (clip_itr=clips.begin(); clip_itr != clips.end(); ++clip_itr)
|
||||
{
|
||||
// Get clip object from the iterator
|
||||
Clip *clip = (*clip_itr);
|
||||
|
||||
// Open or Close this clip, based on if it's intersecting or not
|
||||
update_open_clips(clip, false);
|
||||
}
|
||||
}
|
||||
|
||||
// Open the reader (and start consuming resources)
|
||||
|
||||
Reference in New Issue
Block a user