]> git.sesse.net Git - vlc/blobdiff - projects/activex/vlccontrol2.cpp
activex plugin: Bring marquee interface in line with logo.
[vlc] / projects / activex / vlccontrol2.cpp
index c0de0833ea42793043511cb0eb26284e854fa72c..d540542c201fcb725b39584ee322c6a317d6a64b 100644 (file)
@@ -2,6 +2,7 @@
  * vlccontrol2.cpp: ActiveX control for VLC
  *****************************************************************************
  * Copyright (C) 2006 the VideoLAN team
+ * Copyright (C) 2010 M2X BV
  *
  * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
  *          Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
  * 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>
 
+#include "utils.h"
+#include "plugin.h"
+#include "vlccontrol2.h"
+#include "vlccontrol.h"
+
+#include "position.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));
+        p->setErrorInfo(riid,libvlc_errmsg());
         libvlc_exception_clear(ex);
         return E_FAIL;
     }
@@ -51,9 +52,11 @@ HRESULT _exception_bridge(VLCPlugin *p,REFIID riid, libvlc_exception_t *ex)
 
 EMIT_EXCEPTION_BRIDGE( VLCAudio )
 EMIT_EXCEPTION_BRIDGE( VLCInput )
+EMIT_EXCEPTION_BRIDGE( VLCMarquee )
 EMIT_EXCEPTION_BRIDGE( VLCMessageIterator )
 EMIT_EXCEPTION_BRIDGE( VLCMessages )
 EMIT_EXCEPTION_BRIDGE( VLCLog )
+EMIT_EXCEPTION_BRIDGE( VLCLogo )
 EMIT_EXCEPTION_BRIDGE( VLCPlaylistItems )
 EMIT_EXCEPTION_BRIDGE( VLCPlaylist )
 EMIT_EXCEPTION_BRIDGE( VLCVideo )
@@ -147,14 +150,8 @@ STDMETHODIMP VLCAudio::get_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);
-
-        *mute = libvlc_audio_get_mute(p_libvlc, &ex) ?
+        *mute = libvlc_audio_get_mute(p_libvlc) ?
                         VARIANT_TRUE : VARIANT_FALSE;
-        hr = exception_bridge(&ex);
-    }
     return hr;
 };
 
@@ -163,13 +160,7 @@ 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);
-    }
+        libvlc_audio_set_mute(p_libvlc, VARIANT_FALSE != mute);
     return hr;
 };
 
@@ -181,13 +172,7 @@ STDMETHODIMP VLCAudio::get_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);
-
-        *volume = libvlc_audio_get_volume(p_libvlc, &ex);
-        hr = exception_bridge(&ex);
-    }
+        *volume = libvlc_audio_get_volume(p_libvlc);
     return hr;
 };
 
@@ -348,17 +333,11 @@ 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);
-    }
+        libvlc_audio_toggle_mute(p_libvlc);
     return hr;
 };
 
-/*******************************************************************************/
+/****************************************************************************/
 
 VLCInput::~VLCInput()
 {
@@ -617,13 +596,13 @@ STDMETHODIMP VLCInput::get_hasVout(VARIANT_BOOL* hasVout)
     return hr;
 };
 
-/*******************************************************************************/
+/****************************************************************************/
 
 VLCLog::~VLCLog()
 {
     delete _p_vlcmessages;
     if( _p_log )
-        libvlc_log_close(_p_log, NULL);
+        libvlc_log_close(_p_log);
 
     if( _p_typeinfo )
         _p_typeinfo->Release();
@@ -724,13 +703,7 @@ STDMETHODIMP VLCLog::get_verbosity(long* level)
         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);
-        }
+            *level = libvlc_get_log_verbosity(p_libvlc);
         return hr;
     }
     else
@@ -758,12 +731,12 @@ STDMETHODIMP VLCLog::put_verbosity(long verbosity)
                 hr = exception_bridge(&ex);
             }
             if( SUCCEEDED(hr) )
