vlccontrol2 make error

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
hobbitten
Blank Cone
Blank Cone
Posts: 20
Joined: 02 Jun 2009 19:23

vlccontrol2 make error

Postby hobbitten » 08 Jun 2009 17:36

I am encountering a problem with the make for vlccontrol2 using msys mingw on windows xp (sp3)

Code: Select all

Making all in projects/activex make[2]: Entering directory `/c/vlc/VLC/projects/activex' make all-am make[3]: Entering directory `/c/vlc/VLC/projects/activex' /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I/usr/win32/include -I/usr/win32/include/ebml -D__USE_MINGW_ANSI_STDIO=1 -DSYS_MINGW32 `top_srcdir="../.." top_builddir="../.." ../../vlc-config --cxxflags activex` -mms-bitfields -MT axvlc_la-vlccontrol2.lo -MD -MP -MF .deps/axvlc_la-vlccontrol2.Tpo -c -o axvlc_la-vlccontrol2.lo `test -f 'vlccontrol2.cpp' || echo './'`vlccontrol2.cpp g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I/usr/win32/include -I/usr/win32/include/ebml -D__USE_MINGW_ANSI_STDIO=1 -DSYS_MINGW32 -I/usr/local/include -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG -DUNICODE -D_UNICODE -D_MIDL_USE_GUIDDEF_ -DMODULE_NAME=activex -DMODULE_NAME_IS_activex -DMODULE_STRING=\"activex\" -g -O2 -ffast-math -funroll-loops -mtune=pentium2 -fno-exceptions -DHAVE_OBJSAFE_HEADER -mms-bitfields -MT axvlc_la-vlccontrol2.lo -MD -MP -MF .deps/axvlc_la-vlccontrol2.Tpo -c vlccontrol2.cpp -DDLL_EXPORT -DPIC -o .libs/axvlc_la-vlccontrol2.o In file included from vlccontrol2.cpp:25: vlccontrol2.h:495: error: expected class-name before '{' token vlccontrol2.h: In member function `HRESULT VLCSubtitle::QueryInterface(const IID&, void**)': vlccontrol2.h:508: error: `IID_IVLCSubtitle' was not declared in this scope vlccontrol2.h: At global scope: vlccontrol2.h:659: error: `IVLCSubtitle' has not been declared vlccontrol2.h:659: error: ISO C++ forbids declaration of `parameter' with no type vlccontrol2.cpp: In member function `HRESULT VLCSubtitle::loadTypeInfo()': vlccontrol2.cpp:1748: error: `IID_IVLCSubtitle' was not declared in this scope vlccontrol2.cpp: In member function `HRESULT VLCSubtitle::get_track(long int*)': vlccontrol2.cpp:1826: error: `IID_IVLCSubtitle' was not declared in this scope vlccontrol2.cpp: In member function `HRESULT VLCSubtitle::put_track(long int)': vlccontrol2.cpp:1845: error: `IID_IVLCSubtitle' was not declared in this scope vlccontrol2.cpp: In member function `HRESULT VLCSubtitle::get_count(long int*)': vlccontrol2.cpp:1869: error: `IID_IVLCSubtitle' was not declared in this scope vlccontrol2.cpp: In member function `HRESULT VLCSubtitle::description(long int, OLECHAR**)': vlccontrol2.cpp:1899: error: `IID_IVLCSubtitle' was not declared in this scope vlccontrol2.cpp:1908: error: `IID_IVLCSubtitle' was not declared in this scope vlccontrol2.cpp: At global scope: vlccontrol2.cpp:2724: warning: `__stdcall__' attribute only applies to function types vlccontrol2.cpp:2724: error: `HRESULT VLCControl2::get_subtitle' is not a static member of `class VLCControl2' vlccontrol2.cpp:2724: error: `IVLCSubtitle' was not declared in this scope vlccontrol2.cpp:2724: error: `obj' was not declared in this scope vlccontrol2.cpp:2725: error: expected `,' or `;' before '{' token make[3]: *** [axvlc_la-vlccontrol2.lo] Error 1 make[3]: Leaving directory `/c/vlc/VLC/projects/activex' make[2]: *** [all] Error 2 make[2]: Leaving directory `/c/vlc/VLC/projects/activex' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/c/vlc/VLC' make: *** [all] Error 2

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: vlccontrol2 make error

Postby VLC_help » 09 Jun 2009 19:27

Which VLC version are you trying to build and do you need ActiveX?

hobbitten
Blank Cone
Blank Cone
Posts: 20
Joined: 02 Jun 2009 19:23

Re: vlccontrol2 make error

Postby hobbitten » 09 Jun 2009 22:29

I am using the latest git version. Yes I need activex for IE. I am trying to compile it to change vlc not to intercept the onclick event on xp(sp3). If you have a compiled version ... that does that ... then I will not need to do this anymore.

hobbitten
Blank Cone
Blank Cone
Posts: 20
Joined: 02 Jun 2009 19:23

Re: vlccontrol2 make error

Postby hobbitten » 11 Jun 2009 19:47

I tried adding --disable-activex to disable activex compile, so I can see if there are anymore compile errors, but it still tries to compile activex.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: vlccontrol2 make error

Postby VLC_help » 12 Jun 2009 14:26

You rerun configure after --disable-activex?

hobbitten
Blank Cone
Blank Cone
Posts: 20
Joined: 02 Jun 2009 19:23

Re: vlccontrol2 make error

Postby hobbitten » 12 Jun 2009 15:52

I did ... hours later ... same error

Code: Select all

#!/bin/sh root=$(echo $0|sed 's#extras/package/win32/configure-msys.sh##')./ PATH="/usr/win32/bin:$PATH" \ PKG_CONFIG_LIBDIR=/usr/win32/lib/pkgconfig \ CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \ LDFLAGS="-L/usr/win32/lib" \ CC=gcc CXX=g++ \ CONFIG="${root}configure --host=i586-mingw32msvc --build=i386-linux --disable-mkv --disable-taglib --disable-nls --disable-dirac --enable-debug --disable-activex" \ sh ${root}extras/package/win32/configure-common.sh

hobbitten
Blank Cone
Blank Cone
Posts: 20
Joined: 02 Jun 2009 19:23

Re: vlccontrol2 make error

Postby hobbitten » 22 Jun 2009 17:37

Here is the code in two parts due to the 60000 limit

vlccontrol2.cpp part1

Code: Select all

/***************************************************************************** * vlccontrol2.cpp: ActiveX control for VLC ***************************************************************************** * Copyright (C) 2006 the VideoLAN team * * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net> * Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ #include "plugin.h" #include "vlccontrol2.h" #include "vlccontrol.h" #include "utils.h" #include <stdio.h> #include <shlwapi.h> #include <wininet.h> #include <tchar.h> static inline HRESULT _exception_bridge(VLCPlugin *p,REFIID riid, libvlc_exception_t *ex) { if( libvlc_exception_raised(ex) ) { p->setErrorInfo(riid,libvlc_exception_get_message(ex)); libvlc_exception_clear(ex); return E_FAIL; } return NOERROR; } #define EMIT_EXCEPTION_BRIDGE( classname ) \ HRESULT classname::exception_bridge( libvlc_exception_t *ex ) \ { return _exception_bridge( _p_instance, IID_I##classname, ex ); } EMIT_EXCEPTION_BRIDGE( VLCAudio ) EMIT_EXCEPTION_BRIDGE( VLCInput ) EMIT_EXCEPTION_BRIDGE( VLCMessageIterator ) EMIT_EXCEPTION_BRIDGE( VLCMessages ) EMIT_EXCEPTION_BRIDGE( VLCLog ) EMIT_EXCEPTION_BRIDGE( VLCPlaylistItems ) EMIT_EXCEPTION_BRIDGE( VLCPlaylist ) EMIT_EXCEPTION_BRIDGE( VLCVideo ) EMIT_EXCEPTION_BRIDGE( VLCSubtitle ) #undef EMIT_EXCEPTION_BRIDGE VLCAudio::~VLCAudio() { if( _p_typeinfo ) _p_typeinfo->Release(); }; HRESULT VLCAudio::loadTypeInfo(void) { HRESULT hr = NOERROR; if( NULL == _p_typeinfo ) { ITypeLib *p_typelib; hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib); if( SUCCEEDED(hr) ) { hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCAudio, &_p_typeinfo); if( FAILED(hr) ) { _p_typeinfo = NULL; } p_typelib->Release(); } } return hr; }; STDMETHODIMP VLCAudio::GetTypeInfoCount(UINT* pctInfo) { if( NULL == pctInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) *pctInfo = 1; else *pctInfo = 0; return NOERROR; }; STDMETHODIMP VLCAudio::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo) { if( NULL == ppTInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) { _p_typeinfo->AddRef(); *ppTInfo = _p_typeinfo; return NOERROR; } *ppTInfo = NULL; return E_NOTIMPL; }; STDMETHODIMP VLCAudio::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispID) { if( SUCCEEDED(loadTypeInfo()) ) { return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID); } return E_NOTIMPL; }; STDMETHODIMP VLCAudio::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr) { if( SUCCEEDED(loadTypeInfo()) ) { return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } return E_NOTIMPL; }; STDMETHODIMP VLCAudio::get_mute(VARIANT_BOOL* mute) { if( NULL == mute ) return E_POINTER; libvlc_instance_t* p_libvlc; HRESULT hr = _p_instance->getVLC(&p_libvlc); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *mute = libvlc_audio_get_mute(p_libvlc, &ex) ? VARIANT_TRUE : VARIANT_FALSE; hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCAudio::put_mute(VARIANT_BOOL mute) { libvlc_instance_t* p_libvlc; HRESULT hr = _p_instance->getVLC(&p_libvlc); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_audio_set_mute(p_libvlc, VARIANT_FALSE != mute, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCAudio::get_volume(long* volume) { if( NULL == volume ) return E_POINTER; libvlc_instance_t* p_libvlc; HRESULT hr = _p_instance->getVLC(&p_libvlc); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *volume = libvlc_audio_get_volume(p_libvlc, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCAudio::put_volume(long volume) { libvlc_instance_t* p_libvlc; HRESULT hr = _p_instance->getVLC(&p_libvlc); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_audio_set_volume(p_libvlc, volume, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCAudio::get_track(long* track) { if( NULL == track ) return E_POINTER; libvlc_media_player_t* p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *track = libvlc_audio_get_track(p_md, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCAudio::put_track(long track) { libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_audio_set_track(p_md, track, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCAudio::get_count(long* trackNumber) { if( NULL == trackNumber ) return E_POINTER; libvlc_media_player_t* p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); // get the number of audio track available and return it *trackNumber = libvlc_audio_get_track_count(p_md, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCAudio::description(long trackID, BSTR* name) { if( NULL == name ) return E_POINTER; libvlc_media_player_t* p_md; libvlc_exception_t ex; libvlc_exception_init(&ex); HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { int i, i_limit; const char *psz_name; libvlc_track_description_t *p_trackDesc; // get tracks description p_trackDesc = libvlc_audio_get_track_description(p_md, &ex); hr = exception_bridge(&ex); if( FAILED(hr) ) return hr; //get the number of available track i_limit = libvlc_audio_get_track_count(p_md, &ex); hr = exception_bridge(&ex); if( FAILED(hr) ) return hr; // check if the number given is a good one if ( ( trackID > ( i_limit -1 ) ) || ( trackID < 0 ) ) return E_FAIL; // get the good trackDesc for( i = 0 ; i < trackID ; i++ ) { p_trackDesc = p_trackDesc->p_next; } // get the track name psz_name = p_trackDesc->psz_name; // return it if( psz_name != NULL ) { *name = BSTRFromCStr(CP_UTF8, psz_name); return (NULL == *name) ? E_OUTOFMEMORY : NOERROR; } *name = NULL; return E_FAIL; } return hr; }; STDMETHODIMP VLCAudio::get_channel(long *channel) { if( NULL == channel ) return E_POINTER; libvlc_instance_t* p_libvlc; HRESULT hr = _p_instance->getVLC(&p_libvlc); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *channel = libvlc_audio_get_channel(p_libvlc, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCAudio::put_channel(long channel) { libvlc_instance_t* p_libvlc; HRESULT hr = _p_instance->getVLC(&p_libvlc); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_audio_set_channel(p_libvlc, channel, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCAudio::toggleMute() { libvlc_instance_t* p_libvlc; HRESULT hr = _p_instance->getVLC(&p_libvlc); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_audio_toggle_mute(p_libvlc, &ex); hr = exception_bridge(&ex); } return hr; }; /*******************************************************************************/ VLCInput::~VLCInput() { if( _p_typeinfo ) _p_typeinfo->Release(); }; HRESULT VLCInput::loadTypeInfo(void) { HRESULT hr = NOERROR; if( NULL == _p_typeinfo ) { ITypeLib *p_typelib; hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib); if( SUCCEEDED(hr) ) { hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCInput, &_p_typeinfo); if( FAILED(hr) ) { _p_typeinfo = NULL; } p_typelib->Release(); } } return hr; }; STDMETHODIMP VLCInput::GetTypeInfoCount(UINT* pctInfo) { if( NULL == pctInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) *pctInfo = 1; else *pctInfo = 0; return NOERROR; }; STDMETHODIMP VLCInput::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo) { if( NULL == ppTInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) { _p_typeinfo->AddRef(); *ppTInfo = _p_typeinfo; return NOERROR; } *ppTInfo = NULL; return E_NOTIMPL; }; STDMETHODIMP VLCInput::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispID) { if( SUCCEEDED(loadTypeInfo()) ) { return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID); } return E_NOTIMPL; }; STDMETHODIMP VLCInput::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr) { if( SUCCEEDED(loadTypeInfo()) ) { return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } return E_NOTIMPL; }; STDMETHODIMP VLCInput::get_length(double* length) { if( NULL == length ) return E_POINTER; *length = 0; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *length = (double)libvlc_media_player_get_length(p_md, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCInput::get_position(double* position) { if( NULL == position ) return E_POINTER; *position = 0.0f; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *position = libvlc_media_player_get_position(p_md, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCInput::put_position(double position) { libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_media_player_set_position(p_md, position, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCInput::get_time(double* time) { if( NULL == time ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *time = (double)libvlc_media_player_get_time(p_md, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCInput::put_time(double time) { libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_media_player_set_time(p_md, (int64_t)time, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCInput::get_state(long* state) { if( NULL == state ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *state = libvlc_media_player_get_state(p_md, &ex); if( libvlc_exception_raised(&ex) ) { // don't fail, just return the idle state *state = 0; libvlc_exception_clear(&ex); } } return hr; }; STDMETHODIMP VLCInput::get_rate(double* rate) { if( NULL == rate ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *rate = libvlc_media_player_get_rate(p_md, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCInput::put_rate(double rate) { libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_media_player_set_rate(p_md, rate, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCInput::get_fps(double* fps) { if( NULL == fps ) return E_POINTER; *fps = 0.0; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *fps = libvlc_media_player_get_fps(p_md, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCInput::get_hasVout(VARIANT_BOOL* hasVout) { if( NULL == hasVout ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *hasVout = libvlc_media_player_has_vout(p_md, &ex) ? VARIANT_TRUE : VARIANT_FALSE; hr = exception_bridge(&ex); } return hr; }; /*******************************************************************************/ VLCLog::~VLCLog() { delete _p_vlcmessages; if( _p_log ) libvlc_log_close(_p_log, NULL); if( _p_typeinfo ) _p_typeinfo->Release(); }; HRESULT VLCLog::loadTypeInfo(void) { HRESULT hr = NOERROR; if( NULL == _p_typeinfo ) { ITypeLib *p_typelib; hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib); if( SUCCEEDED(hr) ) { hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCLog, &_p_typeinfo); if( FAILED(hr) ) { _p_typeinfo = NULL; } p_typelib->Release(); } } return hr; }; STDMETHODIMP VLCLog::GetTypeInfoCount(UINT* pctInfo) { if( NULL == pctInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) *pctInfo = 1; else *pctInfo = 0; return NOERROR; }; STDMETHODIMP VLCLog::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo) { if( NULL == ppTInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) { _p_typeinfo->AddRef(); *ppTInfo = _p_typeinfo; return NOERROR; } *ppTInfo = NULL; return E_NOTIMPL; }; STDMETHODIMP VLCLog::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispID) { if( SUCCEEDED(loadTypeInfo()) ) { return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID); } return E_NOTIMPL; }; STDMETHODIMP VLCLog::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr) { if( SUCCEEDED(loadTypeInfo()) ) { return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } return E_NOTIMPL; }; STDMETHODIMP VLCLog::get_messages(IVLCMessages** obj) { if( NULL == obj ) return E_POINTER; *obj = _p_vlcmessages; if( NULL != _p_vlcmessages ) { _p_vlcmessages->AddRef(); return NOERROR; } return E_OUTOFMEMORY; }; STDMETHODIMP VLCLog::get_verbosity(long* level) { if( NULL == level ) return E_POINTER; if( _p_log ) { libvlc_instance_t* p_libvlc; HRESULT hr = _p_instance->getVLC(&p_libvlc); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *level = libvlc_get_log_verbosity(p_libvlc, &ex); hr = exception_bridge(&ex); } return hr; } else { /* log is not enabled, return -1 */ *level = -1; return NOERROR; } }; STDMETHODIMP VLCLog::put_verbosity(long verbosity) { libvlc_instance_t* p_libvlc; HRESULT hr = _p_instance->getVLC(&p_libvlc); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); if( verbosity >= 0 ) { if( ! _p_log ) { _p_log = libvlc_log_open(p_libvlc, &ex); hr = exception_bridge(&ex); } if( SUCCEEDED(hr) ) libvlc_set_log_verbosity(p_libvlc, (unsigned)verbosity, &ex); } else if( _p_log ) { /* close log when verbosity is set to -1 */ libvlc_log_close(_p_log, &ex); _p_log = NULL; } hr = exception_bridge(&ex); } return hr; }; /*******************************************************************************/ /* STL forward iterator used by VLCEnumIterator class to implement IEnumVARIANT */ class VLCMessageSTLIterator { public: VLCMessageSTLIterator(IVLCMessageIterator* iter) : iter(iter), msg(NULL) { // get first message operator++(); }; VLCMessageSTLIterator(const VLCMessageSTLIterator& other) { iter = other.iter; if( iter ) iter->AddRef(); msg = other.msg; if( msg ) msg->AddRef(); }; virtual ~VLCMessageSTLIterator() { if( msg ) msg->Release(); if( iter ) iter->Release(); }; // we only need prefix ++ operator VLCMessageSTLIterator& operator++() { VARIANT_BOOL hasNext = VARIANT_FALSE; if( iter ) { iter->get_hasNext(&hasNext); if( msg ) { msg->Release(); msg = NULL; } if( VARIANT_TRUE == hasNext ) { iter->next(&msg); } } return *this; }; VARIANT operator*() const { VARIANT v; VariantInit(&v); if( msg ) { if( SUCCEEDED(msg->QueryInterface(IID_IDispatch, (LPVOID*)&V_DISPATCH(&v))) ) { V_VT(&v) = VT_DISPATCH; } } return v; }; bool operator==(const VLCMessageSTLIterator& other) const { return msg == other.msg; }; bool operator!=(const VLCMessageSTLIterator& other) const { return msg != other.msg; }; private: IVLCMessageIterator* iter; IVLCMessage* msg; }; //////////////////////////////////////////////////////////////////////////////////////////////////////////// VLCMessages::~VLCMessages() { if( _p_typeinfo ) _p_typeinfo->Release(); }; HRESULT VLCMessages::loadTypeInfo(void) { HRESULT hr = NOERROR; if( NULL == _p_typeinfo ) { ITypeLib *p_typelib; hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib); if( SUCCEEDED(hr) ) { hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCMessages, &_p_typeinfo); if( FAILED(hr) ) { _p_typeinfo = NULL; } p_typelib->Release(); } } return hr; }; STDMETHODIMP VLCMessages::GetTypeInfoCount(UINT* pctInfo) { if( NULL == pctInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) *pctInfo = 1; else *pctInfo = 0; return NOERROR; }; STDMETHODIMP VLCMessages::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo) { if( NULL == ppTInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) { _p_typeinfo->AddRef(); *ppTInfo = _p_typeinfo; return NOERROR; } *ppTInfo = NULL; return E_NOTIMPL; }; STDMETHODIMP VLCMessages::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispID) { if( SUCCEEDED(loadTypeInfo()) ) { return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID); } return E_NOTIMPL; }; STDMETHODIMP VLCMessages::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr) { if( SUCCEEDED(loadTypeInfo()) ) { return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } return E_NOTIMPL; }; STDMETHODIMP VLCMessages::get__NewEnum(LPUNKNOWN* _NewEnum) { if( NULL == _NewEnum ) return E_POINTER; IVLCMessageIterator* iter = NULL; iterator(&iter); *_NewEnum= new VLCEnumIterator<IID_IEnumVARIANT, IEnumVARIANT, VARIANT, VLCMessageSTLIterator> (VLCMessageSTLIterator(iter), VLCMessageSTLIterator(NULL)); return *_NewEnum ? S_OK : E_OUTOFMEMORY; }; STDMETHODIMP VLCMessages::clear() { HRESULT hr = NOERROR; libvlc_log_t *p_log = _p_vlclog->_p_log; if( p_log ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_log_clear(p_log, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCMessages::get_count(long* count) { HRESULT hr = S_OK; if( NULL == count ) return E_POINTER; libvlc_log_t *p_log = _p_vlclog->_p_log; if( p_log ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *count = libvlc_log_count(p_log, &ex); hr = exception_bridge(&ex); } else *count = 0; return hr; }; STDMETHODIMP VLCMessages::iterator(IVLCMessageIterator** iter) { if( NULL == iter ) return E_POINTER; *iter = new VLCMessageIterator(_p_instance, _p_vlclog); return *iter ? S_OK : E_OUTOFMEMORY; }; /*******************************************************************************/ VLCMessageIterator::VLCMessageIterator(VLCPlugin *p_instance, VLCLog* p_vlclog ) : _p_instance(p_instance), _p_typeinfo(NULL), _refcount(1), _p_vlclog(p_vlclog) { if( p_vlclog->_p_log ) { _p_iter = libvlc_log_get_iterator(p_vlclog->_p_log, NULL); } else _p_iter = NULL; }; VLCMessageIterator::~VLCMessageIterator() { if( _p_iter ) libvlc_log_iterator_free(_p_iter, NULL); if( _p_typeinfo ) _p_typeinfo->Release(); }; HRESULT VLCMessageIterator::loadTypeInfo(void) { HRESULT hr = NOERROR; if( NULL == _p_typeinfo ) { ITypeLib *p_typelib; hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib); if( SUCCEEDED(hr) ) { hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCMessageIterator, &_p_typeinfo); if( FAILED(hr) ) { _p_typeinfo = NULL; } p_typelib->Release(); } } return hr; }; STDMETHODIMP VLCMessageIterator::GetTypeInfoCount(UINT* pctInfo) { if( NULL == pctInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) *pctInfo = 1; else *pctInfo = 0; return NOERROR; }; STDMETHODIMP VLCMessageIterator::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo) { if( NULL == ppTInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) { _p_typeinfo->AddRef(); *ppTInfo = _p_typeinfo; return NOERROR; } *ppTInfo = NULL; return E_NOTIMPL; }; STDMETHODIMP VLCMessageIterator::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispID) { if( SUCCEEDED(loadTypeInfo()) ) { return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID); } return E_NOTIMPL; }; STDMETHODIMP VLCMessageIterator::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr) { if( SUCCEEDED(loadTypeInfo()) ) { return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } return E_NOTIMPL; }; STDMETHODIMP VLCMessageIterator::get_hasNext(VARIANT_BOOL* hasNext) { HRESULT hr = S_OK; if( NULL == hasNext ) return E_POINTER; if( _p_iter && _p_vlclog->_p_log ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *hasNext = libvlc_log_iterator_has_next(_p_iter, &ex) ? VARIANT_TRUE : VARIANT_FALSE; hr = exception_bridge(&ex); } else { *hasNext = VARIANT_FALSE; } return hr; }; STDMETHODIMP VLCMessageIterator::next(IVLCMessage** message) { HRESULT hr = S_OK; if( NULL == message ) return E_POINTER; if( _p_iter && _p_vlclog->_p_log ) { struct libvlc_log_message_t buffer; buffer.sizeof_msg = sizeof(buffer); libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_log_iterator_next(_p_iter, &buffer, &ex); hr = exception_bridge(&ex); if( SUCCEEDED(hr) ) { *message = new VLCMessage(_p_instance, buffer); if( !message ) hr = E_OUTOFMEMORY; } } return hr; }; /*******************************************************************************/ VLCMessage::~VLCMessage() { if( _p_typeinfo ) _p_typeinfo->Release(); }; HRESULT VLCMessage::loadTypeInfo(void) { HRESULT hr = NOERROR; if( NULL == _p_typeinfo ) { ITypeLib *p_typelib; hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib); if( SUCCEEDED(hr) ) { hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCMessage, &_p_typeinfo); if( FAILED(hr) ) { _p_typeinfo = NULL; } p_typelib->Release(); } } return hr; }; STDMETHODIMP VLCMessage::GetTypeInfoCount(UINT* pctInfo) { if( NULL == pctInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) *pctInfo = 1; else *pctInfo = 0; return NOERROR; }; STDMETHODIMP VLCMessage::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo) { if( NULL == ppTInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) { _p_typeinfo->AddRef(); *ppTInfo = _p_typeinfo; return NOERROR; } *ppTInfo = NULL; return E_NOTIMPL; }; STDMETHODIMP VLCMessage::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispID) { if( SUCCEEDED(loadTypeInfo()) ) { return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID); } return E_NOTIMPL; }; STDMETHODIMP VLCMessage::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr) { if( SUCCEEDED(loadTypeInfo()) ) { return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } return E_NOTIMPL; }; inline const char *msgSeverity(int sev) { switch( sev ) { case 0: return "info"; case 1: return "error"; case 2: return "warning"; default: return "debug"; } }; STDMETHODIMP VLCMessage::get__Value(VARIANT* _Value) { if( NULL == _Value ) return E_POINTER; char buffer[256]; snprintf(buffer, sizeof(buffer), "%s %s %s: %s", _msg.psz_type, _msg.psz_name, msgSeverity(_msg.i_severity), _msg.psz_message); V_VT(_Value) = VT_BSTR; V_BSTR(_Value) = BSTRFromCStr(CP_UTF8, buffer); return S_OK; }; STDMETHODIMP VLCMessage::get_severity(long* level) { if( NULL == level ) return E_POINTER; *level = _msg.i_severity; return S_OK; }; STDMETHODIMP VLCMessage::get_type(BSTR* type) { if( NULL == type ) return E_POINTER; *type = BSTRFromCStr(CP_UTF8, _msg.psz_type); return NOERROR; }; STDMETHODIMP VLCMessage::get_name(BSTR* name) { if( NULL == name ) return E_POINTER; *name = BSTRFromCStr(CP_UTF8, _msg.psz_name); return NOERROR; }; STDMETHODIMP VLCMessage::get_header(BSTR* header) { if( NULL == header ) return E_POINTER; *header = BSTRFromCStr(CP_UTF8, _msg.psz_header); return NOERROR; }; STDMETHODIMP VLCMessage::get_message(BSTR* message) { if( NULL == message ) return E_POINTER; *message = BSTRFromCStr(CP_UTF8, _msg.psz_message); return NOERROR; }; /*******************************************************************************/ VLCPlaylistItems::~VLCPlaylistItems() { if( _p_typeinfo ) _p_typeinfo->Release(); }; HRESULT VLCPlaylistItems::loadTypeInfo(void) { HRESULT hr = NOERROR; if( NULL == _p_typeinfo ) { ITypeLib *p_typelib; hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib); if( SUCCEEDED(hr) ) { hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCPlaylistItems, &_p_typeinfo); if( FAILED(hr) ) { _p_typeinfo = NULL; } p_typelib->Release(); } } return hr; }; STDMETHODIMP VLCPlaylistItems::GetTypeInfoCount(UINT* pctInfo) { if( NULL == pctInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) *pctInfo = 1; else *pctInfo = 0; return NOERROR; }; STDMETHODIMP VLCPlaylistItems::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo) { if( NULL == ppTInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) { _p_typeinfo->AddRef(); *ppTInfo = _p_typeinfo; return NOERROR; } *ppTInfo = NULL; return E_NOTIMPL; }; STDMETHODIMP VLCPlaylistItems::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispID) { if( SUCCEEDED(loadTypeInfo()) ) { return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID); } return E_NOTIMPL; }; STDMETHODIMP VLCPlaylistItems::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr) { if( SUCCEEDED(loadTypeInfo()) ) { return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } return E_NOTIMPL; }; STDMETHODIMP VLCPlaylistItems::get_count(long* count) { if( NULL == count ) return E_POINTER; libvlc_exception_t ex; libvlc_exception_init(&ex); *count = _p_instance->playlist_count(&ex); return exception_bridge(&ex); }; STDMETHODIMP VLCPlaylistItems::clear() { libvlc_exception_t ex; libvlc_exception_init(&ex); _p_instance->playlist_clear(&ex); return exception_bridge(&ex); }; STDMETHODIMP VLCPlaylistItems::remove(long item) { libvlc_instance_t* p_libvlc; HRESULT hr = _p_instance->getVLC(&p_libvlc); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); _p_instance->playlist_delete_item(item, &ex); hr = exception_bridge(&ex); } return hr; }; /*******************************************************************************/ VLCPlaylist::~VLCPlaylist() { delete _p_vlcplaylistitems; if( _p_typeinfo ) _p_typeinfo->Release(); }; HRESULT VLCPlaylist::loadTypeInfo(void) { HRESULT hr = NOERROR; if( NULL == _p_typeinfo ) { ITypeLib *p_typelib; hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib); if( SUCCEEDED(hr) ) { hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCPlaylist, &_p_typeinfo); if( FAILED(hr) ) { _p_typeinfo = NULL; } p_typelib->Release(); } } return hr; }; STDMETHODIMP VLCPlaylist::GetTypeInfoCount(UINT* pctInfo) { if( NULL == pctInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) *pctInfo = 1; else *pctInfo = 0; return NOERROR; }; STDMETHODIMP VLCPlaylist::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo) { if( NULL == ppTInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) { _p_typeinfo->AddRef(); *ppTInfo = _p_typeinfo; return NOERROR; } *ppTInfo = NULL; return E_NOTIMPL; }; STDMETHODIMP VLCPlaylist::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispID) { if( SUCCEEDED(loadTypeInfo()) ) { return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID); } return E_NOTIMPL; }; STDMETHODIMP VLCPlaylist::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr) { if( SUCCEEDED(loadTypeInfo()) ) { return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } return E_NOTIMPL; }; STDMETHODIMP VLCPlaylist::get_itemCount(long* count) { if( NULL == count ) return E_POINTER; *count = 0; libvlc_exception_t ex; libvlc_exception_init(&ex); *count = _p_instance->playlist_count(&ex); return exception_bridge(&ex); }; STDMETHODIMP VLCPlaylist::get_isPlaying(VARIANT_BOOL* isPlaying) { if( NULL == isPlaying ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *isPlaying = libvlc_media_player_is_playing(p_md, &ex) ? VARIANT_TRUE: VARIANT_FALSE; libvlc_exception_clear(&ex); } return hr; }; STDMETHODIMP VLCPlaylist::add(BSTR uri, VARIANT name, VARIANT options, long* item) { if( NULL == item ) return E_POINTER; if( 0 == SysStringLen(uri) ) return E_INVALIDARG; libvlc_instance_t* p_libvlc; HRESULT hr = _p_instance->getVLC(&p_libvlc); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); char *psz_uri = NULL; if( SysStringLen(_p_instance->getBaseURL()) > 0 ) { /* ** if the MRL a relative URL, we should end up with an absolute URL */ LPWSTR abs_url = CombineURL(_p_instance->getBaseURL(), uri); if( NULL != abs_url ) { psz_uri = CStrFromWSTR(CP_UTF8, abs_url, wcslen(abs_url)); CoTaskMemFree(abs_url); } else { psz_uri = CStrFromBSTR(CP_UTF8, uri); } } else { /* ** baseURL is empty, assume MRL is absolute */ psz_uri = CStrFromBSTR(CP_UTF8, uri); } if( NULL == psz_uri ) { return E_OUTOFMEMORY; } int i_options; char **ppsz_options; hr = VLCControl::CreateTargetOptions(CP_UTF8, &options, &ppsz_options, &i_options); if( FAILED(hr) ) { CoTaskMemFree(psz_uri); return hr; } char *psz_name = NULL; VARIANT v_name; VariantInit(&v_name); if( SUCCEEDED(VariantChangeType(&v_name, &name, 0, VT_BSTR)) ) { if( SysStringLen(V_BSTR(&v_name)) > 0 ) psz_name = CStrFromBSTR(CP_UTF8, V_BSTR(&v_name)); VariantClear(&v_name); } *item = _p_instance->playlist_add_extended_untrusted(psz_uri, i_options, const_cast<const char **>(ppsz_options), &ex); VLCControl::FreeTargetOptions(ppsz_options, i_options); CoTaskMemFree(psz_uri); if( psz_name ) /* XXX Do we even need to check? */ CoTaskMemFree(psz_name); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCPlaylist::play() { libvlc_exception_t ex; libvlc_exception_init(&ex); _p_instance->playlist_play(&ex); return exception_bridge(&ex); }; STDMETHODIMP VLCPlaylist::playItem(long item) { libvlc_exception_t ex; libvlc_exception_init(&ex); _p_instance->playlist_play_item(item,&ex); return exception_bridge(&ex);; }; STDMETHODIMP VLCPlaylist::togglePause() { libvlc_media_player_t* p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_media_player_pause(p_md, &ex); hr = exception_bridge(&ex);; } return hr; }; STDMETHODIMP VLCPlaylist::stop() { libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_media_player_stop(p_md, &ex); hr = exception_bridge(&ex);; } return hr; }; STDMETHODIMP VLCPlaylist::next() { libvlc_exception_t ex; libvlc_exception_init(&ex); _p_instance->playlist_next(&ex); return exception_bridge(&ex);; }; STDMETHODIMP VLCPlaylist::prev() { libvlc_exception_t ex; libvlc_exception_init(&ex); _p_instance->playlist_prev(&ex); return exception_bridge(&ex);; }; STDMETHODIMP VLCPlaylist::clear() { libvlc_exception_t ex; libvlc_exception_init(&ex); _p_instance->playlist_clear(&ex); return exception_bridge(&ex);; }; STDMETHODIMP VLCPlaylist::removeItem(long item) { libvlc_instance_t* p_libvlc; HRESULT hr = _p_instance->getVLC(&p_libvlc); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); _p_instance->playlist_delete_item(item, &ex); hr = exception_bridge(&ex);; } return hr; }; STDMETHODIMP VLCPlaylist::get_items(IVLCPlaylistItems** obj) { if( NULL == obj ) return E_POINTER; *obj = _p_vlcplaylistitems; if( NULL != _p_vlcplaylistitems ) { _p_vlcplaylistitems->AddRef(); return NOERROR; } return E_OUTOFMEMORY; }; /*******************************************************************************/ VLCSubtitle::~VLCSubtitle() { if( _p_typeinfo ) _p_typeinfo->Release(); }; HRESULT VLCSubtitle::loadTypeInfo(void) { HRESULT hr = NOERROR; if( NULL == _p_typeinfo ) { ITypeLib *p_typelib; hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib); if( SUCCEEDED(hr) ) { hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCSubtitle, &_p_typeinfo); if( FAILED(hr) ) { _p_typeinfo = NULL; } p_typelib->Release(); } } return hr; }; STDMETHODIMP VLCSubtitle::GetTypeInfoCount(UINT* pctInfo) { if( NULL == pctInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) *pctInfo = 1; else *pctInfo = 0; return NOERROR; }; STDMETHODIMP VLCSubtitle::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo) { if( NULL == ppTInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) { _p_typeinfo->AddRef(); *ppTInfo = _p_typeinfo; return NOERROR; } *ppTInfo = NULL; return E_NOTIMPL; }; STDMETHODIMP VLCSubtitle::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispID) { if( SUCCEEDED(loadTypeInfo()) ) { return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID); } return E_NOTIMPL; }; STDMETHODIMP VLCSubtitle::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr) { if( SUCCEEDED(loadTypeInfo()) ) { return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } return E_NOTIMPL; }; STDMETHODIMP VLCSubtitle::get_track(long* spu) { if( NULL == spu ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *spu = libvlc_video_get_spu(p_md, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCSubtitle::put_track(long spu) { libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_video_set_spu(p_md, spu, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCSubtitle::get_count(long* spuNumber) { if( NULL == spuNumber ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); // get the number of video subtitle available and return it *spuNumber = libvlc_video_get_spu_count(p_md, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCSubtitle::description(long nameID, BSTR* name) { if( NULL == name ) return E_POINTER; libvlc_media_player_t* p_md; libvlc_exception_t ex; libvlc_exception_init(&ex); HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { int i, i_limit; const char *psz_name; libvlc_track_description_t *p_spuDesc; // get subtitles description p_spuDesc = libvlc_video_get_spu_description(p_md, &ex); hr = exception_bridge(&ex); if( FAILED(hr) ) return hr; // get the number of available subtitle i_limit = libvlc_video_get_spu_count(p_md, &ex); hr = exception_bridge(&ex); if( FAILED(hr) ) return hr; // check if the number given is a good one if ( ( nameID > ( i_limit -1 ) ) || ( nameID < 0 ) ) return E_FAIL; // get the good spuDesc for( i = 0 ; i < nameID ; i++ ) { p_spuDesc = p_spuDesc->p_next; } // get the subtitle name psz_name = p_spuDesc->psz_name; // return it if( psz_name != NULL ) { *name = BSTRFromCStr(CP_UTF8, psz_name); return (NULL == *name) ? E_OUTOFMEMORY : NOERROR; } *name = NULL; return E_FAIL; } return hr; }; /*******************************************************************************/ VLCVideo::~VLCVideo() { if( _p_typeinfo ) _p_typeinfo->Release(); }; HRESULT VLCVideo::loadTypeInfo(void) { HRESULT hr = NOERROR; if( NULL == _p_typeinfo ) { ITypeLib *p_typelib; hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib); if( SUCCEEDED(hr) ) { hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCVideo, &_p_typeinfo); if( FAILED(hr) ) { _p_typeinfo = NULL; } p_typelib->Release(); } } return hr; }; STDMETHODIMP VLCVideo::GetTypeInfoCount(UINT* pctInfo) { if( NULL == pctInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) *pctInfo = 1; else *pctInfo = 0; return NOERROR; }; STDMETHODIMP VLCVideo::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo) { if( NULL == ppTInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) { _p_typeinfo->AddRef(); *ppTInfo = _p_typeinfo; return NOERROR; } *ppTInfo = NULL; return E_NOTIMPL; }; STDMETHODIMP VLCVideo::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispID) { if( SUCCEEDED(loadTypeInfo()) ) { return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID); } return E_NOTIMPL; }; STDMETHODIMP VLCVideo::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr) { if( SUCCEEDED(loadTypeInfo()) ) { return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } return E_NOTIMPL; }; STDMETHODIMP VLCVideo::get_fullscreen(VARIANT_BOOL* fullscreen) { if( NULL == fullscreen ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *fullscreen = libvlc_get_fullscreen(p_md, &ex) ? VARIANT_TRUE : VARIANT_FALSE; hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCVideo::put_fullscreen(VARIANT_BOOL fullscreen) { libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_set_fullscreen(p_md, VARIANT_FALSE != fullscreen, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCVideo::get_width(long* width) { if( NULL == width ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *width = libvlc_video_get_width(p_md, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCVideo::get_height(long* height) { if( NULL == height ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *height = libvlc_video_get_height(p_md, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCVideo::get_aspectRatio(BSTR* aspect) { if( NULL == aspect ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); char *psz_aspect = libvlc_video_get_aspect_ratio(p_md, &ex); hr = exception_bridge(&ex); if( SUCCEEDED(hr) && NULL != psz_aspect ) { *aspect = BSTRFromCStr(CP_UTF8, psz_aspect); if( NULL == *aspect ) hr = E_OUTOFMEMORY; } else if( NULL == psz_aspect) hr = E_OUTOFMEMORY; // strdup("") failed free( psz_aspect ); } return hr; }; STDMETHODIMP VLCVideo::put_aspectRatio(BSTR aspect) { if( NULL == aspect ) return E_POINTER; if( 0 == SysStringLen(aspect) ) return E_INVALIDARG; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); char *psz_aspect = CStrFromBSTR(CP_UTF8, aspect); if( NULL == psz_aspect ) { return E_OUTOFMEMORY; } libvlc_video_set_aspect_ratio(p_md, psz_aspect, &ex); CoTaskMemFree(psz_aspect); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCVideo::get_subtitle(long* spu) { if( NULL == spu ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *spu = libvlc_video_get_spu(p_md, &ex); hr = exception_bridge(&ex); } return hr; };

hobbitten
Blank Cone
Blank Cone
Posts: 20
Joined: 02 Jun 2009 19:23

Re: vlccontrol2 make error

Postby hobbitten » 22 Jun 2009 17:39

vlccontrol2.cpp part2

Code: Select all

STDMETHODIMP VLCVideo::put_subtitle(long spu) { libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_video_set_spu(p_md, spu, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCVideo::get_crop(BSTR* geometry) { if( NULL == geometry ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); char *psz_geometry = libvlc_video_get_crop_geometry(p_md, &ex); hr = exception_bridge(&ex); if( SUCCEEDED(&ex) && NULL != psz_geometry ) { *geometry = BSTRFromCStr(CP_UTF8, psz_geometry); if( NULL == geometry ) hr = E_OUTOFMEMORY; } else if( NULL == psz_geometry ) hr = E_OUTOFMEMORY; free( psz_geometry ); } return hr; }; STDMETHODIMP VLCVideo::put_crop(BSTR geometry) { if( NULL == geometry ) return E_POINTER; if( 0 == SysStringLen(geometry) ) return E_INVALIDARG; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); char *psz_geometry = CStrFromBSTR(CP_UTF8, geometry); if( NULL == psz_geometry ) { return E_OUTOFMEMORY; } libvlc_video_set_crop_geometry(p_md, psz_geometry, &ex); CoTaskMemFree(psz_geometry); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCVideo::get_teletext(long* page) { if( NULL == page ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); *page = libvlc_video_get_teletext(p_md, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCVideo::put_teletext(long page) { libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_video_set_teletext(p_md, page, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCVideo::deinterlaceDisable() { libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_video_set_deinterlace(p_md, 0, "", &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCVideo::deinterlaceEnable(BSTR mode) { libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); /* get deinterlace mode from the user */ char *psz_mode = CStrFromBSTR(CP_UTF8, mode); /* enable deinterlace filter if possible */ libvlc_video_set_deinterlace(p_md, 1, psz_mode, &ex); hr = exception_bridge(&ex); CoTaskMemFree(psz_mode); } return hr; }; STDMETHODIMP VLCVideo::takeSnapshot(LPPICTUREDISP* picture) { if( NULL == picture ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); static int uniqueId = 0; TCHAR path[MAX_PATH+1]; int pathlen = GetTempPath(MAX_PATH-24, path); if( (0 == pathlen) || (pathlen > (MAX_PATH-24)) ) return E_FAIL; /* check temp directory path by openning it */ { HANDLE dirHandle = CreateFile(path, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); if( INVALID_HANDLE_VALUE == dirHandle ) { _p_instance->setErrorInfo(IID_IVLCVideo, "Invalid temporary directory for snapshot images, check values of TMP, TEMP envars."); return E_FAIL; } else { BY_HANDLE_FILE_INFORMATION bhfi; BOOL res = GetFileInformationByHandle(dirHandle, &bhfi); CloseHandle(dirHandle); if( !res || !(bhfi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) { _p_instance->setErrorInfo(IID_IVLCVideo, "Invalid temporary directory for snapshot images, check values of TMP, TEMP envars."); return E_FAIL; } } } TCHAR filepath[MAX_PATH+1]; _stprintf(filepath, TEXT("%sAXVLC%lXS%lX.bmp"), path, GetCurrentProcessId(), ++uniqueId); #ifdef _UNICODE /* reuse path storage for UTF8 string */ char *psz_filepath = (char *)path; WCHAR* wpath = filepath; #else char *psz_filepath = path; /* first convert to unicode using current code page */ WCHAR wpath[MAX_PATH+1]; if( 0 == MultiByteToWideChar(CP_ACP, 0, filepath, -1, wpath, sizeof(wpath)/sizeof(WCHAR)) ) return E_FAIL; #endif /* convert to UTF8 */ pathlen = WideCharToMultiByte(CP_UTF8, 0, wpath, -1, psz_filepath, sizeof(path), NULL, NULL); // fail if path is 0 or too short (i.e pathlen is the same as // storage size) if( (0 == pathlen) || (sizeof(path) == pathlen) ) return E_FAIL; /* take snapshot into file */ libvlc_video_take_snapshot(p_md, psz_filepath, 0, 0, &ex); hr = exception_bridge(&ex); if( SUCCEEDED(hr) ) { /* open snapshot file */ HANDLE snapPic = LoadImage(NULL, filepath, IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION|LR_LOADFROMFILE); if( snapPic ) { PICTDESC snapDesc; snapDesc.cbSizeofstruct = sizeof(PICTDESC); snapDesc.picType = PICTYPE_BITMAP; snapDesc.bmp.hbitmap = (HBITMAP)snapPic; snapDesc.bmp.hpal = NULL; hr = OleCreatePictureIndirect(&snapDesc, IID_IPictureDisp, TRUE, (LPVOID*)picture); if( FAILED(hr) ) { *picture = NULL; DeleteObject(snapPic); } } DeleteFile(filepath); } } return hr; }; STDMETHODIMP VLCVideo::toggleFullscreen() { libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_toggle_fullscreen(p_md, &ex); hr = exception_bridge(&ex); } return hr; }; STDMETHODIMP VLCVideo::toggleTeletext() { libvlc_media_player_t *p_md; HRESULT hr = _p_instance->getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_toggle_teletext(p_md, &ex); hr = exception_bridge(&ex); } return hr; }; /*******************************************************************************/ VLCControl2::VLCControl2(VLCPlugin *p_instance) : _p_instance(p_instance), _p_typeinfo(NULL), _p_vlcaudio(NULL), _p_vlcinput(NULL), _p_vlcplaylist(NULL), _p_vlcsubtitle(NULL), _p_vlcvideo(NULL) { _p_vlcaudio = new VLCAudio(p_instance); _p_vlcinput = new VLCInput(p_instance); _p_vlclog = new VLCLog(p_instance); _p_vlcplaylist = new VLCPlaylist(p_instance); _p_vlcsubtitle = new VLCSubtitle(p_instance); _p_vlcvideo = new VLCVideo(p_instance); }; VLCControl2::~VLCControl2() { delete _p_vlcvideo; delete _p_vlcsubtitle; delete _p_vlcplaylist; delete _p_vlclog; delete _p_vlcinput; delete _p_vlcaudio; if( _p_typeinfo ) _p_typeinfo->Release(); }; HRESULT VLCControl2::loadTypeInfo(void) { HRESULT hr = NOERROR; if( NULL == _p_typeinfo ) { ITypeLib *p_typelib; hr = _p_instance->getTypeLib(LOCALE_USER_DEFAULT, &p_typelib); if( SUCCEEDED(hr) ) { hr = p_typelib->GetTypeInfoOfGuid(IID_IVLCControl2, &_p_typeinfo); if( FAILED(hr) ) { _p_typeinfo = NULL; } p_typelib->Release(); } } return hr; }; STDMETHODIMP VLCControl2::GetTypeInfoCount(UINT* pctInfo) { if( NULL == pctInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) *pctInfo = 1; else *pctInfo = 0; return NOERROR; }; STDMETHODIMP VLCControl2::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo) { if( NULL == ppTInfo ) return E_INVALIDARG; if( SUCCEEDED(loadTypeInfo()) ) { _p_typeinfo->AddRef(); *ppTInfo = _p_typeinfo; return NOERROR; } *ppTInfo = NULL; return E_NOTIMPL; }; STDMETHODIMP VLCControl2::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispID) { if( SUCCEEDED(loadTypeInfo()) ) { return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID); } return E_NOTIMPL; }; STDMETHODIMP VLCControl2::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr) { if( SUCCEEDED(loadTypeInfo()) ) { return DispInvoke(this, _p_typeinfo, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } return E_NOTIMPL; }; STDMETHODIMP VLCControl2::get_AutoLoop(VARIANT_BOOL *autoloop) { if( NULL == autoloop ) return E_POINTER; *autoloop = _p_instance->getAutoLoop() ? VARIANT_TRUE: VARIANT_FALSE; return S_OK; }; STDMETHODIMP VLCControl2::put_AutoLoop(VARIANT_BOOL autoloop) { _p_instance->setAutoLoop((VARIANT_FALSE != autoloop) ? TRUE: FALSE); return S_OK; }; STDMETHODIMP VLCControl2::get_AutoPlay(VARIANT_BOOL *autoplay) { if( NULL == autoplay ) return E_POINTER; *autoplay = _p_instance->getAutoPlay() ? VARIANT_TRUE: VARIANT_FALSE; return S_OK; }; STDMETHODIMP VLCControl2::put_AutoPlay(VARIANT_BOOL autoplay) { _p_instance->setAutoPlay((VARIANT_FALSE != autoplay) ? TRUE: FALSE); return S_OK; }; STDMETHODIMP VLCControl2::get_BaseURL(BSTR *url) { if( NULL == url ) return E_POINTER; *url = SysAllocStringLen(_p_instance->getBaseURL(), SysStringLen(_p_instance->getBaseURL())); return NOERROR; }; STDMETHODIMP VLCControl2::put_BaseURL(BSTR mrl) { _p_instance->setBaseURL(mrl); return S_OK; }; STDMETHODIMP VLCControl2::get_MRL(BSTR *mrl) { if( NULL == mrl ) return E_POINTER; *mrl = SysAllocStringLen(_p_instance->getMRL(), SysStringLen(_p_instance->getMRL())); return NOERROR; }; STDMETHODIMP VLCControl2::put_MRL(BSTR mrl) { _p_instance->setMRL(mrl); return S_OK; }; STDMETHODIMP VLCControl2::get_Toolbar(VARIANT_BOOL *visible) { if( NULL == visible ) return E_POINTER; /* * Note to developpers * * Returning the _b_toolbar is closer to the method specification. * But returning True when toolbar is not implemented so not displayed * could be bad for ActiveX users which rely on this value to show their * own toolbar if not provided by the ActiveX. * * This is the reason why FALSE is returned, until toolbar get implemented. */ /* DISABLED for now */ // *visible = _p_instance->getShowToolbar() ? VARIANT_TRUE: VARIANT_FALSE; *visible = VARIANT_FALSE; return S_OK; }; STDMETHODIMP VLCControl2::put_Toolbar(VARIANT_BOOL visible) { _p_instance->setShowToolbar((VARIANT_FALSE != visible) ? TRUE: FALSE); return S_OK; }; STDMETHODIMP VLCControl2::get_StartTime(long *seconds) { if( NULL == seconds ) return E_POINTER; *seconds = _p_instance->getStartTime(); return S_OK; }; STDMETHODIMP VLCControl2::put_StartTime(long seconds) { _p_instance->setStartTime(seconds); return NOERROR; }; STDMETHODIMP VLCControl2::get_VersionInfo(BSTR *version) { if( NULL == version ) return E_POINTER; const char *versionStr = libvlc_get_version(); if( NULL != versionStr ) { *version = BSTRFromCStr(CP_UTF8, versionStr); return (NULL == *version) ? E_OUTOFMEMORY : NOERROR; } *version = NULL; return E_FAIL; }; STDMETHODIMP VLCControl2::get_Visible(VARIANT_BOOL *isVisible) { if( NULL == isVisible ) return E_POINTER; *isVisible = _p_instance->getVisible() ? VARIANT_TRUE : VARIANT_FALSE; return NOERROR; }; STDMETHODIMP VLCControl2::put_Visible(VARIANT_BOOL isVisible) { _p_instance->setVisible(isVisible != VARIANT_FALSE); return NOERROR; }; STDMETHODIMP VLCControl2::get_Volume(long *volume) { if( NULL == volume ) return E_POINTER; *volume = _p_instance->getVolume(); return NOERROR; }; STDMETHODIMP VLCControl2::put_Volume(long volume) { _p_instance->setVolume(volume); return NOERROR; }; STDMETHODIMP VLCControl2::get_BackColor(OLE_COLOR *backcolor) { if( NULL == backcolor ) return E_POINTER; *backcolor = _p_instance->getBackColor(); return NOERROR; }; STDMETHODIMP VLCControl2::put_BackColor(OLE_COLOR backcolor) { _p_instance->setBackColor(backcolor); return NOERROR; }; STDMETHODIMP VLCControl2::get_audio(IVLCAudio** obj) { if( NULL == obj ) return E_POINTER; *obj = _p_vlcaudio; if( NULL != _p_vlcaudio ) { _p_vlcaudio->AddRef(); return NOERROR; } return E_OUTOFMEMORY; }; STDMETHODIMP VLCControl2::get_input(IVLCInput** obj) { if( NULL == obj ) return E_POINTER; *obj = _p_vlcinput; if( NULL != _p_vlcinput ) { _p_vlcinput->AddRef(); return NOERROR; } return E_OUTOFMEMORY; }; STDMETHODIMP VLCControl2::get_log(IVLCLog** obj) { if( NULL == obj ) return E_POINTER; *obj = _p_vlclog; if( NULL != _p_vlclog ) { _p_vlclog->AddRef(); return NOERROR; } return E_OUTOFMEMORY; }; STDMETHODIMP VLCControl2::get_playlist(IVLCPlaylist** obj) { if( NULL == obj ) return E_POINTER; *obj = _p_vlcplaylist; if( NULL != _p_vlcplaylist ) { _p_vlcplaylist->AddRef(); return NOERROR; } return E_OUTOFMEMORY; }; STDMETHODIMP VLCControl2::get_subtitle(IVLCSubtitle** obj) { if( NULL == obj ) return E_POINTER; *obj = _p_vlcsubtitle; if( NULL != _p_vlcsubtitle ) { _p_vlcsubtitle->AddRef(); return NOERROR; } return E_OUTOFMEMORY; }; STDMETHODIMP VLCControl2::get_video(IVLCVideo** obj) { if( NULL == obj ) return E_POINTER; *obj = _p_vlcvideo; if( NULL != _p_vlcvideo ) { _p_vlcvideo->AddRef(); return NOERROR; } return E_OUTOFMEMORY; };
vlccontrol2.h

Code: Select all

/***************************************************************************** * vlccontrol.h: ActiveX control for VLC ***************************************************************************** * Copyright (C) 2006 the VideoLAN team * * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net> * Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ #ifndef _VLCCONTROL2_H_ #define _VLCCONTROL2_H_ #include "axvlc_idl.h" #include <vlc/libvlc.h> class VLCAudio : public IVLCAudio { public: VLCAudio(VLCPlugin *p_instance) : _p_instance(p_instance), _p_typeinfo(NULL) {}; virtual ~VLCAudio(); // IUnknown methods STDMETHODIMP QueryInterface(REFIID riid, void **ppv) { if( NULL == ppv ) return E_POINTER; if( (IID_IUnknown == riid) || (IID_IDispatch == riid) || (IID_IVLCAudio == riid) ) { AddRef(); *ppv = reinterpret_cast<LPVOID>(this); return NOERROR; } // behaves as a standalone object return E_NOINTERFACE; }; STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); }; STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); }; // IDispatch methods STDMETHODIMP GetTypeInfoCount(UINT*); STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*); STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*); STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*); // IVLCAudio methods STDMETHODIMP get_mute(VARIANT_BOOL*); STDMETHODIMP put_mute(VARIANT_BOOL); STDMETHODIMP get_volume(long*); STDMETHODIMP put_volume(long); STDMETHODIMP get_track(long*); STDMETHODIMP put_track(long); STDMETHODIMP get_count(long*); STDMETHODIMP get_channel(long*); STDMETHODIMP put_channel(long); STDMETHODIMP toggleMute(); STDMETHODIMP description(long, BSTR*); protected: HRESULT loadTypeInfo(); HRESULT exception_bridge(libvlc_exception_t *ex); private: VLCPlugin* _p_instance; ITypeInfo* _p_typeinfo; }; class VLCInput : public IVLCInput { public: VLCInput(VLCPlugin *p_instance) : _p_instance(p_instance), _p_typeinfo(NULL) {}; virtual ~VLCInput(); // IUnknown methods STDMETHODIMP QueryInterface(REFIID riid, void **ppv) { if( NULL == ppv ) return E_POINTER; if( (IID_IUnknown == riid) || (IID_IDispatch == riid) || (IID_IVLCInput == riid) ) { AddRef(); *ppv = reinterpret_cast<LPVOID>(this); return NOERROR; } // behaves as a standalone object return E_NOINTERFACE; }; STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); }; STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); }; // IDispatch methods STDMETHODIMP GetTypeInfoCount(UINT*); STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*); STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*); STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*); // IVLCInput methods STDMETHODIMP get_length(double*); STDMETHODIMP get_position(double*); STDMETHODIMP put_position(double); STDMETHODIMP get_time(double*); STDMETHODIMP put_time(double); STDMETHODIMP get_state(long*); STDMETHODIMP get_rate(double*); STDMETHODIMP put_rate(double); STDMETHODIMP get_fps(double*); STDMETHODIMP get_hasVout(VARIANT_BOOL*); protected: HRESULT loadTypeInfo(); HRESULT exception_bridge(libvlc_exception_t *ex); private: VLCPlugin* _p_instance; ITypeInfo* _p_typeinfo; }; class VLCMessage: public IVLCMessage { public: VLCMessage(VLCPlugin *p_instance, struct libvlc_log_message_t &msg) : _p_instance(p_instance), _p_typeinfo(NULL), _refcount(1), _msg(msg) {}; virtual ~VLCMessage(); // IUnknown methods STDMETHODIMP QueryInterface(REFIID riid, void **ppv) { if( NULL == ppv ) return E_POINTER; if( (IID_IUnknown == riid) || (IID_IDispatch == riid) || (IID_IVLCMessage == riid) ) { AddRef(); *ppv = reinterpret_cast<LPVOID>(this); return NOERROR; } // behaves as a standalone object return E_NOINTERFACE; }; STDMETHODIMP_(ULONG) AddRef(void) { return InterlockedIncrement(&_refcount); }; STDMETHODIMP_(ULONG) Release(void) { ULONG refcount = InterlockedDecrement(&_refcount); if( 0 == refcount ) { delete this; return 0; } return refcount; }; // IDispatch methods STDMETHODIMP GetTypeInfoCount(UINT*); STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*); STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*); STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*); // IVLCMessage methods STDMETHODIMP get__Value(VARIANT *); STDMETHODIMP get_severity(long *); STDMETHODIMP get_type(BSTR *); STDMETHODIMP get_name(BSTR *); STDMETHODIMP get_header(BSTR *); STDMETHODIMP get_message(BSTR *); protected: HRESULT loadTypeInfo(); private: VLCPlugin* _p_instance; ITypeInfo* _p_typeinfo; LONG _refcount; struct libvlc_log_message_t _msg; }; class VLCLog; class VLCMessageIterator : public IVLCMessageIterator { public: VLCMessageIterator(VLCPlugin *p_instance, VLCLog* p_vlclog); virtual ~VLCMessageIterator(); // IUnknown methods STDMETHODIMP QueryInterface(REFIID riid, void **ppv) { if( NULL == ppv ) return E_POINTER; if( (IID_IUnknown == riid) || (IID_IDispatch == riid) || (IID_IVLCMessageIterator == riid) ) { AddRef(); *ppv = reinterpret_cast<LPVOID>(this); return NOERROR; } // behaves as a standalone object return E_NOINTERFACE; }; STDMETHODIMP_(ULONG) AddRef(void) { return InterlockedIncrement(&_refcount); }; STDMETHODIMP_(ULONG) Release(void) { ULONG refcount = InterlockedDecrement(&_refcount); if( 0 == refcount ) { delete this; return 0; } return refcount; }; // IDispatch methods STDMETHODIMP GetTypeInfoCount(UINT*); STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*); STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*); STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*); // IVLCMessageIterator methods STDMETHODIMP get_hasNext(VARIANT_BOOL*); STDMETHODIMP next(IVLCMessage**); protected: HRESULT loadTypeInfo(); HRESULT exception_bridge(libvlc_exception_t *ex); private: VLCPlugin* _p_instance; ITypeInfo* _p_typeinfo; LONG _refcount; VLCLog* _p_vlclog; libvlc_log_iterator_t* _p_iter; }; class VLCMessages : public IVLCMessages { public: VLCMessages(VLCPlugin *p_instance, VLCLog *p_vlclog) : _p_vlclog(p_vlclog), _p_instance(p_instance), _p_typeinfo(NULL) {} virtual ~VLCMessages(); // IUnknown methods STDMETHODIMP QueryInterface(REFIID riid, void **ppv) { if( NULL == ppv ) return E_POINTER; if( (IID_IUnknown == riid) || (IID_IDispatch == riid) || (IID_IVLCMessages == riid) ) { AddRef(); *ppv = reinterpret_cast<LPVOID>(this); return NOERROR; } // behaves as a standalone object return E_NOINTERFACE; }; STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); }; STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); }; // IDispatch methods STDMETHODIMP GetTypeInfoCount(UINT*); STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*); STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*); STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*); // IVLCMessages methods STDMETHODIMP get__NewEnum(LPUNKNOWN*); STDMETHODIMP clear(); STDMETHODIMP get_count(long*); STDMETHODIMP iterator(IVLCMessageIterator**); protected: HRESULT loadTypeInfo(); HRESULT exception_bridge(libvlc_exception_t *ex); VLCLog* _p_vlclog; private: VLCPlugin* _p_instance; ITypeInfo* _p_typeinfo; }; class VLCLog : public IVLCLog { public: friend class VLCMessages; friend class VLCMessageIterator; VLCLog(VLCPlugin *p_instance) : _p_log(NULL), _p_instance(p_instance), _p_typeinfo(NULL), _p_vlcmessages(NULL) { _p_vlcmessages = new VLCMessages(p_instance, this); }; virtual ~VLCLog(); // IUnknown methods STDMETHODIMP QueryInterface(REFIID riid, void **ppv) { if( NULL == ppv ) return E_POINTER; if( (IID_IUnknown == riid) || (IID_IDispatch == riid) || (IID_IVLCLog == riid) ) { AddRef(); *ppv = reinterpret_cast<LPVOID>(this); return NOERROR; } // behaves as a standalone object return E_NOINTERFACE; }; STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); }; STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); }; // IDispatch methods STDMETHODIMP GetTypeInfoCount(UINT*); STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*); STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*); STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*); // IVLCLog methods STDMETHODIMP get_messages(IVLCMessages**); STDMETHODIMP get_verbosity(long *); STDMETHODIMP put_verbosity(long); protected: HRESULT loadTypeInfo(); HRESULT exception_bridge(libvlc_exception_t *ex); libvlc_log_t *_p_log; private: VLCPlugin* _p_instance; ITypeInfo* _p_typeinfo; VLCMessages* _p_vlcmessages; }; class VLCPlaylistItems : public IVLCPlaylistItems { public: VLCPlaylistItems(VLCPlugin *p_instance) : _p_instance(p_instance), _p_typeinfo(NULL) {}; virtual ~VLCPlaylistItems(); // IUnknown methods STDMETHODIMP QueryInterface(REFIID riid, void **ppv) { if( NULL == ppv ) return E_POINTER; if( (IID_IUnknown == riid) || (IID_IDispatch == riid) || (IID_IVLCPlaylistItems == riid) ) { AddRef(); *ppv = reinterpret_cast<LPVOID>(this); return NOERROR; } // behaves as a standalone object return E_NOINTERFACE; }; STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); }; STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); }; // IDispatch methods STDMETHODIMP GetTypeInfoCount(UINT*); STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*); STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*); STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*); // IVLCPlaylistItems methods STDMETHODIMP get_count(long*); STDMETHODIMP clear(); STDMETHODIMP remove(long); protected: HRESULT loadTypeInfo(); HRESULT exception_bridge(libvlc_exception_t *ex); private: VLCPlugin* _p_instance; ITypeInfo* _p_typeinfo; }; class VLCPlaylist : public IVLCPlaylist { public: VLCPlaylist(VLCPlugin *p_instance) : _p_instance(p_instance), _p_typeinfo(NULL), _p_vlcplaylistitems(NULL) { _p_vlcplaylistitems = new VLCPlaylistItems(p_instance); }; virtual ~VLCPlaylist(); // IUnknown methods STDMETHODIMP QueryInterface(REFIID riid, void **ppv) { if( NULL == ppv ) return E_POINTER; if( (IID_IUnknown == riid) || (IID_IDispatch == riid) || (IID_IVLCPlaylist == riid) ) { AddRef(); *ppv = reinterpret_cast<LPVOID>(this); return NOERROR; } // behaves as a standalone object return E_NOINTERFACE; }; STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); }; STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); }; // IDispatch methods STDMETHODIMP GetTypeInfoCount(UINT*); STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*); STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*); STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*); // IVLCPlaylist methods STDMETHODIMP get_itemCount(long*); STDMETHODIMP get_isPlaying(VARIANT_BOOL*); STDMETHODIMP add(BSTR, VARIANT, VARIANT, long*); STDMETHODIMP play(); STDMETHODIMP playItem(long); STDMETHODIMP togglePause(); STDMETHODIMP stop(); STDMETHODIMP next(); STDMETHODIMP prev(); STDMETHODIMP clear(); STDMETHODIMP removeItem(long); STDMETHODIMP get_items(IVLCPlaylistItems**); protected: HRESULT loadTypeInfo(); HRESULT exception_bridge(libvlc_exception_t *ex); private: VLCPlugin* _p_instance; ITypeInfo* _p_typeinfo; VLCPlaylistItems* _p_vlcplaylistitems; }; class VLCSubtitle : public IVLCSubtitle { public: VLCSubtitle(VLCPlugin *p_instance) : _p_instance(p_instance), _p_typeinfo(NULL) {}; virtual ~VLCSubtitle(); // IUnknown methods STDMETHODIMP QueryInterface(REFIID riid, void **ppv) { if( NULL == ppv ) return E_POINTER; if( (IID_IUnknown == riid) || (IID_IDispatch == riid) || (IID_IVLCSubtitle == riid) ) { AddRef(); *ppv = reinterpret_cast<LPVOID>(this); return NOERROR; } // behaves as a standalone object return E_NOINTERFACE; }; STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); }; STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); }; // IDispatch methods STDMETHODIMP GetTypeInfoCount(UINT*); STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*); STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*); STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*); // IVLCSubtitle methods STDMETHODIMP get_track(long*); STDMETHODIMP put_track(long); STDMETHODIMP get_count(long*); STDMETHODIMP description(long, BSTR*); protected: HRESULT loadTypeInfo(); HRESULT exception_bridge(libvlc_exception_t *ex); private: VLCPlugin* _p_instance; ITypeInfo* _p_typeinfo; }; class VLCVideo : public IVLCVideo { public: VLCVideo(VLCPlugin *p_instance) : _p_instance(p_instance), _p_typeinfo(NULL) {}; virtual ~VLCVideo(); // IUnknown methods STDMETHODIMP QueryInterface(REFIID riid, void **ppv) { if( NULL == ppv ) return E_POINTER; if( (IID_IUnknown == riid) || (IID_IDispatch == riid) || (IID_IVLCVideo == riid) ) { AddRef(); *ppv = reinterpret_cast<LPVOID>(this); return NOERROR; } // behaves as a standalone object return E_NOINTERFACE; }; STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); }; STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); }; // IDispatch methods STDMETHODIMP GetTypeInfoCount(UINT*); STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*); STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*); STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*); // IVLCVideo methods STDMETHODIMP get_fullscreen(VARIANT_BOOL*); STDMETHODIMP put_fullscreen(VARIANT_BOOL); STDMETHODIMP get_width(long*); STDMETHODIMP get_height(long*); STDMETHODIMP get_aspectRatio(BSTR*); STDMETHODIMP put_aspectRatio(BSTR); STDMETHODIMP get_subtitle(long*); STDMETHODIMP put_subtitle(long); STDMETHODIMP get_crop(BSTR*); STDMETHODIMP put_crop(BSTR); STDMETHODIMP get_teletext(long*); STDMETHODIMP put_teletext(long); STDMETHODIMP deinterlaceDisable(); STDMETHODIMP deinterlaceEnable(BSTR); STDMETHODIMP takeSnapshot(LPPICTUREDISP*); STDMETHODIMP toggleFullscreen(); STDMETHODIMP toggleTeletext(); protected: HRESULT loadTypeInfo(); HRESULT exception_bridge(libvlc_exception_t *ex); private: VLCPlugin* _p_instance; ITypeInfo* _p_typeinfo; }; class VLCControl2 : public IVLCControl2 { public: VLCControl2(VLCPlugin *p_instance); virtual ~VLCControl2(); // IUnknown methods STDMETHODIMP QueryInterface(REFIID riid, void **ppv) { if( NULL == ppv ) return E_POINTER; if( (IID_IUnknown == riid) || (IID_IDispatch == riid) || (IID_IVLCControl2 == riid) ) { AddRef(); *ppv = reinterpret_cast<LPVOID>(this); return NOERROR; } return _p_instance->pUnkOuter->QueryInterface(riid, ppv); }; STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); }; STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); }; // IDispatch methods STDMETHODIMP GetTypeInfoCount(UINT*); STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*); STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*); STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*); // IVLCControl2 methods STDMETHODIMP get_AutoLoop(VARIANT_BOOL *autoloop); STDMETHODIMP put_AutoLoop(VARIANT_BOOL autoloop); STDMETHODIMP get_AutoPlay(VARIANT_BOOL *autoplay); STDMETHODIMP put_AutoPlay(VARIANT_BOOL autoplay); STDMETHODIMP get_BaseURL(BSTR *url); STDMETHODIMP put_BaseURL(BSTR url); STDMETHODIMP get_MRL(BSTR *mrl); STDMETHODIMP put_MRL(BSTR mrl); STDMETHODIMP get_Toolbar(VARIANT_BOOL *visible); STDMETHODIMP put_Toolbar(VARIANT_BOOL visible); STDMETHODIMP get_StartTime(long *seconds); STDMETHODIMP put_StartTime(long seconds); STDMETHODIMP get_VersionInfo(BSTR *version); STDMETHODIMP get_Visible(VARIANT_BOOL *visible); STDMETHODIMP put_Visible(VARIANT_BOOL visible); STDMETHODIMP get_Volume(long *volume); STDMETHODIMP put_Volume(long volume); STDMETHODIMP get_BackColor(OLE_COLOR *backcolor); STDMETHODIMP put_BackColor(OLE_COLOR backcolor); STDMETHODIMP get_audio(IVLCAudio**); STDMETHODIMP get_input(IVLCInput**); STDMETHODIMP get_log(IVLCLog**); STDMETHODIMP get_playlist(IVLCPlaylist**); STDMETHODIMP get_subtitle(IVLCSubtitle**); STDMETHODIMP get_video(IVLCVideo**); protected: HRESULT loadTypeInfo(); private: VLCPlugin* _p_instance; ITypeInfo* _p_typeinfo; VLCAudio* _p_vlcaudio; VLCInput* _p_vlcinput; VLCLog * _p_vlclog; VLCPlaylist* _p_vlcplaylist; VLCSubtitle* _p_vlcsubtitle; VLCVideo* _p_vlcvideo; }; #endif

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: vlccontrol2 make error

Postby VLC_help » 22 Jun 2009 22:38

IID_IVLCSubtitle should be defined in axvlc_idl.c and IVLCSubtitle in axvlc_idl.h, I haven't done msys builds so I don't know if this is msys related issue or does it bother all platform. (my Cygwin environment is broken ATM so I cannot test it)

hobbitten
Blank Cone
Blank Cone
Posts: 20
Joined: 02 Jun 2009 19:23

Re: vlccontrol2 make error

Postby hobbitten » 23 Jun 2009 00:42

Two part message again, due to 60000 limit.

I noticed this after your comment about axvlc:

viewtopic.php?f=32&t=60738

I added the the following :

Code: Select all

#ifndef __IVLCSubtitle_FWD_DEFINED__ #define __IVLCSubtitle_FWD_DEFINED__ typedef interface IVLCSubtitle IVLCSubtitle; #endif
and

Code: Select all

MIDL_DEFINE_GUID(IID, IID_IVLCSubtitle,0x465e787a,0x0556,0x452f,0x94,0x77,0x95,0x4e,0x4a,0x94,0x00,0x03);
New axvlc.c

Code: Select all

/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */ /* link this file in with the server and any clients */ /* File created by MIDL compiler version 7.00.0500 */ /* at Fri Apr 25 11:37:37 2008 */ /* Compiler settings for axvlc.idl: Oicf, W1, Zp8, env=Win32 (32b run) protocol : dce , ms_ext, c_ext, robust error checks: allocation ref bounds_check enum stub_data VC __declspec() decoration level: __declspec(uuid()), __declspec(selectany), __declspec(novtable) DECLSPEC_UUID(), MIDL_INTERFACE() */ //@@MIDL_FILE_HEADING( ) #pragma warning( disable: 4049 ) /* more than 64k source lines */ #ifdef __cplusplus extern "C"{ #endif #include <rpc.h> #include <rpcndr.h> #ifdef _MIDL_USE_GUIDDEF_ #ifndef INITGUID #define INITGUID #include <guiddef.h> #undef INITGUID #else #include <guiddef.h> #endif #define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) #else // !_MIDL_USE_GUIDDEF_ #ifndef __IID_DEFINED__ #define __IID_DEFINED__ typedef struct _IID { unsigned long x; unsigned short s1; unsigned short s2; unsigned char c[8]; } IID; #endif // __IID_DEFINED__ #ifndef CLSID_DEFINED #define CLSID_DEFINED typedef IID CLSID; #endif // CLSID_DEFINED #define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} #endif !_MIDL_USE_GUIDDEF_ MIDL_DEFINE_GUID(IID, LIBID_AXVLC,0xDF2BBE39,0x40A8,0x433b,0xA2,0x79,0x07,0x3F,0x48,0xDA,0x94,0xB6); MIDL_DEFINE_GUID(IID, IID_IVLCControl,0xC2FA41D0,0xB113,0x476e,0xAC,0x8C,0x9B,0xD1,0x49,0x99,0xC1,0xC1); MIDL_DEFINE_GUID(IID, IID_IVLCAudio,0x9E0BD17B,0x2D3C,0x4656,0xB9,0x4D,0x03,0x08,0x4F,0x3F,0xD9,0xD4); MIDL_DEFINE_GUID(IID, IID_IVLCInput,0x49E0DBD1,0x9440,0x466C,0x9C,0x97,0x95,0xC6,0x71,0x90,0xC6,0x03); MIDL_DEFINE_GUID(IID, IID_IVLCLog,0x8E3BC3D9,0x62E9,0x48FB,0x8A,0x6D,0x99,0x3F,0x9A,0xBC,0x4A,0x0A); MIDL_DEFINE_GUID(IID, IID_IVLCMessage,0x9ED00AFA,0x7BCD,0x4FFF,0x8D,0x48,0x7D,0xD4,0xDB,0x2C,0x80,0x0D); MIDL_DEFINE_GUID(IID, IID_IVLCMessageIterator,0x15179CD8,0xCC12,0x4242,0xA5,0x8E,0xE4,0x12,0x21,0x7F,0xF3,0x43); MIDL_DEFINE_GUID(IID, IID_IVLCMessages,0x6C5CE55D,0x2D6C,0x4AAD,0x82,0x99,0xC6,0x2D,0x23,0x71,0xF1,0x06); MIDL_DEFINE_GUID(IID, IID_IVLCPlaylist,0x54613049,0x40BF,0x4035,0x9E,0x70,0x0A,0x93,0x12,0xC0,0x18,0x8D); MIDL_DEFINE_GUID(IID, IID_IVLCSubtitle,0x465e787a,0x0556,0x452f,0x94,0x77,0x95,0x4e,0x4a,0x94,0x00,0x03); MIDL_DEFINE_GUID(IID, IID_IVLCVideo,0x0AAEDF0B,0xD333,0x4B27,0xA0,0xC6,0xBB,0xF3,0x14,0x13,0xA4,0x2E); MIDL_DEFINE_GUID(IID, IID_IVLCControl2,0x2D719729,0x5333,0x406C,0xBF,0x12,0x8D,0xE7,0x87,0xFD,0x65,0xE3); MIDL_DEFINE_GUID(IID, DIID_DVLCEvents,0xDF48072F,0x5EF8,0x434e,0x9B,0x40,0xE2,0xF3,0xAE,0x75,0x9B,0x5F); MIDL_DEFINE_GUID(IID, IID_IVLCPlaylistItems,0xFD37FE32,0x82BC,0x4A25,0xB0,0x56,0x31,0x5F,0x4D,0xBB,0x19,0x4D); MIDL_DEFINE_GUID(CLSID, CLSID_VLCPlugin,0xE23FE9C6,0x778E,0x49D4,0xB5,0x37,0x38,0xFC,0xDE,0x48,0x87,0xD8); MIDL_DEFINE_GUID(CLSID, CLSID_VLCPlugin2,0x9BE31822,0xFDAD,0x461B,0xAD,0x51,0xBE,0x1D,0x1C,0x15,0x99,0x21); #undef MIDL_DEFINE_GUID #ifdef __cplusplus } #endif
New axvlx.h part1

Code: Select all

/* this ALWAYS GENERATED file contains the definitions for the interfaces */ /* File created by MIDL compiler version 7.00.0500 */ /* at Fri Apr 25 11:37:37 2008 */ /* Compiler settings for axvlc.idl: Oicf, W1, Zp8, env=Win32 (32b run) protocol : dce , ms_ext, c_ext, robust error checks: allocation ref bounds_check enum stub_data VC __declspec() decoration level: __declspec(uuid()), __declspec(selectany), __declspec(novtable) DECLSPEC_UUID(), MIDL_INTERFACE() */ //@@MIDL_FILE_HEADING( ) #pragma warning( disable: 4049 ) /* more than 64k source lines */ /* verify that the <rpcndr.h> version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 #endif #include "rpc.h" #include "rpcndr.h" #ifndef __RPCNDR_H_VERSION__ #error this stub requires an updated version of <rpcndr.h> #endif // __RPCNDR_H_VERSION__ #ifndef __axvlc_idl_h__ #define __axvlc_idl_h__ #if defined(_MSC_VER) && (_MSC_VER >= 1020) #pragma once #endif /* Forward Declarations */ #ifndef __IVLCControl_FWD_DEFINED__ #define __IVLCControl_FWD_DEFINED__ typedef interface IVLCControl IVLCControl; #endif /* __IVLCControl_FWD_DEFINED__ */ #ifndef __IVLCAudio_FWD_DEFINED__ #define __IVLCAudio_FWD_DEFINED__ typedef interface IVLCAudio IVLCAudio; #endif /* __IVLCAudio_FWD_DEFINED__ */ #ifndef __IVLCInput_FWD_DEFINED__ #define __IVLCInput_FWD_DEFINED__ typedef interface IVLCInput IVLCInput; #endif /* __IVLCInput_FWD_DEFINED__ */ #ifndef __IVLCLog_FWD_DEFINED__ #define __IVLCLog_FWD_DEFINED__ typedef interface IVLCLog IVLCLog; #endif /* __IVLCLog_FWD_DEFINED__ */ #ifndef __IVLCMessage_FWD_DEFINED__ #define __IVLCMessage_FWD_DEFINED__ typedef interface IVLCMessage IVLCMessage; #endif /* __IVLCMessage_FWD_DEFINED__ */ #ifndef __IVLCMessageIterator_FWD_DEFINED__ #define __IVLCMessageIterator_FWD_DEFINED__ typedef interface IVLCMessageIterator IVLCMessageIterator; #endif /* __IVLCMessageIterator_FWD_DEFINED__ */ #ifndef __IVLCMessages_FWD_DEFINED__ #define __IVLCMessages_FWD_DEFINED__ typedef interface IVLCMessages IVLCMessages; #endif /* __IVLCMessages_FWD_DEFINED__ */ #ifndef __IVLCPlaylist_FWD_DEFINED__ #define __IVLCPlaylist_FWD_DEFINED__ typedef interface IVLCPlaylist IVLCPlaylist; #endif /* __IVLCPlaylist_FWD_DEFINED__ */ #ifndef __IVLCSubtitle_FWD_DEFINED__ #define __IVLCSubtitle_FWD_DEFINED__ typedef interface IVLCSubtitle IVLCSubtitle; #endif #ifndef __IVLCVideo_FWD_DEFINED__ #define __IVLCVideo_FWD_DEFINED__ typedef interface IVLCVideo IVLCVideo; #endif /* __IVLCVideo_FWD_DEFINED__ */ #ifndef __IVLCControl2_FWD_DEFINED__ #define __IVLCControl2_FWD_DEFINED__ typedef interface IVLCControl2 IVLCControl2; #endif /* __IVLCControl2_FWD_DEFINED__ */ #ifndef __DVLCEvents_FWD_DEFINED__ #define __DVLCEvents_FWD_DEFINED__ typedef interface DVLCEvents DVLCEvents; #endif /* __DVLCEvents_FWD_DEFINED__ */ #ifndef __IVLCPlaylistItems_FWD_DEFINED__ #define __IVLCPlaylistItems_FWD_DEFINED__ typedef interface IVLCPlaylistItems IVLCPlaylistItems; #endif /* __IVLCPlaylistItems_FWD_DEFINED__ */ #ifndef __VLCPlugin_FWD_DEFINED__ #define __VLCPlugin_FWD_DEFINED__ #ifdef __cplusplus typedef class VLCPlugin VLCPlugin; #else typedef struct VLCPlugin VLCPlugin; #endif /* __cplusplus */ #endif /* __VLCPlugin_FWD_DEFINED__ */ #ifndef __VLCPlugin2_FWD_DEFINED__ #define __VLCPlugin2_FWD_DEFINED__ #ifdef __cplusplus typedef class VLCPlugin2 VLCPlugin2; #else typedef struct VLCPlugin2 VLCPlugin2; #endif /* __cplusplus */ #endif /* __VLCPlugin2_FWD_DEFINED__ */ /* header files for imported files */ #include "ocidl.h" #ifdef __cplusplus extern "C"{ #endif #ifndef __AXVLC_LIBRARY_DEFINED__ #define __AXVLC_LIBRARY_DEFINED__ /* library AXVLC */ /* [helpstring][version][uuid] */ typedef /* [public] */ enum VLCPlaylistMode { VLCPlayListInsert = 1, VLCPlayListInsertAndGo = 9, VLCPlayListReplace = 2, VLCPlayListReplaceAndGo = 10, VLCPlayListAppend = 4, VLCPlayListAppendAndGo = 12, VLCPlayListCheckInsert = 16 } eVLCPlaylistMode; #define VLCPlayListEnd ( -666 ) #define DISPID_BackColor ( -501 ) #define DISPID_Visible ( 100 ) #define DISPID_Playing ( 101 ) #define DISPID_Position ( 102 ) #define DISPID_Time ( 103 ) #define DISPID_Length ( 104 ) #define DISPID_Volume ( 105 ) #define DISPID_MRL ( 106 ) #define DISPID_AutoPlay ( 107 ) #define DISPID_AutoLoop ( 108 ) #define DISPID_StartTime ( 109 ) #define DISPID_BaseURL ( 110 ) #define DISPID_Toolbar ( 111 ) #define DISPID_PlayEvent ( 100 ) #define DISPID_PauseEvent ( 101 ) #define DISPID_StopEvent ( 102 ) EXTERN_C const IID LIBID_AXVLC; #ifndef __IVLCControl_INTERFACE_DEFINED__ #define __IVLCControl_INTERFACE_DEFINED__ /* interface IVLCControl */ /* [object][oleautomation][dual][helpstring][uuid] */ EXTERN_C const IID IID_IVLCControl; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("C2FA41D0-B113-476e-AC8C-9BD14999C1C1") IVLCControl : public IDispatch { public: virtual /* [helpstring][bindable][propget][id] */ HRESULT STDMETHODCALLTYPE get_Visible( /* [retval][out] */ VARIANT_BOOL *visible) = 0; virtual /* [helpstring][bindable][propput][id] */ HRESULT STDMETHODCALLTYPE put_Visible( /* [in] */ VARIANT_BOOL visible) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE play( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE pause( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE stop( void) = 0; virtual /* [helpstring][propget][hidden][id] */ HRESULT STDMETHODCALLTYPE get_Playing( /* [retval][out] */ VARIANT_BOOL *isPlaying) = 0; virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Position( /* [retval][out] */ float *position) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_Position( /* [in] */ float position) = 0; virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Time( /* [retval][out] */ int *seconds) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_Time( /* [in] */ int seconds) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE shuttle( /* [in] */ int seconds) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE fullscreen( void) = 0; virtual /* [helpstring][hidden][propget][id] */ HRESULT STDMETHODCALLTYPE get_Length( /* [retval][out] */ int *seconds) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE playFaster( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE playSlower( void) = 0; virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Volume( /* [retval][out] */ int *volume) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_Volume( /* [in] */ int volume) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE toggleMute( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE setVariable( /* [in] */ BSTR name, /* [in] */ VARIANT value) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE getVariable( /* [in] */ BSTR name, /* [retval][out] */ VARIANT *value) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE addTarget( /* [in] */ BSTR uri, /* [in] */ VARIANT options, /* [in] */ enum VLCPlaylistMode mode, /* [in] */ int position) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PlaylistIndex( /* [retval][out] */ int *index) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PlaylistCount( /* [retval][out] */ int *index) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE playlistNext( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE playlistPrev( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE playlistClear( void) = 0; virtual /* [helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE get_VersionInfo( /* [retval][out] */ BSTR *version) = 0; virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_MRL( /* [retval][out] */ BSTR *mrl) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_MRL( /* [in] */ BSTR mrl) = 0; virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_AutoPlay( /* [retval][out] */ VARIANT_BOOL *autoplay) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_AutoPlay( /* [in] */ VARIANT_BOOL autoplay) = 0; virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_AutoLoop( /* [retval][out] */ VARIANT_BOOL *autoloop) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_AutoLoop( /* [in] */ VARIANT_BOOL autoloop) = 0; }; #else /* C style interface */ typedef struct IVLCControlVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IVLCControl * This, /* [in] */ REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IVLCControl * This); ULONG ( STDMETHODCALLTYPE *Release )( IVLCControl * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IVLCControl * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IVLCControl * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IVLCControl * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [range][in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IVLCControl * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][bindable][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Visible )( IVLCControl * This, /* [retval][out] */ VARIANT_BOOL *visible); /* [helpstring][bindable][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Visible )( IVLCControl * This, /* [in] */ VARIANT_BOOL visible); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *play )( IVLCControl * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *pause )( IVLCControl * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *stop )( IVLCControl * This); /* [helpstring][propget][hidden][id] */ HRESULT ( STDMETHODCALLTYPE *get_Playing )( IVLCControl * This, /* [retval][out] */ VARIANT_BOOL *isPlaying); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Position )( IVLCControl * This, /* [retval][out] */ float *position); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Position )( IVLCControl * This, /* [in] */ float position); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Time )( IVLCControl * This, /* [retval][out] */ int *seconds); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Time )( IVLCControl * This, /* [in] */ int seconds); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *shuttle )( IVLCControl * This, /* [in] */ int seconds); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *fullscreen )( IVLCControl * This); /* [helpstring][hidden][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Length )( IVLCControl * This, /* [retval][out] */ int *seconds); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *playFaster )( IVLCControl * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *playSlower )( IVLCControl * This); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Volume )( IVLCControl * This, /* [retval][out] */ int *volume); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Volume )( IVLCControl * This, /* [in] */ int volume); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *toggleMute )( IVLCControl * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *setVariable )( IVLCControl * This, /* [in] */ BSTR name, /* [in] */ VARIANT value); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *getVariable )( IVLCControl * This, /* [in] */ BSTR name, /* [retval][out] */ VARIANT *value); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *addTarget )( IVLCControl * This, /* [in] */ BSTR uri, /* [in] */ VARIANT options, /* [in] */ enum VLCPlaylistMode mode, /* [in] */ int position); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PlaylistIndex )( IVLCControl * This, /* [retval][out] */ int *index); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PlaylistCount )( IVLCControl * This, /* [retval][out] */ int *index); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *playlistNext )( IVLCControl * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *playlistPrev )( IVLCControl * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *playlistClear )( IVLCControl * This); /* [helpstring][hidden][propget] */ HRESULT ( STDMETHODCALLTYPE *get_VersionInfo )( IVLCControl * This, /* [retval][out] */ BSTR *version); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_MRL )( IVLCControl * This, /* [retval][out] */ BSTR *mrl); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_MRL )( IVLCControl * This, /* [in] */ BSTR mrl); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AutoPlay )( IVLCControl * This, /* [retval][out] */ VARIANT_BOOL *autoplay); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AutoPlay )( IVLCControl * This, /* [in] */ VARIANT_BOOL autoplay); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AutoLoop )( IVLCControl * This, /* [retval][out] */ VARIANT_BOOL *autoloop); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AutoLoop )( IVLCControl * This, /* [in] */ VARIANT_BOOL autoloop); END_INTERFACE } IVLCControlVtbl; interface IVLCControl { CONST_VTBL struct IVLCControlVtbl *lpVtbl; }; #ifdef COBJMACROS #define IVLCControl_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IVLCControl_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IVLCControl_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IVLCControl_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define IVLCControl_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define IVLCControl_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define IVLCControl_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define IVLCControl_get_Visible(This,visible) \ ( (This)->lpVtbl -> get_Visible(This,visible) ) #define IVLCControl_put_Visible(This,visible) \ ( (This)->lpVtbl -> put_Visible(This,visible) ) #define IVLCControl_play(This) \ ( (This)->lpVtbl -> play(This) ) #define IVLCControl_pause(This) \ ( (This)->lpVtbl -> pause(This) ) #define IVLCControl_stop(This) \ ( (This)->lpVtbl -> stop(This) ) #define IVLCControl_get_Playing(This,isPlaying) \ ( (This)->lpVtbl -> get_Playing(This,isPlaying) ) #define IVLCControl_get_Position(This,position) \ ( (This)->lpVtbl -> get_Position(This,position) ) #define IVLCControl_put_Position(This,position) \ ( (This)->lpVtbl -> put_Position(This,position) ) #define IVLCControl_get_Time(This,seconds) \ ( (This)->lpVtbl -> get_Time(This,seconds) ) #define IVLCControl_put_Time(This,seconds) \ ( (This)->lpVtbl -> put_Time(This,seconds) ) #define IVLCControl_shuttle(This,seconds) \ ( (This)->lpVtbl -> shuttle(This,seconds) ) #define IVLCControl_fullscreen(This) \ ( (This)->lpVtbl -> fullscreen(This) ) #define IVLCControl_get_Length(This,seconds) \ ( (This)->lpVtbl -> get_Length(This,seconds) ) #define IVLCControl_playFaster(This) \ ( (This)->lpVtbl -> playFaster(This) ) #define IVLCControl_playSlower(This) \ ( (This)->lpVtbl -> playSlower(This) ) #define IVLCControl_get_Volume(This,volume) \ ( (This)->lpVtbl -> get_Volume(This,volume) ) #define IVLCControl_put_Volume(This,volume) \ ( (This)->lpVtbl -> put_Volume(This,volume) ) #define IVLCControl_toggleMute(This) \ ( (This)->lpVtbl -> toggleMute(This) ) #define IVLCControl_setVariable(This,name,value) \ ( (This)->lpVtbl -> setVariable(This,name,value) ) #define IVLCControl_getVariable(This,name,value) \ ( (This)->lpVtbl -> getVariable(This,name,value) ) #define IVLCControl_addTarget(This,uri,options,mode,position) \ ( (This)->lpVtbl -> addTarget(This,uri,options,mode,position) ) #define IVLCControl_get_PlaylistIndex(This,index) \ ( (This)->lpVtbl -> get_PlaylistIndex(This,index) ) #define IVLCControl_get_PlaylistCount(This,index) \ ( (This)->lpVtbl -> get_PlaylistCount(This,index) ) #define IVLCControl_playlistNext(This) \ ( (This)->lpVtbl -> playlistNext(This) ) #define IVLCControl_playlistPrev(This) \ ( (This)->lpVtbl -> playlistPrev(This) ) #define IVLCControl_playlistClear(This) \ ( (This)->lpVtbl -> playlistClear(This) ) #define IVLCControl_get_VersionInfo(This,version) \ ( (This)->lpVtbl -> get_VersionInfo(This,version) ) #define IVLCControl_get_MRL(This,mrl) \ ( (This)->lpVtbl -> get_MRL(This,mrl) ) #define IVLCControl_put_MRL(This,mrl) \ ( (This)->lpVtbl -> put_MRL(This,mrl) ) #define IVLCControl_get_AutoPlay(This,autoplay) \ ( (This)->lpVtbl -> get_AutoPlay(This,autoplay) ) #define IVLCControl_put_AutoPlay(This,autoplay) \ ( (This)->lpVtbl -> put_AutoPlay(This,autoplay) ) #define IVLCControl_get_AutoLoop(This,autoloop) \ ( (This)->lpVtbl -> get_AutoLoop(This,autoloop) ) #define IVLCControl_put_AutoLoop(This,autoloop) \ ( (This)->lpVtbl -> put_AutoLoop(This,autoloop) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IVLCControl_INTERFACE_DEFINED__ */ #ifndef __IVLCAudio_INTERFACE_DEFINED__ #define __IVLCAudio_INTERFACE_DEFINED__ /* interface IVLCAudio */ /* [object][oleautomation][dual][helpstring][uuid] */ EXTERN_C const IID IID_IVLCAudio; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("9E0BD17B-2D3C-4656-B94D-03084F3FD9D4") IVLCAudio : public IDispatch { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_mute( /* [retval][out] */ VARIANT_BOOL *muted) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_mute( /* [in] */ VARIANT_BOOL muted) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_volume( /* [retval][out] */ long *volume) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_volume( /* [in] */ long volume) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE toggleMute( void) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_track( /* [retval][out] */ long *track) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_track( /* [in] */ long track) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_channel( /* [retval][out] */ long *channel) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_channel( /* [in] */ long channel) = 0; }; #else /* C style interface */ typedef struct IVLCAudioVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IVLCAudio * This, /* [in] */ REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IVLCAudio * This); ULONG ( STDMETHODCALLTYPE *Release )( IVLCAudio * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IVLCAudio * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IVLCAudio * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IVLCAudio * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [range][in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IVLCAudio * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_mute )( IVLCAudio * This, /* [retval][out] */ VARIANT_BOOL *muted); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_mute )( IVLCAudio * This, /* [in] */ VARIANT_BOOL muted); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_volume )( IVLCAudio * This, /* [retval][out] */ long *volume); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_volume )( IVLCAudio * This, /* [in] */ long volume); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *toggleMute )( IVLCAudio * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_track )( IVLCAudio * This, /* [retval][out] */ long *track); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_track )( IVLCAudio * This, /* [in] */ long track); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_channel )( IVLCAudio * This, /* [retval][out] */ long *channel); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_channel )( IVLCAudio * This, /* [in] */ long channel); END_INTERFACE } IVLCAudioVtbl; interface IVLCAudio { CONST_VTBL struct IVLCAudioVtbl *lpVtbl; }; #ifdef COBJMACROS #define IVLCAudio_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IVLCAudio_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IVLCAudio_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IVLCAudio_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define IVLCAudio_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define IVLCAudio_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define IVLCAudio_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define IVLCAudio_get_mute(This,muted) \ ( (This)->lpVtbl -> get_mute(This,muted) ) #define IVLCAudio_put_mute(This,muted) \ ( (This)->lpVtbl -> put_mute(This,muted) ) #define IVLCAudio_get_volume(This,volume) \ ( (This)->lpVtbl -> get_volume(This,volume) ) #define IVLCAudio_put_volume(This,volume) \ ( (This)->lpVtbl -> put_volume(This,volume) ) #define IVLCAudio_toggleMute(This) \ ( (This)->lpVtbl -> toggleMute(This) ) #define IVLCAudio_get_track(This,track) \ ( (This)->lpVtbl -> get_track(This,track) ) #define IVLCAudio_put_track(This,track) \ ( (This)->lpVtbl -> put_track(This,track) ) #define IVLCAudio_get_channel(This,channel) \ ( (This)->lpVtbl -> get_channel(This,channel) ) #define IVLCAudio_put_channel(This,channel) \ ( (This)->lpVtbl -> put_channel(This,channel) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IVLCAudio_INTERFACE_DEFINED__ */ #ifndef __IVLCInput_INTERFACE_DEFINED__ #define __IVLCInput_INTERFACE_DEFINED__ /* interface IVLCInput */ /* [object][oleautomation][dual][helpstring][uuid] */ EXTERN_C const IID IID_IVLCInput; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("49E0DBD1-9440-466C-9C97-95C67190C603") IVLCInput : public IDispatch { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_length( /* [retval][out] */ double *length) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_position( /* [retval][out] */ double *position) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_position( /* [in] */ double position) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_time( /* [retval][out] */ double *time) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_time( /* [in] */ double time) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_state( /* [retval][out] */ long *state) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_rate( /* [retval][out] */ double *rate) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_rate( /* [in] */ double rate) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_fps( /* [retval][out] */ double *fps) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_hasVout( /* [retval][out] */ VARIANT_BOOL *hasVout) = 0; }; #else /* C style interface */ typedef struct IVLCInputVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IVLCInput * This, /* [in] */ REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IVLCInput * This); ULONG ( STDMETHODCALLTYPE *Release )( IVLCInput * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IVLCInput * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IVLCInput * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IVLCInput * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [range][in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IVLCInput * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_length )( IVLCInput * This, /* [retval][out] */ double *length); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_position )( IVLCInput * This, /* [retval][out] */ double *position); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_position )( IVLCInput * This, /* [in] */ double position); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_time )( IVLCInput * This, /* [retval][out] */ double *time); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_time )( IVLCInput * This, /* [in] */ double time); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_state )( IVLCInput * This, /* [retval][out] */ long *state); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_rate )( IVLCInput * This, /* [retval][out] */ double *rate); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_rate )( IVLCInput * This, /* [in] */ double rate); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_fps )( IVLCInput * This, /* [retval][out] */ double *fps); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_hasVout )( IVLCInput * This, /* [retval][out] */ VARIANT_BOOL *hasVout); END_INTERFACE } IVLCInputVtbl; interface IVLCInput { CONST_VTBL struct IVLCInputVtbl *lpVtbl; }; #ifdef COBJMACROS #define IVLCInput_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IVLCInput_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IVLCInput_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IVLCInput_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define IVLCInput_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define IVLCInput_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define IVLCInput_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define IVLCInput_get_length(This,length) \ ( (This)->lpVtbl -> get_length(This,length) ) #define IVLCInput_get_position(This,position) \ ( (This)->lpVtbl -> get_position(This,position) ) #define IVLCInput_put_position(This,position) \ ( (This)->lpVtbl -> put_position(This,position) ) #define IVLCInput_get_time(This,time) \ ( (This)->lpVtbl -> get_time(This,time) ) #define IVLCInput_put_time(This,time) \ ( (This)->lpVtbl -> put_time(This,time) ) #define IVLCInput_get_state(This,state) \ ( (This)->lpVtbl -> get_state(This,state) ) #define IVLCInput_get_rate(This,rate) \ ( (This)->lpVtbl -> get_rate(This,rate) ) #define IVLCInput_put_rate(This,rate) \ ( (This)->lpVtbl -> put_rate(This,rate) ) #define IVLCInput_get_fps(This,fps) \ ( (This)->lpVtbl -> get_fps(This,fps) ) #define IVLCInput_get_hasVout(This,hasVout) \ ( (This)->lpVtbl -> get_hasVout(This,hasVout) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IVLCInput_INTERFACE_DEFINED__ */ #ifndef __IVLCLog_INTERFACE_DEFINED__ #define __IVLCLog_INTERFACE_DEFINED__ /* interface IVLCLog */ /* [object][oleautomation][dual][helpstring][uuid] */ EXTERN_C const IID IID_IVLCLog; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("8E3BC3D9-62E9-48FB-8A6D-993F9ABC4A0A") IVLCLog : public IDispatch { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_messages( /* [retval][out] */ IVLCMessages **iter) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_verbosity( /* [retval][out] */ long *level) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_verbosity( /* [in] */ long level) = 0; }; #else /* C style interface */ typedef struct IVLCLogVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IVLCLog * This, /* [in] */ REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IVLCLog * This); ULONG ( STDMETHODCALLTYPE *Release )( IVLCLog * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IVLCLog * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IVLCLog * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IVLCLog * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [range][in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IVLCLog * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_messages )( IVLCLog * This, /* [retval][out] */ IVLCMessages **iter); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_verbosity )( IVLCLog * This, /* [retval][out] */ long *level); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_verbosity )( IVLCLog * This, /* [in] */ long level); END_INTERFACE } IVLCLogVtbl; interface IVLCLog { CONST_VTBL struct IVLCLogVtbl *lpVtbl; }; #ifdef COBJMACROS #define IVLCLog_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IVLCLog_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IVLCLog_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IVLCLog_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define IVLCLog_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define IVLCLog_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define IVLCLog_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define IVLCLog_get_messages(This,iter) \ ( (This)->lpVtbl -> get_messages(This,iter) ) #define IVLCLog_get_verbosity(This,level) \ ( (This)->lpVtbl -> get_verbosity(This,level) ) #define IVLCLog_put_verbosity(This,level) \ ( (This)->lpVtbl -> put_verbosity(This,level) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IVLCLog_INTERFACE_DEFINED__ */ #ifndef __IVLCMessage_INTERFACE_DEFINED__ #define __IVLCMessage_INTERFACE_DEFINED__ /* interface IVLCMessage */ /* [object][oleautomation][dual][helpstring][uuid] */ EXTERN_C const IID IID_IVLCMessage; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("9ED00AFA-7BCD-4FFF-8D48-7DD4DB2C800D") IVLCMessage : public IDispatch { public: virtual /* [propget][id] */ HRESULT STDMETHODCALLTYPE get__Value( /* [retval][out] */ VARIANT *message) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_severity( /* [retval][out] */ long *level) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_type( /* [retval][out] */ BSTR *type) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_name( /* [retval][out] */ BSTR *name) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_header( /* [retval][out] */ BSTR *header) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_message( /* [retval][out] */ BSTR *message) = 0; }; #else /* C style interface */ typedef struct IVLCMessageVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IVLCMessage * This, /* [in] */ REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IVLCMessage * This); ULONG ( STDMETHODCALLTYPE *Release )( IVLCMessage * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IVLCMessage * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IVLCMessage * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IVLCMessage * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [range][in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IVLCMessage * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [propget][id] */ HRESULT ( STDMETHODCALLTYPE *get__Value )( IVLCMessage * This, /* [retval][out] */ VARIANT *message); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_severity )( IVLCMessage * This, /* [retval][out] */ long *level); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_type )( IVLCMessage * This, /* [retval][out] */ BSTR *type); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_name )( IVLCMessage * This, /* [retval][out] */ BSTR *name); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_header )( IVLCMessage * This, /* [retval][out] */ BSTR *header); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_message )( IVLCMessage * This, /* [retval][out] */ BSTR *message); END_INTERFACE } IVLCMessageVtbl; interface IVLCMessage { CONST_VTBL struct IVLCMessageVtbl *lpVtbl; }; #ifdef COBJMACROS #define IVLCMessage_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IVLCMessage_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IVLCMessage_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IVLCMessage_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define IVLCMessage_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define IVLCMessage_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define IVLCMessage_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define IVLCMessage_get__Value(This,message) \ ( (This)->lpVtbl -> get__Value(This,message) ) #define IVLCMessage_get_severity(This,level) \ ( (This)->lpVtbl -> get_severity(This,level) ) #define IVLCMessage_get_type(This,type) \ ( (This)->lpVtbl -> get_type(This,type) ) #define IVLCMessage_get_name(This,name) \ ( (This)->lpVtbl -> get_name(This,name) ) #define IVLCMessage_get_header(This,header) \ ( (This)->lpVtbl -> get_header(This,header) ) #define IVLCMessage_get_message(This,message) \ ( (This)->lpVtbl -> get_message(This,message) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IVLCMessage_INTERFACE_DEFINED__ */ #ifndef __IVLCMessageIterator_INTERFACE_DEFINED__ #define __IVLCMessageIterator_INTERFACE_DEFINED__ /* interface IVLCMessageIterator */ /* [object][oleautomation][dual][helpstring][uuid] */ EXTERN_C const IID IID_IVLCMessageIterator; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("15179CD8-CC12-4242-A58E-E412217FF343") IVLCMessageIterator : public IDispatch { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_hasNext( /* [retval][out] */ VARIANT_BOOL *hasNext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE next( /* [retval][out] */ IVLCMessage **msg) = 0; }; #else /* C style interface */ typedef struct IVLCMessageIteratorVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IVLCMessageIterator * This, /* [in] */ REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IVLCMessageIterator * This); ULONG ( STDMETHODCALLTYPE *Release )( IVLCMessageIterator * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IVLCMessageIterator * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IVLCMessageIterator * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IVLCMessageIterator * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [range][in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IVLCMessageIterator * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_hasNext )( IVLCMessageIterator * This, /* [retval][out] */ VARIANT_BOOL *hasNext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *next )( IVLCMessageIterator * This, /* [retval][out] */ IVLCMessage **msg); END_INTERFACE } IVLCMessageIteratorVtbl; interface IVLCMessageIterator { CONST_VTBL struct IVLCMessageIteratorVtbl *lpVtbl; }; #ifdef COBJMACROS #define IVLCMessageIterator_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IVLCMessageIterator_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IVLCMessageIterator_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IVLCMessageIterator_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define IVLCMessageIterator_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define IVLCMessageIterator_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define IVLCMessageIterator_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define IVLCMessageIterator_get_hasNext(This,hasNext) \ ( (This)->lpVtbl -> get_hasNext(This,hasNext) ) #define IVLCMessageIterator_next(This,msg) \ ( (This)->lpVtbl -> next(This,msg) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IVLCMessageIterator_INTERFACE_DEFINED__ */ #ifndef __IVLCMessages_INTERFACE_DEFINED__ #define __IVLCMessages_INTERFACE_DEFINED__ /* interface IVLCMessages */ /* [object][oleautomation][dual][helpstring][uuid] */ EXTERN_C const IID IID_IVLCMessages; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("6C5CE55D-2D6C-4AAD-8299-C62D2371F106") IVLCMessages : public IDispatch { public: virtual /* [propget][id] */ HRESULT STDMETHODCALLTYPE get__NewEnum( /* [retval][out] */ IUnknown **_NewEnum) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE clear( void) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_count( /* [retval][out] */ long *count) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE iterator( /* [retval][out] */ IVLCMessageIterator **iter) = 0; }; #else /* C style interface */ typedef struct IVLCMessagesVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IVLCMessages * This, /* [in] */ REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IVLCMessages * This); ULONG ( STDMETHODCALLTYPE *Release )( IVLCMessages * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IVLCMessages * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IVLCMessages * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IVLCMessages * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [range][in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IVLCMessages * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [propget][id] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( IVLCMessages * This, /* [retval][out] */ IUnknown **_NewEnum); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *clear )( IVLCMessages * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_count )( IVLCMessages * This, /* [retval][out] */ long *count); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *iterator )( IVLCMessages * This, /* [retval][out] */ IVLCMessageIterator **iter); END_INTERFACE } IVLCMessagesVtbl; interface IVLCMessages { CONST_VTBL struct IVLCMessagesVtbl *lpVtbl; };

hobbitten
Blank Cone
Blank Cone
Posts: 20
Joined: 02 Jun 2009 19:23

Re: vlccontrol2 make error

Postby hobbitten » 23 Jun 2009 00:43

New axvlc.h part2

Code: Select all

#ifdef COBJMACROS #define IVLCMessages_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IVLCMessages_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IVLCMessages_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IVLCMessages_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define IVLCMessages_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define IVLCMessages_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define IVLCMessages_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define IVLCMessages_get__NewEnum(This,_NewEnum) \ ( (This)->lpVtbl -> get__NewEnum(This,_NewEnum) ) #define IVLCMessages_clear(This) \ ( (This)->lpVtbl -> clear(This) ) #define IVLCMessages_get_count(This,count) \ ( (This)->lpVtbl -> get_count(This,count) ) #define IVLCMessages_iterator(This,iter) \ ( (This)->lpVtbl -> iterator(This,iter) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IVLCMessages_INTERFACE_DEFINED__ */ #ifndef __IVLCPlaylist_INTERFACE_DEFINED__ #define __IVLCPlaylist_INTERFACE_DEFINED__ /* interface IVLCPlaylist */ /* [object][oleautomation][dual][helpstring][uuid] */ EXTERN_C const IID IID_IVLCPlaylist; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("54613049-40BF-4035-9E70-0A9312C0188D") IVLCPlaylist : public IDispatch { public: virtual /* [helpstring][propget][hidden] */ HRESULT STDMETHODCALLTYPE get_itemCount( /* [retval][out] */ long *count) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_isPlaying( /* [retval][out] */ VARIANT_BOOL *playing) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE add( /* [in] */ BSTR uri, /* [optional][in] */ VARIANT name, /* [optional][in] */ VARIANT options, /* [retval][out] */ long *itemId) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE play( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE playItem( /* [in] */ long itemId) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE togglePause( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE stop( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE next( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE prev( void) = 0; virtual /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE clear( void) = 0; virtual /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE removeItem( /* [in] */ long item) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_items( /* [retval][out] */ IVLCPlaylistItems **obj) = 0; }; #else /* C style interface */ typedef struct IVLCPlaylistVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IVLCPlaylist * This, /* [in] */ REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IVLCPlaylist * This); ULONG ( STDMETHODCALLTYPE *Release )( IVLCPlaylist * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IVLCPlaylist * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IVLCPlaylist * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IVLCPlaylist * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [range][in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IVLCPlaylist * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][propget][hidden] */ HRESULT ( STDMETHODCALLTYPE *get_itemCount )( IVLCPlaylist * This, /* [retval][out] */ long *count); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_isPlaying )( IVLCPlaylist * This, /* [retval][out] */ VARIANT_BOOL *playing); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *add )( IVLCPlaylist * This, /* [in] */ BSTR uri, /* [optional][in] */ VARIANT name, /* [optional][in] */ VARIANT options, /* [retval][out] */ long *itemId); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *play )( IVLCPlaylist * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *playItem )( IVLCPlaylist * This, /* [in] */ long itemId); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *togglePause )( IVLCPlaylist * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *stop )( IVLCPlaylist * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *next )( IVLCPlaylist * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *prev )( IVLCPlaylist * This); /* [helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *clear )( IVLCPlaylist * This); /* [helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *removeItem )( IVLCPlaylist * This, /* [in] */ long item); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_items )( IVLCPlaylist * This, /* [retval][out] */ IVLCPlaylistItems **obj); END_INTERFACE } IVLCPlaylistVtbl; interface IVLCPlaylist { CONST_VTBL struct IVLCPlaylistVtbl *lpVtbl; }; #ifdef COBJMACROS #define IVLCPlaylist_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IVLCPlaylist_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IVLCPlaylist_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IVLCPlaylist_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define IVLCPlaylist_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define IVLCPlaylist_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define IVLCPlaylist_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define IVLCPlaylist_get_itemCount(This,count) \ ( (This)->lpVtbl -> get_itemCount(This,count) ) #define IVLCPlaylist_get_isPlaying(This,playing) \ ( (This)->lpVtbl -> get_isPlaying(This,playing) ) #define IVLCPlaylist_add(This,uri,name,options,itemId) \ ( (This)->lpVtbl -> add(This,uri,name,options,itemId) ) #define IVLCPlaylist_play(This) \ ( (This)->lpVtbl -> play(This) ) #define IVLCPlaylist_playItem(This,itemId) \ ( (This)->lpVtbl -> playItem(This,itemId) ) #define IVLCPlaylist_togglePause(This) \ ( (This)->lpVtbl -> togglePause(This) ) #define IVLCPlaylist_stop(This) \ ( (This)->lpVtbl -> stop(This) ) #define IVLCPlaylist_next(This) \ ( (This)->lpVtbl -> next(This) ) #define IVLCPlaylist_prev(This) \ ( (This)->lpVtbl -> prev(This) ) #define IVLCPlaylist_clear(This) \ ( (This)->lpVtbl -> clear(This) ) #define IVLCPlaylist_removeItem(This,item) \ ( (This)->lpVtbl -> removeItem(This,item) ) #define IVLCPlaylist_get_items(This,obj) \ ( (This)->lpVtbl -> get_items(This,obj) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IVLCPlaylist_INTERFACE_DEFINED__ */ #ifndef __IVLCVideo_INTERFACE_DEFINED__ #define __IVLCVideo_INTERFACE_DEFINED__ /* interface IVLCVideo */ /* [object][oleautomation][dual][helpstring][uuid] */ EXTERN_C const IID IID_IVLCVideo; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("0AAEDF0B-D333-4B27-A0C6-BBF31413A42E") IVLCVideo : public IDispatch { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_fullscreen( /* [retval][out] */ VARIANT_BOOL *fullscreen) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_fullscreen( /* [in] */ VARIANT_BOOL fullscreen) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_width( /* [retval][out] */ long *width) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_height( /* [retval][out] */ long *height) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_aspectRatio( /* [retval][out] */ BSTR *aspect) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_aspectRatio( /* [in] */ BSTR aspect) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_subtitle( /* [retval][out] */ long *spu) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_subtitle( /* [in] */ long spu) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_crop( /* [retval][out] */ BSTR *geometry) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_crop( /* [in] */ BSTR geometry) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_teletext( /* [retval][out] */ long *page) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_teletext( /* [in] */ long page) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE toggleFullscreen( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE takeSnapshot( /* [retval][out] */ IPictureDisp **picture) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE toggleTeletext( void) = 0; }; #else /* C style interface */ typedef struct IVLCVideoVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IVLCVideo * This, /* [in] */ REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IVLCVideo * This); ULONG ( STDMETHODCALLTYPE *Release )( IVLCVideo * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IVLCVideo * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IVLCVideo * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IVLCVideo * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [range][in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IVLCVideo * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_fullscreen )( IVLCVideo * This, /* [retval][out] */ VARIANT_BOOL *fullscreen); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_fullscreen )( IVLCVideo * This, /* [in] */ VARIANT_BOOL fullscreen); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_width )( IVLCVideo * This, /* [retval][out] */ long *width); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_height )( IVLCVideo * This, /* [retval][out] */ long *height); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_aspectRatio )( IVLCVideo * This, /* [retval][out] */ BSTR *aspect); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_aspectRatio )( IVLCVideo * This, /* [in] */ BSTR aspect); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_subtitle )( IVLCVideo * This, /* [retval][out] */ long *spu); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_subtitle )( IVLCVideo * This, /* [in] */ long spu); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_crop )( IVLCVideo * This, /* [retval][out] */ BSTR *geometry); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_crop )( IVLCVideo * This, /* [in] */ BSTR geometry); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_teletext )( IVLCVideo * This, /* [retval][out] */ long *page); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_teletext )( IVLCVideo * This, /* [in] */ long page); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *toggleFullscreen )( IVLCVideo * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *takeSnapshot )( IVLCVideo * This, /* [retval][out] */ IPictureDisp **picture); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *toggleTeletext )( IVLCVideo * This); END_INTERFACE } IVLCVideoVtbl; interface IVLCVideo { CONST_VTBL struct IVLCVideoVtbl *lpVtbl; }; #ifdef COBJMACROS #define IVLCVideo_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IVLCVideo_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IVLCVideo_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IVLCVideo_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define IVLCVideo_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define IVLCVideo_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define IVLCVideo_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define IVLCVideo_get_fullscreen(This,fullscreen) \ ( (This)->lpVtbl -> get_fullscreen(This,fullscreen) ) #define IVLCVideo_put_fullscreen(This,fullscreen) \ ( (This)->lpVtbl -> put_fullscreen(This,fullscreen) ) #define IVLCVideo_get_width(This,width) \ ( (This)->lpVtbl -> get_width(This,width) ) #define IVLCVideo_get_height(This,height) \ ( (This)->lpVtbl -> get_height(This,height) ) #define IVLCVideo_get_aspectRatio(This,aspect) \ ( (This)->lpVtbl -> get_aspectRatio(This,aspect) ) #define IVLCVideo_put_aspectRatio(This,aspect) \ ( (This)->lpVtbl -> put_aspectRatio(This,aspect) ) #define IVLCVideo_get_subtitle(This,spu) \ ( (This)->lpVtbl -> get_subtitle(This,spu) ) #define IVLCVideo_put_subtitle(This,spu) \ ( (This)->lpVtbl -> put_subtitle(This,spu) ) #define IVLCVideo_get_crop(This,geometry) \ ( (This)->lpVtbl -> get_crop(This,geometry) ) #define IVLCVideo_put_crop(This,geometry) \ ( (This)->lpVtbl -> put_crop(This,geometry) ) #define IVLCVideo_get_teletext(This,page) \ ( (This)->lpVtbl -> get_teletext(This,page) ) #define IVLCVideo_put_teletext(This,page) \ ( (This)->lpVtbl -> put_teletext(This,page) ) #define IVLCVideo_toggleFullscreen(This) \ ( (This)->lpVtbl -> toggleFullscreen(This) ) #define IVLCVideo_takeSnapshot(This,picture) \ ( (This)->lpVtbl -> takeSnapshot(This,picture) ) #define IVLCVideo_toggleTeletext(This) \ ( (This)->lpVtbl -> toggleTeletext(This) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IVLCVideo_INTERFACE_DEFINED__ */ #ifndef __IVLCControl2_INTERFACE_DEFINED__ #define __IVLCControl2_INTERFACE_DEFINED__ /* interface IVLCControl2 */ /* [object][oleautomation][dual][helpstring][uuid] */ EXTERN_C const IID IID_IVLCControl2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("2D719729-5333-406C-BF12-8DE787FD65E3") IVLCControl2 : public IDispatch { public: virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_AutoLoop( /* [retval][out] */ VARIANT_BOOL *autoloop) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_AutoLoop( /* [in] */ VARIANT_BOOL autoloop) = 0; virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_AutoPlay( /* [retval][out] */ VARIANT_BOOL *autoplay) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_AutoPlay( /* [in] */ VARIANT_BOOL autoplay) = 0; virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_BaseURL( /* [retval][out] */ BSTR *url) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_BaseURL( /* [in] */ BSTR url) = 0; virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_StartTime( /* [retval][out] */ long *seconds) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_StartTime( /* [in] */ long seconds) = 0; virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_MRL( /* [retval][out] */ BSTR *mrl) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_MRL( /* [in] */ BSTR mrl) = 0; virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Toolbar( /* [retval][out] */ VARIANT_BOOL *visible) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_Toolbar( /* [in] */ VARIANT_BOOL visible) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_VersionInfo( /* [retval][out] */ BSTR *version) = 0; virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Visible( /* [retval][out] */ VARIANT_BOOL *visible) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_Visible( /* [in] */ VARIANT_BOOL visible) = 0; virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Volume( /* [retval][out] */ long *volume) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_Volume( /* [in] */ long volume) = 0; virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_BackColor( /* [retval][out] */ OLE_COLOR *backcolor) = 0; virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_BackColor( /* [in] */ OLE_COLOR backcolor) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_audio( /* [retval][out] */ IVLCAudio **obj) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_input( /* [retval][out] */ IVLCInput **obj) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_log( /* [retval][out] */ IVLCLog **obj) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_playlist( /* [retval][out] */ IVLCPlaylist **obj) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_video( /* [retval][out] */ IVLCVideo **obj) = 0; }; #else /* C style interface */ typedef struct IVLCControl2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IVLCControl2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IVLCControl2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IVLCControl2 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IVLCControl2 * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IVLCControl2 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IVLCControl2 * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [range][in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IVLCControl2 * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AutoLoop )( IVLCControl2 * This, /* [retval][out] */ VARIANT_BOOL *autoloop); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AutoLoop )( IVLCControl2 * This, /* [in] */ VARIANT_BOOL autoloop); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AutoPlay )( IVLCControl2 * This, /* [retval][out] */ VARIANT_BOOL *autoplay); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AutoPlay )( IVLCControl2 * This, /* [in] */ VARIANT_BOOL autoplay); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_BaseURL )( IVLCControl2 * This, /* [retval][out] */ BSTR *url); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_BaseURL )( IVLCControl2 * This, /* [in] */ BSTR url); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_StartTime )( IVLCControl2 * This, /* [retval][out] */ long *seconds); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_StartTime )( IVLCControl2 * This, /* [in] */ long seconds); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_MRL )( IVLCControl2 * This, /* [retval][out] */ BSTR *mrl); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_MRL )( IVLCControl2 * This, /* [in] */ BSTR mrl); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Toolbar )( IVLCControl2 * This, /* [retval][out] */ VARIANT_BOOL *visible); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Toolbar )( IVLCControl2 * This, /* [in] */ VARIANT_BOOL visible); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_VersionInfo )( IVLCControl2 * This, /* [retval][out] */ BSTR *version); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Visible )( IVLCControl2 * This, /* [retval][out] */ VARIANT_BOOL *visible); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Visible )( IVLCControl2 * This, /* [in] */ VARIANT_BOOL visible); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Volume )( IVLCControl2 * This, /* [retval][out] */ long *volume); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Volume )( IVLCControl2 * This, /* [in] */ long volume); /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_BackColor )( IVLCControl2 * This, /* [retval][out] */ OLE_COLOR *backcolor); /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_BackColor )( IVLCControl2 * This, /* [in] */ OLE_COLOR backcolor); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_audio )( IVLCControl2 * This, /* [retval][out] */ IVLCAudio **obj); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_input )( IVLCControl2 * This, /* [retval][out] */ IVLCInput **obj); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_log )( IVLCControl2 * This, /* [retval][out] */ IVLCLog **obj); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_playlist )( IVLCControl2 * This, /* [retval][out] */ IVLCPlaylist **obj); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_video )( IVLCControl2 * This, /* [retval][out] */ IVLCVideo **obj); END_INTERFACE } IVLCControl2Vtbl; interface IVLCControl2 { CONST_VTBL struct IVLCControl2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IVLCControl2_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IVLCControl2_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IVLCControl2_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IVLCControl2_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define IVLCControl2_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define IVLCControl2_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define IVLCControl2_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define IVLCControl2_get_AutoLoop(This,autoloop) \ ( (This)->lpVtbl -> get_AutoLoop(This,autoloop) ) #define IVLCControl2_put_AutoLoop(This,autoloop) \ ( (This)->lpVtbl -> put_AutoLoop(This,autoloop) ) #define IVLCControl2_get_AutoPlay(This,autoplay) \ ( (This)->lpVtbl -> get_AutoPlay(This,autoplay) ) #define IVLCControl2_put_AutoPlay(This,autoplay) \ ( (This)->lpVtbl -> put_AutoPlay(This,autoplay) ) #define IVLCControl2_get_BaseURL(This,url) \ ( (This)->lpVtbl -> get_BaseURL(This,url) ) #define IVLCControl2_put_BaseURL(This,url) \ ( (This)->lpVtbl -> put_BaseURL(This,url) ) #define IVLCControl2_get_StartTime(This,seconds) \ ( (This)->lpVtbl -> get_StartTime(This,seconds) ) #define IVLCControl2_put_StartTime(This,seconds) \ ( (This)->lpVtbl -> put_StartTime(This,seconds) ) #define IVLCControl2_get_MRL(This,mrl) \ ( (This)->lpVtbl -> get_MRL(This,mrl) ) #define IVLCControl2_put_MRL(This,mrl) \ ( (This)->lpVtbl -> put_MRL(This,mrl) ) #define IVLCControl2_get_Toolbar(This,visible) \ ( (This)->lpVtbl -> get_Toolbar(This,visible) ) #define IVLCControl2_put_Toolbar(This,visible) \ ( (This)->lpVtbl -> put_Toolbar(This,visible) ) #define IVLCControl2_get_VersionInfo(This,version) \ ( (This)->lpVtbl -> get_VersionInfo(This,version) ) #define IVLCControl2_get_Visible(This,visible) \ ( (This)->lpVtbl -> get_Visible(This,visible) ) #define IVLCControl2_put_Visible(This,visible) \ ( (This)->lpVtbl -> put_Visible(This,visible) ) #define IVLCControl2_get_Volume(This,volume) \ ( (This)->lpVtbl -> get_Volume(This,volume) ) #define IVLCControl2_put_Volume(This,volume) \ ( (This)->lpVtbl -> put_Volume(This,volume) ) #define IVLCControl2_get_BackColor(This,backcolor) \ ( (This)->lpVtbl -> get_BackColor(This,backcolor) ) #define IVLCControl2_put_BackColor(This,backcolor) \ ( (This)->lpVtbl -> put_BackColor(This,backcolor) ) #define IVLCControl2_get_audio(This,obj) \ ( (This)->lpVtbl -> get_audio(This,obj) ) #define IVLCControl2_get_input(This,obj) \ ( (This)->lpVtbl -> get_input(This,obj) ) #define IVLCControl2_get_log(This,obj) \ ( (This)->lpVtbl -> get_log(This,obj) ) #define IVLCControl2_get_playlist(This,obj) \ ( (This)->lpVtbl -> get_playlist(This,obj) ) #define IVLCControl2_get_video(This,obj) \ ( (This)->lpVtbl -> get_video(This,obj) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IVLCControl2_INTERFACE_DEFINED__ */ #ifndef __DVLCEvents_DISPINTERFACE_DEFINED__ #define __DVLCEvents_DISPINTERFACE_DEFINED__ /* dispinterface DVLCEvents */ /* [helpstring][uuid] */ EXTERN_C const IID DIID_DVLCEvents; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("DF48072F-5EF8-434e-9B40-E2F3AE759B5F") DVLCEvents : public IDispatch { }; #else /* C style interface */ typedef struct DVLCEventsVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( DVLCEvents * This, /* [in] */ REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( DVLCEvents * This); ULONG ( STDMETHODCALLTYPE *Release )( DVLCEvents * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( DVLCEvents * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( DVLCEvents * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( DVLCEvents * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [range][in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( DVLCEvents * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); END_INTERFACE } DVLCEventsVtbl; interface DVLCEvents { CONST_VTBL struct DVLCEventsVtbl *lpVtbl; }; #ifdef COBJMACROS #define DVLCEvents_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define DVLCEvents_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define DVLCEvents_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define DVLCEvents_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define DVLCEvents_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define DVLCEvents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define DVLCEvents_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __DVLCEvents_DISPINTERFACE_DEFINED__ */ #ifndef __IVLCPlaylistItems_INTERFACE_DEFINED__ #define __IVLCPlaylistItems_INTERFACE_DEFINED__ /* interface IVLCPlaylistItems */ /* [object][oleautomation][dual][helpstring][uuid] */ EXTERN_C const IID IID_IVLCPlaylistItems; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("FD37FE32-82BC-4A25-B056-315F4DBB194D") IVLCPlaylistItems : public IDispatch { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_count( /* [retval][out] */ long *count) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE clear( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE remove( /* [in] */ long itemId) = 0; }; #else /* C style interface */ typedef struct IVLCPlaylistItemsVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IVLCPlaylistItems * This, /* [in] */ REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IVLCPlaylistItems * This); ULONG ( STDMETHODCALLTYPE *Release )( IVLCPlaylistItems * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IVLCPlaylistItems * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IVLCPlaylistItems * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IVLCPlaylistItems * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [range][in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IVLCPlaylistItems * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_count )( IVLCPlaylistItems * This, /* [retval][out] */ long *count); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *clear )( IVLCPlaylistItems * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *remove )( IVLCPlaylistItems * This, /* [in] */ long itemId); END_INTERFACE } IVLCPlaylistItemsVtbl; interface IVLCPlaylistItems { CONST_VTBL struct IVLCPlaylistItemsVtbl *lpVtbl; }; #ifdef COBJMACROS #define IVLCPlaylistItems_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IVLCPlaylistItems_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IVLCPlaylistItems_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IVLCPlaylistItems_GetTypeInfoCount(This,pctinfo) \ ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define IVLCPlaylistItems_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define IVLCPlaylistItems_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define IVLCPlaylistItems_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define IVLCPlaylistItems_get_count(This,count) \ ( (This)->lpVtbl -> get_count(This,count) ) #define IVLCPlaylistItems_clear(This) \ ( (This)->lpVtbl -> clear(This) ) #define IVLCPlaylistItems_remove(This,itemId) \ ( (This)->lpVtbl -> remove(This,itemId) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IVLCPlaylistItems_INTERFACE_DEFINED__ */ EXTERN_C const CLSID CLSID_VLCPlugin; #ifdef __cplusplus class DECLSPEC_UUID("E23FE9C6-778E-49D4-B537-38FCDE4887D8") VLCPlugin; #endif EXTERN_C const CLSID CLSID_VLCPlugin2; #ifdef __cplusplus class DECLSPEC_UUID("9BE31822-FDAD-461B-AD51-BE1D1C159921") VLCPlugin2; #endif #endif /* __AXVLC_LIBRARY_DEFINED__ */ /* Additional Prototypes for ALL interfaces */ /* end of Additional Prototypes */ #ifdef __cplusplus } #endif #endif
I still get:

Code: Select all

/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I/usr/win32/include -I/usr/win32/include/ebml -D__USE_MINGW_ANSI_STDIO=1 -DSYS_MINGW32 `top_srcdir="../.." top_builddir="../.." ../../vlc-config --cxxflags activex` -mms-bitfields -MT axvlc_la-vlccontrol2.lo -MD -MP -MF .deps/axvlc_la-vlccontrol2.Tpo -c -o axvlc_la-vlccontrol2.lo `test -f 'vlccontrol2.cpp' || echo './'`vlccontrol2.cpp g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I/usr/win32/include -I/usr/win32/include/ebml -D__USE_MINGW_ANSI_STDIO=1 -DSYS_MINGW32 -I/usr/local/include -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG -DUNICODE -D_UNICODE -D_MIDL_USE_GUIDDEF_ -DMODULE_NAME=activex -DMODULE_NAME_IS_activex -DMODULE_STRING=\"activex\" -g -O2 -ffast-math -funroll-loops -mtune=pentium2 -fno-exceptions -DHAVE_OBJSAFE_HEADER -mms-bitfields -MT axvlc_la-vlccontrol2.lo -MD -MP -MF .deps/axvlc_la-vlccontrol2.Tpo -c vlccontrol2.cpp -DDLL_EXPORT -DPIC -o .libs/axvlc_la-vlccontrol2.o In file included from vlccontrol2.cpp:25: vlccontrol2.h:495: error: expected class-name before '{' token vlccontrol2.h: In member function `HRESULT VLCSubtitle::QueryInterface(const IID&, void**)': vlccontrol2.h:508: error: `IID_IVLCSubtitle' was not declared in this scope vlccontrol2.h: At global scope: vlccontrol2.h:662: error: `IVLCSubtitle' has not been declared vlccontrol2.h:662: error: ISO C++ forbids declaration of `parameter' with no type vlccontrol2.cpp: In member function `HRESULT VLCSubtitle::exception_bridge(libvlc_exception_t*)': vlccontrol2.cpp:60: error: `IID_IVLCSubtitle' was not declared in this scope vlccontrol2.cpp: In member function `HRESULT VLCSubtitle::loadTypeInfo()': vlccontrol2.cpp:1734: error: `IID_IVLCSubtitle' was not declared in this scope vlccontrol2.cpp: In member function `HRESULT VLCVideo::deinterlaceDisable()': vlccontrol2.cpp:2232: error: `libvlc_video_set_deinterlace' was not declared in this scope vlccontrol2.cpp: In member function `HRESULT VLCVideo::deinterlaceEnable(OLECHAR*)': vlccontrol2.cpp:2249: error: `libvlc_video_set_deinterlace' was not declared in this scope vlccontrol2.cpp: At global scope: vlccontrol2.cpp:2721: warning: `__stdcall__' attribute only applies to function types vlccontrol2.cpp:2721: error: `HRESULT VLCControl2::get_subtitle' is not a static member of `class VLCControl2' vlccontrol2.cpp:2721: error: `IVLCSubtitle' was not declared in this scope vlccontrol2.cpp:2721: error: `obj' was not declared in this scope vlccontrol2.cpp:2722: error: expected `,' or `;' before '{' token make[1]: *** [axvlc_la-vlccontrol2.lo] Error 1 make[1]: Leaving directory `/c/VLC/vlc/projects/activex' make: *** [all] Error 2

thannoy
Big Cone-huna
Big Cone-huna
Posts: 601
Joined: 20 Mar 2008 09:44
VLC version: 0.9.8a & 1.0-git
Operating System: GNU/Linux Fedora10
Location: France
Contact:

Re: vlccontrol2 make error

Postby thannoy » 23 Jun 2009 14:39

You can try to switch to 1.0-bugfix branch (http://wiki.videolan.org/Git#Fetching_a_remote_branch).

You can also try to use widl.exe, midl.exe, midl or widl if you have those binaries. In this case go to /projects/activex and run such commands:
widl* (see README.txt or Makefile.am in the same folder):

Code: Select all

widl -h -H axvlc_idl.h -t -T axvlc.tlb -u -U axvlc_idl.c axvlc.idl
midl* (maybe through a visual studio console, see Makefile.am):

Code: Select all

midl.exe -Oicf -error all -env win32 -tlb axvlc.tlb -iid axvlc_idl.c -h axvlc_idl.h axvlc.idl
It looks like axvlc* files are not in sync with vlccontrol2. Those files are generated from the axvlc.idl file. Since modifications are in progress on the master for this side, they are not maintained in sync untill things gets more stable in this way.

Another tip: retry in few hours. It will maybe applied since then (discussing on the IRC).

thannoy
Big Cone-huna
Big Cone-huna
Posts: 601
Joined: 20 Mar 2008 09:44
VLC version: 0.9.8a & 1.0-git
Operating System: GNU/Linux Fedora10
Location: France
Contact:

Re: vlccontrol2 make error

Postby thannoy » 23 Jun 2009 15:33

By the way, the commit bellow should have fixed this issue. Have you updated your git very recently?
git commit 1c1965d52f89e3b1154ed887fe3e3e0629710233

hobbitten
Blank Cone
Blank Cone
Posts: 20
Joined: 02 Jun 2009 19:23

Re: vlccontrol2 make error

Postby hobbitten » 24 Jun 2009 18:40

Thank you for getting me past the first part of the error. It now gives me the following error.

Code: Select all

/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I/usr/win32/include -I/usr/win32/include/ebml -D__USE_MINGW_ANSI_STDIO=1 -DSYS_MINGW32 `top_srcdir="../.." top_builddir="../.." ../../vlc-config --cxxflags activex` -mms-bitfields -MT axvlc_la-vlccontrol2.lo -MD -MP -MF .deps/axvlc_la-vlccontrol2.Tpo -c -o axvlc_la-vlccontrol2.lo `test -f 'vlccontrol2.cpp' || echo './'`vlccontrol2.cpp g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I/usr/win32/include -I/usr/win32/include/ebml -D__USE_MINGW_ANSI_STDIO=1 -DSYS_MINGW32 -I/usr/local/include -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG -DUNICODE -D_UNICODE -D_MIDL_USE_GUIDDEF_ -DMODULE_NAME=activex -DMODULE_NAME_IS_activex -DMODULE_STRING=\"activex\" -g -O2 -ffast-math -funroll-loops -mtune=pentium2 -fno-exceptions -DHAVE_OBJSAFE_HEADER -mms-bitfields -MT axvlc_la-vlccontrol2.lo -MD -MP -MF .deps/axvlc_la-vlccontrol2.Tpo -c vlccontrol2.cpp -DDLL_EXPORT -DPIC -o .libs/axvlc_la-vlccontrol2.o vlccontrol2.cpp: In member function `virtual HRESULT VLCVideo::deinterlaceDisable()': vlccontrol2.cpp:2232: error: `libvlc_video_set_deinterlace' was not declared in this scope vlccontrol2.cpp: In member function `virtual HRESULT VLCVideo::deinterlaceEnable(OLECHAR*)': vlccontrol2.cpp:2249: error: `libvlc_video_set_deinterlace' was not declared in this scope make[1]: *** [axvlc_la-vlccontrol2.lo] Error 1 make[1]: Leaving directory `/c/VLC/vlc/projects/activex' make: *** [all] Error 2

thannoy
Big Cone-huna
Big Cone-huna
Posts: 601
Joined: 20 Mar 2008 09:44
VLC version: 0.9.8a & 1.0-git
Operating System: GNU/Linux Fedora10
Location: France
Contact:

Re: vlccontrol2 make error

Postby thannoy » 25 Jun 2009 14:09

Can you try this:

Code: Select all

$ git pull --rebase $ make clean $ make distclean and compile all the project.

libvlc_video_set_deinterlace have been added by git commit 3f2f2e788242e8219c6ce9ab573b8cc2ebc71f9f which is older than git commit 1c1965d52f89e3b1154ed887fe3e3e0629710233. git commit d527cc03dc46a08cb5656fced41fdaefdb25e319 is needed too (in case you don't want to pull rebase and only want to retrieve each commit)

hobbitten
Blank Cone
Blank Cone
Posts: 20
Joined: 02 Jun 2009 19:23

Re: vlccontrol2 make error

Postby hobbitten » 26 Jun 2009 16:23

Thank you for all you help. I got it to compile. Needed to add: sh extras/package/win32/configure-msys.sh

Code: Select all

$ git pull --rebase $ sh extras/package/win32/configure-msys.sh $ make clean $ make distclean $ sh extras/package/win32/configure-msys.sh

Needed to comment out from Makefile: # rm -Rf vlc-$(VERSION)/sdk/bin

Code: Select all

# SDK mkdir -p "$(win32_destdir)/sdk.tmp" mkdir -p "$(win32_destdir)/sdk" d=$$(pwd) && \ cd src && \ make install DESTDIR="$$d/vlc-$(VERSION)/sdk.tmp" cd vlc-$(VERSION) && mv sdk.tmp/$(prefix)/* sdk/ find vlc-$(VERSION)/sdk.tmp -type d | sort -r | xargs rmdir # rm -Rf vlc-$(VERSION)/sdk/bin


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 17 guests