View Single Post
Old 7th December 2016, 16:22   #1  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
How to invoke another filter (sometimes) on my filter's output?

Hi,

I'm writing a filter which may, at times, need to display a message. I'm something of a trial-and-error programmer so I've never quite grasped the proper use of classes and invoking in AviSynth

My filter has a number of input clips and produces an output clip. My GetFrame does the following standard thing:

Code:
PVideoFrame dst=env->NewVideoFrame(vi);
to create a new output frame, then writes to the buffer given by dst->GetWritePtr(); and returns dst.

What I'd like to know is: before I return, can I then invoke some other filter (subtitle, specifically) on what I've just painted? If so, what's the recommended way? I need to do inside GetFrame, as only some frames will be getting subtitled.

Previously I've only ever invoked filters on input clips, prior to them being read by my GetFrame.

---

Followup question: if my filter is internally multithreaded, is there some way/need to inform newer versions of AviSynth (+, MT, etc, I don't follow them much) of this so it doesn't try to do it itself?
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 7th December 2016 at 16:29.
wonkey_monkey is offline   Reply With Quote