NowPlayingPlugin:

- Added interface to receive MSN/Windows Live Messenger 'Listening to' notifications sent by various players (e.g Media Player Classic)
- Changes to CAD interface to allow proper supports for players other than MusicBee (e.g. VLC)
- Fixed crash when using the WinAmp interface in multiple skins
This commit is contained in:
Birunthan Mohanathas
2011-06-12 10:05:37 +00:00
parent 7163823971
commit 67cc4c7c6c
11 changed files with 397 additions and 45 deletions

View File

@ -52,7 +52,7 @@ HRESULT CPlayerWMP::CRemoteHost::GetServiceType(BSTR* pbstrType)
HRESULT hr = E_POINTER;
if (pbstrType)
{
*pbstrType = SysAllocString(L"Remote");
*pbstrType = SysAllocString(L"RemoteNoDialogs");
hr = *pbstrType? S_OK : E_POINTER;
}
return hr;
@ -222,9 +222,9 @@ void CPlayerWMP::Initialize()
wc.lpszClassName = L"NowPlayingWMPClass";
RegisterClass(&wc);
// Create dummy window
// Create the host window
m_Window = CreateWindow(L"NowPlayingWMPClass",
L"DummyWindow",
L"HostWindow",
WS_DISABLED,
CW_USEDEFAULT,
CW_USEDEFAULT,
@ -253,7 +253,7 @@ void CPlayerWMP::Initialize()
m_AxWindow->Create(m_Window, NULL, NULL, WS_CHILD | WS_DISABLED);
if(IsWindow(m_AxWindow->m_hWnd))
{
hr = m_AxWindow->QueryHost(IID_IObjectWithSite, (void **)&spHostObject);
hr = m_AxWindow->QueryHost(IID_IObjectWithSite, (void**)&spHostObject);
if(!spHostObject.p)
{
hr = E_POINTER;
@ -336,7 +336,6 @@ void CPlayerWMP::Initialize()
{
pRemoteHost->Release();
}
hr = m_IPlayer->get_controls(&m_IControls);
if (FAILED(hr)) return;
@ -356,7 +355,11 @@ void CPlayerWMP::Initialize()
m_State = PLAYER_PAUSED;
}
m_TrackChanged = true;
if (m_State != PLAYER_STOPPED)
{
m_TrackChanged = true;
}
m_Initialized = true;
}