deargui-vpl/ref/virtools/Samples/Plugins/Wav Reader/WavReaderDll.cpp

108 lines
2.3 KiB
C++

// WavReaderDll.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
#include <mmsystem.h>
#include <amstream.h>
#include <mmsystem.h>
#include <mmreg.h>
#include <msacm.h>
#include "DShowReader.h"
#include "Header\WavReader.h"
#define READER_COUNT 3
CKPluginInfo g_piInfo[READER_COUNT];
#define READER_VERSION 0x00000001
#define WAVREADER_GUID CKGUID(0x61abc44f,0xe1233343)
#define MP3READER_GUID CKGUID(0x6dd83b2b,0x66f744e4)
#define WMAREADER_GUID CKGUID(0x646523ff,0x328a1022)
CKPluginInfo* DShowReader::GetReaderInfo()
{
return &g_piInfo[1];
}
CKPluginInfo* Mp3Reader::GetReaderInfo()
{
return &g_piInfo[2];
}
CKPluginInfo* WAVReader::GetReaderInfo()
{
return &g_piInfo[0];
}
#ifdef CK_LIB
CKDataReader *CKGet_WavReader_Reader(int pos)
#else
CKDataReader* CKGetReader(int pos)
#endif
{
switch(pos){
case 0:
return new WAVReader;
break;
case 1:
case 2:
return new DShowReader;
break;
}
return new DShowReader;
}
int CKGetPluginInfoCount()
{
return READER_COUNT;
}
#ifdef CK_LIB
CKPluginInfo* CKGet_WavReader_PluginInfo(int index)
#else
CKPluginInfo* CKGetPluginInfo(int index)
#endif
{
g_piInfo[0].m_GUID = WAVREADER_GUID;
g_piInfo[0].m_Version = READER_VERSION;
g_piInfo[0].m_Description = "Sound Files";
g_piInfo[0].m_Summary = "Wav Reader";
g_piInfo[0].m_Extension = "wav";
g_piInfo[0].m_Author = "Virtools";
g_piInfo[0].m_InitInstanceFct=NULL; //
g_piInfo[0].m_Type =CKPLUGIN_SOUND_READER; // Plugin Type
g_piInfo[1].m_GUID = WMAREADER_GUID;
g_piInfo[1].m_Version = READER_VERSION;
g_piInfo[1].m_Description = "Sound Files";
g_piInfo[1].m_Summary = "DShow Reader";
g_piInfo[1].m_Extension = "*";
g_piInfo[1].m_Author = "Virtools";
g_piInfo[1].m_InitInstanceFct=NULL; //
g_piInfo[1].m_Type = CKPLUGIN_SOUND_READER; // Plugin Type
g_piInfo[2].m_GUID = MP3READER_GUID;
g_piInfo[2].m_Version = READER_VERSION;
g_piInfo[2].m_Description = "Sound Files";
g_piInfo[2].m_Summary = "DShow Reader";
g_piInfo[2].m_Extension = "*";
g_piInfo[2].m_Author = "Virtools";
g_piInfo[2].m_InitInstanceFct=NULL; //
g_piInfo[2].m_Type =CKPLUGIN_EXTENSION_DLL; // Plugin Type
g_piInfo[2].m_ExitInstanceFct=ExitDShowReaderInstance;
return &g_piInfo[index];
}