Porting a VirtualDub filter >>
Forum

Forum



SearchSearch   Users   Registration   Entrance
Today: 12.08.2025 - 00:13:52
Pages:  1  

Porting a VirtualDub filter

Advertising


MessageAuthor

Dear Experts, 101 needed in plugin coding again :o In my VirtualDub filters, if I want a variable to be carried across several frames, I just declare it as static in the RunProc and it works fine. I'm having a bit of trouble in porting my progressive frame restorer filter and I'm wondering if this technique if valid or not. Should I delclare it static as in class PFR : public GenericVideoFilter { static int FramesSinceChangetoP; or should it be just int FramesSinceChangetoP; and can I intialise it like: int FramesSinceChangetoP = 0; Sorry for stupid questions but I don't think they were quite covered in Ben's Invert example regards Simon

------------------------------
Projects / Pictures => http://mybuildgarage.com/author/carreraboy/

carreraboy911

user forum




Statistics:
Messages: 4,226
Registration: 01.30.2002
08.03.21 - 02:22:53
Message # 1
RE: Porting a VirtualDub filter

Declare it as a member of your filter class (not static) and initialize it in the constructor.

------------------------------
///M3 8/95 Avus Blue Current Mods: Koni SA's along with eibach pro-kit, 540/Euro HFM kit with a Cosmos CAI. Mods to Come: 3.38 LSD, Stromung Exhaust..and a Crank Pulley.

CHAMBMW

user forum




Statistics:
Messages: 404
Registration: 03.26.2003
08.03.21 - 02:33:31
Message # 2
RE: Porting a VirtualDub filter

Constructor :confused: :scared: Your saying after all these years I'm finally going to have to actually understand all that C++ stuff I read about in the beginning :p regards Simon

------------------------------

DTMDinan3

user forum




Statistics:
Messages: 110
Registration: 01.20.2003
08.03.21 - 02:37:52
Message # 3
RE: Porting a VirtualDub filter

That would be a good idea, yes. I'll give you a little help. Your filter class has a name and a definition. That definition can contain both C-style declarations and function declarations. Two of the latter are special. If there is a function member with the same name as the filter class, then it is the constructor and is executed once when the filter is instantiated. Typically it is used for, you guessed it, initialization of stuff. The other has the same name but with a ~ in front. That is the destructor and is run once when the filter is deinstantiated. Get a basic C++ book and read about class declarations. That's all you really need to understand this aspect of it. Also, look at existing filters to see how they do what you need to do.

------------------------------

1BADM3

user forum




Statistics:
Messages: 379
Registration: 07.02.2003
08.03.21 - 02:41:32
Message # 4
RE: Porting a VirtualDub filter
Plastic clips for estate rear side window trim? : Previous topicNext topic: Unexpected re-boots when at Idle
Pages:  1  

Message
Name
Message

Click on the dot next to the name to address the participant

           
   
The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants