Skip to content

(fix): implement hardware check for image loading#2765

Open
IndusAryan wants to merge 5 commits into
recloudstream:masterfrom
IndusAryan:patch-1
Open

(fix): implement hardware check for image loading#2765
IndusAryan wants to merge 5 commits into
recloudstream:masterfrom
IndusAryan:patch-1

Conversation

@IndusAryan
Copy link
Copy Markdown
Contributor

Added a check for potential broken hardware in hasPotentialBrokenHardware (not tested) potentially closes #2640

Added a check for potential broken hardware in hasPotentialBrokenHardware (not tested)
potentially closes recloudstream#2640
@fire-light43
Copy link
Copy Markdown
Contributor

@IndusAryan have you tested this? It looks good but I cannot test it myself

@IndusAryan
Copy link
Copy Markdown
Contributor Author

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.
@IndusAryan
Copy link
Copy Markdown
Contributor Author

@IndusAryan have you tested this? It looks good but I cannot test it myself

Issue is resolved @fire-light43

Log.d(TAG, "buildImageLoader: Setting COIL Image Loader.")
.components {
add(OkHttpNetworkFetcherFactory(callFactory = { buildDefaultClient(context) }))
add(BitmapFactoryDecoder.Factory()) // sw decoder
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@IndusAryan IndusAryan requested a review from fire-light43 May 24, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

**[Bug]: All images fail to load on Allwinner-based Android devices (HY320) since Glide → Coil migration**

2 participants