Adapter detection is failing due to the RPI userland code. The AdapterFactory.cpp doesn't detect in runtime which OS/HW combination is currently running on; if the RPI cmake flag is compiled in, it will try to invoke those adapter calls anyways.
However the bcm_host_init() function calls an exit(-1); if the initialization fails which causing failure if libCEC is invoked on non-RPI based boards (Odroid for example).
Adapter detection is failing due to the RPI userland code. The
AdapterFactory.cpp
doesn't detect in runtime which OS/HW combination is currently running on; if the RPI cmake flag is compiled in, it will try to invoke those adapter calls anyways. However thebcm_host_init()
function calls anexit(-1);
if the initialization fails which causing failure if libCEC is invoked on non-RPI based boards (Odroid for example).https://github.com/Pulse-Eight/libcec/blob/76551ea1dd9a55f0ce1533e440dc12dbc594f7ba/src/libcec/adapter/AdapterFactory.cpp#L232
https://github.com/Pulse-Eight/libcec/blob/76551ea1dd9a55f0ce1533e440dc12dbc594f7ba/src/libcec/adapter/RPi/RPiCECAdapterCommunication.cpp#L458
https://github.com/raspberrypi/userland/blob/master/host_applications/linux/libs/bcm_host/bcm_host.c#L99