[vlc-devel] [PATCH] libvlc: add event libvlc_MediaPlayerESChanged
Jean-Baptiste Kempf
jb at videolan.org
Tue Jul 8 17:14:48 CEST 2014
Good idea: we really need that.
Does it fire when new ES appear or when an ES characteristic change ?
On 08 Jul, Felix Abecassis wrote :
> ---
> include/vlc/libvlc_events.h | 1 +
> lib/event.c | 1 +
> lib/media_player.c | 6 ++++++
> 3 files changed, 8 insertions(+)
>
> diff --git a/include/vlc/libvlc_events.h b/include/vlc/libvlc_events.h
> index f268fb5..3bfcd09 100644
> --- a/include/vlc/libvlc_events.h
> +++ b/include/vlc/libvlc_events.h
> @@ -74,6 +74,7 @@ enum libvlc_event_e {
> libvlc_MediaPlayerLengthChanged,
> libvlc_MediaPlayerVout,
> libvlc_MediaPlayerScrambledChanged,
> + libvlc_MediaPlayerESChanged,
>
> libvlc_MediaListItemAdded=0x200,
> libvlc_MediaListWillAddItem,
> diff --git a/lib/event.c b/lib/event.c
> index aa285f9..67c0f15 100644
> --- a/lib/event.c
> +++ b/lib/event.c
> @@ -281,6 +281,7 @@ static const event_name_t event_list[] = {
> DEF(MediaPlayerLengthChanged)
> DEF(MediaPlayerVout)
> DEF(MediaPlayerScrambledChanged)
> + DEF(MediaPlayerESChanged)
>
> DEF(MediaListItemAdded)
> DEF(MediaListWillAddItem)
> diff --git a/lib/media_player.c b/lib/media_player.c
> index b31a832..38d84c6 100644
> --- a/lib/media_player.c
> +++ b/lib/media_player.c
> @@ -343,6 +343,11 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd,
> event.u.media_player_vout.new_count = i_vout;
> libvlc_event_send( p_mi->p_event_manager, &event );
> }
> + else if( newval.i_int == INPUT_EVENT_ES )
> + {
> + event.type = libvlc_MediaPlayerESChanged;
> + libvlc_event_send( p_mi->p_event_manager, &event );
> + }
>
> return VLC_SUCCESS;
> }
> @@ -538,6 +543,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
>
> register_event(mp, Vout);
> register_event(mp, ScrambledChanged);
> + register_event(mp, ESChanged);
>
> /* Snapshot initialization */
> register_event(mp, SnapshotTaken);
> --
> 1.9.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel
mailing list