Here's a simplified UML Class diagram for Vidproject and associated classes:

The Video Project has a list of the currently used Resources (video and audio clips - i.e. files ). Additionally, it contains an AVTimeline which contains various sequences. Each sequence contains various audio and video tracks. And each track contains... surprise, a clip. The clip has an index indicating which resource it operates on. And of course, a list of effects and a transition.
Notice that a video clipboard is nothing but a sequence. Convenient, isn't it?
As you can see from this diagram, the memory consumption for these classes is minimal, since they're nothing but sparse data structures.
Now, I don't really know how Cinelerra or other video editors work. But one thing's certain: It's much easier to model the classes after the structure of the data we're going to modify. And this data is a timeline.
I already have implemented saving undo/redos for these classes, and you can impose a memory limit on how many undos/redos you can store in memory. So there goes the high memory requirement. Poof! :)
I'll upload this diagram to the webpage when I can.
No comments:
Post a Comment