magiclantern_simplified
magiclantern_simplified copied to clipboard
dual-iso module depends on mlv_set_type(), which is inappropriate
Due to using mlv_set_type(), dual-iso module requires either one of mlv_lite or mlv_rec to be loaded. If only one module provided the symbol, it would auto-load. For that part, see https://github.com/reticulatedpines/magiclantern_simplified/issues/113
Still, dual-iso shouldn't have a hard requirement on MLV video capability, it's useful for stills too.
silent module has a cheat for this:
silent/silent.c:extern WEAK_FUNC(ret_0) void mlv_set_type(mlv_hdr_t *hdr, char *type);
The WEAK_FUNC check means if mlv_lite or mlv_rec are already loaded, their symbol will be used. I don't think this will work for dual-iso, because modules are loaded alphabetically... Still, it's worth checking, I'm not sure.
Possible solutions:
- split some code (including mlv_set_type()) out into small, invisible, utility function modules. These would autoload when required
- move mlv_set_type() into ML; now it is globally visible
- change module load order based on dependency tree? The set of selected modules is known before reboot