-                libvlc_set_log_verbosity(p_libvlc, (unsigned)verbosity, &ex);
+                libvlc_set_log_verbosity(p_libvlc, (unsigned)verbosity);
         }
         else if( _p_log )
         {
             /* close log  when verbosity is set to -1 */
-            libvlc_log_close(_p_log, &ex);
+            libvlc_log_close(_p_log);
             _p_log = NULL;
         }
         hr = exception_bridge(&ex);
@@ -771,7 +744,187 @@ STDMETHODIMP VLCLog::put_verbosity(long verbosity)
     return hr;
 };
 
-/*******************************************************************************/
+/****************************************************************************/
+
+VLCMarquee::~VLCMarquee()
+{
+    if( _p_typeinfo )
+        _p_typeinfo->Release();
+};
+
+HRESULT VLCMarquee::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_IVLCMarquee, &_p_typeinfo);
+            if( FAILED(hr) )
+            {
+                _p_typeinfo = NULL;
+            }
+            p_typelib->Release();
+        }
+    }
+    return hr;
+};
+
+STDMETHODIMP VLCMarquee::GetTypeInfoCount(UINT* pctInfo)
+{
+    if( NULL == pctInfo )
+        return E_INVALIDARG;
+
+    if( SUCCEEDED(loadTypeInfo()) )
+        *pctInfo = 1;
+    else
+        *pctInfo = 0;
+
+    return NOERROR;
+};
+
+STDMETHODIMP VLCMarquee::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 VLCMarquee::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames,
+        UINT cNames, LCID lcid, DISPID* rgDispID)
+{
+    if( SUCCEEDED(loadTypeInfo()) )
+    {
+        return DispGetIDsOfNames(_p_typeinfo, rgszNames, cNames, rgDispID);
+    }
+    return E_NOTIMPL;
+};
+
+HRESULT VLCMarquee::do_put_int(unsigned idx, LONG val)
+{
+    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_marquee_int(p_md, idx, val, &ex);
+        hr = exception_bridge(&ex);
+    }
+    return hr;
+}
+
+HRESULT VLCMarquee::do_get_int(unsigned idx, LONG *val)
+{
+    if( NULL == val )
+        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);
+        *val = libvlc_video_get_marquee_int(p_md, idx, &ex);
+        hr = exception_bridge(&ex);
+    }
+    return hr;
+}
+
+STDMETHODIMP VLCMarquee::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 VLCMarquee::get_position(BSTR* val)
+{
+    if( NULL == val )
+        return E_POINTER;
+
+    LONG i;
+    HRESULT hr = do_get_int(libvlc_marquee_Position, &i);
+
+    if(SUCCEEDED(hr))
+        *val = BSTRFromCStr(CP_UTF8, position_bynumber(i));
+
+    return hr;
+}
+
+STDMETHODIMP VLCMarquee::put_position(BSTR val)
+{
+    char *n = CStrFromBSTR(CP_UTF8, val);
+    if( !n ) return E_OUTOFMEMORY;
+
+    size_t i;
+    HRESULT hr;
+    if( position_byname( n, i ) )
+        hr = do_put_int(libvlc_marquee_Position,i);
+    else
+        hr = E_INVALIDARG;
+
+    CoTaskMemFree(n);
+    return hr;
+}
+
+STDMETHODIMP VLCMarquee::get_text(BSTR *val)
+{
+    char *psz;
+    if( NULL == val )
+        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);
+
+        psz = libvlc_video_get_marquee_string(p_md, libvlc_marquee_Text, &ex);
+
+        hr = exception_bridge(&ex);
+        if(SUCCEEDED(hr))
+            *val = BSTRFromCStr(CP_UTF8, psz);
+    }
+    return hr;
+}
+
+STDMETHODIMP VLCMarquee::put_text(BSTR val)
+{
+    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_text = CStrFromBSTR(CP_UTF8, val);
+        libvlc_video_set_marquee_string(p_md, libvlc_marquee_Text,
+                                        psz_text, &ex);
+        hr = exception_bridge(&ex);
+        CoTaskMemFree(psz_text);
+    }
+    return hr;
+}
+
+/****************************************************************************/
 
 /* STL forward iterator used by VLCEnumIterator class to implement IEnumVARIANT */
 
