[vlc-devel] [PATCH 2/2] libvlc: media_player: Clarify doc

Rémi Denis-Courmont remi at remlab.net
Thu Jun 1 18:15:50 CEST 2017


Le torstaina 1. kesäkuuta 2017, 16.30.52 EEST Hugo Beauzée-Luyssen a écrit :
> ---
>  include/vlc/libvlc_media_player.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/vlc/libvlc_media_player.h
> b/include/vlc/libvlc_media_player.h index dbeafa29d1..c6603d4ac5 100644
> --- a/include/vlc/libvlc_media_player.h
> +++ b/include/vlc/libvlc_media_player.h
> @@ -1418,7 +1418,7 @@ int libvlc_video_set_track( libvlc_media_player_t
> *p_mi, int i_track ); *
>   * \param p_mi media player instance
>   * \param num number of video output (typically 0 for the first/only one)
> - * \param psz_filepath the path where to save the screenshot to
> + * \param psz_filepath the path of a file or a folder to save the
> screenshot into * \param i_width the snapshot's width
>   * \param i_height the snapshot's height
>   * \return 0 on success, -1 if the video was not found

I don´t think magically guessing the nature of a parameter is good API design. 
AFAICT, this should only accept a file name, as the existing description 
implies.

Accepting a directory does not even make much sense. It would be awkward at 
best for the application to recover the actual file name.

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list