#define VDJFLAG_VIDEO_MASTERONLY 0x10000#define VDJFLAG_VIDEO_VISUALISATION 0x20000 // The effect generates visuals, rather than applying an effect on given images

// For transitions, you need to define in OnGetPluginInfo the behavior of the auto-videocrossfader:#define VDJFLAG_VIDEOTRANSITION_CONTINOUS 0x100000 // the crossfader moves continuously from one side to the other#define VDJFLAG_VIDEOTRANSITION_MIDPOINTS 0x000000 // the crossfader stops at 25% or 75% when both videos are playing

class IVdjPluginVideoTransition8 : public IVdjPlugin8{public: // OnDraw is called whenever the video crossfader is different than 0.0 or 1.0. // this function should mix the two images from both decks. virtual HRESULT VDJ_API OnDraw(float crossfader)=0;

// call DrawDeck() to draw the image for each deck with the specified vertices. // call GetVertices() to retrieve the default vertices, and modify it. (or pass NULL to DrawDeck() to use the default) TVertex* (*GetVertices)(int deck); HRESULT (*DrawDeck)(int deck, TVertex* vertices);

// for more complicated operations, you can ask direct access to the device and textures // For OpenGL, GetDevice() returns NULL, for DirectX 9, it needs to point to a IDirect3DDevice9* // For OpenGL texture needs to point to a GLuint, for DirectX 9, it needs to point to a IDirect3DTexture9* HRESULT (*GetDevice)(EVdjVideoEngine engine, void **device); HRESULT (*GetTexture)(EVdjVideoEngine engine, int deck, void**texture);

// Some useful variables int SampleRate; // samplerate of the audio engine int SongBpm; // number of samples between two consecutive beats for master song double SongPosBeats; // number of beats since the first beat in the master song};

class IVdjPluginVideoTransitionMultiDeck8 : public IVdjPlugin8{public: // this version is used if you want a transition plugin that can handle more than 2 decks. // OnDrawMultiDeck is called for each frame (whatever the crossfader position). // videoDecks is an array of nbVideos integers, giving the decks number of each deck that has a video available. // the array is sorted by order of "importance" of the videos (videoLeft and videoRight first, then playing video, etc). // call DrawDeck() to draw the images for each deck with the specified vertices. // call GetVertices to initialize the vertices to their default value, and modify it. (or pass NULL to DrawDeck() to use the default) // NOTE: if you want to retrieve the value of the video crossfader, call GetInfo("video_crossfader"); virtual HRESULT VDJ_API OnDrawMultiDeck(int nbVideoDecks, int *videoDecks)=0;

// for more complicated operations, you can ask direct access to the device and textures // For OpenGL, GetDevice() returns NULL, for DirectX 9, it needs to point to a IDirect3DDevice9* HRESULT (*GetDevice)(EVdjVideoEngine engine, void **device); HRESULT (*GetTexture)(EVdjVideoEngine engine, int deck, void**texture);

// Some useful variables int SampleRate; // samplerate of the audio engine int SongBpm; // number of samples between two consecutive beats for master song double SongPosBeats; // number of beats since the first beat in the master song};

// OnDraw() is called every frame while your plugin is activated. virtual HRESULT VDJ_API OnDraw()=0;

// In order to draw the original image, you can either just call DrawDeck() if you don't need to modify the image (for overlay plugins for examples)HRESULT DrawDeck() {return vcb->DrawDeck();}

// For more complicated operations, you can ask direct access to the device and textures // For OpenGL, GetDevice() returns NULL, for DirectX 9, it needs to point to a IDirect3DDevice9* // or call GetTexture to get low-level access to the texture and its vertices. // For OpenGL, texture has to point to a GLuint, for Direct3D 9, it has to point to a IDirect3DTexture9* HRESULT GetDevice(EVdjVideoEngine engine, void **device) {return vcb->GetDevice(engine,device);} HRESULT GetTexture(EVdjVideoEngine engine, void **texture, TVertex **vertices) {return vcb->GetTexture(engine,texture,vertices);}

// Some useful variables int SampleRate; // samplerate of the audio engine int SongBpm; // number of samples between two consecutive beats for this song double SongPosBeats; // number of beats since the first beat in the song