[vlc-devel] [PATCH] lib: event: add back i_id in media_player_es_changed

Thomas Guillem thomas at gllm.fr
Mon Jun 15 10:34:51 CEST 2020



On Mon, Jun 15, 2020, at 10:29, Alexandre Janniaux wrote:
> Hi,
> 
> Thank you for the patch! LGTM but you could improve it by
> adding a LIBVLC_DEPRECATED tag to the i_id.

We plan to remove all deprecated API when VLC 4.0 is released, I don't think it is worth it.

I added the revert of this patch with the removal of the old tracks API in a separate branch. I will push it as soon as VLC's ports are ready.

> 
> Regards,
> --
> Alexandre Janniaux
> Videolabs
> 
> On Fri, Jun 12, 2020 at 11:27:35AM +0200, Thomas Guillem wrote:
> > To keep compability with the old track API since VLC's ports are still using it.
> >
> > This will be removed when the old track API is removed.
> > ---
> >  include/vlc/libvlc_events.h | 1 +
> >  lib/media_player.c          | 1 +
> >  2 files changed, 2 insertions(+)
> >
> > diff --git a/include/vlc/libvlc_events.h b/include/vlc/libvlc_events.h
> > index 6c3ea15e9b4..5cd545097e7 100644
> > --- a/include/vlc/libvlc_events.h
> > +++ b/include/vlc/libvlc_events.h
> > @@ -356,6 +356,7 @@ typedef struct libvlc_event_t
> >          struct
> >          {
> >              libvlc_track_type_t i_type;
> > +            int i_id; /**< Deprecated, use psz_id */
> >              /** Call libvlc_media_player_get_track_from_id() to get the track
> >               * description. */
> >              const char *psz_id;
> > diff --git a/lib/media_player.c b/lib/media_player.c
> > index d33a1b5b5cb..79550a271e2 100644
> > --- a/lib/media_player.c
> > +++ b/lib/media_player.c
> > @@ -263,6 +263,7 @@ on_track_list_changed(vlc_player_t *player, enum vlc_player_list_action action,
> >
> >      event.u.media_player_es_changed.i_type =
> >          track_type_from_cat(track->fmt.i_cat);
> > +    event.u.media_player_es_changed.i_id = vlc_es_id_GetInputId(track->es_id);
> >      event.u.media_player_es_changed.psz_id = vlc_es_id_GetStrId(track->es_id);
> >
> >      libvlc_event_send(&mp->event_manager, &event);
> > --
> > 2.20.1
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list