mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-02-14 00:05:43 +00:00
Commit of projectM-wmp and GLEW (for building on win32).
git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@485 6778bc44-b910-0410-a7a0-be141de4315d
This commit is contained in:
BIN
src/projectM-wmp/debug/projectM-wmp.ilk
Normal file
BIN
src/projectM-wmp/debug/projectM-wmp.ilk
Normal file
Binary file not shown.
46
src/projectM-wmp/projectM-wmp.sln
Normal file
46
src/projectM-wmp/projectM-wmp.sln
Normal file
@ -0,0 +1,46 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "projectM-wmp", "projectM-wmp\projectM-wmp.vcproj", "{E182C41E-2EF4-4BE6-8D85-F9A0982CD38C}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libprojectM", "..\projectM-engine\libprojectM.vcproj", "{31B91091-431A-4842-8682-2A04B51C980A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glew_static", "..\glew\build\vc6\glew_static.vcproj", "{94AC71AA-7528-4E56-A5A9-EDDFE6D20A39}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug MX|Win32 = Debug MX|Win32
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release MX|Win32 = Release MX|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E182C41E-2EF4-4BE6-8D85-F9A0982CD38C}.Debug MX|Win32.ActiveCfg = Debug|Win32
|
||||
{E182C41E-2EF4-4BE6-8D85-F9A0982CD38C}.Debug MX|Win32.Build.0 = Debug|Win32
|
||||
{E182C41E-2EF4-4BE6-8D85-F9A0982CD38C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E182C41E-2EF4-4BE6-8D85-F9A0982CD38C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E182C41E-2EF4-4BE6-8D85-F9A0982CD38C}.Release MX|Win32.ActiveCfg = Release|Win32
|
||||
{E182C41E-2EF4-4BE6-8D85-F9A0982CD38C}.Release MX|Win32.Build.0 = Release|Win32
|
||||
{E182C41E-2EF4-4BE6-8D85-F9A0982CD38C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E182C41E-2EF4-4BE6-8D85-F9A0982CD38C}.Release|Win32.Build.0 = Release|Win32
|
||||
{31B91091-431A-4842-8682-2A04B51C980A}.Debug MX|Win32.ActiveCfg = Debug|Win32
|
||||
{31B91091-431A-4842-8682-2A04B51C980A}.Debug MX|Win32.Build.0 = Debug|Win32
|
||||
{31B91091-431A-4842-8682-2A04B51C980A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{31B91091-431A-4842-8682-2A04B51C980A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{31B91091-431A-4842-8682-2A04B51C980A}.Release MX|Win32.ActiveCfg = Release|Win32
|
||||
{31B91091-431A-4842-8682-2A04B51C980A}.Release MX|Win32.Build.0 = Release|Win32
|
||||
{31B91091-431A-4842-8682-2A04B51C980A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{31B91091-431A-4842-8682-2A04B51C980A}.Release|Win32.Build.0 = Release|Win32
|
||||
{94AC71AA-7528-4E56-A5A9-EDDFE6D20A39}.Debug MX|Win32.ActiveCfg = Debug MX|Win32
|
||||
{94AC71AA-7528-4E56-A5A9-EDDFE6D20A39}.Debug MX|Win32.Build.0 = Debug MX|Win32
|
||||
{94AC71AA-7528-4E56-A5A9-EDDFE6D20A39}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{94AC71AA-7528-4E56-A5A9-EDDFE6D20A39}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{94AC71AA-7528-4E56-A5A9-EDDFE6D20A39}.Release MX|Win32.ActiveCfg = Release MX|Win32
|
||||
{94AC71AA-7528-4E56-A5A9-EDDFE6D20A39}.Release MX|Win32.Build.0 = Release MX|Win32
|
||||
{94AC71AA-7528-4E56-A5A9-EDDFE6D20A39}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{94AC71AA-7528-4E56-A5A9-EDDFE6D20A39}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
src/projectM-wmp/projectM-wmp.suo
Normal file
BIN
src/projectM-wmp/projectM-wmp.suo
Normal file
Binary file not shown.
BIN
src/projectM-wmp/projectM-wmp/Debug/BuildLog.htm
Normal file
BIN
src/projectM-wmp/projectM-wmp/Debug/BuildLog.htm
Normal file
Binary file not shown.
BIN
src/projectM-wmp/projectM-wmp/Release/BuildLog.htm
Normal file
BIN
src/projectM-wmp/projectM-wmp/Release/BuildLog.htm
Normal file
Binary file not shown.
10
src/projectM-wmp/projectM-wmp/StdAfx.cpp
Normal file
10
src/projectM-wmp/projectM-wmp/StdAfx.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// stdafx.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#ifdef _ATL_STATIC_REGISTRY
|
||||
#include <statreg.h>
|
||||
#endif
|
||||
|
||||
28
src/projectM-wmp/projectM-wmp/StdAfx.h
Normal file
28
src/projectM-wmp/projectM-wmp/StdAfx.h
Normal file
@ -0,0 +1,28 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#if !defined(AFX_STDAFX_H__970E5960_5209_4AE7_8DD2_ACD4C1165941__INCLUDED_)
|
||||
#define AFX_STDAFX_H__970E5960_5209_4AE7_8DD2_ACD4C1165941__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#define STRICT
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#endif
|
||||
#define _ATL_APARTMENT_THREADED
|
||||
|
||||
#include <atlbase.h>
|
||||
//You may derive a class from CComModule and use it if you want to override
|
||||
//something, but do not change the name of _Module
|
||||
extern CComModule _Module;
|
||||
#include <atlcom.h>
|
||||
#include <ocidl.h> // Added by ClassView
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__970E5960_5209_4AE7_8DD2_ACD4C1165941__INCLUDED)
|
||||
BIN
src/projectM-wmp/projectM-wmp/projectM-wmp.aps
Normal file
BIN
src/projectM-wmp/projectM-wmp/projectM-wmp.aps
Normal file
Binary file not shown.
548
src/projectM-wmp/projectM-wmp/projectM-wmp.cpp
Normal file
548
src/projectM-wmp/projectM-wmp/projectM-wmp.cpp
Normal file
@ -0,0 +1,548 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// projectM-wmp.cpp : Implementation of CProjectMwmp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "projectM-wmp.h"
|
||||
#include "projectM.hpp"
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::CProjectMwmp
|
||||
// Constructor
|
||||
|
||||
HGLRC hrc = NULL;
|
||||
bool starting = true;
|
||||
int width, height;
|
||||
projectM *globalPM;
|
||||
|
||||
CProjectMwmp::CProjectMwmp() :
|
||||
m_hwndParent(NULL),
|
||||
m_clrForeground(0x0000FF),
|
||||
m_nPreset(0)
|
||||
{
|
||||
m_dwAdviseCookie = 0;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::~CProjectMwmp
|
||||
// Destructor
|
||||
|
||||
CProjectMwmp::~CProjectMwmp()
|
||||
{
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp:::FinalConstruct
|
||||
// Called when an effect is first loaded. Use this function to do one-time
|
||||
// intializations that could fail (i.e. creating offscreen buffers) instead
|
||||
// of doing this in the constructor, which cannot return an error.
|
||||
|
||||
HRESULT CProjectMwmp::FinalConstruct()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp:::FinalRelease
|
||||
// Called when an effect is unloaded. Use this function to free any
|
||||
// resources allocated in FinalConstruct.
|
||||
|
||||
void CProjectMwmp::FinalRelease()
|
||||
{
|
||||
ReleaseCore();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::Render
|
||||
// Called when an effect should render itself to the screen.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::Render(TimedLevel *pLevels, HDC hdc, RECT *prc)
|
||||
{
|
||||
|
||||
if (starting) {
|
||||
static PIXELFORMATDESCRIPTOR pfd = {
|
||||
sizeof(PIXELFORMATDESCRIPTOR), 1,
|
||||
PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER,
|
||||
PFD_TYPE_RGBA, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,
|
||||
0, 0, PFD_MAIN_PLANE, 0, 0, 0, 0
|
||||
};
|
||||
SetPixelFormat(hdc, ChoosePixelFormat(hdc,&pfd), &pfd);
|
||||
hrc = wglCreateContext(hdc);
|
||||
wglMakeCurrent(hdc, hrc);
|
||||
starting = false;
|
||||
|
||||
|
||||
glShadeModel( GL_SMOOTH);
|
||||
|
||||
glViewport( 0, 0, width, height );
|
||||
|
||||
glMatrixMode(GL_TEXTURE);
|
||||
glLoadIdentity();
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
|
||||
glDrawBuffer(GL_BACK);
|
||||
glReadBuffer(GL_BACK);
|
||||
glEnable(GL_BLEND);
|
||||
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
glEnable(GL_LINE_SMOOTH);
|
||||
glEnable(GL_POINT_SMOOTH);
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
width = (int)(prc->right - prc->left);
|
||||
height = (int)(prc->bottom - prc->top);
|
||||
|
||||
globalPM = new projectM("C:\\projectM\\config.inp");//24,18,0,128,width,height,"C:\\Documents and Settings\\DEV2\\My Documents\\svn\\presets_projectM\\");
|
||||
|
||||
}
|
||||
|
||||
int newwidth = (int)(prc->right - prc->left);
|
||||
int newheight = (int)(prc->bottom - prc->top);
|
||||
if (width!= newwidth || height != newheight)
|
||||
{
|
||||
width=newwidth;
|
||||
height=newheight;
|
||||
globalPM->projectM_resetGL(width,height);
|
||||
}
|
||||
|
||||
globalPM->beatDetect->pcm->addPCM8(pLevels->waveform);
|
||||
globalPM->renderFrame();
|
||||
|
||||
SwapBuffers(hdc);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::MediaInfo
|
||||
// Everytime new media is loaded, this method is called to pass the
|
||||
// number of channels (mono/stereo), the sample rate of the media, and the
|
||||
// title of the media
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::MediaInfo(LONG lChannelCount, LONG lSampleRate, BSTR bstrTitle )
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::GetCapabilities
|
||||
// Returns the capabilities of this effect. Flags that can be returned are:
|
||||
// EFFECT_CANGOFULLSCREEN -- effect supports full-screen rendering
|
||||
// EFFECT_HASPROPERTYPAGE -- effect supports a property page
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::GetCapabilities(DWORD * pdwCapabilities)
|
||||
{
|
||||
if (NULL == pdwCapabilities)
|
||||
{
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pdwCapabilities = EFFECT_CANGOFULLSCREEN;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::GetTitle
|
||||
// Invoked when a host wants to obtain the title of the effect
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::GetTitle(BSTR* bstrTitle)
|
||||
{
|
||||
USES_CONVERSION;
|
||||
|
||||
if (NULL == bstrTitle)
|
||||
{
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
CComBSTR bstrTemp;
|
||||
bstrTemp.LoadString(IDS_EFFECTNAME);
|
||||
|
||||
if ((!bstrTemp) || (0 == bstrTemp.Length()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
*bstrTitle = bstrTemp.Detach();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::GetPresetTitle
|
||||
// Invoked when a host wants to obtain the title of the given preset
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::GetPresetTitle(LONG nPreset, BSTR *bstrPresetTitle)
|
||||
{
|
||||
USES_CONVERSION;
|
||||
|
||||
if (NULL == bstrPresetTitle)
|
||||
{
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
if ((nPreset < 0) || (nPreset >= PRESET_COUNT))
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
CComBSTR bstrTemp;
|
||||
|
||||
bstrTemp = "projectM 1.0";
|
||||
|
||||
if ((!bstrTemp) || (0 == bstrTemp.Length()))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
*bstrPresetTitle = bstrTemp.Detach();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::GetPresetCount
|
||||
// Invoked when a host wants to obtain the number of supported presets
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::GetPresetCount(LONG *pnPresetCount)
|
||||
{
|
||||
if (NULL == pnPresetCount)
|
||||
{
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pnPresetCount = 1;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::SetCurrentPreset
|
||||
// Invoked when a host wants to change the index of the current preset
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::SetCurrentPreset(LONG nPreset)
|
||||
{
|
||||
if ((nPreset < 0) || (nPreset >= PRESET_COUNT))
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
m_nPreset = 0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::GetCurrentPreset
|
||||
// Invoked when a host wants to obtain the index of the current preset
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::GetCurrentPreset(LONG *pnPreset)
|
||||
{
|
||||
if (NULL == pnPreset)
|
||||
{
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pnPreset = 0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::SetCore
|
||||
// Set WMP core interface
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::SetCore(IWMPCore * pCore)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
// release any existing WMP core interfaces
|
||||
ReleaseCore();
|
||||
|
||||
// If we get passed a NULL core, this means
|
||||
// that the plugin is being shutdown.
|
||||
|
||||
if (pCore == NULL)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
m_spCore = pCore;
|
||||
|
||||
// connect up the event interface
|
||||
CComPtr<IConnectionPointContainer> spConnectionContainer;
|
||||
|
||||
hr = m_spCore->QueryInterface( &spConnectionContainer );
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = spConnectionContainer->FindConnectionPoint( __uuidof(IWMPEvents), &m_spConnectionPoint );
|
||||
}
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = m_spConnectionPoint->Advise( GetUnknown(), &m_dwAdviseCookie );
|
||||
|
||||
if ((FAILED(hr)) || (0 == m_dwAdviseCookie))
|
||||
{
|
||||
m_spConnectionPoint = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::Create
|
||||
// Invoked when the visualization should be initialized.
|
||||
//
|
||||
// If hwndParent != NULL, RenderWindowed() will be called and the visualization
|
||||
// should draw into the window specified by hwndParent. This will be the
|
||||
// behavior when the visualization is hosted in a window.
|
||||
//
|
||||
// If hwndParent == NULL, Render() will be called and the visualization
|
||||
// should draw into the DC passed to Render(). This will be the behavior when
|
||||
// the visualization is hosted windowless (like in a skin for example).
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::Create(HWND hwndParent)
|
||||
{
|
||||
|
||||
m_hwndParent = hwndParent;
|
||||
if(!starting)
|
||||
{
|
||||
delete(globalPM);
|
||||
starting = true;
|
||||
}
|
||||
|
||||
//
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::Destroy
|
||||
// Invoked when the visualization should be released.
|
||||
//
|
||||
// Any resources allocated for rendering should be released.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::Destroy()
|
||||
{
|
||||
m_hwndParent = NULL;
|
||||
starting = true;
|
||||
delete(globalPM);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::NotifyNewMedia
|
||||
// Invoked when a new media stream begins playing.
|
||||
//
|
||||
// The visualization can inspect this object for properties (like name or artist)
|
||||
// that might be interesting for visualization.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::NotifyNewMedia(IWMPMedia *pMedia)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::OnWindowMessage
|
||||
// Window messages sent to the parent window.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::OnWindowMessage(UINT msg, WPARAM WParam, LPARAM LParam, LRESULT *plResultParam )
|
||||
{
|
||||
// return S_OK only if the plugin has handled the window message
|
||||
// return S_FALSE to let the defWindowProc handle the message
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::RenderWindowed
|
||||
// Called when an effect should render itself to the screen.
|
||||
//
|
||||
// The fRequiredRender flag specifies if an update is required, otherwise the
|
||||
// update is optional. This allows visualizations that are fairly static (for example,
|
||||
// album art visualizations) to only render when the parent window requires it,
|
||||
// instead of n times a second for dynamic visualizations.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::RenderWindowed(TimedLevel *pLevels, BOOL fRequiredRender )
|
||||
{
|
||||
// NULL parent window should not happen
|
||||
if (NULL == m_hwndParent)
|
||||
{
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
// At this point the visualization should draw directly into the parent
|
||||
// window. This sample just calls windowless render for simplicity.
|
||||
|
||||
HDC hdc = ::GetDC(m_hwndParent);
|
||||
|
||||
if (NULL == hdc)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
RECT rParent = { 0 };
|
||||
::GetClientRect(m_hwndParent, &rParent);
|
||||
|
||||
Render(pLevels, hdc, &rParent);
|
||||
|
||||
::ReleaseDC(m_hwndParent, hdc);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::ReleaseCore
|
||||
// Release WMP core interfaces
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
void CProjectMwmp::ReleaseCore()
|
||||
{
|
||||
if (m_spConnectionPoint)
|
||||
{
|
||||
if (0 != m_dwAdviseCookie)
|
||||
{
|
||||
m_spConnectionPoint->Unadvise(m_dwAdviseCookie);
|
||||
m_dwAdviseCookie = 0;
|
||||
}
|
||||
m_spConnectionPoint = NULL;
|
||||
}
|
||||
|
||||
if (m_spCore)
|
||||
{
|
||||
m_spCore = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::get_foregroundColor
|
||||
// Property get to retrieve the foregroundColor prop via the public interface.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::get_foregroundColor(BSTR *pVal)
|
||||
{
|
||||
return ColorToWz( pVal, m_clrForeground);
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::put_foregroundColor
|
||||
// Property put to set the foregroundColor prop via the public interface.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
STDMETHODIMP CProjectMwmp::put_foregroundColor(BSTR newVal)
|
||||
{
|
||||
return WzToColor(newVal, &m_clrForeground);
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::WzToColor
|
||||
// Helper function used to convert a string into a COLORREF.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
HRESULT CProjectMwmp::WzToColor(const WCHAR *pwszColor, COLORREF *pcrColor)
|
||||
{
|
||||
if (NULL == pwszColor)
|
||||
{
|
||||
//NULL color string passed in
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
if (0 == lstrlenW(pwszColor))
|
||||
{
|
||||
//Empty color string passed in
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
if (NULL == pcrColor)
|
||||
{
|
||||
//NULL output color DWORD passed in
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
if (lstrlenW(pwszColor) != 7)
|
||||
{
|
||||
//hex color string is not of the correct length
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
DWORD dwRet = 0;
|
||||
for (int i = 1; i < 7; i++)
|
||||
{
|
||||
// shift dwRet by 4
|
||||
dwRet <<= 4;
|
||||
// and add in the value of this string
|
||||
|
||||
if ((pwszColor[i] >= L'0') && (pwszColor[i] <= L'9'))
|
||||
{
|
||||
dwRet += pwszColor[i] - '0';
|
||||
}
|
||||
else if ((pwszColor[i] >= L'A') && (pwszColor[i] <= L'F'))
|
||||
{
|
||||
dwRet += 10 + (pwszColor[i] - L'A');
|
||||
}
|
||||
else if ((pwszColor[i] >= L'a') && (pwszColor[i] <= L'f'))
|
||||
{
|
||||
dwRet += 10 + (pwszColor[i] - L'a');
|
||||
}
|
||||
else
|
||||
{
|
||||
//Invalid hex digit in color string
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
}
|
||||
|
||||
*pcrColor = SwapBytes(dwRet);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::ColorToWz
|
||||
// Helper function used to convert a COLORREF to a BSTR.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
HRESULT CProjectMwmp::ColorToWz( BSTR* pbstrColor, COLORREF crColor)
|
||||
{
|
||||
_ASSERT( NULL != pbstrColor );
|
||||
_ASSERT( (crColor & 0x00FFFFFF) == crColor );
|
||||
|
||||
*pbstrColor = NULL;
|
||||
|
||||
WCHAR wsz[8];
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
swprintf_s( wsz, sizeof(wsz)/sizeof(wsz[0]), L"#%06X", SwapBytes(crColor) );
|
||||
|
||||
*pbstrColor = ::SysAllocString( wsz );
|
||||
|
||||
if (!pbstrColor)
|
||||
{
|
||||
hr = E_FAIL;
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp::SwapBytes
|
||||
// Used to convert between a DWORD and COLORREF. Simply swaps the lowest
|
||||
// and 3rd order bytes.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
inline DWORD CProjectMwmp::SwapBytes(DWORD dwRet)
|
||||
{
|
||||
return ((dwRet & 0x0000FF00) | ((dwRet & 0x00FF0000) >> 16) | ((dwRet & 0x000000FF) << 16));
|
||||
}
|
||||
|
||||
9
src/projectM-wmp/projectM-wmp/projectM-wmp.def
Normal file
9
src/projectM-wmp/projectM-wmp/projectM-wmp.def
Normal file
@ -0,0 +1,9 @@
|
||||
; projectM-wmp.def : Declares the module parameters.
|
||||
|
||||
LIBRARY "PROJECTM-WMP.DLL"
|
||||
|
||||
EXPORTS
|
||||
DllCanUnloadNow PRIVATE
|
||||
DllGetClassObject PRIVATE
|
||||
DllRegisterServer PRIVATE
|
||||
DllUnregisterServer PRIVATE
|
||||
143
src/projectM-wmp/projectM-wmp/projectM-wmp.h
Normal file
143
src/projectM-wmp/projectM-wmp/projectM-wmp.h
Normal file
@ -0,0 +1,143 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// projectM-wmp.h : Declaration of the CProjectMwmp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __PROJECTMWMP_H_
|
||||
#define __PROJECTMWMP_H_
|
||||
|
||||
#include "resource.h"
|
||||
#include "effects.h"
|
||||
#include "projectM-wmp_h.h"
|
||||
|
||||
// preset values
|
||||
enum {
|
||||
PRESET_BARS = 0,
|
||||
PRESET_SCOPE,
|
||||
PRESET_COUNT
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CProjectMwmp
|
||||
class ATL_NO_VTABLE CProjectMwmp :
|
||||
public CComObjectRootEx<CComSingleThreadModel>,
|
||||
public CComCoClass<CProjectMwmp, &CLSID_ProjectMwmp>,
|
||||
public IDispatchImpl<IProjectMwmp, &IID_IProjectMwmp, &LIBID_PROJECTMWMPLib>,
|
||||
public IWMPEvents,
|
||||
public IWMPEffects2
|
||||
{
|
||||
private:
|
||||
COLORREF m_clrForeground; // foreground color
|
||||
LONG m_nPreset; // current preset
|
||||
|
||||
HRESULT WzToColor(const WCHAR *pwszColor, COLORREF *pcrColor);
|
||||
HRESULT ColorToWz( BSTR* pbstrColor, COLORREF crColor);
|
||||
DWORD SwapBytes(DWORD dwRet);
|
||||
|
||||
public:
|
||||
CProjectMwmp();
|
||||
~CProjectMwmp();
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_PROJECTMWMP)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(CProjectMwmp)
|
||||
COM_INTERFACE_ENTRY(IProjectMwmp)
|
||||
COM_INTERFACE_ENTRY(IDispatch)
|
||||
COM_INTERFACE_ENTRY(IWMPEvents)
|
||||
COM_INTERFACE_ENTRY(IWMPEffects)
|
||||
COM_INTERFACE_ENTRY(IWMPEffects2)
|
||||
END_COM_MAP()
|
||||
|
||||
public:
|
||||
|
||||
// CComCoClass Overrides
|
||||
HRESULT FinalConstruct();
|
||||
void FinalRelease();
|
||||
|
||||
// IProjectMwmp
|
||||
STDMETHOD(get_foregroundColor)(/*[out, retval]*/ BSTR *pVal);
|
||||
STDMETHOD(put_foregroundColor)(/*[in]*/ BSTR newVal);
|
||||
|
||||
// IWMPEffects
|
||||
STDMETHOD(Render)(TimedLevel *pLevels, HDC hdc, RECT *rc);
|
||||
STDMETHOD(MediaInfo)(LONG lChannelCount, LONG lSampleRate, BSTR bstrTitle);
|
||||
STDMETHOD(GetCapabilities)(DWORD * pdwCapabilities);
|
||||
STDMETHOD(GoFullscreen)(BOOL fFullScreen) { return E_NOTIMPL; };
|
||||
STDMETHOD(RenderFullScreen)(TimedLevel *pLevels) { return E_NOTIMPL; };
|
||||
STDMETHOD(DisplayPropertyPage)(HWND hwndOwner) { return E_NOTIMPL; };
|
||||
STDMETHOD(GetTitle)(BSTR *bstrTitle);
|
||||
STDMETHOD(GetPresetTitle)(LONG nPreset, BSTR *bstrPresetTitle);
|
||||
STDMETHOD(GetPresetCount)(LONG *pnPresetCount);
|
||||
STDMETHOD(SetCurrentPreset)(LONG nPreset);
|
||||
STDMETHOD(GetCurrentPreset)(LONG *pnPreset);
|
||||
|
||||
// IWMPEffects2
|
||||
STDMETHOD(SetCore)(IWMPCore * pCore);
|
||||
STDMETHOD(Create)(HWND hwndParent);
|
||||
STDMETHOD(Destroy)();
|
||||
STDMETHOD(NotifyNewMedia)(IWMPMedia *pMedia);
|
||||
STDMETHOD(OnWindowMessage)(UINT msg, WPARAM WParam, LPARAM LParam, LRESULT *plResultParam );
|
||||
STDMETHOD(RenderWindowed)(TimedLevel *pLevels, BOOL fRequiredRender );
|
||||
|
||||
// IWMPEvents methods
|
||||
void STDMETHODCALLTYPE OpenStateChange( long NewState );
|
||||
void STDMETHODCALLTYPE PlayStateChange( long NewState );
|
||||
void STDMETHODCALLTYPE AudioLanguageChange( long LangID );
|
||||
void STDMETHODCALLTYPE StatusChange();
|
||||
void STDMETHODCALLTYPE ScriptCommand( BSTR scType, BSTR Param );
|
||||
void STDMETHODCALLTYPE NewStream();
|
||||
void STDMETHODCALLTYPE Disconnect( long Result );
|
||||
void STDMETHODCALLTYPE Buffering( VARIANT_BOOL Start );
|
||||
void STDMETHODCALLTYPE Error();
|
||||
void STDMETHODCALLTYPE Warning( long WarningType, long Param, BSTR Description );
|
||||
void STDMETHODCALLTYPE EndOfStream( long Result );
|
||||
void STDMETHODCALLTYPE PositionChange( double oldPosition, double newPosition);
|
||||
void STDMETHODCALLTYPE MarkerHit( long MarkerNum );
|
||||
void STDMETHODCALLTYPE DurationUnitChange( long NewDurationUnit );
|
||||
void STDMETHODCALLTYPE CdromMediaChange( long CdromNum );
|
||||
void STDMETHODCALLTYPE PlaylistChange( IDispatch * Playlist, WMPPlaylistChangeEventType change );
|
||||
void STDMETHODCALLTYPE CurrentPlaylistChange( WMPPlaylistChangeEventType change );
|
||||
void STDMETHODCALLTYPE CurrentPlaylistItemAvailable( BSTR bstrItemName );
|
||||
void STDMETHODCALLTYPE MediaChange( IDispatch * Item );
|
||||
void STDMETHODCALLTYPE CurrentMediaItemAvailable( BSTR bstrItemName );
|
||||
void STDMETHODCALLTYPE CurrentItemChange( IDispatch *pdispMedia);
|
||||
void STDMETHODCALLTYPE MediaCollectionChange();
|
||||
void STDMETHODCALLTYPE MediaCollectionAttributeStringAdded( BSTR bstrAttribName, BSTR bstrAttribVal );
|
||||
void STDMETHODCALLTYPE MediaCollectionAttributeStringRemoved( BSTR bstrAttribName, BSTR bstrAttribVal );
|
||||
void STDMETHODCALLTYPE MediaCollectionAttributeStringChanged( BSTR bstrAttribName, BSTR bstrOldAttribVal, BSTR bstrNewAttribVal);
|
||||
void STDMETHODCALLTYPE PlaylistCollectionChange();
|
||||
void STDMETHODCALLTYPE PlaylistCollectionPlaylistAdded( BSTR bstrPlaylistName);
|
||||
void STDMETHODCALLTYPE PlaylistCollectionPlaylistRemoved( BSTR bstrPlaylistName);
|
||||
void STDMETHODCALLTYPE PlaylistCollectionPlaylistSetAsDeleted( BSTR bstrPlaylistName, VARIANT_BOOL varfIsDeleted);
|
||||
void STDMETHODCALLTYPE ModeChange( BSTR ModeName, VARIANT_BOOL NewValue);
|
||||
void STDMETHODCALLTYPE MediaError( IDispatch * pMediaObject);
|
||||
void STDMETHODCALLTYPE OpenPlaylistSwitch( IDispatch *pItem );
|
||||
void STDMETHODCALLTYPE DomainChange( BSTR strDomain);
|
||||
void STDMETHODCALLTYPE SwitchedToPlayerApplication();
|
||||
void STDMETHODCALLTYPE SwitchedToControl();
|
||||
void STDMETHODCALLTYPE PlayerDockedStateChange();
|
||||
void STDMETHODCALLTYPE PlayerReconnect();
|
||||
void STDMETHODCALLTYPE Click( short nButton, short nShiftState, long fX, long fY );
|
||||
void STDMETHODCALLTYPE DoubleClick( short nButton, short nShiftState, long fX, long fY );
|
||||
void STDMETHODCALLTYPE KeyDown( short nKeyCode, short nShiftState );
|
||||
void STDMETHODCALLTYPE KeyPress( short nKeyAscii );
|
||||
void STDMETHODCALLTYPE KeyUp( short nKeyCode, short nShiftState );
|
||||
void STDMETHODCALLTYPE MouseDown( short nButton, short nShiftState, long fX, long fY );
|
||||
void STDMETHODCALLTYPE MouseMove( short nButton, short nShiftState, long fX, long fY );
|
||||
void STDMETHODCALLTYPE MouseUp( short nButton, short nShiftState, long fX, long fY );
|
||||
|
||||
private:
|
||||
void ReleaseCore();
|
||||
|
||||
HWND m_hwndParent;
|
||||
CComPtr<IWMPCore> m_spCore;
|
||||
CComPtr<IConnectionPoint> m_spConnectionPoint;
|
||||
DWORD m_dwAdviseCookie;
|
||||
};
|
||||
|
||||
#endif //__PROJECTMWMP_H_
|
||||
40
src/projectM-wmp/projectM-wmp/projectM-wmp.idl
Normal file
40
src/projectM-wmp/projectM-wmp/projectM-wmp.idl
Normal file
@ -0,0 +1,40 @@
|
||||
// iprojectM-wmp.idl : IDL source for projectM-wmp.dll
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
// This file will be processed by the MIDL tool to
|
||||
// produce the type library (iprojectM-wmp.tlb) and marshalling code.
|
||||
|
||||
import "oaidl.idl";
|
||||
import "ocidl.idl";
|
||||
[
|
||||
object,
|
||||
uuid(8E230690-504E-471D-B3B7-C8EE5C874B96),
|
||||
dual,
|
||||
helpstring("IProjectMwmp Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IProjectMwmp : IDispatch
|
||||
{
|
||||
[propget, id(1), helpstring("property foregroundColor")] HRESULT foregroundColor([out, retval] BSTR *pVal);
|
||||
[propput, id(1), helpstring("property foregroundColor")] HRESULT foregroundColor([in] BSTR newVal);
|
||||
};
|
||||
|
||||
[
|
||||
uuid(0EEBF2FE-5198-43EE-980A-57C120606942),
|
||||
version(1.0),
|
||||
helpstring("ProjectMwmp 1.0 Type Library")
|
||||
]
|
||||
library PROJECTMWMPLib
|
||||
{
|
||||
importlib("stdole32.tlb");
|
||||
importlib("stdole2.tlb");
|
||||
|
||||
[
|
||||
uuid(0F04F51D-A1EA-4F41-908B-28BC5BC00FA8),
|
||||
helpstring("ProjectMwmp Class")
|
||||
]
|
||||
coclass ProjectMwmp
|
||||
{
|
||||
[default] interface IProjectMwmp;
|
||||
};
|
||||
};
|
||||
122
src/projectM-wmp/projectM-wmp/projectM-wmp.rc
Normal file
122
src/projectM-wmp/projectM-wmp/projectM-wmp.rc
Normal file
@ -0,0 +1,122 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "winres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""winres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"1 TYPELIB ""projectM-wmp.tlb""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904B0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "ProjectMwmp"
|
||||
VALUE "FileDescription", "ProjectMwmp Module"
|
||||
VALUE "FileVersion", "1, 0, 0, 1"
|
||||
VALUE "InternalName", "ProjectMwmp"
|
||||
VALUE "LegalCopyright", "Copyright <20> 2001-2001"
|
||||
VALUE "OriginalFilename", "projectM-wmp.dll"
|
||||
VALUE "ProductName", "ProjectMwmp Module"
|
||||
VALUE "ProductVersion", "1, 0, 0, 1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// REGISTRY
|
||||
//
|
||||
|
||||
IDR_PROJECTMWMP REGISTRY "projectM-wmp.rgs"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROJNAME "projectM-wmp"
|
||||
IDS_EFFECTNAME "projectM"
|
||||
IDS_DESCRIPTION "Open-Source Music Visualizer"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
1 TYPELIB "projectM-wmp.tlb"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
41
src/projectM-wmp/projectM-wmp/projectM-wmp.rgs
Normal file
41
src/projectM-wmp/projectM-wmp/projectM-wmp.rgs
Normal file
@ -0,0 +1,41 @@
|
||||
HKCR
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {0F04F51D-A1EA-4F41-908B-28BC5BC00FA8} = s 'ProjectMwmp Class'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
'TypeLib' = s '{0EEBF2FE-5198-43EE-980A-57C120606942}'
|
||||
}
|
||||
}
|
||||
}
|
||||
HKEY_LOCAL_MACHINE
|
||||
{
|
||||
NoRemove SOFTWARE
|
||||
{
|
||||
NoRemove Microsoft
|
||||
{
|
||||
NoRemove MediaPlayer
|
||||
{
|
||||
NoRemove Objects
|
||||
{
|
||||
NoRemove Effects
|
||||
{
|
||||
ForceRemove ProjectMwmp
|
||||
{
|
||||
Properties
|
||||
{
|
||||
val classid = s '{0F04F51D-A1EA-4F41-908B-28BC5BC00FA8}'
|
||||
val name = s 'res://projectM-wmp.dll/RT_STRING/#101'
|
||||
val description = s 'res://projectM-wmp.dll/RT_STRING/#105'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
279
src/projectM-wmp/projectM-wmp/projectM-wmp.vcproj
Normal file
279
src/projectM-wmp/projectM-wmp/projectM-wmp.vcproj
Normal file
@ -0,0 +1,279 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="projectM-wmp"
|
||||
ProjectGUID="{E182C41E-2EF4-4BE6-8D85-F9A0982CD38C}"
|
||||
RootNamespace="projectMwmp"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
UseOfATL="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""C:\Documents and Settings\DEV2\My Documents\svn\src\projectM-engine";"C:\Documents and Settings\DEV2\My Documents\svn\src\glew\include\GL""
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_USRDLL;_WINNT_WIN32=0x5000;"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="$(IntDir)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
RegisterOutput="true"
|
||||
UseLibraryDependencyInputs="false"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib"
|
||||
LinkIncremental="2"
|
||||
LinkDLL="true"
|
||||
IgnoreAllDefaultLibraries="false"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
ModuleDefinitionFile="projectM-wmp.def"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
BaseAddress="254803968"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
UseOfATL="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""C:\Documents and Settings\DEV2\My Documents\svn\src\glew\include\GL";"C:\Documents and Settings\DEV2\My Documents\svn\src\projectM-engine""
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_USRDLL;_WINNT_WIN32=0x5000"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
AdditionalIncludeDirectories="$(IntDir)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
RegisterOutput="true"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib"
|
||||
LinkDLL="true"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
ModuleDefinitionFile="projectM-wmp.def"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
BaseAddress="254803968"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
<ProjectReference
|
||||
ReferencedProjectIdentifier="{31B91091-431A-4842-8682-2A04B51C980A}"
|
||||
RelativePathToProject="..\projectM-engine\libprojectM.vcproj"
|
||||
/>
|
||||
<ProjectReference
|
||||
ReferencedProjectIdentifier="{94AC71AA-7528-4E56-A5A9-EDDFE6D20A39}"
|
||||
RelativePathToProject="..\glew\build\vc6\glew_static.vcproj"
|
||||
/>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\projectM-wmp.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\projectM-wmp.def"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\projectM-wmp.idl"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\projectM-wmpdll.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\projectM-wmpevents.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\StdAfx.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\projectM-wmp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\StdAfx.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\projectM-wmp.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\projectM-wmp.rgs"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioUserFile
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
ShowAllFiles="false"
|
||||
>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<DebugSettings
|
||||
Command="C:\Program Files\Windows Media Player\wmplayer.exe"
|
||||
WorkingDirectory=""
|
||||
CommandArguments=""
|
||||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteMachine="CYBERDEV2"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
SQLDebugging=""
|
||||
Environment=""
|
||||
EnvironmentMerge="true"
|
||||
DebuggerFlavor=""
|
||||
MPIRunCommand=""
|
||||
MPIRunArguments=""
|
||||
MPIRunWorkingDirectory=""
|
||||
ApplicationCommand=""
|
||||
ApplicationArguments=""
|
||||
ShimCommand=""
|
||||
MPIAcceptMode=""
|
||||
MPIAcceptFilter=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<DebugSettings
|
||||
Command="C:\Program Files\Windows Media Player\wmplayer.exe"
|
||||
WorkingDirectory=""
|
||||
CommandArguments=""
|
||||
Attach="false"
|
||||
DebuggerType="3"
|
||||
Remote="1"
|
||||
RemoteMachine="CYBERDEV2"
|
||||
RemoteCommand=""
|
||||
HttpUrl=""
|
||||
PDBPath=""
|
||||
SQLDebugging=""
|
||||
Environment=""
|
||||
EnvironmentMerge="true"
|
||||
DebuggerFlavor=""
|
||||
MPIRunCommand=""
|
||||
MPIRunArguments=""
|
||||
MPIRunWorkingDirectory=""
|
||||
ApplicationCommand=""
|
||||
ApplicationArguments=""
|
||||
ShimCommand=""
|
||||
MPIAcceptMode=""
|
||||
MPIAcceptFilter=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</VisualStudioUserFile>
|
||||
85
src/projectM-wmp/projectM-wmp/projectM-wmp_i.c
Normal file
85
src/projectM-wmp/projectM-wmp/projectM-wmp_i.c
Normal file
@ -0,0 +1,85 @@
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */
|
||||
|
||||
/* link this file in with the server and any clients */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 7.00.0499 */
|
||||
/* at Wed Sep 26 10:20:07 2007
|
||||
*/
|
||||
/* Compiler settings for .\projectM-wmp.idl:
|
||||
Oicf, W1, Zp8, env=Win32 (32b run)
|
||||
protocol : dce , ms_ext, c_ext, robust
|
||||
error checks: allocation ref bounds_check enum stub_data
|
||||
VC __declspec() decoration level:
|
||||
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
|
||||
DECLSPEC_UUID(), MIDL_INTERFACE()
|
||||
*/
|
||||
//@@MIDL_FILE_HEADING( )
|
||||
|
||||
#pragma warning( disable: 4049 ) /* more than 64k source lines */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
|
||||
#include <rpc.h>
|
||||
#include <rpcndr.h>
|
||||
|
||||
#ifdef _MIDL_USE_GUIDDEF_
|
||||
|
||||
#ifndef INITGUID
|
||||
#define INITGUID
|
||||
#include <guiddef.h>
|
||||
#undef INITGUID
|
||||
#else
|
||||
#include <guiddef.h>
|
||||
#endif
|
||||
|
||||
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
|
||||
DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
|
||||
|
||||
#else // !_MIDL_USE_GUIDDEF_
|
||||
|
||||
#ifndef __IID_DEFINED__
|
||||
#define __IID_DEFINED__
|
||||
|
||||
typedef struct _IID
|
||||
{
|
||||
unsigned long x;
|
||||
unsigned short s1;
|
||||
unsigned short s2;
|
||||
unsigned char c[8];
|
||||
} IID;
|
||||
|
||||
#endif // __IID_DEFINED__
|
||||
|
||||
#ifndef CLSID_DEFINED
|
||||
#define CLSID_DEFINED
|
||||
typedef IID CLSID;
|
||||
#endif // CLSID_DEFINED
|
||||
|
||||
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
|
||||
const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
|
||||
|
||||
#endif !_MIDL_USE_GUIDDEF_
|
||||
|
||||
MIDL_DEFINE_GUID(IID, IID_IProjectMwmp,0x8E230690,0x504E,0x471D,0xB3,0xB7,0xC8,0xEE,0x5C,0x87,0x4B,0x96);
|
||||
|
||||
|
||||
MIDL_DEFINE_GUID(IID, LIBID_PROJECTMWMPLib,0x0EEBF2FE,0x5198,0x43EE,0x98,0x0A,0x57,0xC1,0x20,0x60,0x69,0x42);
|
||||
|
||||
|
||||
MIDL_DEFINE_GUID(CLSID, CLSID_ProjectMwmp,0x0F04F51D,0xA1EA,0x4F41,0x90,0x8B,0x28,0xBC,0x5B,0xC0,0x0F,0xA8);
|
||||
|
||||
#undef MIDL_DEFINE_GUID
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
81
src/projectM-wmp/projectM-wmp/projectM-wmpdll.cpp
Normal file
81
src/projectM-wmp/projectM-wmp/projectM-wmpdll.cpp
Normal file
@ -0,0 +1,81 @@
|
||||
// projectM-wmpdll.cpp : Implementation of DLL Exports.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
#include <initguid.h>
|
||||
#include "wmpplug.h"
|
||||
#include "projectM-wmp_h.h"
|
||||
#include "projectM-wmp_i.c"
|
||||
#include "projectM-wmp.h"
|
||||
|
||||
|
||||
CComModule _Module;
|
||||
|
||||
BEGIN_OBJECT_MAP(ObjectMap)
|
||||
OBJECT_ENTRY(CLSID_ProjectMwmp, CProjectMwmp)
|
||||
END_OBJECT_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// DLL Entry Point
|
||||
|
||||
extern "C"
|
||||
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
|
||||
{
|
||||
if (dwReason == DLL_PROCESS_ATTACH)
|
||||
{
|
||||
_Module.Init(ObjectMap, hInstance, &LIBID_PROJECTMWMPLib);
|
||||
DisableThreadLibraryCalls(hInstance);
|
||||
}
|
||||
else if (dwReason == DLL_PROCESS_DETACH)
|
||||
_Module.Term();
|
||||
return TRUE; // ok
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Used to determine whether the DLL can be unloaded by OLE
|
||||
|
||||
STDAPI DllCanUnloadNow(void)
|
||||
{
|
||||
return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Returns a class factory to create an object of the requested type
|
||||
|
||||
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
|
||||
{
|
||||
return _Module.GetClassObject(rclsid, riid, ppv);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// DllRegisterServer - Adds entries to the system registry
|
||||
|
||||
STDAPI DllRegisterServer(void)
|
||||
{
|
||||
// registers object, typelib and all interfaces in typelib
|
||||
|
||||
HRESULT hr = _Module.RegisterServer();
|
||||
|
||||
// Notify WMP that plugin has been added
|
||||
|
||||
WMPNotifyPluginAddRemove();
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// DllUnregisterServer - Removes entries from the system registry
|
||||
|
||||
STDAPI DllUnregisterServer(void)
|
||||
{
|
||||
HRESULT hr = _Module.UnregisterServer();
|
||||
|
||||
// Notify WMP that plugin has been removed
|
||||
|
||||
WMPNotifyPluginAddRemove();
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
347
src/projectM-wmp/projectM-wmp/projectM-wmpevents.cpp
Normal file
347
src/projectM-wmp/projectM-wmp/projectM-wmpevents.cpp
Normal file
@ -0,0 +1,347 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// projectM-wmpEvents.cpp : Implementation of CProjectMwmp events
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "projectM-wmp.h"
|
||||
|
||||
void CProjectMwmp::OpenStateChange( long NewState )
|
||||
{
|
||||
switch (NewState)
|
||||
{
|
||||
case wmposUndefined:
|
||||
break;
|
||||
case wmposPlaylistChanging:
|
||||
break;
|
||||
case wmposPlaylistLocating:
|
||||
break;
|
||||
case wmposPlaylistConnecting:
|
||||
break;
|
||||
case wmposPlaylistLoading:
|
||||
break;
|
||||
case wmposPlaylistOpening:
|
||||
break;
|
||||
case wmposPlaylistOpenNoMedia:
|
||||
break;
|
||||
case wmposPlaylistChanged:
|
||||
break;
|
||||
case wmposMediaChanging:
|
||||
break;
|
||||
case wmposMediaLocating:
|
||||
break;
|
||||
case wmposMediaConnecting:
|
||||
break;
|
||||
case wmposMediaLoading:
|
||||
break;
|
||||
case wmposMediaOpening:
|
||||
break;
|
||||
case wmposMediaOpen:
|
||||
break;
|
||||
case wmposBeginCodecAcquisition:
|
||||
break;
|
||||
case wmposEndCodecAcquisition:
|
||||
break;
|
||||
case wmposBeginLicenseAcquisition:
|
||||
break;
|
||||
case wmposEndLicenseAcquisition:
|
||||
break;
|
||||
case wmposBeginIndividualization:
|
||||
break;
|
||||
case wmposEndIndividualization:
|
||||
break;
|
||||
case wmposMediaWaiting:
|
||||
break;
|
||||
case wmposOpeningUnknownURL:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CProjectMwmp::PlayStateChange( long NewState )
|
||||
{
|
||||
switch (NewState)
|
||||
{
|
||||
case wmppsUndefined:
|
||||
break;
|
||||
case wmppsStopped:
|
||||
break;
|
||||
case wmppsPaused:
|
||||
break;
|
||||
case wmppsPlaying:
|
||||
break;
|
||||
case wmppsScanForward:
|
||||
break;
|
||||
case wmppsScanReverse:
|
||||
break;
|
||||
case wmppsBuffering:
|
||||
break;
|
||||
case wmppsWaiting:
|
||||
break;
|
||||
case wmppsMediaEnded:
|
||||
break;
|
||||
case wmppsTransitioning:
|
||||
break;
|
||||
case wmppsReady:
|
||||
break;
|
||||
case wmppsReconnecting:
|
||||
break;
|
||||
case wmppsLast:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CProjectMwmp::AudioLanguageChange( long LangID )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::StatusChange()
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::ScriptCommand( BSTR scType, BSTR Param )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::NewStream()
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::Disconnect( long Result )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::Buffering( VARIANT_BOOL Start )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::Error()
|
||||
{
|
||||
CComPtr<IWMPError> spError;
|
||||
CComPtr<IWMPErrorItem> spErrorItem;
|
||||
HRESULT dwError = S_OK;
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
if (m_spCore)
|
||||
{
|
||||
hr = m_spCore->get_error(&spError);
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = spError->get_item(0, &spErrorItem);
|
||||
}
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = spErrorItem->get_errorCode( (long *) &dwError );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CProjectMwmp::Warning( long WarningType, long Param, BSTR Description )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::EndOfStream( long Result )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::PositionChange( double oldPosition, double newPosition)
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::MarkerHit( long MarkerNum )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::DurationUnitChange( long NewDurationUnit )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::CdromMediaChange( long CdromNum )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::PlaylistChange( IDispatch * Playlist, WMPPlaylistChangeEventType change )
|
||||
{
|
||||
switch (change)
|
||||
{
|
||||
case wmplcUnknown:
|
||||
break;
|
||||
case wmplcClear:
|
||||
break;
|
||||
case wmplcInfoChange:
|
||||
break;
|
||||
case wmplcMove:
|
||||
break;
|
||||
case wmplcDelete:
|
||||
break;
|
||||
case wmplcInsert:
|
||||
break;
|
||||
case wmplcAppend:
|
||||
break;
|
||||
case wmplcPrivate:
|
||||
break;
|
||||
case wmplcNameChange:
|
||||
break;
|
||||
case wmplcMorph:
|
||||
break;
|
||||
case wmplcSort:
|
||||
break;
|
||||
case wmplcLast:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CProjectMwmp::CurrentPlaylistChange( WMPPlaylistChangeEventType change )
|
||||
{
|
||||
switch (change)
|
||||
{
|
||||
case wmplcUnknown:
|
||||
break;
|
||||
case wmplcClear:
|
||||
break;
|
||||
case wmplcInfoChange:
|
||||
break;
|
||||
case wmplcMove:
|
||||
break;
|
||||
case wmplcDelete:
|
||||
break;
|
||||
case wmplcInsert:
|
||||
break;
|
||||
case wmplcAppend:
|
||||
break;
|
||||
case wmplcPrivate:
|
||||
break;
|
||||
case wmplcNameChange:
|
||||
break;
|
||||
case wmplcMorph:
|
||||
break;
|
||||
case wmplcSort:
|
||||
break;
|
||||
case wmplcLast:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CProjectMwmp::CurrentPlaylistItemAvailable( BSTR bstrItemName )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::MediaChange( IDispatch * Item )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::CurrentMediaItemAvailable( BSTR bstrItemName )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::CurrentItemChange( IDispatch *pdispMedia)
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::MediaCollectionChange()
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::MediaCollectionAttributeStringAdded( BSTR bstrAttribName, BSTR bstrAttribVal )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::MediaCollectionAttributeStringRemoved( BSTR bstrAttribName, BSTR bstrAttribVal )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::MediaCollectionAttributeStringChanged( BSTR bstrAttribName, BSTR bstrOldAttribVal, BSTR bstrNewAttribVal)
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::PlaylistCollectionChange()
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::PlaylistCollectionPlaylistAdded( BSTR bstrPlaylistName)
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::PlaylistCollectionPlaylistRemoved( BSTR bstrPlaylistName)
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::PlaylistCollectionPlaylistSetAsDeleted( BSTR bstrPlaylistName, VARIANT_BOOL varfIsDeleted)
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::ModeChange( BSTR ModeName, VARIANT_BOOL NewValue)
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::MediaError( IDispatch * pMediaObject)
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::OpenPlaylistSwitch( IDispatch *pItem )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::DomainChange( BSTR strDomain)
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::SwitchedToPlayerApplication()
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::SwitchedToControl()
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::PlayerDockedStateChange()
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::PlayerReconnect()
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::Click( short nButton, short nShiftState, long fX, long fY )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::DoubleClick( short nButton, short nShiftState, long fX, long fY )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::KeyDown( short nKeyCode, short nShiftState )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::KeyPress( short nKeyAscii )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::KeyUp( short nKeyCode, short nShiftState )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::MouseDown( short nButton, short nShiftState, long fX, long fY )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::MouseMove( short nButton, short nShiftState, long fX, long fY )
|
||||
{
|
||||
}
|
||||
|
||||
void CProjectMwmp::MouseUp( short nButton, short nShiftState, long fX, long fY )
|
||||
{
|
||||
}
|
||||
21
src/projectM-wmp/projectM-wmp/resource.h
Normal file
21
src/projectM-wmp/projectM-wmp/resource.h
Normal file
@ -0,0 +1,21 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by projectM-wmp.rc
|
||||
//
|
||||
#define IDS_PROJNAME 100
|
||||
#define IDS_EFFECTNAME 101
|
||||
#define IDS_BARSPRESETNAME 102
|
||||
#define IDS_SCOPEPRESETNAME 103
|
||||
#define IDR_PROJECTMWMP 104
|
||||
#define IDS_DESCRIPTION 105
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 201
|
||||
#define _APS_NEXT_COMMAND_VALUE 32768
|
||||
#define _APS_NEXT_CONTROL_VALUE 201
|
||||
#define _APS_NEXT_SYMED_VALUE 105
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user