Commit 4b9b0667 authored by Damien Fouilleul's avatar Damien Fouilleul

- activex: more features and fully updated test.html for new APIs

parent 92bdf8d6
......@@ -38,8 +38,6 @@ SOURCES_activex = \
viewobject.h \
vlccontrol.cpp \
vlccontrol.h \
vlcconfiguration.cpp \
vlcconfiguration.h \
vlccontrol2.cpp \
vlccontrol2.h \
plugin.cpp \
......@@ -80,10 +78,10 @@ LDFLAGS_activex = `$(VLC_CONFIG) --libs activex vlc builtin`
libaxvlc_a_SOURCES = $(SOURCES_activex) $(SOURCE_dll)
libaxvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags activex`
libaxvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags activex`
libaxvlc_a_DEPENDENCIES = axvlc.def $(DATA_axvlc_rc)
libaxvlc_a_DEPENDENCIES = axvlc.def $(DATA_axvlc_rc) $(LIBRARIES_libvlc)
axvlc$(LIBEXT): $(libaxvlc_a_OBJECTS) \
$(libaxvlc_a_DEPENDENCIES) stamp-pic
$(libaxvlc_a_DEPENDENCIES) stamp-builtin
$(CXXLINK) $(libaxvlc_a_OBJECTS) $(DATA_axvlc_rc) \
$(srcdir)/axvlc.def \
$(LIBRARIES_libvlc) -shared $(LIBRARIES_libvlc) $(LDFLAGS_activex) \
......@@ -140,9 +138,9 @@ clean-stamp:
rm -f stamp-pic
if BUILD_SHARED
stamp-pic:
stamp-builtin:
else
stamp-pic: $(shell ${VLC_CONFIG} --target builtin)
stamp-builtin: $(shell ${VLC_CONFIG} --target builtin)
endif
@touch $@
......
......@@ -208,7 +208,7 @@ library AXVLC
interface IVLCInput : IDispatch
{
[propget, helpstring("Returns the clip length, in milliseconds.")]
HRESULT length([out, retval] __int64* length);
HRESULT length([out, retval] double* length);
[propget, helpstring("Returns/sets playback position in current clip. Position is ranging from 0.0 to 1.0.")]
HRESULT position([out, retval] float* position);
......@@ -216,9 +216,9 @@ library AXVLC
HRESULT position([in] float position);
[propget, helpstring("Returns/sets playback time in current clip, in milliseconds.")]
HRESULT time([out, retval] __int64* time);
HRESULT time([out, retval] double* time);
[propput, helpstring("Returns/sets playback time in the current clip, in milliseconds.")]
HRESULT time([in] __int64 time);
HRESULT time([in] double time);
[propget, helpstring("Returns current playback state.")]
HRESULT state([out, retval] int* state);
......@@ -301,12 +301,12 @@ library AXVLC
[
odl,
uuid(15179CD8-CC12-4242-A58E-E412217FF343),
helpstring("VLC Configuration options"),
uuid(2D719729-5333-406C-BF12-8DE787FD65E3),
helpstring("VLC Control"),
dual,
oleautomation
]
interface IVLCConfiguration : IDispatch
interface IVLCControl2 : IDispatch
{
[id(DISPID_AutoLoop), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]
HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);
......@@ -345,17 +345,7 @@ library AXVLC
HRESULT Volume([out, retval] int* volume);
[id(DISPID_Volume), propput, helpstring("Returns/sets default audio volume.")]
HRESULT Volume([in] int volume);
};
[
odl,
uuid(2D719729-5333-406C-BF12-8DE787FD65E3),
helpstring("VLC Control"),
dual,
oleautomation
]
interface IVLCControl2 : IVLCConfiguration
{
[propget, helpstring("Returns the audio object.")]
HRESULT audio([out, retval] IVLCAudio** obj);
......
......@@ -10,7 +10,7 @@
[axvlc.dll]
FileVersion=@VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_REVISION@,0
clsid={E23FE9C6-778E-49d4-B537-38FCDE4887D8}
clsid={9BE31822-FDAD-461B-AD51-BE1D1C159921}
RegisterServer=no
Hook=runinstaller
......
No preview for this file type
......@@ -17,7 +17,6 @@ DEFINE_GUID(IID_IVLCAudio, 0x9e0bd17b, 0x2d3c, 0x4656, 0xb9,0x4d, 0x03,0x08,0x4f
DEFINE_GUID(IID_IVLCInput, 0x49e0dbd1, 0x9440, 0x466c, 0x9c,0x97, 0x95,0xc6,0x71,0x90,0xc6,0x03);
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_IVLCConfiguration, 0x15179cd8, 0xcc12, 0x4242, 0xa5,0x8e, 0xe4,0x12,0x21,0x7f,0xf3,0x43);
DEFINE_GUID(IID_IVLCControl2, 0x2d719729, 0x5333, 0x406c, 0xbf,0x12, 0x8d,0xe7,0x87,0xfd,0x65,0xe3);
DEFINE_GUID(CLSID_VLCPlugin, 0xe23fe9c6, 0x778e, 0x49d4, 0xb5,0x37, 0x38,0xfc,0xde,0x48,0x87,0xd8);
DEFINE_GUID(CLSID_VLCPlugin2, 0x9be31822, 0xfdad, 0x461b, 0xad,0x51, 0xbe,0x1d,0x1c,0x15,0x99,0x21);
......
......@@ -940,7 +940,7 @@ DEFINE_GUID(IID_IVLCInput, 0x49e0dbd1, 0x9440, 0x466c, 0x9c,0x97, 0x95,0xc6,0x71
interface IVLCInput : public IDispatch
{
virtual HRESULT STDMETHODCALLTYPE get_length(
__int64* length) = 0;
double* length) = 0;
virtual HRESULT STDMETHODCALLTYPE get_position(
float* position) = 0;
......@@ -949,10 +949,10 @@ interface IVLCInput : public IDispatch
float position) = 0;
virtual HRESULT STDMETHODCALLTYPE get_time(
__int64* time) = 0;
double* time) = 0;
virtual HRESULT STDMETHODCALLTYPE put_time(
__int64 time) = 0;
double time) = 0;
virtual HRESULT STDMETHODCALLTYPE get_state(
int* state) = 0;
......@@ -1019,7 +1019,7 @@ typedef struct IVLCInputVtbl {
/*** IVLCInput methods ***/
HRESULT (STDMETHODCALLTYPE *get_length)(
IVLCInput* This,
__int64* length);
double* length);
HRESULT (STDMETHODCALLTYPE *get_position)(
IVLCInput* This,
......@@ -1031,11 +1031,11 @@ typedef struct IVLCInputVtbl {
HRESULT (STDMETHODCALLTYPE *get_time)(
IVLCInput* This,
__int64* time);
double* time);
HRESULT (STDMETHODCALLTYPE *put_time)(
IVLCInput* This,
__int64 time);
double time);
HRESULT (STDMETHODCALLTYPE *get_state)(
IVLCInput* This,
......@@ -1090,7 +1090,7 @@ interface IVLCInput {
HRESULT CALLBACK IVLCInput_get_length_Proxy(
IVLCInput* This,
__int64* length);
double* length);
void __RPC_STUB IVLCInput_get_length_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
......@@ -1114,7 +1114,7 @@ void __RPC_STUB IVLCInput_put_position_Stub(
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCInput_get_time_Proxy(
IVLCInput* This,
__int64* time);
double* time);
void __RPC_STUB IVLCInput_get_time_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
......@@ -1122,7 +1122,7 @@ void __RPC_STUB IVLCInput_get_time_Stub(
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCInput_put_time_Proxy(
IVLCInput* This,
__int64 time);
double time);
void __RPC_STUB IVLCInput_put_time_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
......@@ -1572,20 +1572,15 @@ void __RPC_STUB IVLCVideo_get_height_Stub(
#endif /* __IVLCVideo_INTERFACE_DEFINED__ */
#ifndef __IVLCConfiguration_FWD_DEFINED__
#define __IVLCConfiguration_FWD_DEFINED__
typedef interface IVLCConfiguration IVLCConfiguration;
#endif
/*****************************************************************************
* IVLCConfiguration interface
* IVLCControl2 interface
*/
#ifndef __IVLCConfiguration_INTERFACE_DEFINED__
#define __IVLCConfiguration_INTERFACE_DEFINED__
#ifndef __IVLCControl2_INTERFACE_DEFINED__
#define __IVLCControl2_INTERFACE_DEFINED__
DEFINE_GUID(IID_IVLCConfiguration, 0x15179cd8, 0xcc12, 0x4242, 0xa5,0x8e, 0xe4,0x12,0x21,0x7f,0xf3,0x43);
DEFINE_GUID(IID_IVLCControl2, 0x2d719729, 0x5333, 0x406c, 0xbf,0x12, 0x8d,0xe7,0x87,0xfd,0x65,0xe3);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IVLCConfiguration : public IDispatch
interface IVLCControl2 : public IDispatch
{
virtual HRESULT STDMETHODCALLTYPE get_AutoLoop(
VARIANT_BOOL* autoloop) = 0;
......@@ -1632,283 +1627,6 @@ interface IVLCConfiguration : public IDispatch
virtual HRESULT STDMETHODCALLTYPE put_Volume(
int volume) = 0;
};
#else
typedef struct IVLCConfigurationVtbl {
BEGIN_INTERFACE
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IVLCConfiguration* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IVLCConfiguration* This);
ULONG (STDMETHODCALLTYPE *Release)(
IVLCConfiguration* This);
/*** IDispatch methods ***/
HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
IVLCConfiguration* This,
UINT* pctinfo);
HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
IVLCConfiguration* This,
UINT iTInfo,
LCID lcid,
ITypeInfo** ppTInfo);
HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
IVLCConfiguration* This,
REFIID riid,
LPOLESTR* rgszNames,
UINT cNames,
LCID lcid,
DISPID* rgDispId);
HRESULT (STDMETHODCALLTYPE *Invoke)(
IVLCConfiguration* This,
DISPID dispIdMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS* pDispParams,
VARIANT* pVarResult,
EXCEPINFO* pExcepInfo,
UINT* puArgErr);
/*** IVLCConfiguration methods ***/
HRESULT (STDMETHODCALLTYPE *get_AutoLoop)(
IVLCConfiguration* This,
VARIANT_BOOL* autoloop);
HRESULT (STDMETHODCALLTYPE *put_AutoLoop)(
IVLCConfiguration* This,
VARIANT_BOOL autoloop);
HRESULT (STDMETHODCALLTYPE *get_AutoPlay)(
IVLCConfiguration* This,
VARIANT_BOOL* autoplay);
HRESULT (STDMETHODCALLTYPE *put_AutoPlay)(
IVLCConfiguration* This,
VARIANT_BOOL autoplay);
HRESULT (STDMETHODCALLTYPE *get_BaseURL)(
IVLCConfiguration* This,
BSTR* url);
HRESULT (STDMETHODCALLTYPE *put_BaseURL)(
IVLCConfiguration* This,
BSTR url);
HRESULT (STDMETHODCALLTYPE *get_StartTime)(
IVLCConfiguration* This,
int* seconds);
HRESULT (STDMETHODCALLTYPE *put_StartTime)(
IVLCConfiguration* This,
int seconds);
HRESULT (STDMETHODCALLTYPE *get_MRL)(
IVLCConfiguration* This,
BSTR* mrl);
HRESULT (STDMETHODCALLTYPE *put_MRL)(
IVLCConfiguration* This,
BSTR mrl);
HRESULT (STDMETHODCALLTYPE *get_VersionInfo)(
IVLCConfiguration* This,
BSTR* version);
HRESULT (STDMETHODCALLTYPE *get_Visible)(
IVLCConfiguration* This,
VARIANT_BOOL* visible);
HRESULT (STDMETHODCALLTYPE *put_Visible)(
IVLCConfiguration* This,
VARIANT_BOOL visible);
HRESULT (STDMETHODCALLTYPE *get_Volume)(
IVLCConfiguration* This,
int* volume);
HRESULT (STDMETHODCALLTYPE *put_Volume)(
IVLCConfiguration* This,
int volume);
END_INTERFACE
} IVLCConfigurationVtbl;
interface IVLCConfiguration {
const IVLCConfigurationVtbl* lpVtbl;
};
#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IVLCConfiguration_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IVLCConfiguration_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IVLCConfiguration_Release(p) (p)->lpVtbl->Release(p)
/*** IDispatch methods ***/
#define IVLCConfiguration_GetTypeInfoCount(p,a) (p)->lpVtbl->GetTypeInfoCount(p,a)
#define IVLCConfiguration_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
#define IVLCConfiguration_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
#define IVLCConfiguration_Invoke(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
/*** IVLCConfiguration methods ***/
#define IVLCConfiguration_get_AutoLoop(p,a) (p)->lpVtbl->get_AutoLoop(p,a)
#define IVLCConfiguration_put_AutoLoop(p,a) (p)->lpVtbl->put_AutoLoop(p,a)
#define IVLCConfiguration_get_AutoPlay(p,a) (p)->lpVtbl->get_AutoPlay(p,a)
#define IVLCConfiguration_put_AutoPlay(p,a) (p)->lpVtbl->put_AutoPlay(p,a)
#define IVLCConfiguration_get_BaseURL(p,a) (p)->lpVtbl->get_BaseURL(p,a)
#define IVLCConfiguration_put_BaseURL(p,a) (p)->lpVtbl->put_BaseURL(p,a)
#define IVLCConfiguration_get_StartTime(p,a) (p)->lpVtbl->get_StartTime(p,a)
#define IVLCConfiguration_put_StartTime(p,a) (p)->lpVtbl->put_StartTime(p,a)
#define IVLCConfiguration_get_MRL(p,a) (p)->lpVtbl->get_MRL(p,a)
#define IVLCConfiguration_put_MRL(p,a) (p)->lpVtbl->put_MRL(p,a)
#define IVLCConfiguration_get_VersionInfo(p,a) (p)->lpVtbl->get_VersionInfo(p,a)
#define IVLCConfiguration_get_Visible(p,a) (p)->lpVtbl->get_Visible(p,a)
#define IVLCConfiguration_put_Visible(p,a) (p)->lpVtbl->put_Visible(p,a)
#define IVLCConfiguration_get_Volume(p,a) (p)->lpVtbl->get_Volume(p,a)
#define IVLCConfiguration_put_Volume(p,a) (p)->lpVtbl->put_Volume(p,a)
#endif
#endif
HRESULT CALLBACK IVLCConfiguration_get_AutoLoop_Proxy(
IVLCConfiguration* This,
VARIANT_BOOL* autoloop);
void __RPC_STUB IVLCConfiguration_get_AutoLoop_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCConfiguration_put_AutoLoop_Proxy(
IVLCConfiguration* This,
VARIANT_BOOL autoloop);
void __RPC_STUB IVLCConfiguration_put_AutoLoop_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCConfiguration_get_AutoPlay_Proxy(
IVLCConfiguration* This,
VARIANT_BOOL* autoplay);
void __RPC_STUB IVLCConfiguration_get_AutoPlay_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCConfiguration_put_AutoPlay_Proxy(
IVLCConfiguration* This,
VARIANT_BOOL autoplay);
void __RPC_STUB IVLCConfiguration_put_AutoPlay_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCConfiguration_get_BaseURL_Proxy(
IVLCConfiguration* This,
BSTR* url);
void __RPC_STUB IVLCConfiguration_get_BaseURL_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCConfiguration_put_BaseURL_Proxy(
IVLCConfiguration* This,
BSTR url);
void __RPC_STUB IVLCConfiguration_put_BaseURL_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCConfiguration_get_StartTime_Proxy(
IVLCConfiguration* This,
int* seconds);
void __RPC_STUB IVLCConfiguration_get_StartTime_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCConfiguration_put_StartTime_Proxy(
IVLCConfiguration* This,
int seconds);
void __RPC_STUB IVLCConfiguration_put_StartTime_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCConfiguration_get_MRL_Proxy(
IVLCConfiguration* This,
BSTR* mrl);
void __RPC_STUB IVLCConfiguration_get_MRL_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCConfiguration_put_MRL_Proxy(
IVLCConfiguration* This,
BSTR mrl);
void __RPC_STUB IVLCConfiguration_put_MRL_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCConfiguration_get_VersionInfo_Proxy(
IVLCConfiguration* This,
BSTR* version);
void __RPC_STUB IVLCConfiguration_get_VersionInfo_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCConfiguration_get_Visible_Proxy(
IVLCConfiguration* This,
VARIANT_BOOL* visible);
void __RPC_STUB IVLCConfiguration_get_Visible_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCConfiguration_put_Visible_Proxy(
IVLCConfiguration* This,
VARIANT_BOOL visible);
void __RPC_STUB IVLCConfiguration_put_Visible_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCConfiguration_get_Volume_Proxy(
IVLCConfiguration* This,
int* volume);
void __RPC_STUB IVLCConfiguration_get_Volume_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCConfiguration_put_Volume_Proxy(
IVLCConfiguration* This,
int volume);
void __RPC_STUB IVLCConfiguration_put_Volume_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IVLCConfiguration_INTERFACE_DEFINED__ */
/*****************************************************************************
* IVLCControl2 interface
*/
#ifndef __IVLCControl2_INTERFACE_DEFINED__
#define __IVLCControl2_INTERFACE_DEFINED__
DEFINE_GUID(IID_IVLCControl2, 0x2d719729, 0x5333, 0x406c, 0xbf,0x12, 0x8d,0xe7,0x87,0xfd,0x65,0xe3);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IVLCControl2 : public IVLCConfiguration
{
virtual HRESULT STDMETHODCALLTYPE get_audio(
IVLCAudio** obj) = 0;
......@@ -1968,7 +1686,7 @@ typedef struct IVLCControl2Vtbl {
EXCEPINFO* pExcepInfo,
UINT* puArgErr);
/*** IVLCConfiguration methods ***/
/*** IVLCControl2 methods ***/
HRESULT (STDMETHODCALLTYPE *get_AutoLoop)(
IVLCControl2* This,
VARIANT_BOOL* autoloop);
......@@ -2029,7 +1747,6 @@ typedef struct IVLCControl2Vtbl {
IVLCControl2* This,
int volume);
/*** IVLCControl2 methods ***/
HRESULT (STDMETHODCALLTYPE *get_audio)(
IVLCControl2* This,
IVLCAudio** obj);
......@@ -2062,7 +1779,7 @@ interface IVLCControl2 {
#define IVLCControl2_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
#define IVLCControl2_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
#define IVLCControl2_Invoke(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
/*** IVLCConfiguration methods ***/
/*** IVLCControl2 methods ***/
#define IVLCControl2_get_AutoLoop(p,a) (p)->lpVtbl->get_AutoLoop(p,a)
#define IVLCControl2_put_AutoLoop(p,a) (p)->lpVtbl->put_AutoLoop(p,a)
#define IVLCControl2_get_AutoPlay(p,a) (p)->lpVtbl->get_AutoPlay(p,a)
......@@ -2078,7 +1795,6 @@ interface IVLCControl2 {
#define IVLCControl2_put_Visible(p,a) (p)->lpVtbl->put_Visible(p,a)
#define IVLCControl2_get_Volume(p,a) (p)->lpVtbl->get_Volume(p,a)
#define IVLCControl2_put_Volume(p,a) (p)->lpVtbl->put_Volume(p,a)
/*** IVLCControl2 methods ***/
#define IVLCControl2_get_audio(p,a) (p)->lpVtbl->get_audio(p,a)
#define IVLCControl2_get_input(p,a) (p)->lpVtbl->get_input(p,a)
#define IVLCControl2_get_playlist(p,a) (p)->lpVtbl->get_playlist(p,a)
......@@ -2087,6 +1803,126 @@ interface IVLCControl2 {
#endif
HRESULT CALLBACK IVLCControl2_get_AutoLoop_Proxy(
IVLCControl2* This,
VARIANT_BOOL* autoloop);
void __RPC_STUB IVLCControl2_get_AutoLoop_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_put_AutoLoop_Proxy(
IVLCControl2* This,
VARIANT_BOOL autoloop);
void __RPC_STUB IVLCControl2_put_AutoLoop_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_get_AutoPlay_Proxy(
IVLCControl2* This,
VARIANT_BOOL* autoplay);
void __RPC_STUB IVLCControl2_get_AutoPlay_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_put_AutoPlay_Proxy(
IVLCControl2* This,
VARIANT_BOOL autoplay);
void __RPC_STUB IVLCControl2_put_AutoPlay_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_get_BaseURL_Proxy(
IVLCControl2* This,
BSTR* url);
void __RPC_STUB IVLCControl2_get_BaseURL_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_put_BaseURL_Proxy(
IVLCControl2* This,
BSTR url);
void __RPC_STUB IVLCControl2_put_BaseURL_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_get_StartTime_Proxy(
IVLCControl2* This,
int* seconds);
void __RPC_STUB IVLCControl2_get_StartTime_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_put_StartTime_Proxy(
IVLCControl2* This,
int seconds);
void __RPC_STUB IVLCControl2_put_StartTime_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_get_MRL_Proxy(
IVLCControl2* This,
BSTR* mrl);
void __RPC_STUB IVLCControl2_get_MRL_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_put_MRL_Proxy(
IVLCControl2* This,
BSTR mrl);
void __RPC_STUB IVLCControl2_put_MRL_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_get_VersionInfo_Proxy(
IVLCControl2* This,
BSTR* version);
void __RPC_STUB IVLCControl2_get_VersionInfo_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_get_Visible_Proxy(
IVLCControl2* This,
VARIANT_BOOL* visible);
void __RPC_STUB IVLCControl2_get_Visible_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_put_Visible_Proxy(
IVLCControl2* This,
VARIANT_BOOL visible);
void __RPC_STUB IVLCControl2_put_Visible_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_get_Volume_Proxy(
IVLCControl2* This,
int* volume);
void __RPC_STUB IVLCControl2_get_Volume_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_put_Volume_Proxy(
IVLCControl2* This,
int volume);
void __RPC_STUB IVLCControl2_put_Volume_Stub(
IRpcStubBuffer* This,
IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IVLCControl2_get_audio_Proxy(
IVLCControl2* This,
IVLCAudio** obj);
......
......@@ -520,7 +520,7 @@ HRESULT VLCPlugin::onLoad(void)
if( UrlIsW(base_url, URLIS_URL) )
{
/* copy base URL */
_bstr_mrl = SysAllocString(base_url);
_bstr_baseurl = SysAllocString(base_url);
}
CoTaskMemFree(base_url);
}
......@@ -630,23 +630,34 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
if( SysStringLen(_bstr_mrl) > 0 )
{
char *psz_mrl = NULL;
DWORD len = INTERNET_MAX_URL_LENGTH;
LPOLESTR abs_url = (LPOLESTR)CoTaskMemAlloc(sizeof(OLECHAR)*len);
if( NULL != abs_url )
if( SysStringLen(_bstr_baseurl) > 0 )
{
/*
** 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)) )
DWORD len = INTERNET_MAX_URL_LENGTH;
LPOLESTR abs_url = (LPOLESTR)CoTaskMemAlloc(sizeof(OLECHAR)*len);
if( NULL != abs_url )
{
psz_mrl = CStrFromBSTR(CP_UTF8, abs_url);
}
else
{
psz_mrl = CStrFromBSTR(CP_UTF8, _bstr_mrl);
/*
** 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);
}
CoTaskMemFree(abs_url);
}
CoTaskMemFree(abs_url);
}
else
{
/*
** baseURL is empty, assume MRL is absolute
*/
psz_mrl = CStrFromBSTR(CP_UTF8, _bstr_mrl);
}
if( NULL != psz_mrl )
{
......
......@@ -44,8 +44,8 @@ Insert MSComctlLib.Slider.2 activex control
<DIV id="info" style="text-align:center">-:--:--/-:--:--</DIV>
</TD></TR>
<TR><TD colspan="2">
<INPUT type=button id="PlayOrPause" value=" Play " onClick='doPlayOrPause()'>
<INPUT type=button value="Stop" onClick='document.getElementById("vlc").playlist.stop();'>
<INPUT type=button id="PlayOrPause" value=" Play " onClick='doPlayOrPause();'>
<INPUT type=button value="Stop" onClick='doStop();'>
&nbsp;
<INPUT type=button value=" << " onClick='doPlaySlower();'>
<INPUT type=button value=" >> " onClick='doPlayFaster();'>
......@@ -53,7 +53,7 @@ Insert MSComctlLib.Slider.2 activex control
<INPUT type=button value="Show" onClick='document.getElementById("vlc").Visible = true;'>
<INPUT type=button value="Hide" onClick='document.getElementById("vlc").Visible = false;'>
&nbsp;
<INPUT type=button value="Version" onClick='alert(document.getElementById("vlc").VersionInfo);'>
<INPUT type=button id="VersionBut" value="Version" onClick='alert(document.getElementById("vlc").VersionInfo);'>
<SPAN style="text-align:center">Volume:</SPAN>
<INPUT type=button value=" - " onClick='updateVolume(-10)'>
<SPAN id="volumeTextField" style="text-align: center">--</SPAN>
......@@ -62,108 +62,115 @@ Insert MSComctlLib.Slider.2 activex control
</TD>
</TR>
</TABLE>
<SCRIPT LANGUAGE="JScript">
<SCRIPT language="javascript">
<!--
var sliderTimerId = 0;
var prevState = 0;
var monitorTimerId = 0;
var sliderScrolling = false;
document.onreadystatechange=onVLCStateChange;
function onVLCStateChange()
{
if( document.readyState == 'complete' )
{
updateVolume(0);
}
};
function updateVolume(deltaVol)
{
var vlc = document.getElementById("vlc");
vlc.audio.volume += deltaVol;
document.getElementById("volumeTextField").innerHTML = vlc.audio.volume+"%";