diff options
author | wm4 <nfxjfg@googlemail.com> | 2015-07-02 19:04:59 +0200 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2015-07-02 23:22:53 +0200 |
commit | 1316df7aa98c4784f190d107206d0bb12c590b89 (patch) | |
tree | bc8922c649dd88312f81b9521bc82660c7c65fe3 | |
parent | a31c4b2cbef9aee15910fc3df52519aef46760de (diff) | |
download | ffmpeg-1316df7aa98c4784f190d107206d0bb12c590b89.tar.gz |
lavu: add an API function to return the Libav version string
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.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | cmdutils.c | 2 | ||||
-rw-r--r-- | doc/APIchanges | 3 | ||||
-rw-r--r-- | libavutil/avutil.h | 7 | ||||
-rw-r--r-- | libavutil/utils.c | 7 |
6 files changed, 22 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore index e225866ec6..d3cde42c65 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,7 @@ /avprobe /config.* /coverage.info -/version.h +/avversion.h /doc/*.1 /doc/*.html /doc/*.pod @@ -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) +avversion.h .version: + $(M)$(VERSION_SH) $(SRC_PATH) 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 avversion.h config: $(SRC_PATH)/configure $(value LIBAV_CONFIGURATION) diff --git a/cmdutils.c b/cmdutils.c index c4a78199f3..bc22ef5839 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -45,8 +45,8 @@ #include "libavutil/dict.h" #include "libavutil/opt.h" #include "libavutil/cpu.h" +#include "avversion.h" #include "cmdutils.h" -#include "version.h" #if CONFIG_NETWORK #include "libavformat/network.h" #endif diff --git a/doc/APIchanges b/doc/APIchanges index 0ddfb11e03..06ad1b7f4f 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -19,6 +19,9 @@ API changes, most recent first: 2015-xx-xx - xxxxxxx - lavu 54.14.0 - cpu.h Add AV_CPU_FLAG_AVXSLOW. +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 f056415f09..688068eff8 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -164,6 +164,13 @@ unsigned avutil_version(void); /** + * Return an informative version string. This usually is the actual release + * version number or a git commit description. This string has no fixed format + * and can change any time. It should never be parsed by code. + */ +const char *av_version_info(void); + +/** * Return the libavutil build-time configuration. */ const char *avutil_configuration(void); diff --git a/libavutil/utils.c b/libavutil/utils.c index c8c161dccb..8dcf3b6774 100644 --- a/libavutil/utils.c +++ b/libavutil/utils.c @@ -19,11 +19,18 @@ #include "config.h" #include "avutil.h" +#include "avversion.h" + /** * @file * various utility functions */ +const char *av_version_info(void) +{ + return LIBAV_VERSION; +} + unsigned avutil_version(void) { return LIBAVUTIL_VERSION_INT; |