Comments (3)
I'm not sure how useful that would be...
In general, being able to keep images for longer than a render call would probably simplify things for some library users.
Passing future timestamps for rendering ahead sounds very weird. I don't think that will be very useful. Allowing the render function to be reentrant (so that multiple threads could call it at the same time with different timestamps), or maybe some sort of asynchronous render API (think a future
) sounds more useful. They probably wouldn't be more complex than passing future timestamps (and using them to actually render ahead).
If you just want to render ahead, you could do that with unanimated events, or parts of the event that are constant. It seems the trend is towards one event per frame anyway to get "animation" (let me call ASS script authors retards while we're at it).
from libass.
So I think ti should be either....
- Provide an asynchronous API. You pass timestamps, and at some point you're notified that a frame is ready. Would require refcounting for rendered images in some way.
- Make the renderer API reentrant. Then the user could do the same as 1. by managing a thread-pool. Still requires refcounting.
- Somehow allow creating multiple ASS_Renderers that all use the same data (fonts, fontconfig objects, possibly parts of the cache, and of course the subtitle data). The ASS_Renderers could be accessed by a single thread only, so strictly speaking no (user visible) refcounting is needed. But this sounds like a bad hack and is probably more complicated than the others.
from libass.
You're probably already aware of this, but I thought I'd mention it here, just as a reference:
http://madshi.net/SubRenderIntf.h
This is a subtitle interface my DirectShow video renderer "madVR" already supports (and XySubFilter), and which I think satisfies all the requirements mentioned here. The interface supports multi-threading, is reference counted and is IMHO quite easy to use for the consumer (although maybe more difficult to implement for the renderer). I've no idea if this could be useful for you. But in any case, let me just say that you're quite welcome to use any part of the interface, if you like. No need for any references, acknowledgements or things like that...
P.S: Just noticed that you guys already commented on SubRenderIntf.h in #106. So my comment is probably superfluous. Anyway, doesn't harm to have a link to the interface here, I guess...
from libass.
Related Issues (20)
- Rendering: VSFilter/GDI draws underline/strikethrough using clockwise-wound rectangles
- Is it possible to support rounded rectangle text background style?
- Incorrect border scaling in the x direction when cropping or resizing the video to a different aspect ratio HOT 7
- Incorrect border scaling for srt subs HOT 13
- Borderstyle=3 box height is affected by fallback fonts HOT 6
- How to typeset multiple layers of text outlines (borders)? HOT 5
- Word-based line splitting for CJK
- @font vertical writing is displayed wrong HOT 12
- Rendering: effects show different? HOT 6
- Why change \fsp behaviour on multi-codepoint graphemes? HOT 5
- Performance regression results in severe framedrops for typesetted subtitles HOT 8
- Memory leak in ass_font_provider_add_font HOT 28
- Rendering: wrong direction of lines HOT 5
- move feature HOT 3
- Request: GPU rendering backend HOT 1
- Investigate unexpected vsfilter behavior with \h on certain font HOT 15
- Font size differs from VSFilter for specific fonts HOT 4
- Try to parse script properties even if missing "[Script Info]" HOT 1
- Significant perf drop for specific, lower(!) resolution HOT 2
- Rendering: Unable to render some bitmap style fonts HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libass.