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