]> git.sesse.net Git - mlt/commitdiff
+ Win32 port - dev studio is required to avoid issues with C++ ABI compatibility
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Thu, 23 Feb 2006 09:49:30 +0000 (09:49 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Thu, 23 Feb 2006 09:49:30 +0000 (09:49 +0000)
+ Fix for image render in NTSC

NB: mlt patch to follow (this one isn't much use without it :-)) - mlt build is purely
mingw32 of course

git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++@891 d19143bc-622f-0410-bfdd-b5b2a6649095

28 files changed:
mlt++/mlt++.sln [new file with mode: 0644]
mlt++/mlt++.vcproj [new file with mode: 0644]
mlt++/src/Mlt.h
mlt++/src/MltConsumer.h
mlt++/src/MltDeque.h
mlt++/src/MltEvent.h
mlt++/src/MltFactory.cpp
mlt++/src/MltFactory.h
mlt++/src/MltField.h
mlt++/src/MltFilter.h
mlt++/src/MltFilteredConsumer.h
mlt++/src/MltFilteredProducer.h
mlt++/src/MltFrame.cpp
mlt++/src/MltFrame.h
mlt++/src/MltGeometry.h
mlt++/src/MltMultitrack.h
mlt++/src/MltParser.h
mlt++/src/MltPlaylist.cpp
mlt++/src/MltPlaylist.h
mlt++/src/MltProducer.cpp
mlt++/src/MltProducer.h
mlt++/src/MltProperties.cpp
mlt++/src/MltProperties.h
mlt++/src/MltPushConsumer.h
mlt++/src/MltService.h
mlt++/src/MltTokeniser.h
mlt++/src/MltTractor.h
mlt++/src/MltTransition.h

diff --git a/mlt++/mlt++.sln b/mlt++/mlt++.sln
new file mode 100644 (file)
index 0000000..1820fb8
--- /dev/null
@@ -0,0 +1,21 @@
+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
diff --git a/mlt++/mlt++.vcproj b/mlt++/mlt++.vcproj
new file mode 100644 (file)
index 0000000..6faedb5
--- /dev/null
@@ -0,0 +1,265 @@
+<?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="&quot;C:\Program Files\mlt\include\mlt&quot;"\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="&quot;C:\Program Files\mlt\lib&quot;"\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="&quot;C:\Program Files\mlt\include\mlt&quot;"\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="&quot;C:\Program Files\mlt\lib&quot;"\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
index 17621c8839ba48c86ef7601a677f99d1cf598306..7abb1dc408f65dfd2b78287c1bbeb8c0284d04e6 100644 (file)
 #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"
index 17eda600a42899f09811d17048698214c926588e..dc4c87d4bd30ae61e340ad408c5aa5fc51686fe0 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_CONSUMER_H_
 #define _MLTPP_CONSUMER_H_
 
+#include "config.h"
+
 #include <framework/mlt.h>
 
 #include "MltService.h"
@@ -29,7 +31,7 @@ namespace Mlt
 {
        class Service;
 
-       class Consumer : public Service
+       class MLTPP_DECLSPEC Consumer : public Service
        {
                private:
                        mlt_consumer instance;
index 5323fd611117cb7b5378eb845f548aaad86706fb..155bfd655effa58f45f5445cfe9c7219650251c6 100644 (file)
 #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;
index 66b189f821bc4dc63d1b2548646ea2eb0b593e74..92b391718e5e7dc521ea8018d51f417305560c8b 100644 (file)
 #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;
index 51aa7f96f7e3bc7a6d2d28f25383020e79fbba06..f32018a46e3458f4f51ab7dcf7d09bcb669aa6d3 100644 (file)
@@ -55,6 +55,18 @@ Consumer *Factory::consumer( char *id, char *arg )
        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( );
index 01286984d55df2553977722c3359dbb1e1a8f4ce..f493c743c7e9dd903f4d68b61d8a1a9c886a199a 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_FACTORY_H_
 #define _MLTPP_FACTORY_H_
 
+#include "config.h"
+
 #include <framework/mlt.h>
 
 namespace Mlt
@@ -31,7 +33,7 @@ namespace Mlt
        class Transition;
        class Consumer;
 
-       class Factory
+       class MLTPP_DECLSPEC Factory
        {
                public:
                        static int init( char *arg = NULL );
@@ -40,6 +42,10 @@ namespace Mlt
                        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( );
        };
 }
index 67a631bb44162d7efec1963dfb796e5b5f36bdc2..06e2d4627bd56688402c2a46d08b5af83614175b 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_FIELD_H_
 #define _MLTPP_FIELD_H_
 
+#include "config.h"
+
 #include <framework/mlt.h>
 
 #include "MltService.h"
@@ -31,7 +33,7 @@ namespace Mlt
        class Filter;
        class Transition;
 
-       class Field : public Service
+       class MLTPP_DECLSPEC Field : public Service
        {
                private:
                        mlt_field instance;
index ac0a7205bf5cf633d517cb575e438c968afa1e39..3be254cd28f8b5ddbb9de772041e155a64b84ed2 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_FILTER_H_
 #define _MLTPP_FILTER_H_
 
+#include "config.h"
+
 #include <framework/mlt.h>
 
 #include "MltService.h"
@@ -29,7 +31,7 @@ namespace Mlt
 {
        class Service;
 
-       class Filter : public Service
+       class MLTPP_DECLSPEC Filter : public Service
        {
                private:
                        mlt_filter instance;
index 1e48a3619aed08ea29ed9cc9a52da3a42f46fa6f..f1c1fffeeec53f860c944fd2352ebbc74224689f 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_FILTERED_CONSUMER_H_
 #define _MLTPP_FILTERED_CONSUMER_H_
 
+#include "config.h"
+
 #include "MltConsumer.h"
 #include "MltFilter.h"
 #include "MltService.h"
@@ -31,7 +33,7 @@ namespace Mlt
        class Service;
        class Filter;
 
-       class FilteredConsumer : public Consumer
+       class MLTPP_DECLSPEC FilteredConsumer : public Consumer
        {
                private:
                        Service *first;
index a13a0d32de22513e620258bf87839166dbb2c858..ce76c869bc239faaa923167871748d31709805ca 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_FILTERED_PRODUCER_H_
 #define _MLTPP_FILTERED_PRODUCER_H_
 
+#include "config.h"
+
 #include "MltProducer.h"
 #include "MltFilter.h"
 #include "MltService.h"
@@ -31,7 +33,7 @@ namespace Mlt
        class Service;
        class Filter;
 
-       class FilteredProducer : public Producer
+       class MLTPP_DECLSPEC FilteredProducer : public Producer
        {
                private:
                        Service *last;
index 546220d968d607218b22288b80ef208d4d92bd41..5d974ce0f32341c5b22198844dfc9e091cedcec5 100644 (file)
@@ -52,8 +52,8 @@ mlt_properties Frame::get_properties( )
 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 );
@@ -63,8 +63,8 @@ uint8_t *Frame::get_image( mlt_image_format &format, int &w, int &h, int writabl
 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 );
index 030ae0d979600f16ea823b607c4d803957b799c6..9d564ab816a56b364d4cbdbbeddba3e607b11cc0 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_FRAME_H_
 #define _MLTPP_FRAME_H_
 
+#include "config.h"
+
 #include <framework/mlt.h>
 #include "MltProperties.h"
 
@@ -29,7 +31,7 @@ namespace Mlt
        class Properties;
        class Producer;
 
-       class Frame : public Properties
+       class MLTPP_DECLSPEC Frame : public Properties
        {
                private:
                        mlt_frame instance;
index fea20e179fb5c6252e272a09ff368bf03eef8872..0105467dfa37bd0d6643ff1f15bfdd11e5b933eb 100644 (file)
 #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; }
@@ -47,7 +49,7 @@ namespace Mlt
                        void mix( float value ) { item.f[4] = 1; item.mix = value; }
        };
 
-       class Geometry
+       class MLTPP_DECLSPEC Geometry
        {
                private:
                        mlt_geometry geometry;
index 5d43468ee7a61e4af6569c7aa781f34993af3d2f..75a49faffe055bc65ae8cd30ea8abb2c11504f15 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_MULTITRACK_H_
 #define _MLTPP_MULTITRACK_H_
 
+#include "config.h"
+
 #include <framework/mlt.h>
 
 #include "MltProducer.h"
@@ -30,7 +32,7 @@ namespace Mlt
        class Service;
        class Producer;
 
-       class Multitrack : public Producer
+       class MLTPP_DECLSPEC Multitrack : public Producer
        {
                private:
                        mlt_multitrack instance;
index 397834ec13113798454b6ec7f2bcf7e2840a50a6..b7ffc4640bd701948f7c83aa4fd4e5ae507106d5 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_PARSER_H_
 #define _MLTPP_PARSER_H_
 
+#include "config.h"
+
 #include <framework/mlt.h>
 #include "MltProperties.h"
 
@@ -35,16 +37,15 @@ namespace Mlt
        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 );
index 0d34accffcc8f5971b561dad351f54e7593556fa..350e53b7ade6f5f0ef29c5c8bdec46439737224e 100644 (file)
@@ -167,6 +167,11 @@ ClipInfo *Playlist::clip_info( int index, ClipInfo *info )
        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 );
@@ -241,12 +246,12 @@ bool Playlist::is_mix( int clip )
 
 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 )
index badc1d03349dbab482bbd2ccaf2de29d0bc46e73..0cd17b0859b68c21fb55593cc3b863d16f1f8c2b 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_PLAYLIST_H_
 #define _MLTPP_PLAYLIST_H_
 
+#include "config.h"
+
 #include <framework/mlt.h>
 
 #include "MltProducer.h"
@@ -32,7 +34,7 @@ namespace Mlt
        class Playlist;
        class Transition;
 
-       class ClipInfo
+       class MLTPP_DECLSPEC ClipInfo
        {
                public:
                        ClipInfo( );
@@ -52,7 +54,7 @@ namespace Mlt
                        int repeat;
        };
 
-       class Playlist : public Producer
+       class MLTPP_DECLSPEC Playlist : public Producer
        {
                private:
                        mlt_playlist instance;
@@ -72,6 +74,7 @@ namespace Mlt
                        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 );
index 3a588195041eefe6fb399146cd79ae381e3b251e..1b06e9130d39c577c7e1bf9334aac5fcbc585614 100644 (file)
@@ -167,12 +167,12 @@ Producer *Producer::cut( int in, int out )
 
 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 )
index 81b4dad85f211ab1daf353998ca89255ad4b382d..35c2f0e50c4723f3d5f9a6f8b6aec96ef0e79ea0 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_PRODUCER_H_
 #define _MLTPP_PRODUCER_H_
 
+#include "config.h"
+
 #include <framework/mlt.h>
 
 #include "MltService.h"
@@ -30,7 +32,7 @@ namespace Mlt
        class Service;
        class Filter;
 
-       class Producer : public Service
+       class MLTPP_DECLSPEC Producer : public Service
        {
                private:
                        mlt_producer instance;
index a1452e29b3a3d31c213aec4fbcae14462401cba6..f168eb92fc4f7bc2e224a6e93ce5a221a8650e43 100644 (file)
@@ -206,6 +206,9 @@ void Properties::load( const char *file )
 
 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 )
@@ -218,6 +221,7 @@ int Properties::save( const char *file )
                error = 1;
        }
        return error;
+#endif
 }
 
 #if defined( __DARWIN__ ) && GCC_VERSION < 40000
@@ -243,6 +247,11 @@ Event *Properties::setup_wait_for( char *id )
        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( ) );
index 9393992d66d9dbd70f71e74ce5428325be644f96..4e5166877dc85a8f08462eb5e4c52105dcc24a3c 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_PROPERTIES_H_
 #define _MLTPP_PROPERTIES_H_
 
+#include "config.h"
+
 #include <stdio.h>
 #include <framework/mlt.h>
 
@@ -31,12 +33,10 @@ namespace Mlt
        /** Abstract Properties class.
         */
 
-       class Properties 
+       class MLTPP_DECLSPEC Properties 
        {
                private:
                        mlt_properties instance;
-               protected:
-                       virtual mlt_properties get_properties( );
                public:
                        Properties( );
                        Properties( bool dummy );
@@ -44,6 +44,7 @@ namespace Mlt
                        Properties( mlt_properties properties );
                        Properties( const char *file );
                        virtual ~Properties( );
+                       virtual mlt_properties get_properties( );
                        int inc_ref( );
                        int dec_ref( );
                        int ref_count( );
@@ -78,6 +79,7 @@ namespace Mlt
                        #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 );
        };
index abb8a3c0c71d382dd495e44127678ca3570578e8..105d7fa00a11e51399427acb8e3ee04a816437ca 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef MLTPP_PUSH_CONSUMER_H
 #define MLTPP_PUSH_CONSUMER_H
 
+#include "config.h"
+
 #include "MltConsumer.h"
 
 namespace Mlt
@@ -29,7 +31,7 @@ namespace Mlt
        class Service;
        class PushPrivate;
 
-       class PushConsumer : public Consumer
+       class MLTPP_DECLSPEC PushConsumer : public Consumer
        {
                private:
                        PushPrivate *m_private;
index 69dd9894721d8204ac52ed391cb0788c46cc8496..aa2c0e278e1ef0e3dce6cc75b549ef276e452e06 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_SERVICE_H_
 #define _MLTPP_SERVICE_H_
 
+#include "config.h"
+
 #include <framework/mlt.h>
 
 #include "MltProperties.h"
@@ -32,7 +34,7 @@ namespace Mlt
        class Filter;
        class Frame;
 
-       class Service : public Properties
+       class MLTPP_DECLSPEC Service : public Properties
        {
                private:
                        mlt_service instance;
@@ -44,7 +46,7 @@ namespace Mlt
                        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( );
index f3d127e39875d2d248f0de592ea67623133e52cb..7b0bda9b68856d24ab50f88645c3cf1fa95f6fe5 100644 (file)
 #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;
index 2bc8e9996443491016f0dad92458c3e2f3d81785..3b220aaec8dbf257f1fab38d9177ab57f229f276 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_TRACTOR_H_
 #define _MLTPP_TRACTOR_H_
 
+#include "config.h"
+
 #include <framework/mlt.h>
 
 #include "MltProducer.h"
@@ -33,7 +35,7 @@ namespace Mlt
        class Transition;
        class Filter;
 
-       class Tractor : public Producer
+       class MLTPP_DECLSPEC Tractor : public Producer
        {
                private:
                        mlt_tractor instance;
@@ -44,7 +46,7 @@ namespace Mlt
                        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( );
index 1ef84865c4dbcba4085a87bb209e78280021dbb3..66ed23f61131e116891a30945ba8de48acaea8c7 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _MLTPP_TRANSITION_H_
 #define _MLTPP_TRANSITION_H_
 
+#include "config.h"
+
 #include <framework/mlt.h>
 #include "MltService.h"
 
@@ -28,7 +30,7 @@ namespace Mlt
 {
        class Service;
 
-       class Transition : public Service
+       class MLTPP_DECLSPEC Transition : public Service
        {
                private:
                        mlt_transition instance;