My Approach was to knot the tunnels from start to finish and check every step to see whether buffers were allocated and parameters were set right.įinally some components are (yet) pretty useless.
Further, if a component alters the video/image/audio (as in the resizer and the encoder) you should set the output parameters accordingly.Įxcept for the input and output the tunneling takes care of the buffering and allocation of memory for those buffers. You (mostly) need to set the input parameters of every component to match that of the output component it is tunneled to. I'd like to add to Dickon's program-scheme the following: Sure it is not a turorial it is a reference. Once you get your heart set to the Khronos reference on Openmax, it is not so bad at all.
Saves a lot of hassle all round.Īs far as I can tell, the only real sillyness in use is that when you obtain a handle on a component all its ports are enabled, yet to do anything remotely useful with them, you need to disable them first. And I don't see why every potty little structure needs versioning: just pass the expected ABI version into the init function and be done with it. And it shouts a lot, with a lot of confusingly-similar #defines, which being straight numbers, passed to multi-purpose 'methods' (sic), aren't checked at compile time. And they use the daft 'foo* bar ' spacing, rather than 'foo *bar ' as any sane person would. Oh, and the bool type is a tri-state (OMX_FALSE, OMX_TRUE, OMX_BOOL_MAX. It's also confusing: I simply don't understand why so many things are prefixed by 'n' - the closest I can sensibly come up with is 'a ninteger' it can't be 'natural' (zero and negatives 'n'-prefixed entities may be signed or unsigned this is clever), and it can't be 'number' (floats, chars, and other non-int32_t entities are also numbers). Its use of Hungarian Notation is particularly irritating nobody sensible uses it, and it's basically redundant in C where your compiler does all the type checking for you. Bits of the OpenMAX spec aren't *completely* hateful, just most of it.