Commit b210a0ea authored by Damien Fouilleul's avatar Damien Fouilleul

plugin.cpp: formatting

supportinfo: use static IIDs as previous method wouldn't work in a multithreaded environment
parent 12efe797
......@@ -494,7 +494,7 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
libvlc_audio_set_volume(_p_libvlc, _i_volume, NULL);
if( _b_mute )
{
libvlc_audio_set_mute(_p_libvlc, TRUE, NULL);
libvlc_audio_set_mute(_p_libvlc, TRUE, NULL);
}
// initial playlist item
......
......@@ -24,20 +24,25 @@
#include "supporterrorinfo.h"
#include "utils.h"
#include "axvlc_idl.h"
using namespace std;
STDMETHODIMP VLCSupportErrorInfo::InterfaceSupportsErrorInfo(REFIID riid)
{
if( IID_NULL == riid )
return S_FALSE;
return riid == _riid ? S_OK : S_FALSE;
if( (riid == IID_IVLCAudio)
|| (riid == IID_IVLCInput)
|| (riid == IID_IVLCPlaylist)
|| (riid == IID_IVLCVideo)
|| (riid == IID_IVLCControl2) )
{
return S_OK;
}
return S_FALSE;
};
void VLCSupportErrorInfo::setErrorInfo(LPCOLESTR progid, REFIID riid, const char *description)
{
_riid = IID_NULL;
BSTR bstrDescription = BSTRFromCStr(CP_UTF8, description);
if( NULL != bstrDescription )
{
......@@ -54,7 +59,6 @@ void VLCSupportErrorInfo::setErrorInfo(LPCOLESTR progid, REFIID riid, const char
hr = pcerrinfo->QueryInterface(IID_IErrorInfo, (LPVOID*) &perrinfo);
if( SUCCEEDED(hr) )
{
_riid = riid;
::SetErrorInfo(0, perrinfo);
perrinfo->Release();
}
......
......@@ -31,8 +31,7 @@ class VLCSupportErrorInfo : public ISupportErrorInfo
public:
VLCSupportErrorInfo(VLCPlugin *p_instance) :
_p_instance(p_instance),
_riid(IID_NULL)
_p_instance(p_instance)
{};
virtual ~VLCSupportErrorInfo()
{};
......@@ -63,7 +62,6 @@ public:
private:
VLCPlugin *_p_instance;
IID _riid;
};
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment