Giter Site home page Giter Site logo

Comments (3)

 avatar commented on May 26, 2024

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.

 avatar commented on May 26, 2024

So I think ti should be either....

  1. 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.
  2. Make the renderer API reentrant. Then the user could do the same as 1. by managing a thread-pool. Still requires refcounting.
  3. 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.

madshi avatar madshi commented on May 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.