4 This mlt sub-project provides a C++ wrapping for the MLT library.
9 ./configure [ --prefix=path ]
16 Use the following definitions in a Makefile to compile and link with mlt++:
18 CXXFLAGS=`mlt-config -Wall`
21 Include files for the classes can either be explicitly included, ie:
23 #include <mlt++/MltProducer.h>
26 Or you can include all using:
28 #include <mlt++/Mlt.h>
30 All definitions are placed in an Mlt namespace, and adhere closely to the C
31 naming convention. Mappings always follow the pattern:
35 mlt_factory_init => Mlt::Factory::init
36 mlt_factory_producer => Mlt::Factory::producer
41 mlt_producer ==> Mlt::Producer
42 mlt_consumer ==> Mlt::Consumer
47 mlt_type_method ==> Mlt:Type.method
48 ie: mlt_playlist_append ==> Mlt::Playlist.append
51 Additionally, you can specify:
55 To avoid the enforced use of the Mlt:: prefix.
57 Enumerators and macros are reused directly from the C library.
62 The currently mapped objects are shown in the following hierarchy:
77 Care should be taken with wrapper objects.
79 Taking, as an example, the C function that returns the immediate consumer of
82 mlt_service mlt_service_consumer( mlt_service );
86 Mlt::Service *Mlt::Service.consumer( );
88 Note that you get an object back - it is never the original object, but a
89 wrapping object. This is done to keep consistency with the C api which may
90 instantiate C instances - therefore it cannot be assumed that a C++ object
91 exists for all mlt service instances.
93 As such, it is mandatory that you delete these objects. The original will
94 not be affected. However, all other modifications (to properties or its
95 state of connection) will be reflected in the original object.
97 This approach excludes the use of RTTI to determine the real type of the
98 object - this can only be done by parsing the objects properties.
100 Objects may be invalid - always use the is_valid method to check validity
106 The mechanisms for the definition of new services are deliberately
107 excluded from the C++ wrappings - this is done to ensure that service
108 networks constructed can be serialised and used by existing applications
109 which are based on the C API (such as miracle).