[vlc-devel] [PATCH 1/3] lib: deprecate libvlc_media_player_pause()

Thomas Guillem thomas at gllm.fr
Fri Dec 8 16:30:52 CET 2017



On Fri, Dec 8, 2017, at 14:26, Thomas Guillem wrote:
> Hello,
> 
> I would like to backport these 3 patches to 3.0 (and fix VLCKit use of
> these deprecated functions). I know that we froze the libvlc API since
> some times now, but I would prefer having VLC 3.0 without these 2 pause
> function (err, deprecated).
> 

After a live discussions with jb and Hugo, we decided to not deprecate
the toggle pause sfunctions for 3.0. But we still want to add the
libvlc_media_*list*_player_set_pause for 3.0.

> 
> 
> On Fri, Dec 8, 2017, at 14:23, Thomas Guillem wrote:
> > Because the pause state can be changed internally by VLC core and you can
> > never
> > know if this function will pause or unpause.
> > ---
> >  include/vlc/deprecated.h          | 10 ++++++++++
> >  include/vlc/libvlc_media_player.h |  7 -------
> >  lib/media_list_player.c           |  2 ++
> >  3 files changed, 12 insertions(+), 7 deletions(-)
> > 
> > diff --git a/include/vlc/deprecated.h b/include/vlc/deprecated.h
> > index 27323a4344..1aa7f8b5b1 100644
> > --- a/include/vlc/deprecated.h
> > +++ b/include/vlc/deprecated.h
> > @@ -69,6 +69,16 @@ LIBVLC_API uint32_t libvlc_media_player_get_agl (
> > libvlc_media_player_t *p_mi );
> >  LIBVLC_DEPRECATED LIBVLC_API
> >  void libvlc_track_description_release( libvlc_track_description_t
> >  *p_track_description );
> >  
> > +/**
> > + * Toggle pause (no effect if there is no media)
> > + *
> > + * \deprecated Use libvlc_media_player_set_pause() instead
> > + *
> > + * \param p_mi the Media Player
> > + */
> > +LIBVLC_DEPRECATED LIBVLC_API
> > +void libvlc_media_player_pause ( libvlc_media_player_t *p_mi );
> > +
> >  /** @}*/
> >  
> >  /**
> > diff --git a/include/vlc/libvlc_media_player.h
> > b/include/vlc/libvlc_media_player.h
> > index 4336df9442..bafcebaae7 100644
> > --- a/include/vlc/libvlc_media_player.h
> > +++ b/include/vlc/libvlc_media_player.h
> > @@ -261,13 +261,6 @@ LIBVLC_API void libvlc_media_player_set_pause (
> > libvlc_media_player_t *mp,
> >                                                      int do_pause );
> >  
> >  /**
> > - * Toggle pause (no effect if there is no media)
> > - *
> > - * \param p_mi the Media Player
> > - */
> > -LIBVLC_API void libvlc_media_player_pause ( libvlc_media_player_t *p_mi
> > );
> > -
> > -/**
> >   * Stop (no effect if there is no media)
> >   *
> >   * \param p_mi the Media Player
> > diff --git a/lib/media_list_player.c b/lib/media_list_player.c
> > index 930b69061a..fb8ca35a15 100644
> > --- a/lib/media_list_player.c
> > +++ b/lib/media_list_player.c
> > @@ -32,8 +32,10 @@
> >  #include <vlc/libvlc_media.h>
> >  #include <vlc/libvlc_media_list.h>
> >  #include <vlc/libvlc_media_player.h>
> > +#include <vlc/libvlc_media_discoverer.h>
> >  #include <vlc/libvlc_media_list_player.h>
> >  #include <vlc/libvlc_events.h>
> > +#include <vlc/deprecated.h>
> >  #include <assert.h>
> >  
> >  #include "libvlc_internal.h"
> > -- 
> > 2.11.0
> > 
> > _______________________________________________
> > 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