1 The avi decoder plugins |
|
2 ----------------------- |
|
3 |
|
4 The 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 |
|
10 the avidecoder element uses the above plugins to perform the avi |
|
11 decoding. It is constructed as a custom bin which initially only has |
|
12 the demuxer element in it. The demuxer has a set of padtemplates for |
|
13 raw 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 |
|
28 the demuxer has a set of padtemplates for the raw avi header properties. |
|
29 |
|
30 The avi decoder will act on the new_pad signal of the demuxer element |
|
31 and will attach an avitype plugin to the new pad. Caps negotiation will |
|
32 convert the raw avi caps to the gstreamer caps. If the src pad of the |
|
33 avitypes plugin are compatible with the avidecoder padtemplate, the |
|
34 avitype pad is ghosted to the avidecoder bin, this is the case where no |
|
35 codec is needed (for raw PCM samples, for example). |
|
36 |
|
37 When the avitypes caps are not compatible with one of the avidecoder |
|
38 templates, a static autoplugger is used the find an element to connect |
|
39 the demuxers pad to the decoders padtemplate. |
|
40 |
|
41 When no element could be found, an windec plugin is attached to the |
|
42 demuxers pad and the avitypes plugin is removed from the decoder. |
|
43 |
|
44 |
|
45 example: |
|
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 |
|
66 TODO |
|
67 ---- |
|
68 |
|
69 automatically generate the padtemplates from all possible avi types |
|
70 found in the registry. |
|
71 |
|
72 |
|