Commit 79542310 authored by Damien Fouilleul's avatar Damien Fouilleul

- activex: backporting from 0.8.6

parent 9d6dfde4
......@@ -46,6 +46,7 @@ SOURCES_activex = \
plugin.h \
axvlc_idl.c \
axvlc_idl.h \
guiddef.h \
$(NULL)
DIST_rsrc = \
......@@ -137,7 +138,7 @@ endif
###############################################################################
clean-stamp:
rm -f stamp-pic
rm -f stamp-builtin
if BUILD_SHARED
stamp-builtin:
......
......@@ -79,7 +79,6 @@ library AXVLC
uuid(C2FA41D0-B113-476e-AC8C-9BD14999C1C1),
helpstring("VLC Control (deprecated)"),
dual,
hidden,
oleautomation
]
interface IVLCControl : IDispatch
......@@ -165,7 +164,6 @@ library AXVLC
[
uuid(DF48072F-5EF8-434e-9B40-E2F3AE759B5F),
helpstring("Event interface for VLC control"),
hidden
]
dispinterface DVLCEvents
{
......@@ -183,9 +181,7 @@ library AXVLC
odl,
uuid(9E0BD17B-2D3C-4656-B94D-03084F3FD9D4),
helpstring("VLC Audio APIs"),
hidden,
dual,
nonextensible,
oleautomation
]
interface IVLCAudio : IDispatch
......@@ -208,9 +204,7 @@ library AXVLC
odl,
uuid(49E0DBD1-9440-466C-9C97-95C67190C603),
helpstring("VLC Input APIs"),
hidden,
dual,
nonextensible,
oleautomation
]
interface IVLCInput : IDispatch
......@@ -247,9 +241,7 @@ library AXVLC
odl,
uuid(9ED00AFA-7BCD-4FFF-8D48-7DD4DB2C800D),
helpstring("VLC Log Message"),
hidden,
dual,
nonextensible,
oleautomation
]
interface IVLCMessage: IDispatch
......@@ -277,9 +269,7 @@ library AXVLC
odl,
uuid(15179CD8-CC12-4242-A58E-E412217FF343),
helpstring("VLC Log iterator"),
hidden,
dual,
nonextensible,
oleautomation
]
interface IVLCMessageIterator : IDispatch
......@@ -294,10 +284,8 @@ library AXVLC
[
odl,
uuid(6C5CE55D-2D6C-4AAD-8299-C62D2371F106),
helpstring("VLC Log APIs"),
hidden,
helpstring("VLC Log Messages Collection."),
dual,
nonextensible,
oleautomation
]
interface IVLCMessages : IDispatch
......@@ -319,9 +307,7 @@ library AXVLC
odl,
uuid(8E3BC3D9-62E9-48FB-8A6D-993F9ABC4A0A),
helpstring("VLC Log APIs"),
hidden,
dual,
nonextensible,
oleautomation
]
interface IVLCLog : IDispatch
......@@ -335,31 +321,48 @@ library AXVLC
HRESULT verbosity([in] long level);
};
[
odl,
uuid(FD37FE32-82BC-4A25-B056-315F4DBB194D),
helpstring("VLC Playlist Items collection"),
dual,
oleautomation
]
interface IVLCPlaylistItems : IDispatch
{
[propget, helpstring("Returns number of items in playlist.")]
HRESULT count([out, retval] long* count);
[helpstring("Remove all items from playlist.")]
HRESULT clear();
[helpstring("remove item from playlist.")]
HRESULT remove([in] long itemId);
};
[
odl,
uuid(54613049-40BF-4035-9E70-0A9312C0188D),
helpstring("VLC Playlist APIs"),
hidden,
dual,
nonextensible,
oleautomation
]
interface IVLCPlaylist : IDispatch
{
[propget, helpstring("Returns number of items in playlist.")]
[hidden, propget, helpstring("Returns number of items in playlist. (deprecated)")]
HRESULT itemCount([out, retval] long* count);
[propget, helpstring("Returns whether playback displays video.")]
HRESULT isPlaying([out, retval] VARIANT_BOOL* playing);
[helpstring("Add a playlist item.")]
HRESULT add([in] BSTR uri, [in, optional] VARIANT name, [in, optional] VARIANT options, [out, retval] long* item);
HRESULT add([in] BSTR uri, [in, optional] VARIANT name, [in, optional] VARIANT options, [out, retval] long* itemId);
[helpstring("Play/Resume the playlist.")]
HRESULT play();
[helpstring("Play item in playlist.")]
HRESULT playItem([in] long item);
HRESULT playItem([in] long itemId);
[helpstring("Play/Pause current clip.")]
HRESULT togglePause();
......@@ -373,20 +376,21 @@ library AXVLC
[helpstring("Advance to previous item in playlist.")]
HRESULT prev();
[helpstring("Remove all items from playlist.")]
[hidden, helpstring("Remove all items from playlist. (deprecated)")]
HRESULT clear();
[helpstring("remove item from playlist.")]
[hidden, helpstring("Remove item from playlist. (deprecated)")]
HRESULT removeItem([in] long item);
[propget, helpstring("Returns the playlist items collection object.")]
HRESULT items([out, retval] IVLCPlaylistItems** obj);
};
[
odl,
uuid(0AAEDF0B-D333-4B27-A0C6-BBF31413A42E),
helpstring("VLC Video APIs"),
hidden,
dual,
nonextensible,
oleautomation
]
interface IVLCVideo : IDispatch
......@@ -403,7 +407,7 @@ library AXVLC
HRESULT height([out, retval] long* height);
[propget, helpstring("Returns video aspect ratio.")]
HRESULT aspectRatio([out, retval] BSTR aspect);
HRESULT aspectRatio([out, retval] BSTR* aspect);
[propput, helpstring("Sets video aspect ratio.")]
HRESULT aspectRatio([in] BSTR aspect);
......@@ -415,7 +419,6 @@ library AXVLC
odl,
uuid(2D719729-5333-406C-BF12-8DE787FD65E3),
helpstring("VLC Control"),
hidden,
dual,
oleautomation
]
......@@ -496,6 +499,5 @@ library AXVLC
{
[default] interface IVLCControl2;
interface IVLCControl;
[default, source] dispinterface DVLCEvents;
};
};
No preview for this file type
......@@ -19,6 +19,7 @@ DEFINE_GUID(IID_IVLCMessage, 0x9ed00afa, 0x7bcd, 0x4fff, 0x8d,0x48, 0x7d,0xd4,0x
DEFINE_GUID(IID_IVLCMessageIterator, 0x15179cd8, 0xcc12, 0x4242, 0xa5,0x8e, 0xe4,0x12,0x21,0x7f,0xf3,0x43);
DEFINE_GUID(IID_IVLCMessages, 0x6c5ce55d, 0x2d6c, 0x4aad, 0x82,0x99, 0xc6,0x2d,0x23,0x71,0xf1,0x06);
DEFINE_GUID(IID_IVLCLog, 0x8e3bc3d9, 0x62e9, 0x48fb, 0x8a,0x6d, 0x99,0x3f,0x9a,0xbc,0x4a,0x0a);
DEFINE_GUID(IID_IVLCPlaylistItems, 0xfd37fe32, 0x82bc, 0x4a25, 0xb0,0x56, 0x31,0x5f,0x4d,0xbb,0x19,0x4d);
DEFINE_GUID(IID_IVLCPlaylist, 0x54613049, 0x40bf, 0x4035, 0x9e,0x70, 0x0a,0x93,0x12,0xc0,0x18,0x8d);
DEFINE_GUID(IID_IVLCVideo, 0x0aaedf0b, 0xd333, 0x4b27, 0xa0,0xc6, 0xbb,0xf3,0x14,0x13,0xa4,0x2e);
DEFINE_GUID(IID_IVLCControl2, 0x2d719729, 0x5333, 0x406c, 0xbf,0x12, 0x8d,0xe7,0x87,0xfd,0x65,0xe3);
......
......@@ -1757,6 +1757,139 @@ void __RPC_STUB IVLCLog_put_verbosity_Stub(
#endif /* __IVLCLog_INTERFACE_DEFINED__ */
#ifndef __IVLCPlaylistItems_FWD_DEFINED__
#define __IVLCPlaylistItems_FWD_DEFINED__
typedef interface IVLCPlaylistItems IVLCPlaylistItems;
#endif
/*****************************************************************************
* IVLCPlaylistItems interface
*/
#ifndef __IVLCPlaylistItems_INTERFACE_DEFINED__
#define __IVLCPlaylistItems_INTERFACE_DEFINED__
DEFINE_GUID(IID_IVLCPlaylistItems, 0xfd37fe32, 0x82bc, 0x4a25, 0xb0,0x56, 0x31,0x5f,0x4d,0xbb,0x19,0x4d);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IVLCPlaylistItems : public IDispatch
{
virtual HRESULT STDMETHODCALLTYPE get_count(
long* count) = 0;
virtual HRESULT STDMETHODCALLTYPE clear(
) = 0;
virtual HRESULT STDMETHODCALLTYPE remove(
long itemId) = 0;
};
#else
typedef struct IVLCPlaylistItemsVtbl {
BEGIN_INTERFACE
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IVLCPlaylistItems* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IVLCPlaylistItems* This);
ULONG (STDMETHODCALLTYPE *Release)(
IVLCPlaylistItems* This);
/*** IDispatch methods ***/
HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
IVLCPlaylistItems* This,
UINT* pctinfo);
HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
IVLCPlaylistItems* This,
UINT iTInfo,
LCID lcid,
ITypeInfo** ppTInfo);
HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
IVLCPlaylistItems* This,
REFIID riid,
LPOLESTR* rgszNames,
UINT cNames,
LCID lcid,
DISPID* rgDispId);
HRESULT (STDMETHODCALLTYPE *Invoke)(
IVLCPlaylistItems* This,
DISPID dispIdMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS* pDispParams,
VARIANT* pVarResult,
EXCEPINFO* pExcepInfo,
UINT* puArgErr);
/*** IVLCPlaylistItems methods ***/
HRESULT (STDMETHODCALLTYPE *get_count)(
IVLCPlaylistItems* This,
long* count);
HRESULT (STDMETHODCALLTYPE *clear)(
IVLCPlaylistItems* This);
HRESULT (STDMETHODCALLTYPE *remove)(
IVLCPlaylistItems* This,
long itemId);
END_INTERFACE
} IVLCPlaylistItemsVtbl;
interface IVLCPlaylistItems {
const IVLCPlaylistItemsVtbl* lpVtbl;
};
#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IVLCPlaylistItems_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IVLCPlaylistItems_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IVLCPlaylistItems_Release(p) (p)->lpVtbl->Release(p)
/*** IDispatch methods ***/
#define IVLCPlaylistItems_GetTypeInfoCount(p,a) (p)->lpVtbl->GetTypeInfoCount(p,a)
#define IVLCPlaylistItems_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
#define IVLCPlaylistItems_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
#define IVLCPlaylistItems_Invoke(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
/*** IVLCPlaylistItems methods ***/
#define IVLCPlaylistItems_get_count(p,a) (p)->lpVtbl->get_count(p,a)
#define IVLCPlaylistItems_clear(p) (p)->lpVtbl->clear(p)
#define IVLCPlaylistItems_remove(p,a) (p)->lpVtbl->remove(p,a)
#endif
#endif
HRESULT CALLBACK IVLCPlaylistItems_get_count_Proxy(
IVLCPlaylistItems* This,
long* count);
void __RPC_STUB IVLCPlaylistItems_get_count_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCPlaylistItems_clear_Proxy(
IVLCPlaylistItems* This);
void __RPC_STUB IVLCPlaylistItems_clear_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCPlaylistItems_remove_Proxy(
IVLCPlaylistItems* This,
long itemId);
void __RPC_STUB IVLCPlaylistItems_remove_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IVLCPlaylistItems_INTERFACE_DEFINED__ */
/*****************************************************************************
* IVLCPlaylist interface
*/
......@@ -1777,13 +1910,13 @@ interface IVLCPlaylist : public IDispatch
BSTR uri,
VARIANT name,
VARIANT options,
long* item) = 0;
long* itemId) = 0;
virtual HRESULT STDMETHODCALLTYPE play(
) = 0;
virtual HRESULT STDMETHODCALLTYPE playItem(
long item) = 0;
long itemId) = 0;
virtual HRESULT STDMETHODCALLTYPE togglePause(
) = 0;
......@@ -1803,6 +1936,9 @@ interface IVLCPlaylist : public IDispatch
virtual HRESULT STDMETHODCALLTYPE removeItem(
long item) = 0;
virtual HRESULT STDMETHODCALLTYPE get_items(
IVLCPlaylistItems** obj) = 0;
};
#else
typedef struct IVLCPlaylistVtbl {
......@@ -1864,14 +2000,14 @@ typedef struct IVLCPlaylistVtbl {
BSTR uri,
VARIANT name,
VARIANT options,
long* item);
long* itemId);
HRESULT (STDMETHODCALLTYPE *play)(
IVLCPlaylist* This);
HRESULT (STDMETHODCALLTYPE *playItem)(
IVLCPlaylist* This,
long item);
long itemId);
HRESULT (STDMETHODCALLTYPE *togglePause)(
IVLCPlaylist* This);
......@@ -1892,6 +2028,10 @@ typedef struct IVLCPlaylistVtbl {
IVLCPlaylist* This,
long item);
HRESULT (STDMETHODCALLTYPE *get_items)(
IVLCPlaylist* This,
IVLCPlaylistItems** obj);
END_INTERFACE
} IVLCPlaylistVtbl;
interface IVLCPlaylist {
......@@ -1920,6 +2060,7 @@ interface IVLCPlaylist {
#define IVLCPlaylist_prev(p) (p)->lpVtbl->prev(p)
#define IVLCPlaylist_clear(p) (p)->lpVtbl->clear(p)
#define IVLCPlaylist_removeItem(p,a) (p)->lpVtbl->removeItem(p,a)
#define IVLCPlaylist_get_items(p,a) (p)->lpVtbl->get_items(p,a)
#endif
#endif
......@@ -1945,7 +2086,7 @@ HRESULT CALLBACK IVLCPlaylist_add_Proxy(
BSTR uri,
VARIANT name,
VARIANT options,
long* item);
long* itemId);
void __RPC_STUB IVLCPlaylist_add_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
......@@ -1960,7 +2101,7 @@ void __RPC_STUB IVLCPlaylist_play_Stub(
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCPlaylist_playItem_Proxy(
IVLCPlaylist* This,
long item);
long itemId);
void __RPC_STUB IVLCPlaylist_playItem_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
......@@ -2009,6 +2150,14 @@ void __RPC_STUB IVLCPlaylist_removeItem_Stub(
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCPlaylist_get_items_Proxy(
IVLCPlaylist* This,
IVLCPlaylistItems** obj);
void __RPC_STUB IVLCPlaylist_get_items_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IVLCPlaylist_INTERFACE_DEFINED__ */
......@@ -2035,7 +2184,7 @@ interface IVLCVideo : public IDispatch
long* height) = 0;
virtual HRESULT STDMETHODCALLTYPE get_aspectRatio(
BSTR aspect) = 0;
BSTR* aspect) = 0;
virtual HRESULT STDMETHODCALLTYPE put_aspectRatio(
BSTR aspect) = 0;
......@@ -2109,7 +2258,7 @@ typedef struct IVLCVideoVtbl {
HRESULT (STDMETHODCALLTYPE *get_aspectRatio)(
IVLCVideo* This,
BSTR aspect);
BSTR* aspect);
HRESULT (STDMETHODCALLTYPE *put_aspectRatio)(
IVLCVideo* This,
......@@ -2180,7 +2329,7 @@ void __RPC_STUB IVLCVideo_get_height_Stub(
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCVideo_get_aspectRatio_Proxy(
IVLCVideo* This,
BSTR aspect);
BSTR* aspect);
void __RPC_STUB IVLCVideo_get_aspectRatio_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
......
......@@ -35,7 +35,7 @@ struct VLCEnumConnectionsDereference
CONNECTDATA operator()(const map<DWORD,LPUNKNOWN>::iterator& i)
{
CONNECTDATA cd;
cd.dwCookie = i->first;
cd.pUnk = i->second;
return cd;
......
......@@ -42,13 +42,13 @@ extern "C" const IID IID_IObjectSafety;
struct IObjectSafety : public IUnknown
{
virtual STDMETHODIMP GetInterfaceSafetyOptions(
virtual STDMETHODIMP GetInterfaceSafetyOptions(
REFIID riid,
DWORD __RPC_FAR *pdwSupportedOptions,
DWORD __RPC_FAR *pdwEnabledOptions
) = 0;
virtual STDMETHODIMP SetInterfaceSafetyOptions(
virtual STDMETHODIMP SetInterfaceSafetyOptions(
REFIID riid,
DWORD dwSupportedOptions,
DWORD dwOptionSetMask
......@@ -83,19 +83,19 @@ public:
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
// IUnknown methods
STDMETHODIMP GetInterfaceSafetyOptions(
STDMETHODIMP GetInterfaceSafetyOptions(
REFIID riid,
DWORD *pdwSupportedOptions,
DWORD *pdwEnabledOptions
);
STDMETHODIMP SetInterfaceSafetyOptions(
STDMETHODIMP SetInterfaceSafetyOptions(
REFIID riid,
DWORD dwOptionSetMask,
DWORD dwEnabledOptions
);
private:
private:
VLCPlugin *_p_instance;
};
......
......@@ -35,10 +35,10 @@ public:
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{
if( NULL == ppv )
return E_POINTER;
return E_POINTER;
if( (IID_IUnknown == riid)
|| (IID_IOleWindow == riid)
|| (IID_IOleInPlaceObject == riid) )
|| (IID_IOleInPlaceObject == riid) )
{
AddRef();
*ppv = reinterpret_cast<LPVOID>(this);
......@@ -66,4 +66,3 @@ private:
};
#endif
......@@ -30,7 +30,7 @@
using namespace std;
VLCOleObject::VLCOleObject(VLCPlugin *p_instance) :
_p_clientsite(NULL), _p_instance(p_instance)
_p_clientsite(NULL), _p_instance(p_instance)
{
CreateOleAdviseHolder(&_p_advise_holder);
};
......@@ -242,7 +242,7 @@ STDMETHODIMP VLCOleObject::GetClientSite(LPOLECLIENTSITE *ppClientSite)
{
if( NULL == ppClientSite )
return E_POINTER;
if( NULL != _p_clientsite )
_p_clientsite->AddRef();
......@@ -295,7 +295,7 @@ STDMETHODIMP VLCOleObject::GetMoniker(DWORD dwAssign, DWORD dwWhichMoniker, LPMO
{
if( NULL != _p_clientsite )
return _p_clientsite->GetMoniker(dwAssign,dwWhichMoniker, ppMoniker);
return E_UNEXPECTED;
};
......
......@@ -37,7 +37,7 @@ public:
if( NULL == ppv )
return E_POINTER;
if( (IID_IUnknown == riid)
|| (IID_IOleObject == riid) )
|| (IID_IOleObject == riid) )
{
AddRef();
*ppv = reinterpret_cast<LPVOID>(this);
......
......@@ -243,4 +243,3 @@ STDMETHODIMP VLCPersistPropertyBag::Save(LPPROPERTYBAG pPropBag, BOOL fClearDirt
return S_OK;
};
......@@ -48,9 +48,8 @@ public:
AxVLCVariant(VARIANTARG &v)
{
//VariantInit(&_v);
//VariantCopy(&_v, &v);
_v = v;
VariantInit(&_v);
VariantCopy(&_v, &v);
};
AxVLCVariant(VARIANTARG *v)
......@@ -276,7 +275,7 @@ public:
(*p.first).second = val.second;
return S_OK;
};
// custom methods
HRESULT Load(LPSTREAM pStm)
......@@ -292,7 +291,7 @@ public:
{
if( (val->first == L"(Count)") && (VT_I4 == V_VT(val->second.variantArg())) )
{
size_t count = V_I4(val->second.variantArg());
size_t count = V_I4(val->second.variantArg());
delete val;
while( count-- )
{
......@@ -551,7 +550,7 @@ STDMETHODIMP VLCPersistStreamInit::IsDirty(void)
STDMETHODIMP VLCPersistStreamInit::GetSizeMax(ULARGE_INTEGER *pcbSize)
{
pcbSize->HighPart = 0UL;
pcbSize->LowPart = 4096UL; // just a guess
pcbSize->LowPart = 16384UL; // just a guess
return S_OK;
};
......
......@@ -69,4 +69,3 @@ private:
};
#endif
......@@ -98,7 +98,7 @@ VLCPluginClass::VLCPluginClass(LONG *p_class_ref, HINSTANCE hInstance, REFCLSID
wClass.hbrBackground = NULL;
wClass.lpszMenuName = NULL;
wClass.lpszClassName = getInPlaceWndClassName();
_inplace_wndclass_atom = RegisterClass(&wClass);
}
else
......@@ -258,6 +258,7 @@ VLCPlugin::~VLCPlugin()
_p_pict->Release();
SysFreeString(_bstr_mrl);
SysFreeString(_bstr_baseurl);
_p_class->Release();
};
......@@ -434,17 +435,17 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
if( RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\VideoLAN\\VLC",
0, KEY_READ, &h_key ) == ERROR_SUCCESS )
{
if( RegQueryValueEx( h_key, "InstallDir", 0, &i_type,
(LPBYTE)p_data, &i_data ) == ERROR_SUCCESS )
{
if( i_type == REG_SZ )
{
strcat( p_data, "\\plugins" );
//ppsz_argv[ppsz_argc++] = "--plugin-path";
//ppsz_argv[ppsz_argc++] = p_data;
}
}
RegCloseKey( h_key );
if( RegQueryValueEx( h_key, "InstallDir", 0, &i_type,
(LPBYTE)p_data, &i_data ) == ERROR_SUCCESS )
{
if( i_type == REG_SZ )
{
strcat( p_data, "\\plugins" );
ppsz_argv[ppsz_argc++] = "--plugin-path";
ppsz_argv[ppsz_argc++] = p_data;
}
}
RegCloseKey( h_key );
}
char p_path[MAX_PATH+1];
......@@ -496,7 +497,7 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
{
libvlc_audio_set_mute(_p_libvlc, TRUE, NULL);
}
// initial playlist item
if( SysStringLen(_bstr_mrl) > 0 )
{
......@@ -504,24 +505,19 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
if( SysStringLen(_bstr_baseurl) > 0 )
{
DWORD len = INTERNET_MAX_URL_LENGTH;
LPOLESTR abs_url = (LPOLESTR)CoTaskMemAlloc(sizeof(OLECHAR)*len);
/*
** if the MRL a relative URL, we should end up with an absolute URL
*/
LPWSTR abs_url = CombineURL(_bstr_baseurl, _bstr_mrl);
if( NULL != abs_url )
{
/*
** if the MRL a relative URL, we should end up with an absolute URL
*/
if( SUCCEEDED(UrlCombineW(_bstr_baseurl, _bstr_mrl, abs_url, &len,
URL_ESCAPE_UNSAFE|URL_PLUGGABLE_PROTOCOL)) )
{
psz_mrl = CStrFromBSTR(CP_UTF8, abs_url);
}
else
{
psz_mrl = CStrFromBSTR(CP_UTF8, _bstr_mrl);
}
psz_mrl = CStrFromWSTR(CP_UTF8, abs_url, wcslen(abs_url));
CoTaskMemFree(abs_url);
}
else
{
psz_mrl = CStrFromBSTR(CP_UTF8, _bstr_mrl);
}
}
else
{
......@@ -648,6 +644,14 @@ HRESULT VLCPlugin::onClose(DWORD dwSaveOption)
{
libvlc_instance_t* p_libvlc = _p_libvlc;
IVLCLog *p_log;
if( SUCCEEDED(vlcControl2->get_log(&p_log)) )
{
// make sure the log is disabled
p_log->put_verbosity(-1);
p_log->Release();
}
_p_libvlc = NULL;
vlcDataObject->onClose();
......@@ -741,7 +745,7 @@ HRESULT VLCPlugin::onInPlaceDeactivate(void)
DestroyWindow(_inplacewnd);
_inplacewnd = NULL;
return S_OK;
};
......@@ -984,4 +988,3 @@ void VLCPlugin::fireOnStopEvent(void)
DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};
vlcConnectionPointContainer->fireEvent(DISPID_StopEvent, &dispparamsNoArgs);
};
......@@ -162,7 +162,7 @@ public:
_p_pict->AddRef();
return _p_pict;
};
BOOL hasFocus(void);
void setFocus(BOOL fFocus);
......@@ -268,4 +268,3 @@ private:
};
#endif
......@@ -57,4 +57,3 @@ STDMETHODIMP VLCProvideClassInfo::GetGUID(DWORD dwGuidKind, GUID *pGUID)
return S_OK;
};
......@@ -64,4 +64,3 @@ private:
};
#endif
......@@ -37,6 +37,7 @@ STDMETHODIMP VLCSupportErrorInfo::InterfaceSupportsErrorInfo(REFIID riid)