1The avi decoder plugins
2-----------------------
3
4The avi decoder consists of a set of gstreamer plugins:
5
6 - demuxer (avidemux)
7 - avi to gstreamer type converter (avitypes)
8 - windows dlls wrappers.
9
10the avidecoder element uses the above plugins to perform the avi
11decoding. It is constructed as a custom bin which initially only has
12the demuxer element in it. The demuxer has a set of padtemplates for
13raw audio and video.
14
15  (------------------------------------)
16  ! avidecoder                         !
17  !                                 (video/raw)...
18  !     (----------)                   !
19  !     ! demuxer (video/x-msvideo, auds)..
20  !     !          !                   !
21  !   -src         !                   !
22  !  /  !         (video/x-msvideo, vids)..
23 - src  !          !                   !
24  !     (----------)                (audio/raw)...
25  !                                    !
26  (------------------------------------)
27
28the demuxer has a set of padtemplates for the raw avi header properties.
29
30The avi decoder will act on the new_pad signal of the demuxer element
31and will attach an avitype plugin to the new pad. Caps negotiation will
32convert the raw avi caps to the gstreamer caps. If the src pad of the
33avitypes plugin are compatible with the avidecoder padtemplate, the
34avitype pad is ghosted to the avidecoder bin, this is the case where no
35codec is needed (for raw PCM samples, for example).
36
37When the avitypes caps are not compatible with one of the avidecoder
38templates, a static autoplugger is used the find an element to connect
39the demuxers pad to the decoders padtemplate.
40
41When no element could be found, an windec plugin is attached to the
42demuxers pad and the avitypes plugin is removed from the decoder.
43
44
45example:
46--------
47
48 An avidecoder that has a video pad (decoded with windows dlls) and an
49 audio pad (raw PCM).
50
51  (----------------------------------------------------------------)
52  ! avidecoder               (--------)    (------)                !
53  !                          !avitypes!    !windec!       /-- (video/raw)
54  !     (----------)     /-sink      src--sink   src -----         !
55  !     !demuxer (video/x-msvideo,    !    !      !                !
56  !     !          ! auds).. (--------)    (------)                !
57  !   -sink        !         (--------)                            !
58  !  /  !        (video/x-..,!avitypes!                            !
59 -sink  !          ! vids).. !        !                            !
60  !     (----------)     \-sink      src -------------------- (audio/raw)
61  !                          (--------)                            !
62  (----------------------------------------------------------------)
63
64
65
66TODO
67----
68
69automatically generate the padtemplates from all possible avi types
70found in the registry.
71
72
73