Multitrack classes added
[melted] / mlt++ / README
1 MLT++
2 -----
3
4         This mlt sub-project provides a C++ wrapping for the MLT library.
5
6 INSTALLATION
7 ------------
8
9         ./configure [ --prefix=path ]
10         make
11         make install
12
13 USAGE
14 -----
15
16         Use the following definitions in a Makefile to compile and link with mlt++:
17
18                 CXXFLAGS=`mlt-config -Wall`
19                 LDFLAGS=-lmlt++
20
21         Include files for the classes can either be explicitly included, ie:
22
23                 #include <mlt++/MltProducer.h>
24                 etc
25
26         Or you can include all using:
27
28                 #include <mlt++/Mlt.h>
29
30         All definitions are placed in an Mlt namespace, and adhere closely to the C
31         naming convention. Mappings always follow the pattern:
32
33         Factory methods:
34
35                 mlt_factory_init        ==> Mlt::Factory::init
36                 mlt_factory_producer    ==> Mlt::Factory::producer
37                 mlt_factory_filter      ==> Mlt::Factory::filter
38                 mlt_factory_transition  ==> Mlt::Factory::transition
39                 mlt_factory_consumer    ==> Mlt::Factory::consumer
40                 mlt_factory_close       ==> Mlt::Factory::close
41
42         NB: Factory usage for service construction is optional.
43
44         Types:
45
46                 mlt_properties          ==> Mlt::Properties
47                 mlt_frame               ==> Mlt::Frame
48                 mlt_service             ==> Mlt::Service
49                 mlt_producer            ==> Mlt::Producer
50                 mlt_filter              ==> Mlt::Filter
51                 mlt_transition          ==> Mlt::Transition
52                 mlt_consumer            ==> Mlt::Consumer
53
54         Methods:
55
56                 mlt_type_method         ==> Mlt::Type.method
57         ie:     mlt_playlist_append     ==> Mlt::Playlist.append
58
59         Parent methods are available directly on children.
60
61         Additionally, you can specify:
62
63                 using namespace Mlt;
64
65         To avoid the enforced use of the Mlt:: prefix.
66
67         Enumerators and macros are reused directly from the C library.
68
69 CLASS HIERARCHY
70 ---------------
71
72         The currently mapped objects are shown in the following hierarchy:
73
74                 Factory
75                 Properties
76                         Frame
77                         Service
78                                 Consumer
79                                 Filter
80                                 Producer
81                                         Playlist
82                                 Transition
83
84 SPECIAL CASES
85 -------------
86
87         Care should be taken with wrapper objects. 
88
89         Taking, as an example, the C function that returns the immediate consumer of
90         a service:
91
92                 mlt_service mlt_service_consumer( mlt_service );
93
94         This maps to:
95
96                 Mlt::Service *Mlt::Service.consumer( );
97
98         Note that you get an object back - it is never the original c++ object, but 
99         a wrapping object. This is done to keep consistency with the C api which may 
100         instantiate C instances - therefore it cannot be assumed that a C++ object 
101         exists for all mlt service instances.
102
103         As such, it is mandatory that you delete these objects. The original will 
104         not be affected. However, all other modifications (to properties or its
105         state of connection) will be reflected in the original object.
106
107         This approach excludes the use of RTTI to determine the real type of the 
108         object - this can only be done by parsing the objects properties.
109
110         Objects may be invalid - always use the is_valid method to check validity 
111         before use.
112
113 LIMITATIONS
114 -----------
115
116         The mechanisms for the definition of new services are deliberately 
117         excluded from the C++ wrappings - this is done to ensure that service 
118         networks constructed can be serialised and used by existing applications
119         which are based on the C API (such as miracle).
120
121 SWIG
122 ----
123
124         Experimental swig bindings based on mlt++ are provided.
125