Re: [Mlt-devel] MLT Version Information Patch
Brought to you by:
ddennedy,
lilo_booter
From: Dan D. <da...@de...> - 2010-12-17 05:55:51
|
On Thu, Dec 16, 2010 at 12:11 AM, Jonathan Thomas <jon...@gm...> wrote: > Hi Dan! > Here is a patch that makes version information (i.e. 0.5.10) available in > the MLT library. I need this ability in OpenShot to make some features > conditional based on MLT's version. I moved 2 #define statements from the > mlt.h file into the a new mlt_version.h file. I saw no good place to add > these new methods, so I added the mlt_version.h / mlt_version.c files. They > are also imported into SWIG, and seem to work great from Python. I wasn't > sure the best name for these methods, so I just tried to imitate the naming > of other methods. Thanks! I applied with some minor changes, the most notable of which is to rename BUILD -> REVISION with mlt_version_get_revision(). > Here are the new methods: >>> import mlt >>> mlt.mlt_version_get_int() > 1290 >>>> mlt.mlt_version_get_string() > '0.5.10' >>>> mlt.mlt_version_get_major() > 0 >>>> mlt.mlt_version_get_minor() > 5 >>>> mlt.mlt_version_get_build() > 10 > Please let me know what you think. I'll be happy to fix the patch if > something looks wrong. =) > Thanks, > -Jonathan > |