topherz
4th December 2004, 04:50 PM
To the freeframe experts,
Always been wanting to write some freeframe plugins, finally have a little time!
Everything is pretty clear with the standard, and im working from the included CPlugin example. (building with visualcplusplus 6) And testing with the included "plugin tester.exe"
Its working, and i have a plugin that works in other hosts, except... i cannot add a fourth parameter to the existing three parameters in the sample. And I am stumped as to what i am doing wrong.
The Symptoms:
When i try the plugin in the "plugin tester", the effect seems to load ok, I see four parametes with all the correct names, but the effect is not applied to the video. Ive gone through the 17 steps one by one, and i get no error messages till i click on button 17, "Deinit and DeInstance". Then I get a popup error message from windows:
"debug error: DAMAGE after normal block ...." (see attached jpeg)
The Code:
To isolate what was causing the problem, i started fresh with the suplied CPlugin code. It complied and worked perfectly.
Then I made the following three code changes to FreeFrameSample.cpp, the minimum I figured to get 4 parameters.
1.
#define NUM_PARAMS 4
#define NUM_INPUTS 1
2.
DWORD initialise()
{
// populate the parameters constants structs
paramConstants[0].defaultValue = 0.5f;
paramConstants[1].defaultValue = 0.5f;
paramConstants[2].defaultValue = 0.5f;
paramConstants[3].defaultValue = 0.5f;
char tempName1[17] = "red";
char tempName2[17] = "green";
char tempName3[17] = "blue";
char tempName4[17] = "blue";
memcpy(paramConstants[0].name, tempName1, 16);
memcpy(paramConstants[1].name, tempName2, 16);
memcpy(paramConstants[2].name, tempName3, 16);
memcpy(paramConstants[3].name, tempName4, 16);
return FF_SUCCESS;
}
3. (In instantiate)
pPlugObj->paramDynamicData[0].value = 0.5f;
pPlugObj->paramDynamicData[1].value = 0.5f;
pPlugObj->paramDynamicData[2].value = 0.5f;
pPlugObj->paramDynamicData[3].value = 0.5f;
That is it.
*******************************
Anyone have an idea what the problem could be?
Thanks for any suggestions!
-topher
Always been wanting to write some freeframe plugins, finally have a little time!
Everything is pretty clear with the standard, and im working from the included CPlugin example. (building with visualcplusplus 6) And testing with the included "plugin tester.exe"
Its working, and i have a plugin that works in other hosts, except... i cannot add a fourth parameter to the existing three parameters in the sample. And I am stumped as to what i am doing wrong.
The Symptoms:
When i try the plugin in the "plugin tester", the effect seems to load ok, I see four parametes with all the correct names, but the effect is not applied to the video. Ive gone through the 17 steps one by one, and i get no error messages till i click on button 17, "Deinit and DeInstance". Then I get a popup error message from windows:
"debug error: DAMAGE after normal block ...." (see attached jpeg)
The Code:
To isolate what was causing the problem, i started fresh with the suplied CPlugin code. It complied and worked perfectly.
Then I made the following three code changes to FreeFrameSample.cpp, the minimum I figured to get 4 parameters.
1.
#define NUM_PARAMS 4
#define NUM_INPUTS 1
2.
DWORD initialise()
{
// populate the parameters constants structs
paramConstants[0].defaultValue = 0.5f;
paramConstants[1].defaultValue = 0.5f;
paramConstants[2].defaultValue = 0.5f;
paramConstants[3].defaultValue = 0.5f;
char tempName1[17] = "red";
char tempName2[17] = "green";
char tempName3[17] = "blue";
char tempName4[17] = "blue";
memcpy(paramConstants[0].name, tempName1, 16);
memcpy(paramConstants[1].name, tempName2, 16);
memcpy(paramConstants[2].name, tempName3, 16);
memcpy(paramConstants[3].name, tempName4, 16);
return FF_SUCCESS;
}
3. (In instantiate)
pPlugObj->paramDynamicData[0].value = 0.5f;
pPlugObj->paramDynamicData[1].value = 0.5f;
pPlugObj->paramDynamicData[2].value = 0.5f;
pPlugObj->paramDynamicData[3].value = 0.5f;
That is it.
*******************************
Anyone have an idea what the problem could be?
Thanks for any suggestions!
-topher