Commit 30357f82 authored by Sergey Radionov's avatar Sergey Radionov Committed by Jean-Baptiste Kempf

ActiveX: Sync argument of...

ActiveX: Sync argument of fireOnMediaPlayerBufferingEvent/fireOnMediaPlayerTimeChangedEvent/fireOnMediaPlayerPositionChangedEvent with libvlc_event_t
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 6c1c36cf
......@@ -1037,14 +1037,14 @@ void VLCPlugin::fireOnMediaPlayerOpeningEvent()
vlcConnectionPointContainer->fireEvent(DISPID_MediaPlayerOpeningEvent, &dispparamsNoArgs);
};
void VLCPlugin::fireOnMediaPlayerBufferingEvent(long cache)
void VLCPlugin::fireOnMediaPlayerBufferingEvent(float cache)
{
DISPPARAMS params;
params.cArgs = 1;
params.rgvarg = (VARIANTARG *) CoTaskMemAlloc(sizeof(VARIANTARG) * params.cArgs) ;
memset(params.rgvarg, 0, sizeof(VARIANTARG) * params.cArgs);
params.rgvarg[0].vt = VT_I4;
params.rgvarg[0].lVal = cache;
params.rgvarg[0].lVal = static_cast<LONG>(cache);
params.rgdispidNamedArgs = NULL;
params.cNamedArgs = 0;
vlcConnectionPointContainer->fireEvent(DISPID_MediaPlayerBufferingEvent, &params);
......@@ -1130,14 +1130,14 @@ static void handle_input_state_event(const libvlc_event_t* event, void *param)
}
}
void VLCPlugin::fireOnMediaPlayerTimeChangedEvent(long time)
void VLCPlugin::fireOnMediaPlayerTimeChangedEvent(libvlc_time_t time)
{
DISPPARAMS params;
params.cArgs = 1;
params.rgvarg = (VARIANTARG *) CoTaskMemAlloc(sizeof(VARIANTARG) * params.cArgs) ;
memset(params.rgvarg, 0, sizeof(VARIANTARG) * params.cArgs);
params.rgvarg[0].vt = VT_I4;
params.rgvarg[0].lVal = time;
params.rgvarg[0].lVal = static_cast<LONG>(time);
params.rgdispidNamedArgs = NULL;
params.cNamedArgs = 0;
vlcConnectionPointContainer->fireEvent(DISPID_MediaPlayerTimeChangedEvent, &params);
......@@ -1149,14 +1149,14 @@ static void handle_time_changed_event(const libvlc_event_t* event, void *param)
plugin->fireOnMediaPlayerTimeChangedEvent(event->u.media_player_time_changed.new_time);
}
void VLCPlugin::fireOnMediaPlayerPositionChangedEvent(long position)
void VLCPlugin::fireOnMediaPlayerPositionChangedEvent(float position)
{
DISPPARAMS params;
params.cArgs = 1;
params.rgvarg = (VARIANTARG *) CoTaskMemAlloc(sizeof(VARIANTARG) * params.cArgs) ;
memset(params.rgvarg, 0, sizeof(VARIANTARG) * params.cArgs);
params.rgvarg[0].vt = VT_I4;
params.rgvarg[0].lVal = position;
params.rgvarg[0].lVal = static_cast<LONG>(position);
params.rgdispidNamedArgs = NULL;
params.cNamedArgs = 0;
vlcConnectionPointContainer->fireEvent(DISPID_MediaPlayerPositionChangedEvent, &params);
......
......@@ -247,7 +247,7 @@ public:
// async events;
void fireOnMediaPlayerNothingSpecialEvent();
void fireOnMediaPlayerOpeningEvent();
void fireOnMediaPlayerBufferingEvent(long cache);
void fireOnMediaPlayerBufferingEvent(float cache);
void fireOnMediaPlayerPlayingEvent();
void fireOnMediaPlayerPausedEvent();
void fireOnMediaPlayerForwardEvent();
......@@ -256,8 +256,8 @@ public:
void fireOnMediaPlayerEndReachedEvent();
void fireOnMediaPlayerStoppedEvent();
void fireOnMediaPlayerTimeChangedEvent(long time);
void fireOnMediaPlayerPositionChangedEvent(long position);
void fireOnMediaPlayerTimeChangedEvent(libvlc_time_t time);
void fireOnMediaPlayerPositionChangedEvent(float position);
void fireOnMediaPlayerSeekableChangedEvent(VARIANT_BOOL seekable);
void fireOnMediaPlayerPausableChangedEvent(VARIANT_BOOL pausable);
......
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