On Mon, 30 Dec 2013 09:27:53 +0100, Luca Barbato <[email protected]> wrote:
> From: Derek Buitenhuis <[email protected]>
> 
> Deprecate AV_TIME_BASE{_Q, } and provide av_time_base{_q, }()
> to access this value.
> 
> This way the internal timebase can change without impacting the user
> and using accessors makes the life of foreign language users much
> easier.
> 
> Signed-off-by: Derek Buitenhuis <[email protected]>
> Signed-off-by: Luca Barbato <[email protected]>
> ---
>  doc/APIchanges      |  4 ++++
>  libavutil/avutil.h  | 50 ++++++++++++++++++++++++++++++++++++++------------
>  libavutil/utils.c   | 10 ++++++++++
>  libavutil/version.h |  5 ++++-
>  4 files changed, 56 insertions(+), 13 deletions(-)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 60e16d8..c256548 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -13,6 +13,10 @@ libavutil:     2013-12-xx
>  
>  API changes, most recent first:
>  
> +2013-12-xx - xxxxxxx - lavu 53.1.0 - avutil.h
> +  Add av_time_base() and deprecate AV_TIME_BASE.
> +  Add av_time_base_q() and deprecate AV_TIME_BASE_Q.
> +
>  2013-12-xx - xxxxxxx - lavc 55.30.0 - avcodec.h
>    Add HEVC profiles
>  
> diff --git a/libavutil/avutil.h b/libavutil/avutil.h
> index a0d35d1..0981dd3 100644
> --- a/libavutil/avutil.h
> +++ b/libavutil/avutil.h
> @@ -228,18 +228,6 @@ enum AVMediaType {
>  #define AV_NOPTS_VALUE          INT64_C(0x8000000000000000)
>  
>  /**
> - * Internal time base represented as integer
> - */
> -
> -#define AV_TIME_BASE            1000000
> -
> -/**
> - * Internal time base represented as fractional value
> - */
> -
> -#define AV_TIME_BASE_Q          (AVRational){1, AV_TIME_BASE}
> -
> -/**
>   * @}
>   * @}
>   * @defgroup lavu_picture Image related
> @@ -273,6 +261,7 @@ char av_get_picture_type_char(enum AVPictureType 
> pict_type);
>   */
>  
>  #include "error.h"
> +#include "rational.h"
>  #include "version.h"
>  #include "macros.h"
>  
> @@ -281,4 +270,41 @@ char av_get_picture_type_char(enum AVPictureType 
> pict_type);
>   * @}
>   */
>  
> +/**
> + * @addtogroup lavu_time
> + * @{
> + */
> +
> +/**
> + * Return the integer representation of the internal time base

"the internal time base" might make a reader think we always convert to this
timebase internally, which is not true. I'd change it to "default timebase" or
something along those lines.

Also, this is not "the integer representation" of the timebase (that would be
0), but of its inverse.

And perhaps we could just say in the docs that it's microsecond resolution, I
don't think we're likely to change that any time soon (or ever).

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to