open-source cross-platform real-time video effects plugin system

FFSrcPlug

Freeframe ID: 
DSRC
Number of Inputs: 
1
Platform: 
Windows
Plugin Type: 
Source
License: 
Open Source
Freeframe Version: 
FF 1.0x
Developer: 
Chris Korda

FFSrcPlug is an MFC template project for developing Freeframe source plugins. It mirrors the structure of a typical MFC graphics app, using a surrogate main frame and view, so that drawing code can be transplanted from an app to a plugin with minimal modifications. The project has a simple demo view which draws a bouncing ball, and exposes a single Freeframe parameter (the ball speed).

Look for lines containing the string "TODO"; these mark areas where customization is needed. The process generally should include these steps.

1) In DemoPlug.cpp, edit the plugin's ID and title. NOTE that these are NOT null-terminated strings! Do NOT change their lengths. Pad them with blanks as necessary to keep their lengths the same.

2) In DemoPlug.cpp, edit the plugin's description and about text. These ARE null-terminated strings but don't go crazy with the length as the host may truncate them. The description should summarize what the plugin does, and the about text should contain the author and license info if any.

3) In DemoPlug.h, enumerate your plugin's parameters. This number and order of the parameters enumerated here MUST match the definition of paramConstants in DemoPlug.cpp (see below).

4) In DemoPlug.cpp, add your plugin's parameters to paramConstants. NOTE that the parameter names are NOT null-terminated strings! Do NOT change their lengths. Pad them with blanks as necessary to keep their lengths the same. Also set the default values of your parameters here.

5) In DemoPlug.cpp, customize the switch statement in setParameter as needed to pass the parameters into your CMainFrame object. Note that since DemoPlug is derived from CMainFrame, DemoPlug has access to CMainFrame's protected members.

6) In DemoView.cpp, replace the drawing code in Draw with your own drawing code.

7) In FFSrcPlug.def, change the plugin name and description.

8) In Project/Settings/Link, change the output DLL name for both Release and Debug.

And that's all.