X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=mlt%2B%2B%2Fsrc%2FMltFactory.cpp;h=d5815a401622e32bf3cffdad1aa174824c35eaef;hb=44a578d2a99909a4c0894774b7b4103a1ea1c027;hp=e52f49a55f59966977d78436e462169343e58aa1;hpb=b61d43804b15c0ddf8a3579cdcd2146105d9be26;p=melted diff --git a/mlt++/src/MltFactory.cpp b/mlt++/src/MltFactory.cpp index e52f49a..d5815a4 100644 --- a/mlt++/src/MltFactory.cpp +++ b/mlt++/src/MltFactory.cpp @@ -1,6 +1,7 @@ /** * MltFactory.cpp - MLT Wrapper * Copyright (C) 2004-2005 Charles Yates + * Copyright (C) 2008 Dan Dennedy * Author: Charles Yates * * This program is free software; you can redistribute it and/or modify @@ -23,33 +24,51 @@ #include "MltFilter.h" #include "MltTransition.h" #include "MltConsumer.h" +#include "MltRepository.h" using namespace Mlt; -int Factory::init( char *arg ) +Repository *Factory::init( const char *directory ) { - return mlt_factory_init( arg ); + return new Repository( mlt_factory_init( directory ) ); } -Producer *Factory::producer( char *id, char *arg ) +Properties *Factory::event_object( ) { - return new Producer( id, arg ); + return new Properties( mlt_factory_event_object( ) ); } -Filter *Factory::filter( char *id, char *arg ) +Producer *Factory::producer( Profile& profile, char *id, char *arg ) { - return new Filter( id, arg ); + return new Producer( profile, id, arg ); } -Transition *Factory::transition( char *id, char *arg ) +Filter *Factory::filter( Profile& profile, char *id, char *arg ) { - return new Transition( id, arg ); + return new Filter( profile, id, arg ); } -Consumer *Factory::consumer( char *id, char *arg ) +Transition *Factory::transition( Profile& profile, char *id, char *arg ) { - return new Consumer( id, arg ); + return new Transition( profile, id, arg ); } +Consumer *Factory::consumer( Profile& profile, char *id, char *arg ) +{ + return new Consumer( profile, id, arg ); +} + +#ifdef WIN32 +char *Factory::getenv( const char *name ) +{ + return mlt_getenv( name ); +} + +int Factory::setenv( const char *name, const char *value ) +{ + return mlt_setenv( name, value ); +} +#endif + void Factory::close( ) { mlt_factory_close( );