script.module.inputstreamhelper
script.module.inputstreamhelper copied to clipboard
Detect soft-float ARM platforms
Libwidevinecdm.so on ARMv71 is using hard-float ABI (readelf -a libwidevinecdm.so | grep Flags
). This cannot be loaded on a platform using softfp. Kodi fails with a cryptic error message.
2023-12-04 22:04:42.116 T:11544 error <general>: AddOnLog: inputstream.adaptive: Initialize: Initialize: Failed to load library: /media/developer/apps/usr/palm/applications/org.xbmc.
kodi/.kodi/cdm/libwidevinecdm.so: internal error
2023-12-04 22:04:42.116 T:11544 error <general>: AddOnLog: inputstream.adaptive: Unable to load widevine shared library (/media/developer/apps/usr/palm/applications/org.xbmc.kodi/.ko
di/cdm/libwidevinecdm.so)
2023-12-04 22:04:42.116 T:11544 error <general>: AddOnLog: inputstream.adaptive: OpenDRMSystem failed
2023-12-04 22:04:42.116 T:11544 error <general>: CVideoPlayer::OpenInputStream - error opening [plugin://plugin.video.vrt.nu/play/id/vid-6b245bab-1289-45a1-b395-bacf9a9eb70f/pbs-pub-
578fd4d4-79ee-4226-9a6f-b1b1c918a691/1640602595708]
2023-12-04 22:04:42.116 T:11544 info <general>: CVideoPlayer::OnExit()
2023-12-04 22:04:42.117 T:11544 info <general>: ADDON: Dll Destroyed - InputStream Adaptive
Could inputstreamhelper read the current executable and check the ABI?
That reminded me of #415. Really need to figure out what to do about those failing tests there...
Anyway, afaik there is no libwidevinecdm.so for arm soft float (please correct me if I'm wrong), so I guess we should detect that architecture as not supported.
There is no softfp or soft version of libwidevinecdm for arm, and there likely never will be. See https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/chromiumos-board-porting-guide/
Keep in mind that Chromium OS assumes you are using the hard float ABI. While it is certainly possible to get things working with a soft float ABI, you shouldn't waste your time. Join us in the future and migrate away from the old & slow soft float ABI (this also includes the softfp ABI -- it's just as bad).
Technically, it is not the architecture but the current kodi float-abi that determines compatibility. So parsing the current executable (/proc/self) is probably the way to go, eg checking the elf header directly (ldd, readelf and others may not be available on embedded platforms).
If I find time, I can test compiling a hard-float version of kodi for webos to see if that one is compatible with libwidevinecdm, but I would be really surprised if LG WebOS offers both softfp and hardfp versions for supporting libraries.