[FFmpeg-devel] avcodec_version() and friends

Måns Rullgård mans
Fri Jul 11 10:15:47 CEST 2008


Andreas ?man <andreas at lonelycoder.com> writes:

> Hi
>
> When helping somebody on irc who has screwed up his includepaths
> i realized all libs expect lavc lacks functions equivalent to
> avcodec_version().
>
> Attached patch add such functions for lavf. If this is wanted
> i can fix for the other libs as well.
>
> While at it I fixed doxygen comments for the lavc ones.
>
> Index: libavcodec/avcodec.h
> ===================================================================
> --- libavcodec/avcodec.h	(revision 14161)
> +++ libavcodec/avcodec.h	(working copy)
> @@ -2514,9 +2514,16 @@
>  #endif
>  AVCodec *av_codec_next(AVCodec *c);
>  
> -/* returns LIBAVCODEC_VERSION_INT constant */
> +/**
> + * Get lavc version.
> + * @return LIBAVCODEC_VERSION_INT constant 
> + */
>  unsigned avcodec_version(void);
> -/* returns LIBAVCODEC_BUILD constant */
> +
> +/**
> + * Get lavc build id.
> + * @return LIBAVCODEC_BUILD constant 
> + */
>  unsigned avcodec_build(void);

LIBAVCODEC_BUILD and LIBAVCODEC_VERSION_INT are the same number.  I
suggest we deprecate avcodec_build().

>  /**
> Index: libavformat/avformat.h
> ===================================================================
> --- libavformat/avformat.h	(revision 14161)
> +++ libavformat/avformat.h	(working copy)
> @@ -570,6 +570,18 @@
>  AVInputFormat  *av_iformat_next(AVInputFormat  *f);
>  AVOutputFormat *av_oformat_next(AVOutputFormat *f);
>  
> +/**
> + * Get lavf version.
> + * @return LIBAVFORMAT_VERSION_INT constant 
> + */
> +unsigned avformat_version(void);
> +
> +/**
> + * Get lavf build id.
> + * @return LIBAVFORMAT_BUILD constant 
> + */
> +unsigned avformat_build(void);

Again, _BUILD is the same _VERSION_INT.  There is no need for this
function.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list