]> git.sesse.net Git - vlc/blob - plugins/mad/DESIGN
* COMPLETE CVS BREAKAGE !! The MAIN branch is going to be a playground
[vlc] / plugins / mad / DESIGN
1 File:   Plugin mad for vlc is based upon libmad from the mad distribution.
2 Author: Jean-Paul Saman <jpsaman@wxs.nl>
3
4 Directories:
5 ============
6 vlc/                    : adapted config.in and Makefile
7                         : added libtool, ltmain.sh and ltconfig
8 vlc/plugins/mad         : mad audio decoder plugin for vlc
9
10 Interface functions to implement in mad plugin are:
11 =========
12 adec_mad_Probe
13 adec_mad_Run
14 adec_mad_Init
15 adec_mad_ErrorThread
16 adec_mad_EndThread
17
18 libmad_input
19 libmad_output
20 libmad_header
21 libmad_messages
22
23 Design: (ASCII art)
24 =======
25 It represents the function call flow viewed from the vlc main program. The main program is in charge of allocating decoders,
26 initializing, starting and stopping them.
27
28       ---------------   
29       |  <library>  |
30       |   libmad    |
31       ---------------
32             ^
33             |
34       ---------------           
35       |   <plugin>  |
36       |     mad     |
37       _______________
38             ^
39             |
40       ________________________
41       |  <decoder interface> |
42       | vlc plugin interface |
43       ________________________
44
45
46 Interface view:
47 ===============
48                                     [mad decoder plugin]
49                                    ----------------------
50         vlc decoder interface -> | mad_adec     mad_libmad | -> libmad
51                                    -----------------------
52
53 Rationel:
54 Keeping libmad as a separate library, either dynamic or statically linked in, makes maintenance so much simpeler.
55 Merging with a new libmad version should be straight forward as long as the interface stays stable.
56 There is another benefit: Disk (actually flash ROM) resources and memory are very limited on a iPaq.
57 Other programs or utilities like madplay and BBplay can make use of the same libmad version we do. In this way
58 limiting the needed storage place on disk (flash ROM). Also this is only possible when the interface stays the same.
59
60