[vlc-devel] [PATCH 1/2] vlc_tick: Move documentation to header
Steve Lhomme
robux4 at ycbcr.xyz
Tue Oct 9 16:43:57 CEST 2018
LGTM
On 09/10/2018 11:42, Marvin Scholz wrote:
> Some part of the documentation was in the mtime.c file instead of the
> header, this commit moves it to the header so it is consistent.
> ---
>
> Maybe there is a specific reason this should not be in the header,
> but I could not find any. So I thought it would be good to move it
> to the header as it is a lot easier to find the documentation there
> when not looking at the rendered docs but the header files instead.
>
> ---
> include/vlc_tick.h | 14 ++++++++++++++
> src/misc/mtime.c | 13 -------------
> 2 files changed, 14 insertions(+), 13 deletions(-)
>
> diff --git a/include/vlc_tick.h b/include/vlc_tick.h
> index 157f6a2e38..0c39b6897a 100644
> --- a/include/vlc_tick.h
> +++ b/include/vlc_tick.h
> @@ -200,6 +200,17 @@ struct timespec timespec_from_vlc_tick(vlc_tick_t date);
> /*****************************************************************************
> * Prototypes
> *****************************************************************************/
> +
> +/**
> + * Convert seconds to a time in the format h:mm:ss.
> + *
> + * This function is provided for any interface function which need to print a
> + * time string in the format h:mm:ss
> + * date.
> + * \param secs the date to be converted
> + * \param psz_buffer should be a buffer at least MSTRTIME_MAX_SIZE characters
> + * \return psz_buffer is returned so this can be used as printf parameter.
> + */
> VLC_API char * secstotimestr( char *psz_buffer, int32_t secs );
>
> /**
> @@ -285,5 +296,8 @@ VLC_API vlc_tick_t date_Decrement(date_t *restrict date, uint32_t count);
>
> /** @} */
>
> +/**
> + * @return NTP 64-bits timestamp in host byte order.
> + */
> VLC_API uint64_t NTPtime64( void );
> #endif /* !__VLC_MTIME_ */
> diff --git a/src/misc/mtime.c b/src/misc/mtime.c
> index e3f87c895c..1fff5816e9 100644
> --- a/src/misc/mtime.c
> +++ b/src/misc/mtime.c
> @@ -39,16 +39,6 @@
> #include <time.h>
> #include <stdlib.h>
>
> -/**
> - * Convert seconds to a time in the format h:mm:ss.
> - *
> - * This function is provided for any interface function which need to print a
> - * time string in the format h:mm:ss
> - * date.
> - * \param secs the date to be converted
> - * \param psz_buffer should be a buffer at least MSTRTIME_MAX_SIZE characters
> - * \return psz_buffer is returned so this can be used as printf parameter.
> - */
> char *secstotimestr( char *psz_buffer, int32_t i_seconds )
> {
> if( unlikely(i_seconds < 0) )
> @@ -136,9 +126,6 @@ vlc_tick_t date_Decrement( date_t *p_date, uint32_t i_nb_samples )
> return p_date->date;
> }
>
> -/**
> - * @return NTP 64-bits timestamp in host byte order.
> - */
> uint64_t NTPtime64(void)
> {
> struct timespec ts;
> --
> 2.19.1
>
> _______________________________________________
> 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