Class rework and simplification
[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                 etc
38
39         Types:
40
41                 mlt_producer                    ==>     Mlt::Producer
42                 mlt_consumer                    ==>     Mlt::Consumer
43                 etc
44
45         Methods:
46
47                 mlt_type_method                 ==> Mlt:Type.method
48         ie:     mlt_playlist_append             ==> Mlt::Playlist.append
49                 etc
50
51         Additionally, you can specify:
52
53                 using namespace Mlt;
54
55         To avoid the enforced use of the Mlt:: prefix.
56
57         Enumerators and macros are reused directly from the C library.
58
59 CLASS HIERARCHY
60 ---------------
61
62         The currently mapped objects are shown in the following hierarchy:
63
64                 Factory
65                 Properties
66                         Frame
67                         Service
68                                 Consumer
69                                 Filter
70                                 Producer
71                                         Playlist
72                                 Transition
73
74 SPECIAL CASES
75 -------------
76
77         Care should be taken with wrapper objects. 
78
79         Taking, as an example, the C function that returns the immediate consumer of
80         a service:
81
82                 mlt_service mlt_service_consumer( mlt_service );
83
84         This maps to:
85
86                 Mlt::Service *Mlt::Service.consumer( );
87
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.
92
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.
96
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.
99
100         Objects may be invalid - always use the is_valid method to check validity 
101         before use.
102
103 LIMITATIONS
104 -----------
105
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).
110
111