-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SubtitleView support GL render. #2053
Comments
The extra details in this question make me wonder if this would be better implemented as an |
But the Effect can't access the subtilte. Also if #2055 is support, this feature may not need anymore for me. |
Are you trying to play standalone SSA files or those muxed into an MKV file or similar? If the file is standalone, you can probably quite easily read it yourself and use it to drive your If it's muxed into an MKV file then the wiring is a bit trickier - you would likely need to get the subtitle data as it's emitted from |
This feature can replace by #2055. |
[REQUIRED] Use case description
I'm trying to add libass to render ass/ssa on media3.
ASS_Image only have bitmap with alpha channe, I need to blend the color with the alpha, then put the ARGB data to bitmap, then send to cue to render.
Since ass may have many effects in seconds, thus there will be thousands of bitmap to blend, it will need huge cpu time to blend color, and huge memory to store ARGB bitmap data.
Proposed solution
The media3 only support web and canvas render.If can support GL render, I will not need to blend ass_image alpha with colour in cpu, I can copy alpha data to ALPHA_8 bitmap, then upload the bitmap to gl texture, and blend all the effect in GL shader.
This solution will cost least memory (use alpha 8 instead of ARGB 8888), and best performance (GL blend is much better than cpu).
Alternatives considered
So If SubtitleView support GL render will be great.
By the way, other subtitles should render as before, only my situation need this feature.
The text was updated successfully, but these errors were encountered: