File: README.org

package info (click to toggle)
gem 1%3A0.94-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 25,636 kB
  • sloc: cpp: 174,297; ansic: 42,132; makefile: 3,852; sh: 1,096; objc: 389
file content (106 lines) | stat: -rw-r--r-- 5,297 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
* plugins for Gem

this is a collection of plugins, that allow Gem to accomplish input and output
of media files in a platform-specific way.

** Developer notes

*** verbosity-levels
when reporting errors, keep in mind that oftentimes the current plugin is only
one in a long chain.
e.g. when a film-plugin fails to open a movie file, the next plugin in the
chain might succeed. therefore, to keep noise for the end user low, the
reporting verbosity should be kept low; usually below post() level.
errors that happen once a plugin has been selected, may be more load.
reporting from (potentially) threaded callbacks, should avoid using Pd's
post(),... functions and instead just printf() to the stderr.

| loglevel   | maximum visible verbosity      |
|------------+--------------------------------|
| LOG:fatal  | verbose(..-3)                  |
| LOG:error  | pd_error, error, verbose(..-2) |
| LOG:normal | post, verbose(..-1)            |
| LOG:debug  | verbose(..0)                   |
| LOG:all    | verbose(..verbosity)           |

***** namespace
it would be nice if all plugins supported a common prefix, so people can know where the error comes from,
e.g. "[GEM:filmAVI]"

***** idea
 - fatal errors that /must/ effect the user (because the current plugin is selected and there cannot be an alternative) ~error()~
 - non-fatal errors effecting the user: ~verbose(0)~ (warning)
 - errors that /might/ effect the user must be ~verbose(0)~
 - debugging output should be done with ~verbose(1)~

The following is an attempt to define the apropriate logging levels

**** ~film~
| function         | max reporting state                        |
|------------------+--------------------------------------------|
| CTOR             | ~verbose(0)~                               |
| DTOR             | ~verbose(0)~                               |
| ~isThreadable~   | ~verbose(0)~                               |
| ~enumProperties~ | ~verbose(0)~, ~error()~ for opened devices |
| ~setProperties~  | ~verbose(0)~, ~error()~ for opened devices |
| ~getProperties~  | ~verbose(0)~, ~error()~ for opened devices |
| ~open~           | ~verbose(0)~                               |
| ~close~          | ~error()~                                  |
| ~changeImage~    | ~error()~                                  |
| ~getFrame~       | ~error()~, ~printf()~ if threaded          |

**** imageloader
| function       | max reporting state |
|----------------+---------------------|
| CTOR           | ~verbose(0)~        |
| DTOR           | ~verbose(0)~        |
| ~isThreadable~ | ~verbose(0)~        |
| ~load~         | ~verbose(0)~        |
**** imagesaver
| function               | max reporting state |
|------------------------+---------------------|
| CTOR                   | ~verbose(0)~        |
| DTOR                   | ~verbose(0)~        |
| ~isThreadable~         | ~verbose(0)~        |
| ~save~                 | ~verbose(0)~        |
| ~estimateSave~         | ~verbose(0)~        |
| ~getWriteCapabilities~ | ~verbose(0)~        |
**** modelloader
**** record
| function              | max reporting state |
|-----------------------+---------------------|
| CTOR                  | ~verbose(0)~        |
| DTOR                  | ~verbose(0)~        |
| ~isThreadable~        | ~verbose(0)~        |
| ~getCodecs~           | ~verbose(0)~        |
| ~getCodecDescription~ | ~verbose(0)~        |
| ~setCodec~            | ~verbose(0)~        |
| ~enumProperties~      | ~verbose(0)~        |
| ~dialog~              | ~error()~           |
| ~start~               | ~error()~           |
| ~write~               | ~error()~           |
| ~stop~                | ~error()~           |

**** video
| function           | max reporting state                            |
|--------------------+------------------------------------------------|
| CTOR               | ~verbose(0)~                                   |
| DTOR               | ~verbose(0)~                                   |
| ~isThreadable~     | ~verbose(0)~                                   |
| ~enumerate~        | ~verbose(0)~                                   |
| ~setDevice~        | ~verbose(0)~                                   |
| ~open~             | ~verbose(0)~                                   |
| ~start~            | ~error()~                                      |
| ~getFrame~         | ~fprintf()~ for threaded; ~error()~ otherwise  |
| ~stop~             | ~error()~                                      |
| ~close~            | ~error()~                                      |
| ~reset~            | ~error()~ (?)                                  |
| ~enumProperties~   | ~error()~ (~verbose()~ for non-opened devices) |
| ~getProperties~    | ~error()~ (~verbose()~ for non-opened devices) |
| ~setProperties~    | ~error()~ (~verbose()~ for non-opened devices) |
| ~dialog~           | ~error()~                                      |
| ~dialogs~          | ~error()~ (~verbose()~ for non-opened devices) |
| ~grabAsynchronous~ | ~verbose(0)~                                   |
| ~setColor~         | ~verbose(0)~                                   |
| ~provides~         | ~verbose(0)~                                   |
| ~getName~          | ~verbose(0)~                                   |