[vlc-devel] [PATCH 2/2] libvlc media list player: add getter player instance

Rémi Denis-Courmont remi at remlab.net
Thu Sep 10 18:10:57 CEST 2015


Subject does not parse

Le 2015-09-10 14:48, Felix Paul Kühne a écrit :
> ---
>  include/vlc/libvlc_media_list_player.h | 10 ++++++++++
>  lib/libvlc.sym                         |  1 +
>  lib/media_list_player.c                | 16 +++++++++++++++-
>  3 files changed, 26 insertions(+), 1 deletion(-)
>
> diff --git a/include/vlc/libvlc_media_list_player.h
> b/include/vlc/libvlc_media_list_player.h
> index b85981d..71e2ac0 100644
> --- a/include/vlc/libvlc_media_list_player.h
> +++ b/include/vlc/libvlc_media_list_player.h
> @@ -103,6 +103,16 @@ LIBVLC_API void
>                                       libvlc_media_player_t * p_mi );
>
>  /**
> + * Get media player instance in this media_list_player instance.
> + *
> + * \param p_mlp media list player instance
> + * \return p_mi media player instance

??

> + * \note the caller is responsible for releasing the player instance

Typography.

> + */
> +LIBVLC_API libvlc_media_player_t *
> +
> libvlc_media_list_player_get_media_player(libvlc_media_list_player_t 
> *
> p_mlp);
> +
> +/**
>   * Set the media list associated with the player
>   *
>   * \param p_mlp media list player instance
> diff --git a/lib/libvlc.sym b/lib/libvlc.sym
> index 06c9826..97b153b 100644
> --- a/lib/libvlc.sym
> +++ b/lib/libvlc.sym
> @@ -109,6 +109,7 @@ libvlc_media_list_lock
>  libvlc_media_list_media
>  libvlc_media_list_new
>  libvlc_media_list_player_event_manager
> +libvlc_media_list_player_get_media_player
>  libvlc_media_list_player_get_state
>  libvlc_media_list_player_is_playing
>  libvlc_media_list_player_new
> diff --git a/lib/media_list_player.c b/lib/media_list_player.c
> index 44f75a0..b5a645e 100644
> --- a/lib/media_list_player.c
> +++ b/lib/media_list_player.c
> @@ -1,10 +1,12 @@
>
> 
> /*****************************************************************************
>   * media_list_player.c: libvlc new API media_list player functions
>
> 
> *****************************************************************************
> - * Copyright (C) 2007 VLC authors and VideoLAN
> + * Copyright (C) 2007-2015 VLC authors and VideoLAN
>   * $Id$
>   *
>   * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
> + *          Niles Bindel <zaggal69 # gmail.com>
> + *          Rémi Denis-Courmont
>   *
>   * This program is free software; you can redistribute it and/or 
> modify it
>   * under the terms of the GNU Lesser General Public License as 
> published by
> @@ -601,6 +603,18 @@ void
> libvlc_media_list_player_set_media_player(libvlc_media_list_player_t 
> *
> p_ml
>  }
>
>  
> /**************************************************************************
> + *        get_media_player (Public)
> + 
> **************************************************************************/
> +libvlc_media_player_t *
> libvlc_media_list_player_get_media_player(libvlc_media_list_player_t 
> *
> p_mlp)
> +{
> +    if (p_mlp->p_mi == NULL)
> +        return NULL;

How do you trigger this?

> +
> +    libvlc_media_player_retain(p_mlp->p_mi);
> +    return p_mlp->p_mi;
> +}
> +
> 
> +/**************************************************************************
>   *       set_media_list (Public)
>   
> **************************************************************************/
>  void
> libvlc_media_list_player_set_media_list(libvlc_media_list_player_t *
> p_mlp, libvlc_media_list_t * p_mlist)

-- 
Rémi Denis-Courmont
http://www.remlab.net/


More information about the vlc-devel mailing list