_inplace_wndclass_atom = 0;
}
- HBITMAP hbitmap = (HBITMAP)LoadImage(getHInstance(), MAKEINTRESOURCE(1), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
+ HBITMAP hbitmap = (HBITMAP)LoadImage(getHInstance(), MAKEINTRESOURCE(2), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
if( NULL != hbitmap )
{
PICTDESC pictDesc;
if( NULL == _p_libvlc )
{
// initialize persistable properties
- _b_autoplay = TRUE;
- _b_autoloop = FALSE;
+ _b_autoplay = TRUE;
+ _b_autoloop = FALSE;
+ _b_toolbar = FALSE;
_bstr_baseurl = NULL;
- _bstr_mrl = NULL;
- _b_visible = TRUE;
- _b_mute = FALSE;
- _i_volume = 50;
- _i_time = 0;
- _i_backcolor = 0;
+ _bstr_mrl = NULL;
+ _b_visible = TRUE;
+ _b_mute = FALSE;
+ _i_volume = 50;
+ _i_time = 0;
+ _i_backcolor = 0;
// set default/preferred size (320x240) pixels in HIMETRIC
HDC hDC = CreateDevDC(NULL);
_extent.cx = 320;
return S_OK;
};
-HRESULT VLCPlugin::getVLCObject(int* i_vlc)
-{
- libvlc_instance_t *p_libvlc;
- HRESULT result = getVLC(&p_libvlc);
- if( SUCCEEDED(result) )
- {
- *i_vlc = libvlc_get_vlc_id(p_libvlc);
- }
- else
- {
- *i_vlc = 0;
- }
- return result;
-}
-
HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
{
extern HMODULE DllGetModule();
/*
** default initialization options
*/
- const char *ppsz_argv[32] = { "vlc" };
- int ppsz_argc = 1;
+ const char *ppsz_argv[32] = { };
+ int ppsz_argc = 0;
char p_progpath[MAX_PATH];
{
/* common settings */
ppsz_argv[ppsz_argc++] = "--no-stats";
ppsz_argv[ppsz_argc++] = "--no-media-library";
+ ppsz_argv[ppsz_argc++] = "--ignore-config";
ppsz_argv[ppsz_argc++] = "--intf=dummy";
// loop mode is a configuration option only
if( _b_autoloop )
ppsz_argv[ppsz_argc++] = "--loop";
- _p_libvlc = libvlc_new(ppsz_argc, ppsz_argv, NULL);
- if( NULL == _p_libvlc )
+ libvlc_exception_t ex;
+ libvlc_exception_init(&ex);
+
+ _p_libvlc = libvlc_new(ppsz_argc, ppsz_argv, &ex);
+ if( libvlc_exception_raised(&ex) )
{
*pp_libvlc = NULL;
+ libvlc_exception_clear(&ex);
return E_FAIL;
}
_p_libvlc = NULL;
vlcDataObject->onClose();
- libvlc_release(p_libvlc);
+ if( p_libvlc )
+ libvlc_release(p_libvlc);
}
return S_OK;
};
setStartTime(_i_time);
if( isRunning() )
{
- libvlc_media_instance_t *p_md = libvlc_playlist_get_media_instance(_p_libvlc, NULL);
+ libvlc_media_player_t *p_md = libvlc_playlist_get_media_player(_p_libvlc, NULL);
if( NULL != p_md )
{
- libvlc_media_instance_set_time(p_md, _i_time, NULL);
- libvlc_media_instance_release(p_md);
+ libvlc_media_player_set_time(p_md, _i_time, NULL);
+ libvlc_media_player_release(p_md);
}
}
}