docs, gst: typo fixes
[platform/upstream/gstreamer.git] / docs / random / ensonic / embedded.txt
1 $Id$
2
3 = embedded =
4
5 == index handling ==
6 For avidemux I currently have a big patch doing memory optimized index handling.
7 It basically thins out the index to save memory. Right now it only keeps index
8 entries marked with the avi keyframe flag.
9
10 In gstreamer core we have some indexing objects. They are curently used nowhere.
11 The idea is to use them and to make the index strategy plugable or configurable
12 at run time.
13
14 The challenge is then to rewrite muxers and demuxers to use them instead of the
15 built in index logic.
16
17 This way the different requirements of desktop and embedded platforms could be
18 encapsulated in the indexer strategy.
19
20 == ranking ==
21 Autopluggers like playbin and decodebin use the element caps plus static ranks
22 to create piplines.
23 The rank of an elemnt right now refers to the quality/maturity of the element.
24 Elements with higher rank should be functionally more complete. If we have
25 multiple elements that are feature complete there is a draw.
26
27 There are more decission criteria thinkable:
28 * target processor (CPU,DSP,GPU)
29 * ressource usage (CPU, memory)
30 * license (proprietary, open source)
31 * quality (in terms of the audio/image quality)
32
33 One problem of taking criteria like quality and performance into account when
34 autoplugging, is that elements might have objects-properties that influence
35 them.
36
37 Beside adding more ranking criteria, we might consider adding an overridable
38 mechanism for picking elements (basically registry filters that not decide on
39 the base of ranks). Applications might choose the filter mechanism based on the
40 use-case (which gstreamer not know right now).
41
42 == g_malloc vs. g_try_malloc ==
43 g_malloc/g_new should not be used when allocating space of a size that is
44 derived from a value found in the file. Instead one should use g_try_malloc or
45 g_try_new and check the return value.
46
47 $ find . -name "*.c" -exec grep "g_malloc" {} \; | wc -l
48 190
49 $ find . -name "*.c" -exec grep "g_try_malloc" {} \; | wc -l
50 0
51 $ find . -name "*.c" -exec grep "g_new" {} \; | wc -l
52 398
53 $ find . -name "*.c" -exec grep "g_try_new" {} \; | wc -l
54 3
55
56 This is not strickly related to embedded, but its easier to crash gstreamer on
57 embedded this way.