Commit 39e11285 authored by Jean-Paul Saman's avatar Jean-Paul Saman Committed by Jean-Baptiste Kempf

mozilla: activex: add cache filling level to event MediaPlayerBuffering

Add cache filling level to the MediaPlayerBuffering event.
parent 85b75f90
......@@ -206,7 +206,7 @@ library AXVLC
[id(DISPID_MediaPlayerOpeningEvent), helpstring("Opening media")]
void MediaPlayerOpening();
[id(DISPID_MediaPlayerBufferingEvent), helpstring("Buffering media")]
void MediaPlayerBuffering();
void MediaPlayerBuffering([in] long cache);
[id(DISPID_MediaPlayerPlayingEvent), helpstring("Media is playing")]
void MediaPlayerPlaying();
[id(DISPID_MediaPlayerPausedEvent), helpstring("Media is paused")]
......
No preview for this file type
......@@ -1021,10 +1021,17 @@ void VLCPlugin::fireOnMediaPlayerOpeningEvent()
vlcConnectionPointContainer->fireEvent(DISPID_MediaPlayerOpeningEvent, &dispparamsNoArgs);
};
void VLCPlugin::fireOnMediaPlayerBufferingEvent()
void VLCPlugin::fireOnMediaPlayerBufferingEvent(long cache)
{
DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};
vlcConnectionPointContainer->fireEvent(DISPID_MediaPlayerBufferingEvent, &dispparamsNoArgs);
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.rgdispidNamedArgs = NULL;
params.cNamedArgs = 0;
vlcConnectionPointContainer->fireEvent(DISPID_MediaPlayerBufferingEvent, &params);
};
void VLCPlugin::fireOnMediaPlayerPlayingEvent()
......@@ -1081,7 +1088,7 @@ static void handle_input_state_event(const libvlc_event_t* event, void *param)
plugin->fireOnMediaPlayerOpeningEvent();
break;
case libvlc_MediaPlayerBuffering:
plugin->fireOnMediaPlayerBufferingEvent();
plugin->fireOnMediaPlayerBufferingEvent(event->u.media_player_buffering.new_cache);
break;
case libvlc_MediaPlayerPlaying:
plugin->fireOnMediaPlayerPlayingEvent();
......
......@@ -241,7 +241,7 @@ public:
// async events;
void fireOnMediaPlayerNothingSpecialEvent();
void fireOnMediaPlayerOpeningEvent();
void fireOnMediaPlayerBufferingEvent();
void fireOnMediaPlayerBufferingEvent(long cache);
void fireOnMediaPlayerPlayingEvent();
void fireOnMediaPlayerPausedEvent();
void fireOnMediaPlayerForwardEvent();
......
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