Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
18th September 2014, 17:42 | #1 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,493
|
How to write a filter which creates a clip from nothing?
Hi,
I'd like to write a plugin which doesn't take a video clip as input, but does create one and return it as output. Is there a "right" way to do this? How should I declare the constructor, which normally looks something like this: Code:
example::example(PClip _child, IScriptEnvironment* env) : GenericVideoFilter(_child) { Do I create my own VideoInfo structure to create the output clip? Does anyone have an example of some code for a filter which does this? Thanks, David |
18th September 2014, 17:54 | #3 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,493
|
Oh yeah, I suppose they do! I never connected them with what I'm trying to do - thanks!
ETA: Having said that, I've tried to wade my through the mpeg2source source, but it seems I just don't understand enough to make any sense of it. And I can't find the blankclip code in the Avisynth source... Last edited by wonkey_monkey; 18th September 2014 at 18:26. |
18th September 2014, 20:28 | #4 | Link | |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
Quote:
(I've been searching the codebase a lot lately) |
|
18th September 2014, 20:46 | #5 | Link |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
https://github.com/FFMS/ffms2/blob/m...ources.cpp#L27
Basically, put a VideoInfo in your filter class and init it in your filter constructor (it's called VI in the FFMS2 code I linked), then in your GetFrame() just call env->NewVideoFrame(VideoInfo) and put your stuff in there. Last edited by TheFluff; 18th September 2014 at 20:52. |
18th September 2014, 22:45 | #6 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
RandomSource:- http://forum.doom9.org/showthread.ph...t=randomsource
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
Thread Tools | Search this Thread |
Display Modes | |
|
|