Object validity checks
[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         All definitions are placed in an Mlt namespace, and adhere closely to the C
22         naming convention. Mappings always follow the pattern:
23
24         Factory methods:
25
26                 mlt_factory_init                =>      Mlt::Factory::init
27                 mlt_factory_producer    =>      Mlt::Factory::producer
28                 etc
29
30         Types:
31
32                 mlt_producer                    ==>     Mlt::Producer
33                 mlt_consumer                    ==>     Mlt::Consumer
34                 etc
35
36         Methods:
37
38                 mlt_type_method                 ==> Mlt:Type.method
39         ie:     mlt_playlist_append             ==> Mlt::Playlist.append
40                 etc
41
42         Enumerators and macros are reused directly from the C library.
43
44 CLASS HIERARCHY
45 ---------------
46
47         The currently mapped objects are shown in the following hierarchy:
48
49                 Factory
50                 Properties
51                         Frame
52                         Service
53                                 Consumer
54                                 Filter
55                                 Producer
56                                         Playlist
57                                 Transition
58
59 SPECIAL CASES
60 -------------
61
62         Care should be taken with wrapper objects. 
63
64         Taking, as an example, the C function that returns the immediate consumer of
65         a service:
66
67                 mlt_service mlt_service_consumer( mlt_service );
68
69         This maps to:
70
71                 Mlt::Service *Mlt::Service.consumer( );
72
73         Note that you get an object back - it is never the original object, but a 
74         wrapping object. This is done to keep consistency with the C api which may 
75         instantiate C instances - therefore there it cannot be assumed that a C++ 
76         object exists for all mlt service instances.
77
78         As such, it is mandatory that you delete these objects. The original will 
79         not be affected. Further to that, all modifications (to properties or its
80         state of connection) will be reflected in the original object.
81
82         This excludes the use of the RTTI to determine the real type of the object -
83         this can only be done by parsing the objects properties.
84
85         Non-NULL objects may be invalid - always use the is_valid method to
86         check validity before use.
87
88 LIMITATIONS
89 -----------
90
91         The mechanisms for the definition of new services have deliberately not 
92         been exposed by the C++ wrappings - this is done to ensure that service 
93         networks constructed can be serialised and used by existing applications
94         which are based on the C API (such as miracle).
95