From: ddennedy Date: Sat, 16 Feb 2008 05:50:06 +0000 (+0000) Subject: MltRepository.{h,cpp}, swig/mltpp.i: added consumers, filters, producers, transitions... X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=cfbdb03eeb550c8765a7e7875bab00e2991dea0e;p=melted MltRepository.{h,cpp}, swig/mltpp.i: added consumers, filters, producers, transitions, register_metadata, and metadata methods to Repository class git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++@1073 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/mlt++/src/MltRepository.cpp b/mlt++/src/MltRepository.cpp index a9d1d54..83b8e61 100644 --- a/mlt++/src/MltRepository.cpp +++ b/mlt++/src/MltRepository.cpp @@ -19,6 +19,7 @@ #include "MltRepository.h" #include "MltProfile.h" +#include "MltProperties.h" using namespace Mlt; Repository::Repository( const char* directory ) : @@ -48,3 +49,33 @@ void *Repository::create( Profile& profile, mlt_service_type type, const char *s { return mlt_repository_create( instance, profile.get_profile(), type, service, arg ); } + +Properties *Repository::consumers( ) const +{ + return new Properties( mlt_repository_consumers( instance ) ); +} + +Properties *Repository::filters( ) const +{ + return new Properties( mlt_repository_filters( instance ) ); +} + +Properties *Repository::producers( ) const +{ + return new Properties( mlt_repository_producers( instance ) ); +} + +Properties *Repository::transitions( ) const +{ + return new Properties( mlt_repository_transitions( instance ) ); +} + +void Repository::register_metadata( mlt_service_type type, const char *service, Properties& metadata ) +{ + mlt_repository_register_metadata( instance, type, service, metadata.get_properties() ); +} + +Properties *Repository::metadata( mlt_service_type type, const char *service ) const +{ + return new Properties( mlt_repository_metadata( instance, type, service ) ); +} diff --git a/mlt++/src/MltRepository.h b/mlt++/src/MltRepository.h index b5ef957..bb6af6c 100644 --- a/mlt++/src/MltRepository.h +++ b/mlt++/src/MltRepository.h @@ -31,6 +31,7 @@ namespace Mlt { class Profile; + class Properties; class MLTPP_DECLSPEC Repository { @@ -44,6 +45,12 @@ namespace Mlt void register_service( mlt_service_type service_type, const char *service, void *symbol ); void *create( Profile& profile, mlt_service_type type, const char *service, void *arg ); + Properties *consumers( ) const; + Properties *filters( ) const; + Properties *producers( ) const; + Properties *transitions( ) const; + void register_metadata( mlt_service_type type, const char *service, Properties& metadata ); + Properties *metadata( mlt_service_type type, const char *service ) const; }; } diff --git a/mlt++/swig/mltpp.i b/mlt++/swig/mltpp.i index 1d6d0a8..f6060b7 100644 --- a/mlt++/swig/mltpp.i +++ b/mlt++/swig/mltpp.i @@ -53,6 +53,11 @@ namespace Mlt { %newobject Miracle::execute( char * ); %newobject Miracle::push( char *, Service & ); %newobject Miracle::unit( int ); +%newobject Repository::consumers( ); +%newobject Repository::filters( ); +%newobject Repository::producers( ); +%newobject Repository::transitions( ); +%newobject Repository::metadata( mlt_service_type, const char * ); } /** Classes to wrap.