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