--- /dev/null
+Microsoft Visual Studio Solution File, Format Version 8.00\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mlt++", "mlt++.vcproj", "{31B6CBDB-6A84-4BC7-AACF-A1BCE02444FD}"\r
+ ProjectSection(ProjectDependencies) = postProject\r
+ EndProjectSection\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfiguration) = preSolution\r
+ Debug = Debug\r
+ Release = Release\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfiguration) = postSolution\r
+ {31B6CBDB-6A84-4BC7-AACF-A1BCE02444FD}.Debug.ActiveCfg = Debug|Win32\r
+ {31B6CBDB-6A84-4BC7-AACF-A1BCE02444FD}.Debug.Build.0 = Debug|Win32\r
+ {31B6CBDB-6A84-4BC7-AACF-A1BCE02444FD}.Release.ActiveCfg = Release|Win32\r
+ {31B6CBDB-6A84-4BC7-AACF-A1BCE02444FD}.Release.Build.0 = Release|Win32\r
+ EndGlobalSection\r
+ GlobalSection(ExtensibilityGlobals) = postSolution\r
+ EndGlobalSection\r
+ GlobalSection(ExtensibilityAddIns) = postSolution\r
+ EndGlobalSection\r
+EndGlobal\r
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+ ProjectType="Visual C++"\r
+ Version="7.10"\r
+ Name="mlt++"\r
+ ProjectGUID="{31B6CBDB-6A84-4BC7-AACF-A1BCE02444FD}"\r
+ Keyword="Win32Proj">\r
+ <Platforms>\r
+ <Platform\r
+ Name="Win32"/>\r
+ </Platforms>\r
+ <Configurations>\r
+ <Configuration\r
+ Name="Debug|Win32"\r
+ OutputDirectory="Debug"\r
+ IntermediateDirectory="Debug"\r
+ ConfigurationType="2"\r
+ CharacterSet="2">\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ Optimization="0"\r
+ AdditionalIncludeDirectories=""C:\Program Files\mlt\include\mlt""\r
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MLTPP_EXPORTS"\r
+ MinimalRebuild="TRUE"\r
+ BasicRuntimeChecks="3"\r
+ RuntimeLibrary="3"\r
+ TreatWChar_tAsBuiltInType="TRUE"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="TRUE"\r
+ DebugInformationFormat="4"/>\r
+ <Tool\r
+ Name="VCCustomBuildTool"/>\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="libmlt.0.2.1.lib"\r
+ OutputFile="$(OutDir)/mlt++.dll"\r
+ LinkIncremental="2"\r
+ AdditionalLibraryDirectories=""C:\Program Files\mlt\lib""\r
+ GenerateDebugInformation="TRUE"\r
+ ProgramDatabaseFile="$(OutDir)/mlt++.pdb"\r
+ SubSystem="2"\r
+ ImportLibrary="$(OutDir)/mlt++.lib"\r
+ TargetMachine="1"/>\r
+ <Tool\r
+ Name="VCMIDLTool"/>\r
+ <Tool\r
+ Name="VCPostBuildEventTool"/>\r
+ <Tool\r
+ Name="VCPreBuildEventTool"/>\r
+ <Tool\r
+ Name="VCPreLinkEventTool"/>\r
+ <Tool\r
+ Name="VCResourceCompilerTool"/>\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"/>\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"/>\r
+ <Tool\r
+ Name="VCWebDeploymentTool"/>\r
+ <Tool\r
+ Name="VCManagedWrapperGeneratorTool"/>\r
+ <Tool\r
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
+ </Configuration>\r
+ <Configuration\r
+ Name="Release|Win32"\r
+ OutputDirectory="Release"\r
+ IntermediateDirectory="Release"\r
+ ConfigurationType="2"\r
+ CharacterSet="2">\r
+ <Tool\r
+ Name="VCCLCompilerTool"\r
+ AdditionalIncludeDirectories=""C:\Program Files\mlt\include\mlt""\r
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MLTPP_EXPORTS"\r
+ RuntimeLibrary="0"\r
+ TreatWChar_tAsBuiltInType="TRUE"\r
+ UsePrecompiledHeader="0"\r
+ WarningLevel="3"\r
+ Detect64BitPortabilityProblems="TRUE"\r
+ DebugInformationFormat="3"/>\r
+ <Tool\r
+ Name="VCCustomBuildTool"/>\r
+ <Tool\r
+ Name="VCLinkerTool"\r
+ AdditionalDependencies="libmlt.0.2.1.lib"\r
+ OutputFile="$(OutDir)/mlt++.dll"\r
+ LinkIncremental="1"\r
+ AdditionalLibraryDirectories=""C:\Program Files\mlt\lib""\r
+ GenerateDebugInformation="TRUE"\r
+ SubSystem="2"\r
+ OptimizeReferences="2"\r
+ EnableCOMDATFolding="2"\r
+ ImportLibrary="$(OutDir)/mlt++.lib"\r
+ TargetMachine="1"/>\r
+ <Tool\r
+ Name="VCMIDLTool"/>\r
+ <Tool\r
+ Name="VCPostBuildEventTool"/>\r
+ <Tool\r
+ Name="VCPreBuildEventTool"/>\r
+ <Tool\r
+ Name="VCPreLinkEventTool"/>\r
+ <Tool\r
+ Name="VCResourceCompilerTool"/>\r
+ <Tool\r
+ Name="VCWebServiceProxyGeneratorTool"/>\r
+ <Tool\r
+ Name="VCXMLDataGeneratorTool"/>\r
+ <Tool\r
+ Name="VCWebDeploymentTool"/>\r
+ <Tool\r
+ Name="VCManagedWrapperGeneratorTool"/>\r
+ <Tool\r
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
+ </Configuration>\r
+ </Configurations>\r
+ <References>\r
+ </References>\r
+ <Files>\r
+ <Filter\r
+ Name="Source Files"\r
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">\r
+ <File\r
+ RelativePath=".\src\config.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\Mlt.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltConsumer.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltConsumer.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltDeque.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltDeque.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltEvent.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltEvent.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltFactory.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltFactory.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltField.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltField.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltFilter.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltFilter.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltFilteredConsumer.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltFilteredConsumer.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltFilteredProducer.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltFilteredProducer.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltFrame.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltFrame.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltGeometry.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltGeometry.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltMultitrack.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltMultitrack.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltParser.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltParser.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltPlaylist.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltPlaylist.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltProducer.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltProducer.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltProperties.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltProperties.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltPushConsumer.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltPushConsumer.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltService.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltService.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltTokeniser.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltTokeniser.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltTractor.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltTractor.h">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltTransition.cpp">\r
+ </File>\r
+ <File\r
+ RelativePath=".\src\MltTransition.h">\r
+ </File>\r
+ </Filter>\r
+ <Filter\r
+ Name="Header Files"\r
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">\r
+ </Filter>\r
+ <Filter\r
+ Name="Resource Files"\r
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"\r
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">\r
+ </Filter>\r
+ </Files>\r
+ <Globals>\r
+ </Globals>\r
+</VisualStudioProject>\r
#include "MltFilteredConsumer.h"
#include "MltFrame.h"
#include "MltGeometry.h"
+#ifndef WIN32
#include "MltMiracle.h"
+#endif
#include "MltMultitrack.h"
#include "MltParser.h"
#include "MltPlaylist.h"
#include "MltProducer.h"
#include "MltProperties.h"
#include "MltPushConsumer.h"
+#ifndef WIN32
#include "MltResponse.h"
+#endif
#include "MltService.h"
#include "MltTokeniser.h"
#include "MltTractor.h"
#ifndef _MLTPP_CONSUMER_H_
#define _MLTPP_CONSUMER_H_
+#include "config.h"
+
#include <framework/mlt.h>
#include "MltService.h"
{
class Service;
- class Consumer : public Service
+ class MLTPP_DECLSPEC Consumer : public Service
{
private:
mlt_consumer instance;
#ifndef _MLTPP_DEQUE_H
#define _MLTPP_DEQUE_H
+#include "config.h"
+
#include <framework/mlt.h>
namespace Mlt
{
- class Deque
+ class MLTPP_DECLSPEC Deque
{
private:
mlt_deque deque;
#ifndef _MLTPP_EVENT_H_
#define _MLTPP_EVENT_H_
+#include "config.h"
+
#include <framework/mlt.h>
namespace Mlt
{
- class Event
+ class MLTPP_DECLSPEC Event
{
private:
mlt_event instance;
return new Consumer( 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( );
#ifndef _MLTPP_FACTORY_H_
#define _MLTPP_FACTORY_H_
+#include "config.h"
+
#include <framework/mlt.h>
namespace Mlt
class Transition;
class Consumer;
- class Factory
+ class MLTPP_DECLSPEC Factory
{
public:
static int init( char *arg = NULL );
static Filter *filter( char *id, char *arg = NULL );
static Transition *transition( char *id, char *arg = NULL );
static Consumer *consumer( char *id, char *arg = NULL );
+#ifdef WIN32
+ static char *getenv( const char * );
+ static int setenv( const char *, const char * );
+#endif
static void close( );
};
}
#ifndef _MLTPP_FIELD_H_
#define _MLTPP_FIELD_H_
+#include "config.h"
+
#include <framework/mlt.h>
#include "MltService.h"
class Filter;
class Transition;
- class Field : public Service
+ class MLTPP_DECLSPEC Field : public Service
{
private:
mlt_field instance;
#ifndef _MLTPP_FILTER_H_
#define _MLTPP_FILTER_H_
+#include "config.h"
+
#include <framework/mlt.h>
#include "MltService.h"
{
class Service;
- class Filter : public Service
+ class MLTPP_DECLSPEC Filter : public Service
{
private:
mlt_filter instance;
#ifndef _MLTPP_FILTERED_CONSUMER_H_
#define _MLTPP_FILTERED_CONSUMER_H_
+#include "config.h"
+
#include "MltConsumer.h"
#include "MltFilter.h"
#include "MltService.h"
class Service;
class Filter;
- class FilteredConsumer : public Consumer
+ class MLTPP_DECLSPEC FilteredConsumer : public Consumer
{
private:
Service *first;
#ifndef _MLTPP_FILTERED_PRODUCER_H_
#define _MLTPP_FILTERED_PRODUCER_H_
+#include "config.h"
+
#include "MltProducer.h"
#include "MltFilter.h"
#include "MltService.h"
class Service;
class Filter;
- class FilteredProducer : public Producer
+ class MLTPP_DECLSPEC FilteredProducer : public Producer
{
private:
Service *last;
uint8_t *Frame::get_image( mlt_image_format &format, int &w, int &h, int writable )
{
uint8_t *image = NULL;
- if ( mlt_properties_get_int( get_properties( ), "consumer_aspect_ratio" ) == 0 )
- mlt_properties_set_int( get_properties( ), "consumer_aspect_ratio", 1 );
+ if ( get_double( "consumer_aspect_ratio" ) == 0.0 )
+ set( "consumer_aspect_ratio", 1.0 );
mlt_frame_get_image( get_frame( ), &image, &format, &w, &h, writable );
set( "format", format );
set( "writable", writable );
unsigned char *Frame::fetch_image( mlt_image_format f, int w, int h, int writable )
{
uint8_t *image = NULL;
- if ( mlt_properties_get_int( get_properties( ), "consumer_aspect_ratio" ) == 0 )
- mlt_properties_set_int( get_properties( ), "consumer_aspect_ratio", 1 );
+ if ( get_double( "consumer_aspect_ratio" ) == 0.0 )
+ set( "consumer_aspect_ratio", 1.0 );
mlt_frame_get_image( get_frame( ), &image, &f, &w, &h, writable );
set( "format", f );
set( "writable", writable );
#ifndef _MLTPP_FRAME_H_
#define _MLTPP_FRAME_H_
+#include "config.h"
+
#include <framework/mlt.h>
#include "MltProperties.h"
class Properties;
class Producer;
- class Frame : public Properties
+ class MLTPP_DECLSPEC Frame : public Properties
{
private:
mlt_frame instance;
#ifndef _MLTPP_GEOMETRY_H
#define _MLTPP_GEOMETRY_H
+#include "config.h"
+
#include <framework/mlt.h>
namespace Mlt
{
// Just for consistent naming purposes
- class GeometryItem
+ class MLTPP_DECLSPEC GeometryItem
{
private:
struct mlt_geometry_item_s item;
public:
mlt_geometry_item get_item( ) { return &item; }
- bool key( ) { return item.key; }
+ bool key( ) { return item.key != 0; }
int frame( ) { return item.frame; }
void frame( int value ) { item.frame = value; }
float x( ) { return item.x; }
void mix( float value ) { item.f[4] = 1; item.mix = value; }
};
- class Geometry
+ class MLTPP_DECLSPEC Geometry
{
private:
mlt_geometry geometry;
#ifndef _MLTPP_MULTITRACK_H_
#define _MLTPP_MULTITRACK_H_
+#include "config.h"
+
#include <framework/mlt.h>
#include "MltProducer.h"
class Service;
class Producer;
- class Multitrack : public Producer
+ class MLTPP_DECLSPEC Multitrack : public Producer
{
private:
mlt_multitrack instance;
#ifndef _MLTPP_PARSER_H_
#define _MLTPP_PARSER_H_
+#include "config.h"
+
#include <framework/mlt.h>
#include "MltProperties.h"
class Filter;
class Transition;
- class Parser : public Properties
+ class MLTPP_DECLSPEC Parser : public Properties
{
private:
mlt_parser parser;
- protected:
- virtual mlt_properties get_properties( );
public:
Parser( );
~Parser( );
int start( Service &service );
+ virtual mlt_properties get_properties( );
virtual int on_invalid( Service *object );
virtual int on_unknown( Service *object );
virtual int on_start_producer( Producer *object );
return info;
}
+void Playlist::delete_clip_info( ClipInfo *info )
+{
+ delete info;
+}
+
int Playlist::insert( Producer &producer, int where, int in, int out )
{
return mlt_playlist_insert( get_playlist( ), producer.get_producer( ), where, in, out );
bool Playlist::is_blank( int clip )
{
- return mlt_playlist_is_blank( get_playlist( ), clip );
+ return mlt_playlist_is_blank( get_playlist( ), clip ) != 0;
}
bool Playlist::is_blank_at( int position )
{
- return mlt_playlist_is_blank_at( get_playlist( ), position );
+ return mlt_playlist_is_blank_at( get_playlist( ), position ) != 0;
}
Producer *Playlist::replace_with_blank( int clip )
#ifndef _MLTPP_PLAYLIST_H_
#define _MLTPP_PLAYLIST_H_
+#include "config.h"
+
#include <framework/mlt.h>
#include "MltProducer.h"
class Playlist;
class Transition;
- class ClipInfo
+ class MLTPP_DECLSPEC ClipInfo
{
public:
ClipInfo( );
int repeat;
};
- class Playlist : public Producer
+ class MLTPP_DECLSPEC Playlist : public Producer
{
private:
mlt_playlist instance;
int current_clip( );
Producer *current( );
ClipInfo *clip_info( int index, ClipInfo *info = NULL );
+ static void delete_clip_info( ClipInfo *info );
int insert( Producer &producer, int where, int in = -1, int out = -1 );
int remove( int where );
int move( int from, int to );
bool Producer::is_cut( )
{
- return mlt_producer_is_cut( get_producer( ) );
+ return mlt_producer_is_cut( get_producer( ) ) != 0;
}
bool Producer::is_blank( )
{
- return mlt_producer_is_blank( get_producer( ) );
+ return mlt_producer_is_blank( get_producer( ) ) != 0;
}
bool Producer::same_clip( Producer &that )
#ifndef _MLTPP_PRODUCER_H_
#define _MLTPP_PRODUCER_H_
+#include "config.h"
+
#include <framework/mlt.h>
#include "MltService.h"
class Service;
class Filter;
- class Producer : public Service
+ class MLTPP_DECLSPEC Producer : public Service
{
private:
mlt_producer instance;
int Properties::save( const char *file )
{
+#ifdef WIN32
+ return mlt_properties_save( get_properties( ), file );
+#else
int error = 0;
FILE *f = fopen( file, "w" );
if ( f != NULL )
error = 1;
}
return error;
+#endif
}
#if defined( __DARWIN__ ) && GCC_VERSION < 40000
return new Event( mlt_events_setup_wait_for( get_properties( ), id ) );
}
+void Properties::delete_event( Event *event )
+{
+ delete event;
+}
+
void Properties::wait_for( Event *event, bool destroy )
{
mlt_events_wait_for( get_properties( ), event->get_event( ) );
#ifndef _MLTPP_PROPERTIES_H_
#define _MLTPP_PROPERTIES_H_
+#include "config.h"
+
#include <stdio.h>
#include <framework/mlt.h>
/** Abstract Properties class.
*/
- class Properties
+ class MLTPP_DECLSPEC Properties
{
private:
mlt_properties instance;
- protected:
- virtual mlt_properties get_properties( );
public:
Properties( );
Properties( bool dummy );
Properties( mlt_properties properties );
Properties( const char *file );
virtual ~Properties( );
+ virtual mlt_properties get_properties( );
int inc_ref( );
int dec_ref( );
int ref_count( );
#else
Event *listen( char *id, void *object, mlt_listener );
#endif
+ static void delete_event( Event * );
Event *setup_wait_for( char *id );
void wait_for( Event *, bool destroy = true );
};
#ifndef MLTPP_PUSH_CONSUMER_H
#define MLTPP_PUSH_CONSUMER_H
+#include "config.h"
+
#include "MltConsumer.h"
namespace Mlt
class Service;
class PushPrivate;
- class PushConsumer : public Consumer
+ class MLTPP_DECLSPEC PushConsumer : public Consumer
{
private:
PushPrivate *m_private;
#ifndef _MLTPP_SERVICE_H_
#define _MLTPP_SERVICE_H_
+#include "config.h"
+
#include <framework/mlt.h>
#include "MltProperties.h"
class Filter;
class Frame;
- class Service : public Properties
+ class MLTPP_DECLSPEC Service : public Properties
{
private:
mlt_service instance;
virtual mlt_service get_service( );
void lock( );
void unlock( );
- mlt_properties get_properties( );
+ virtual mlt_properties get_properties( );
int connect_producer( Service &producer, int index = 0 );
Service *consumer( );
Service *producer( );
#ifndef _MLTPP_TOKENISER_H
#define _MLTPP_TOKENISER_H
+#include "config.h"
+
#include <framework/mlt.h>
namespace Mlt
{
- class Tokeniser
+ class MLTPP_DECLSPEC Tokeniser
{
private:
mlt_tokeniser tokens;
#ifndef _MLTPP_TRACTOR_H_
#define _MLTPP_TRACTOR_H_
+#include "config.h"
+
#include <framework/mlt.h>
#include "MltProducer.h"
class Transition;
class Filter;
- class Tractor : public Producer
+ class MLTPP_DECLSPEC Tractor : public Producer
{
private:
mlt_tractor instance;
Tractor( Tractor &tractor );
Tractor( char *id, char *arg = NULL );
virtual ~Tractor( );
- mlt_tractor get_tractor( );
+ virtual mlt_tractor get_tractor( );
mlt_producer get_producer( );
Multitrack *multitrack( );
Field *field( );
#ifndef _MLTPP_TRANSITION_H_
#define _MLTPP_TRANSITION_H_
+#include "config.h"
+
#include <framework/mlt.h>
#include "MltService.h"
{
class Service;
- class Transition : public Service
+ class MLTPP_DECLSPEC Transition : public Service
{
private:
mlt_transition instance;