home | products |web boards| faq | galleries | contact | about  
multimedia autorun autorun
download multimedia buy now graphics multimedia search


 

DVDlab
Home
Screenshots
Encoder
Banners

DVDlab PRO
Home
Screenshots
History

DVD-9 DL
Home

Resources
Tips & Tricks
Help

Help

Help

Help

Help

FAQ
History

DVD Tools
Timecode calc
Re-Aspect

Articles
H. Theater
DOF Machine
3D Video

Photo-Brush
Start here

Real-Draw
Start here

CompactDraw
Start here

PhotoSEAM
Start here

Multimedia Builder
Start here

Other tools
UltraSnap
Camera Tools

 

 

 

 


Compile plug-ins using a very simple API
You can create a plug-ins in your programming language with a powerfull yet simple API that interfaces to lab-TALK

Note: this text refer to a PRO version which is currently in beta.
A features presented here may not yet be available in the public beta version

A scripting support is added into PRO (not yet available)

Please see Keypad Part 2 for introduction to lab-TALK scripting language.

In previous sections you learned about the lab-TALK scripting language. The lab-TALK is a interpreter that can control any operation in DVD-lab, down to the pixel level.

While lab-TALK is fast enough for creating and setting parameters to objects, menus or movies, if you want to access the pixels in an object and to do many image operations on it, the interpreter will slow you considerably down.

Check this part of script:

for y=1 to height
for x=1 to width
intensity = (ImgGetR(1,x,y)+ImgGetG(1,x,y)+ImgGetB(1,x,y))/3
ImgSetR(1,x,y,intensity)
ImgSetG(1,x,y,intensity)
ImgSetB(1,x,y,intensity)
next x
next y

Depending on the size of the object, this loop may take couple of seconds to run in the interpreter. It doesn't even do much - just make the pixels grayscale.
The good thing is that DVD-lab can run not only lab-TALK script, but also "script" plugins compilled in any language that can create DLL.
The even better thing is that you don't have to learn any new SDK. The plug-in API reuses the lab-TALK commands - what you call in lab-TALK you call in plug-in API.

All is done through one callback function (PLCallBack) that you need to implement to your language.

struct _PLVariable
{
int m_nVariableType;
float m_fValue;
int m_nValue;
char* m_sValue;
};

typedef void (*PLCallBack)(char* sName, _PLVariable *result,_PLVariable *param1,_PLVariable *param2,_PLVariable *param3,_PLVariable *param4);

DVD-lab will call just this function when it runs the plug-in

extern "C" __declspec(dllexport) void PL_RunScript(PLCallBack pCallback,HWND hWnd);

It gives you a pointer to a callback PLCallBack pointer and the HWND of the DVD-lab main window.

extern "C" __declspec(dllexport) void PL_RunScript(PLCallBack pCallback,HWND hWnd)
{

}

More later....

 
© www.MediaChance.com 2000