Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: Plugins - Sources Codes or/and Beta Version - Let your links or ideas here con't

This topic is old and might contain outdated or incorrect information.

My idea is to create a VirtualDJ Output Plugin that dynamicly updates an Extended .m3u file or something like this....

#EXTM3U
#EXTINF:111,3rd Bass - Al z A-B-Cee z
mp3/3rd Bass/3rd bass - Al z A-B-Cee z.mp3

1st line remains unchnaged
2nd line #EXTINF:<lenth of song in second>,<Artist - Title>
3rd line is the filename of the mp3
in this example c:\\mp3\\3rd Bass\\3rd bass - Al z A-B-Cee z.mp3

The plugin will query the function GetInfo() and to get the info we need (length of song in seconds,artist,title,file path) and have the plugin take the acquired information and write an M3U with this info

Here are the parameters from GetInfo() for what we need
1.Length of Song in Seconds: SongLength(int*): returns the length in samples of the actual song (in 1/44100th seconds)
2.Artist: Author(char*): return the author of the actual song.
3.Title: Title(char*): return the title of the actual song.
4.Path: FileName(char*): return the filename of the actual song.

If someone will write an .dll (in C++) that can get this info I will do the rest.

Thank You
 

Posted Tue 10 Apr 07 @ 4:59 pm
djcelPRO InfinityModeratorMember since 2004
I have just corrected the needs of your project
 

Posted Tue 10 Apr 07 @ 7:37 pm
Ok Thank You, am I to understand that the outcome (the plugin) will be a DLL that Query's a DLL?
 

Posted Wed 11 Apr 07 @ 2:02 am
djcelPRO InfinityModeratorMember since 2004
ethan_hines wrote :
Ok Thank You, am I to understand that the outcome (the plugin) will be a DLL that Query's a DLL?

NO no, you don't use getinfo.dll
 

Posted Wed 11 Apr 07 @ 11:26 am
djcel wrote :
ethan_hines wrote :
Ok Thank You, am I to understand that the outcome (the plugin) will be a DLL that Query's a DLL?

NO no, you don't use getinfo.dll

