(fix): implement hardware check for image loading#2765
Conversation
Added a check for potential broken hardware in hasPotentialBrokenHardware (not tested) potentially closes recloudstream#2640
|
@IndusAryan have you tested this? It looks good but I cannot test it myself |
|
I am waiting for response of @beng1z if image loading in his android box is fixed or not. |
Comment out allowHardware check for SDK version 28.
Refactor image loading configuration and remove unused hardware check.
Issue is resolved @fire-light43 |
| Log.d(TAG, "buildImageLoader: Setting COIL Image Loader.") | ||
| .components { | ||
| add(OkHttpNetworkFetcherFactory(callFactory = { buildDefaultClient(context) })) | ||
| add(BitmapFactoryDecoder.Factory()) // sw decoder |
There was a problem hiding this comment.
It looks like this changes the default decoder from StaticImageDecoder to BitmapFactoryDecoder, which seems less efficient . Is it possible to restrict this to faulty hardware or otherwise ensure fastest decoding possible? Or is there simply no performance differences?
There was a problem hiding this comment.
Looking at their convo and benchmarks, it seems so. We cannot increase latency for all people. I have added the hardware check again for hw enable and sw decoder factory. Also the bitmap argb 888 config will be used in broken hardware only, coil will auto choose optimal in rest of the devices.
Added a check for potential broken hardware in the image loader configuration to adjust settings accordingly.
Added a check for potential broken hardware in hasPotentialBrokenHardware (not tested) potentially closes #2640