Commit 1a55ef20 authored by Sergey Radionov's avatar Sergey Radionov Committed by Cheng Sun

ActiveX: switch to vlc_player_options

Signed-off-by: 's avatarCheng Sun <chengsun9@gmail.com>
parent d67e96f1
......@@ -217,7 +217,7 @@ extern HMODULE DllGetModule();
VLCPlugin::VLCPlugin(VLCPluginClass *p_class, LPUNKNOWN pUnkOuter) :
_inplacewnd(NULL),
_WindowsManager(DllGetModule(), _ViewRC),
_WindowsManager(DllGetModule(), _ViewRC, this),
_p_class(p_class),
_i_ref(1UL),
_p_libvlc(NULL),
......@@ -402,9 +402,9 @@ HRESULT VLCPlugin::onInit(void)
if( NULL == _p_libvlc )
{
// initialize persistable properties
_b_autoplay = TRUE;
set_autoplay(true);
_b_autoloop = FALSE;
_b_toolbar = FALSE;
set_show_toolbar(false);
_bstr_baseurl = NULL;
_bstr_mrl = NULL;
_b_visible = TRUE;
......@@ -750,7 +750,7 @@ HRESULT VLCPlugin::onActivateInPlace(LPMSG lpMesg, HWND hwndParent, LPCRECT lprc
if( FAILED(result) )
return result;
if( _b_autoplay && playlist_select(0) )
if( get_autoplay() && playlist_select(0) )
{
libvlc_media_player_play(_p_mplayer);
fireOnPlayEvent();
......
......@@ -32,6 +32,8 @@
#include <vlc/vlc.h>
#include "../common/win32_fullscreen.h"
#include "../common/vlc_player_options.h"
extern "C" const GUID CLSID_VLCPlugin;
extern "C" const GUID CLSID_VLCPlugin2;
extern "C" const GUID LIBID_AXVLC;
......@@ -73,11 +75,9 @@ private:
LPPICTURE _inplace_picture;
};
struct VLCPlugin : public IUnknown
struct VLCPlugin : public IUnknown, public vlc_player_options
{
public:
VLCPlugin(VLCPluginClass *p_class, LPUNKNOWN pUnkOuter);
/* IUnknown methods */
......@@ -103,10 +103,10 @@ public:
inline void setAutoPlay(BOOL autoplay)
{
_b_autoplay = autoplay;
set_autoplay(autoplay != FALSE);
setDirty(TRUE);
};
inline BOOL getAutoPlay(void) { return _b_autoplay; };
inline BOOL getAutoPlay(void) { return get_autoplay()? TRUE : FALSE; };
inline void setAutoLoop(BOOL autoloop)
{
......@@ -117,10 +117,10 @@ public:
inline void setShowToolbar(BOOL showtoolbar)
{
_b_toolbar = showtoolbar;
set_show_toolbar(showtoolbar != FALSE);
setDirty(TRUE);
};
inline BOOL getShowToolbar(void) { return _b_toolbar;};
inline BOOL getShowToolbar(void) { return get_show_toolbar() ? TRUE : FALSE; };
void setVolume(int volume);
int getVolume(void) { return _i_volume; };
......@@ -380,9 +380,7 @@ private:
// persistable properties
BSTR _bstr_baseurl;
BSTR _bstr_mrl;
BOOL _b_autoplay;
BOOL _b_autoloop;
BOOL _b_toolbar;
BOOL _b_visible;
BOOL _b_mute;
int _i_volume;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment