class IVdjPluginVideoFx : public IVdjPlugin{public: // called when DirectX is initialized and closed // if you need to allocate private surfaces or textures, // this is the place to do it virtual HRESULT VDJ_API OnDXInit() {return 0;} virtual HRESULT VDJ_API OnDXClose() {return 0;}

// use this function to render the D3D surface on the device, using any modification you want // return S_OK if you actually draw the texture on the device, or S_FALSE to let VirtualDJ do it virtual HRESULT VDJ_API OnDraw(IDirect3DTexture9 *texture,TVertex *vertices)=0;

// variables you can use (once DX has been initialized) IDirect3DDevice9 *D3DDevice; int ImageWidth,ImageHeight;};

class IVdjPluginVideoTransition : public IVdjPlugin{public: // called when DirectX is initialized and closed // if you need to allocate private surfaces or textures, // this is the place to do it virtual HRESULT VDJ_API OnDXInit() {return 0;} virtual HRESULT VDJ_API OnDXClose() {return 0;}

// use this function to compose both surfaces on the device. // calling the RenderSurface[x] function will render the image on the actual render target, // using the vertices[x] given. virtual HRESULT VDJ_API Compose(int crossfader,HRESULT(VDJ_API *RenderSurface[2])(),TVertex *vertices[2])=0;

// OnStart() and OnStop() are called if the user activate the auto-transition. // once activated, OnCrossfaderTimer() will be called every frame to let you change // the value of the video crossfader before rendering. // return S_FALSE will stop the auto-transition (OnStop() will not be called). // return E_NOTIMPL will use the default auto-transition. // NOTE: if crossfader is set to 0 or 4096, the Compose() function will not be called. virtual HRESULT VDJ_API OnStart(int chan) {return 0;} virtual HRESULT VDJ_API OnStop() {return 0;} virtual HRESULT VDJ_API OnCrossfaderTimer(int *crossfader) {return E_NOTIMPL;}

// variables you can use (once DX has been initialized) IDirect3DDevice9 *D3DDevice; int ImageWidth,ImageHeight;};