From: Dan Dennedy Date: Sun, 10 Apr 2011 04:57:01 +0000 (-0700) Subject: Add Mlt::Profile.list(). X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ecbeb5fb9cdff3ff95931b3c09ffdaa19b8ed032;p=mlt Add Mlt::Profile.list(). --- diff --git a/src/framework/mlt_profile.c b/src/framework/mlt_profile.c index d1c0237b..04b04cc9 100644 --- a/src/framework/mlt_profile.c +++ b/src/framework/mlt_profile.c @@ -338,7 +338,7 @@ mlt_profile mlt_profile_clone( mlt_profile profile ) /** Get the list of profiles. * - * The caller MUST free the returned properties object! + * The caller MUST close the returned properties object! * Each entry in the list is keyed on its name, and its value is another * properties object that contains the attributes of the profile. * \public \memberof mlt_profile_s diff --git a/src/mlt++/MltProfile.cpp b/src/mlt++/MltProfile.cpp index c8418ed4..47302b7a 100644 --- a/src/mlt++/MltProfile.cpp +++ b/src/mlt++/MltProfile.cpp @@ -120,3 +120,8 @@ double Profile::dar() const { return mlt_profile_dar( instance ); } + +Properties* Profile::list() +{ + return new Properties( mlt_profile_list() ); +} diff --git a/src/mlt++/MltProfile.h b/src/mlt++/MltProfile.h index af77d471..e51543db 100644 --- a/src/mlt++/MltProfile.h +++ b/src/mlt++/MltProfile.h @@ -57,6 +57,7 @@ namespace Mlt int display_aspect_num() const; int display_aspect_den() const; double dar() const; + static Properties* list(); }; } diff --git a/src/swig/mlt.i b/src/swig/mlt.i index cb57ad6c..f453f1e0 100644 --- a/src/swig/mlt.i +++ b/src/swig/mlt.i @@ -60,6 +60,7 @@ namespace Mlt { %newobject Repository::transitions( ); %newobject Repository::metadata( mlt_service_type, const char * ); %newobject Repository::languages( ); +%newobject Profile::list(); } /** Classes to wrap.