Commit a5974ebb 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 112672d9
...@@ -494,7 +494,7 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc) ...@@ -494,7 +494,7 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
libvlc_audio_set_volume(_p_libvlc, _i_volume, NULL); libvlc_audio_set_volume(_p_libvlc, _i_volume, NULL);
if( _b_mute ) if( _b_mute )
{ {
libvlc_audio_set_mute(_p_libvlc, TRUE, NULL); libvlc_audio_set_mute(_p_libvlc, TRUE, NULL);
} }
// initial playlist item // initial playlist item
......
...@@ -24,20 +24,25 @@ ...@@ -24,20 +24,25 @@
#include "supporterrorinfo.h" #include "supporterrorinfo.h"
#include "utils.h" #include "utils.h"
#include "axvlc_idl.h"
using namespace std; using namespace std;
STDMETHODIMP VLCSupportErrorInfo::InterfaceSupportsErrorInfo(REFIID riid) STDMETHODIMP VLCSupportErrorInfo::InterfaceSupportsErrorInfo(REFIID riid)
{ {
if( IID_NULL == riid ) if( (riid == IID_IVLCAudio)
return S_FALSE; || (riid == IID_IVLCInput)
|| (riid == IID_IVLCPlaylist)
return riid == _riid ? S_OK : S_FALSE; || (riid == IID_IVLCVideo)
|| (riid == IID_IVLCControl2) )
{
return S_OK;
}
return S_FALSE;
}; };
void VLCSupportErrorInfo::setErrorInfo(LPCOLESTR progid, REFIID riid, const char *description) void VLCSupportErrorInfo::setErrorInfo(LPCOLESTR progid, REFIID riid, const char *description)
{ {
_riid = IID_NULL;
BSTR bstrDescription = BSTRFromCStr(CP_UTF8, description); BSTR bstrDescription = BSTRFromCStr(CP_UTF8, description);
if( NULL != bstrDescription ) if( NULL != bstrDescription )
{ {
...@@ -54,7 +59,6 @@ void VLCSupportErrorInfo::setErrorInfo(LPCOLESTR progid, REFIID riid, const char ...@@ -54,7 +59,6 @@ void VLCSupportErrorInfo::setErrorInfo(LPCOLESTR progid, REFIID riid, const char
hr = pcerrinfo->QueryInterface(IID_IErrorInfo, (LPVOID*) &perrinfo); hr = pcerrinfo->QueryInterface(IID_IErrorInfo, (LPVOID*) &perrinfo);
if( SUCCEEDED(hr) ) if( SUCCEEDED(hr) )
{ {
_riid = riid;
::SetErrorInfo(0, perrinfo); ::SetErrorInfo(0, perrinfo);
perrinfo->Release(); perrinfo->Release();
} }
......
...@@ -31,8 +31,7 @@ class VLCSupportErrorInfo : public ISupportErrorInfo ...@@ -31,8 +31,7 @@ class VLCSupportErrorInfo : public ISupportErrorInfo
public: public:
VLCSupportErrorInfo(VLCPlugin *p_instance) : VLCSupportErrorInfo(VLCPlugin *p_instance) :
_p_instance(p_instance), _p_instance(p_instance)
_riid(IID_NULL)
{}; {};
virtual ~VLCSupportErrorInfo() virtual ~VLCSupportErrorInfo()
{}; {};
...@@ -63,7 +62,6 @@ public: ...@@ -63,7 +62,6 @@ public:
private: private:
VLCPlugin *_p_instance; VLCPlugin *_p_instance;
IID _riid;
}; };
#endif #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