On 2015-07-02 15:41:23 +0200, wm4 wrote:
> This returns something like "v12_dev0-1332-g333a27c". This is much more
> useful than the individual library versions, of which there are too
> many, and which are very hard to map back to releases or git commits.
> ---
> Now it generates a separate avversion.h, to avoid the include clash.
> ---
>  .gitignore         | 1 +
>  Makefile           | 6 +++---
>  cmdutils.c         | 2 +-
>  doc/APIchanges     | 3 +++
>  libavutil/avutil.h | 7 +++++++
>  libavutil/utils.c  | 7 +++++++
>  6 files changed, 22 insertions(+), 4 deletions(-)
> 
> diff --git a/.gitignore b/.gitignore
> index e225866..b395e20 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -44,6 +44,7 @@
>  /libavcodec/*_tables.c
>  /libavcodec/*_tables.h
>  /libavutil/avconfig.h
> +/libavutil/avversion.h
>  /tests/audiogen
>  /tests/base64
>  /tests/data/
> diff --git a/Makefile b/Makefile
> index cc016b3..8b62465 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -162,8 +162,8 @@ GIT_LOG     = $(SRC_PATH)/.git/logs/HEAD
>  .version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak
>  .version: M=@
>  
> -version.h .version:
> -     $(M)$(VERSION_SH) $(SRC_PATH) version.h $(EXTRA_VERSION)
> +libavutil/avversion.h .version:

please keep it in in the top level dir

> +     $(M)$(VERSION_SH) $(SRC_PATH) libavutil/avversion.h $(EXTRA_VERSION)
>       $(Q)touch .version
>  
>  # force version.sh to run whenever version might have changed
> @@ -204,7 +204,7 @@ clean::
>  
>  distclean::
>       $(RM) $(DISTCLEANSUFFIXES)
> -     $(RM) config.* .config libavutil/avconfig.h .version version.h
> +     $(RM) config.* .config libavutil/avconfig.h .version version.h 
> avversion.h

please remove version.h here

>  
>  config:
>       $(SRC_PATH)/configure $(value LIBAV_CONFIGURATION)
> diff --git a/cmdutils.c b/cmdutils.c
> index c4a7819..f5a8f0c 100644
> --- a/cmdutils.c
> +++ b/cmdutils.c
> @@ -37,6 +37,7 @@
>  #include "libswscale/swscale.h"
>  #include "libavutil/avassert.h"
>  #include "libavutil/avstring.h"
> +#include "libavutil/avversion.h"
>  #include "libavutil/mathematics.h"
>  #include "libavutil/imgutils.h"
>  #include "libavutil/parseutils.h"
> @@ -46,7 +47,6 @@
>  #include "libavutil/opt.h"
>  #include "libavutil/cpu.h"
>  #include "cmdutils.h"
> -#include "version.h"
>  #if CONFIG_NETWORK
>  #include "libavformat/network.h"
>  #endif
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 5d39ec6..f3026b7 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -13,6 +13,9 @@ libavutil:     2014-08-09
>  
>  API changes, most recent first:
>  
> +2015-xx-xx - xxxxxxx - lavu 56.xx.0
> +  Add av_version_info().
> +
>  2015-xx-xx - xxxxxxx - lavc 56.23.0
>    Add av_vda_default_init2.
>  
> diff --git a/libavutil/avutil.h b/libavutil/avutil.h
> index f056415..8ca773e 100644
> --- a/libavutil/avutil.h
> +++ b/libavutil/avutil.h
> @@ -164,6 +164,13 @@
>  unsigned avutil_version(void);
>  
>  /**
> + * Return an informative version string. This usually the actual release 
> version

+is

> + * number and a git hash. This string has no fixed format and can change any

s/and/or/; it's not a git hash, maybe 'git commit description'. It can also be 
empty but I guess we can ignore that

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

Reply via email to