/**
* MltFactory.cpp - MLT Wrapper
* Copyright (C) 2004-2005 Charles Yates
+ * Copyright (C) 2008 Dan Dennedy <dan@dennedy.org>
* Author: Charles Yates <charles.yates@pandora.be>
*
* This program is free software; you can redistribute it and/or modify
*/
#include "MltFactory.h"
+#include "MltProducer.h"
+#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 ) );
}
+Properties *Factory::event_object( )
+{
+ return new Properties( mlt_factory_event_object( ) );
+}
+
+Producer *Factory::producer( Profile& profile, char *id, char *arg )
+{
+ return new Producer( profile, id, arg );
+}
+
+Filter *Factory::filter( Profile& profile, char *id, char *arg )
+{
+ return new Filter( profile, id, arg );
+}
+
+Transition *Factory::transition( Profile& profile, char *id, char *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( );