Forgive my Ignorance again....but if the plugin doesn't use GETINFO.DLL, why does it exist? Does it not act as a conduit between VDJ and the plugin?
Sorry :(
 

Posted Thu 12 Apr 07 @ 3:36 am
Why am I getting the following compiler errors in VC++ 2003 with the VDJ4~ SDK?

Compiling...
my_plugin1.cpp
my_plugin1.cpp(16) : error C2518: keyword 'class' illegal in base class list; ignored
my_plugin1.cpp(16) : error C2499: 'Cmy_plugin1' : a class cannot be its own base class
my_plugin1.cpp(16) : error C2059: syntax error : ':'
my_plugin1.cpp(17) : error C2518: keyword 'class' illegal in base class list; ignored
my_plugin1.cpp(18) : error C2518: keyword 'class' illegal in base class list; ignored

But I don't get those errors when Compiling the VdjDspWizard.exe
 

Posted Sun 15 Apr 07 @ 1:02 pm
cstollPRO InfinityMember since 2004
So - to answer the getinfo.dll question - there is no DLL called getinfo. As you state in your own blog the GetInfo() is a method of the VirtualDJ environment that you can use to retrieve info about the VirtualDJ environment.

Second - give you error message and not showing the code you are trying to compile doesn't help. Need to see the code.
 

Posted Sun 15 Apr 07 @ 3:16 pm
In regards to the first question located in the SDK there is a file called http://ethan-hines.110mb.com/GetInfo.dll
/////////////////////////////////////////////////////////////////////////////////////////////////

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "VdjPlugin.h"
#include "vdjDsp.h"
#include "vdjVideo.h"
#define DIRECT3D_VERSION 0x9000
//#include <d3d9.h>
#include "vdjVideo.h"
// If you want to use Direct3D interface
// #define DIRECT3D_VERSION 0x9000
// #include <d3d9.h>
//////////////////////////////////////////////////////////////////////////
// Class definition
//////////////////////////////////////////////////////////////////////////
class Cmy_plugin1 : public IVdjPlugin
,class Cmy_plugin1 ,: public IVdjPluginDsp
class Cmy_plugin1 : public IVdjPluginVideoFx
class Cmy_plugin1 : public IVdjPluginVideoTransition
{
public:
HRESULT __stdcall OnLoad();
HRESULT __stdcall OnGetPluginInfo(TVdjPluginInfo *infos);
ULONG __stdcall Release();
HRESULT __stdcall OnProcessSamples(short *buffer,int nb,int pos);
HRESULT __stdcall OnDraw(IDirect3DTexture9 *texture,TVertex *vertices);
HRESULT __stdcall Compose(int crossfader,HRESULT(__stdcall *RenderSurface[2])(),TVertex *vertices[2]);
HRESULT __stdcall OnCrossfaderTimer(int *crossfader);

private:
// Example: for the default interface:
int slider1;
int slider2;
};
//////////////////////////////////////////////////////////////////////////
// Initialization
//////////////////////////////////////////////////////////////////////////
HRESULT __stdcall DllGetClassObject(const GUID &rclsid,const GUID &riid,void** ppObject)
{
// This is the standard DLL loader for COM object.
// You don't need to change anything in this function.
if(memcmp(&rclsid,&CLSID_VdjPlugin,sizeof(GUID))!=0) return CLASS_E_CLASSNOTAVAILABLE;
if(memcmp(&riid,&IID_IVdjPluginDsp,sizeof(GUID))!=0) return CLASS_E_CLASSNOTAVAILABLE;
if(memcmp(&riid,&IID_IVdjPluginVideoFx,sizeof(GUID))!=0) return CLASS_E_CLASSNOTAVAILABLE;
if(memcmp(&riid,&IID_IVdjPluginVideoTransition,sizeof(GUID))!=0) return CLASS_E_CLASSNOTAVAILABLE;
*ppObject=new Cmy_plugin1();
return NO_ERROR;
}
//------------------------------------------------------------------------
HRESULT __stdcall Cmy_plugin1::OnLoad()
{
// Example: how to use the default interface
DeclareParameter(&slider1,VDJPARAM_SLIDER,1,"My first slider",2048);
DeclareParameter(&slider2,VDJPARAM_SLIDER,2,"My second slider",2048);
return S_OK;
}
//------------------------------------------------------------------------
HRESULT __stdcall Cmy_plugin1::OnGetPluginInfo(TVdjPluginInfo *infos)
{
infos->Author="Put your name here";
infos->PluginName="my_plugin1";
infos->Description="Description of your plugin";
infos->Bitmap=LoadBitmap(hInstance,MAKEINTRESOURCE(100));
infos->Flag=0;
return S_OK;
}
//------------------------------------------------------------------------
ULONG __stdcall Cmy_plugin1::Release()
{
delete this;
return 0;
}
//////////////////////////////////////////////////////////////////////////
// Sound processing
//////////////////////////////////////////////////////////////////////////
HRESULT __stdcall Cmy_plugin1::OnProcessSamples(short *buffer,int nb,int pos)
{
for(int i=0;i<nb;i++)
{
int left=buffer[2*i];
int right=buffer[2*i+1];
// do whatever you want here
buffer[2*i]=left;
buffer[2*i+1]=right;
}
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// Video processing
//////////////////////////////////////////////////////////////////////////
HRESULT __stdcall Cmy_plugin1::OnDraw(IDirect3DTexture9 *texture,TVertex *vertices)
{
// modify the texture or vertices
return S_FALSE;
}
//////////////////////////////////////////////////////////////////////////
// Auto-transition
//////////////////////////////////////////////////////////////////////////
HRESULT __stdcall Cmy_plugin1::OnCrossfaderTimer(int *crossfader)
{
return GetInfo("AutoVideoCrossfader",crossfader);
}
//////////////////////////////////////////////////////////////////////////
// Video processing
//////////////////////////////////////////////////////////////////////////
HRESULT __stdcall Cmy_plugin1::Compose(int crossfader,HRESULT(__stdcall *RenderSurface[2])(),TVertex *vertices[2])
{
// change the vertices according to crossfader
RenderSurface[0];
RenderSurface[1];
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
 

Posted Sun 15 Apr 07 @ 11:56 pm
djcelPRO InfinityModeratorMember since 2004
You have just copied plugin.cpp without considering the type of plugin you use
=> It's syntax of the wizard for Visual Studio
[!if xxxxxxx] ... [!endif]
 

Posted Mon 16 Apr 07 @ 11:35 am
djcelPRO InfinityModeratorMember since 2004
This is the code for an empty plugin. I removed the bitmap part because it uses the resources file

#define WIN32_LEAN_AND_MEAN

#include <windows.h>
#include "VdjPlugin.h"

//////////////////////////////////////////////////////////////////////////
// Class definition
//////////////////////////////////////////////////////////////////////////
class Cmyplugin : public IVdjPlugin
{
public:
HRESULT __stdcall OnLoad();
HRESULT __stdcall OnGetPluginInfo(TVdjPluginInfo *infos);
ULONG __stdcall Release();
private:
};
//////////////////////////////////////////////////////////////////////////
// Initialization
//////////////////////////////////////////////////////////////////////////
HRESULT __stdcall DllGetClassObject(const GUID &rclsid,const GUID &riid,void** ppObject)
{
// This is the standard DLL loader for COM object.
// You don't need to change anything in this function.
if(memcmp(&rclsid,&CLSID_VdjPlugin,sizeof(GUID))!=0) return CLASS_E_CLASSNOTAVAILABLE;
*ppObject=new Cmyplugin();
return NO_ERROR;
}
//------------------------------------------------------------------------
HRESULT __stdcall Cmyplugin::OnLoad()
{
return S_OK;
}
//------------------------------------------------------------------------
HRESULT __stdcall Cmyplugin::OnGetPluginInfo(TVdjPluginInfo *infos)
{
infos->Author="Put your name here";
infos->PluginName="myplugin";
infos->Description="Description of your plugin";
infos->Flag=0;
return S_OK;
}
//------------------------------------------------------------------------
ULONG __stdcall Cmyplugin::Release()
{
delete this;
return 0;
}
 

Posted Mon 16 Apr 07 @ 11:43 am
Is this the function to get info from VDJ? It was located in VdjDsp2.h
HRESULT (__stdcall *GetParam)(int desk,char *param,void *result);
at the bottom of that h file were the params:
Params list:
- Bpm (float)
- Pitch (int)
- FilePath (char*)
- FileName (char*)
- FileSize (int)
- Author (char*)
- Title (char*)
- SongLength (int)
- Volume (int)
- Comment (char*)
- PlayPos (int)
- VdjFolder (char*)
- EffectFolder (char*)
- VdjVersion (int)
- CurrentDesk (int)
- CurrentSlot (int)
- CrossfaderVolume (int)
- Crossfader (int)

I assume (int) means integer and (char*) means contains characters.

Also in the previous code there are codes that say "delete this'" am I to delete that line or is this valid code?
 

Posted Tue 17 Apr 07 @ 11:05 am
djcelPRO InfinityModeratorMember since 2004
Ok, break, you are totally wrong since the beginning:

1) Download the last SDK in the tools section of the website: the one for VirtualDJ v4.x and not the old SDK and don't mix the files between them.
2) create a dll project with vdjplugin.h and plugin.cpp
3) Use my basis code instead of the code written in the plugin.cpp of the SDK
 

