Commit 37f89f65 authored by Laurent Aimar's avatar Laurent Aimar

Added libvlc_MediaPlayerVout event.

It is send on vout count changes (close #5277).
parent b18fad44
......@@ -71,6 +71,7 @@ enum libvlc_event_e {
libvlc_MediaPlayerTitleChanged,
libvlc_MediaPlayerSnapshotTaken,
libvlc_MediaPlayerLengthChanged,
libvlc_MediaPlayerVout,
libvlc_MediaListItemAdded=0x200,
libvlc_MediaListWillAddItem,
......@@ -162,6 +163,10 @@ typedef struct libvlc_event_t
{
int new_pausable;
} media_player_pausable_changed;
struct
{
int new_count;
} media_player_vout;
/* media list */
struct
......
......@@ -316,6 +316,25 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd,
var_GetFloat( p_input, "cache" ));
libvlc_event_send( p_mi->p_event_manager, &event );
}
else if( newval.i_int == INPUT_EVENT_VOUT )
{
vout_thread_t **pp_vout;
size_t i_vout;
if( input_Control( p_input, INPUT_GET_VOUTS, &pp_vout, &i_vout ) )
{
i_vout = 0;
}
else
{
for( size_t i = 0; i < i_vout; i++ )
vlc_object_release( pp_vout[i] );
free( pp_vout );
}
event.type = libvlc_MediaPlayerVout;
event.u.media_player_vout.new_count = i_vout;
libvlc_event_send( p_mi->p_event_manager, &event );
}
return VLC_SUCCESS;
}
......
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