@@ -953,38 +1106,20 @@ STDMETHODIMP VLCMessages::get__NewEnum(LPUNKNOWN* _NewEnum)
 
 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;
+        libvlc_log_clear(p_log);
+    return NOERROR;
 };
 
 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;
+    *count = libvlc_log_count(p_log);
+    return S_OK;
 };
 
 STDMETHODIMP VLCMessages::iterator(IVLCMessageIterator** iter)
@@ -997,7 +1132,7 @@ STDMETHODIMP VLCMessages::iterator(IVLCMessageIterator** iter)
     return *iter ? S_OK : E_OUTOFMEMORY;
 };
 
-/*******************************************************************************/
+/****************************************************************************/
 
 VLCMessageIterator::VLCMessageIterator(VLCPlugin *p_instance, VLCLog* p_vlclog ) :
     _p_instance(p_instance),
@@ -1016,7 +1151,7 @@ VLCMessageIterator::VLCMessageIterator(VLCPlugin *p_instance, VLCLog* p_vlclog )
 VLCMessageIterator::~VLCMessageIterator()
 {
     if( _p_iter )
-        libvlc_log_iterator_free(_p_iter, NULL);
+        libvlc_log_iterator_free(_p_iter);
 
     if( _p_typeinfo )
         _p_typeinfo->Release();
@@ -1095,25 +1230,19 @@ STDMETHODIMP VLCMessageIterator::Invoke(DISPID dispIdMember, REFIID riid,
 
 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) ?
+        *hasNext = libvlc_log_iterator_has_next(_p_iter) ?
                    VARIANT_TRUE : VARIANT_FALSE;
-        hr = exception_bridge(&ex);
     }
     else
     {
         *hasNext = VARIANT_FALSE;
     }
-    return hr;
+    return S_OK;
 };
 
 STDMETHODIMP VLCMessageIterator::next(IVLCMessage** message)
@@ -1133,18 +1262,14 @@ STDMETHODIMP VLCMessageIterator::next(IVLCMessage** message)
         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;
-        }
+        *message = new VLCMessage(_p_instance, buffer);
+        if( !message )
+            hr = E_OUTOFMEMORY;
     }
     return hr;
 };
 
-/*******************************************************************************/
+/****************************************************************************/
 
 VLCMessage::~VLCMessage()
 {
@@ -1304,7 +1429,7 @@ STDMETHODIMP VLCMessage::get_message(BSTR* message)
     return NOERROR;
 };
 
-/*******************************************************************************/
+/****************************************************************************/
 
 VLCPlaylistItems::~VLCPlaylistItems()
 {
@@ -1419,7 +1544,7 @@ STDMETHODIMP VLCPlaylistItems::remove(long item)
     return hr;
 };
 
-/*******************************************************************************/
+/****************************************************************************/
 
 VLCPlaylist::~VLCPlaylist()
 {
@@ -1713,7 +1838,7 @@ STDMETHODIMP VLCPlaylist::get_items(IVLCPlaylistItems** obj)
     return E_OUTOFMEMORY;
 };
 
-/*******************************************************************************/
+/****************************************************************************/
 
 VLCSubtitle::~VLCSubtitle()
 {
@@ -1896,10 +2021,12 @@ STDMETHODIMP VLCSubtitle::description(long nameID, BSTR* name)
     return hr;
 };
 
-/*******************************************************************************/
+/****************************************************************************/
 
 VLCVideo::~VLCVideo()
 {
+    delete _p_vlcmarquee;
+    delete _p_vlclogo;
     if( _p_typeinfo )
         _p_typeinfo->Release();
 };
@@ -2076,9 +2203,6 @@ 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) )
@@ -2384,24 +2508,201 @@ STDMETHODIMP VLCVideo::toggleTeletext()
     return hr;
 };
 
