On Sun, Jun 7, 2015 at 11:57 AM Dan Dennedy <d...@dennedy.org> wrote:

> I will work on it this week, and then integrate it into Shotcut to verify
> it works sufficiently.
>
>
JB,
Here is the new Mlt::Animation API plus some unit tests showing how to use
it (to some degree). I pushed it into a branch for now:
https://github.com/mltframework/mlt/commits/animation

Beyond our previous discussion, I added some methods to get the number of
keyframes and get information for a keyframe by index (as opposed to frame
position). This makes it easier to iterate over them or to use in a Qt
model class.

It is important to think of this API as a supplement to the Properties API.
You get the animation from the property, and then the animation API
provides an object-oriented, exploded view of the animation. In addition,
it lets you do the one main manipulation you cannot do through properties:
remove a keyframe. I avoided exposing things that really only
mlt_properties really knows about: namely, mlt_property but also fps and
locale_t. Anything value-related, such as insertion and value retrieval,
should go through Properties.

Some seemingly redundant methods are there to make it nicer to work with
from C++ versus a scripting/managed language. For example,
Properties::get_animation() is nicer from C++ to avoid using a pointer.
But, Properties:;get_anim() is for Python.
------------------------------------------------------------------------------
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to