Posted Tue 17 Apr 07 @ 1:56 pm
e:Microsoft Visual Studio .NET 2003Vc7vcprojectsSDK for VirtualDJ v4.x and Numark CUEpluginsdkVdjPlugin.h(93) : error C2375: 'DllGetClassObject' : redefinition; different linkage
e:Microsoft Visual Studio .NET 2003Vc7PlatformSDKIncludeObjBase.h(807) : see declaration of 'DllGetClassObject'

which sends me inside VdjPlugin.h to:
__declspec( dllexport ) HRESULT __stdcall DllGetClassObject(const GUID &rclsid,const GUID &riid,void** ppObject);

With the old SDK (VdjDspWizard.exe) there was a wizzard and it was writen in VC++
The New SDK (SDK for VirtualDJ v4.x and Numark CUE) I think was writen in plain C

Here's a zip of the VC++ 2003 project http://ca.briefcase.yahoo.com/ethanhines
under vc++ projects


 

Posted Tue 17 Apr 07 @ 3:33 pm
djcelPRO InfinityModeratorMember since 2004
When you release source codes, only add the important files because your package is 4.47MB ;-)

I mean you can delete the .ncb file and the release or debug folder
 

Posted Wed 18 Apr 07 @ 12:07 pm
djcelPRO InfinityModeratorMember since 2004
Ok first you used MFC whereas it's useless:

select this for "Use of MFC":
"Use Standard Windows Libraries"


Then create an empty dll project
(stdafx.h and stdafx.cpp are for MFC)
 

Posted Wed 18 Apr 07 @ 6:06 pm
Ok I Deleted all that other stuff I used standard libraries and I still am getting error
error C2375: 'DllGetClassObject' : redefinition; different linkage
and
ObjBase.h (807) : see declaration of 'DllGetClassObject'

locatedin VdjPlugin.h at line 93
__declspec( dllexport ) HRESULT __stdcall DllGetClassObject(const GUID &rclsid,const GUID &riid,void** ppObject);
 

Posted Fri 20 Apr 07 @ 3:13 am


(Old topics and forums are automatically closed)