Skip to content

Make libass glyph and cache sizes configurable - #61

Merged
peerless2012 merged 2 commits into
peerless2012:masterfrom
j3553a:master
Jan 12, 2026
Merged

peerless2012 merged 2 commits into
peerless2012:masterfrom
j3553a:master

Conversation

@j3553a

@j3553a j3553a commented Jan 10, 2026 •

Copy link
Copy Markdown
Contributor

I have introduced an AssHandlerConfig with defaults for the glyph and cache that preserve the existing behavior but allows applications to configure the cache limits based on their needs.

I was able to test a glyph size of 10000 and a cache size of 128 MB for a few months playing media heavily on a Shield TV and found the experience to be much smoother. I only crashed one time.

Usage is as simple as setting the config when you new up the AssHandler.
private val assHandler by lazy { AssHandler(AssRenderType.OVERLAY_CANVAS, config = AssHandlerConfig(glyphSize = 10000, cacheSize = 128)) }

The config and all members within the config are optional so a consumer can mix and match their own settings based on their needs.

@peerless2012
peerless2012 merged commit 13a5d27 into peerless2012:master Jan 12, 2026
2 checks passed
thor2002ro pushed a commit to thor2002ro/libass-android that referenced this pull request Jul 24, 2026
Make libass glyph and cache sizes configurable
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.

2 participants