-/*******************************************************************************/
+STDMETHODIMP VLCVideo::get_marquee(IVLCMarquee** obj)
+{
+    if( NULL == obj )
+        return E_POINTER;
+
+    *obj = _p_vlcmarquee;
+    if( NULL != _p_vlcmarquee )
+    {
+        _p_vlcmarquee->AddRef();
+        return NOERROR;
+    }
+    return E_OUTOFMEMORY;
+};
+
+STDMETHODIMP VLCVideo::get_logo(IVLCLogo** obj)
+{
+    if( NULL == obj )
+        return E_POINTER;
+
+    *obj = _p_vlclogo;
+    if( NULL != _p_vlclogo )
+    {
+        _p_vlclogo->AddRef();
+        return NOERROR;
+    }
+    return E_OUTOFMEMORY;
+}
+
+
+/****************************************************************************/
+
+HRESULT VLCLogo::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_IVLCLogo, &_p_typeinfo);
+            if( FAILED(hr) )
+            {
+                _p_typeinfo = NULL;
+            }
+            p_typelib->Release();
+        }
+    }
+    return hr;
+}
+
+STDMETHODIMP VLCLogo::GetTypeInfoCount(UINT* pctInfo)
+{
+    if( NULL == pctInfo )
+        return E_INVALIDARG;
+
+    if( SUCCEEDED(loadTypeInfo()) )
+        *pctInfo = 1;
+    else
+        *pctInfo = 0;
+
+    return NOERROR;
+}
+
+STDMETHODIMP VLCLogo::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 VLCLogo::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 VLCLogo::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;
+}
+
+
+HRESULT VLCLogo::do_put_int(unsigned idx, LONG val)
+{
+    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_logo_int(p_md, idx, val, &ex);
+        hr = exception_bridge(&ex);
+    }
+    return hr;
+}
+
+HRESULT VLCLogo::do_get_int(unsigned idx, LONG *val)
+{
+    if( NULL == val )
+        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);
+        *val = libvlc_video_get_logo_int(p_md, idx, &ex);
+        hr = exception_bridge(&ex);
+    }
+    return hr;
+}
+
+STDMETHODIMP VLCLogo::file(BSTR fname)
+{
+    libvlc_media_player_t *p_md;
+    HRESULT hr = _p_instance->getMD(&p_md);
+
+    char *n = CStrFromBSTR(CP_UTF8, fname);
+    if( !n ) hr = E_OUTOFMEMORY;
+
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+        libvlc_video_set_logo_string(p_md, libvlc_logo_file, n, &ex);
+        hr = exception_bridge(&ex);
+    }
+
+    CoTaskMemFree(n);
+    return hr;
+}
+
+STDMETHODIMP VLCLogo::get_position(BSTR* val)
+{
+    if( NULL == val )
+        return E_POINTER;
+
+    LONG i;
+    HRESULT hr = do_get_int(libvlc_logo_position, &i);
+
+    if(SUCCEEDED(hr))
+        *val = BSTRFromCStr(CP_UTF8, position_bynumber(i));
+
+    return hr;
+}
+
+STDMETHODIMP VLCLogo::put_position(BSTR val)
+{
+    char *n = CStrFromBSTR(CP_UTF8, val);
+    if( !n ) return E_OUTOFMEMORY;
+
+    size_t i;
+    HRESULT hr;
+    if( position_byname( n, i ) )
+        hr = do_put_int(libvlc_logo_position,i);
+    else
+        hr = E_INVALIDARG;
+
+    CoTaskMemFree(n);
+    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))
 {
-    _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()
 {
@@ -2557,7 +2858,7 @@ STDMETHODIMP VLCControl2::get_Toolbar(VARIANT_BOOL *visible)
         return E_POINTER;
 
     /*
-     * Note to developpers
+     * Note to developers
      *
      * Returning the _b_toolbar is closer to the method specification.
      * But returning True when toolbar is not implemented so not displayed