Commit b80918ce authored by Damien Fouilleul's avatar Damien Fouilleul

- activex: a few fixes for VB6 and misc cleanup

parent c3501ebe
......@@ -28,7 +28,7 @@ import "oaidl.idl";
[
uuid(DF2BBE39-40A8-433b-A279-073F48DA94B6),
version(1.0),
helpstring("VideoLAN VLC ActiveX Plugin"),
helpstring("VideoLAN VLC ActiveX Plugin")
]
library AXVLC
{
......
No preview for this file type
......@@ -6,7 +6,7 @@
/* File created by MIDL compiler version 6.00.0361 */
/* at Mon Nov 27 17:47:26 2006
/* at Fri Dec 08 20:17:16 2006
*/
/* Compiler settings for axvlc.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
......
......@@ -4,7 +4,7 @@
/* File created by MIDL compiler version 6.00.0361 */
/* at Mon Nov 27 17:47:26 2006
/* at Fri Dec 08 20:17:16 2006
*/
/* Compiler settings for axvlc.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
......
......@@ -947,26 +947,6 @@ void VLCPlugin::setVolume(int volume)
}
};
void VLCPlugin::setTime(int seconds)
{
if( seconds < 0 )
seconds = 0;
if( seconds != _i_time )
{
setStartTime(_i_time);
if( isRunning() )
{
libvlc_input_t *p_input = libvlc_playlist_get_input(_p_libvlc, NULL);
if( NULL != p_input )
{
libvlc_input_set_time(p_input, _i_time, NULL);
libvlc_input_free(p_input);
}
}
}
};
void VLCPlugin::setFocus(BOOL fFocus)
{
if( fFocus )
......
......@@ -127,9 +127,6 @@ public:
};
inline int getStartTime(void) { return _i_time; };
void setTime(int time);
int getTime(void) { return _i_time; };
void setBaseURL(BSTR url)
{
SysFreeString(_bstr_baseurl);
......
......@@ -228,16 +228,31 @@ STDMETHODIMP VLCControl::get_Time(int *seconds)
}
}
else
*seconds = _p_instance->getTime();
*seconds = _p_instance->getStartTime();
return result;
};
STDMETHODIMP VLCControl::put_Time(int seconds)
{
_p_instance->setTime(seconds);
if( seconds < 0 )
seconds = 0;
return NOERROR;
HRESULT result = NOERROR;
if( _p_instance->isRunning() )
{
int i_vlc;
result = _p_instance->getVLCObject(&i_vlc);
if( SUCCEEDED(result) )
{
VLC_TimeSet(i_vlc, seconds, VLC_FALSE);
}
}
else if( seconds != _p_instance->getStartTime() )
{
_p_instance->setStartTime(seconds);
}
return result;
};
STDMETHODIMP VLCControl::shuttle(int seconds)
......@@ -845,7 +860,7 @@ STDMETHODIMP VLCControl::get_VersionInfo(BSTR *version)
const char *versionStr = VLC_Version();
if( NULL != versionStr )
{
*version = BSTRFromCStr(_p_instance->getCodePage(), versionStr);
*version = BSTRFromCStr(CP_UTF8, versionStr);
return NULL == *version ? E_OUTOFMEMORY : NOERROR;
}
*version = NULL;
......
......@@ -2244,7 +2244,7 @@ STDMETHODIMP VLCControl2::get_VersionInfo(BSTR *version)
const char *versionStr = VLC_Version();
if( NULL != versionStr )
{
*version = BSTRFromCStr(_p_instance->getCodePage(), versionStr);
*version = BSTRFromCStr(CP_UTF8, versionStr);
return NULL == *version ? E_OUTOFMEMORY : NOERROR;
}
......
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