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>tags/n2.8
@@ -26,7 +26,7 @@ | |||||
/avprobe | /avprobe | ||||
/config.* | /config.* | ||||
/coverage.info | /coverage.info | ||||
/version.h | |||||
/avversion.h | |||||
/doc/*.1 | /doc/*.1 | ||||
/doc/*.html | /doc/*.html | ||||
/doc/*.pod | /doc/*.pod | ||||
@@ -162,8 +162,8 @@ GIT_LOG = $(SRC_PATH)/.git/logs/HEAD | |||||
.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak | .version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak | ||||
.version: M=@ | .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 | $(Q)touch .version | ||||
# force version.sh to run whenever version might have changed | # force version.sh to run whenever version might have changed | ||||
@@ -204,7 +204,7 @@ clean:: | |||||
distclean:: | distclean:: | ||||
$(RM) $(DISTCLEANSUFFIXES) | $(RM) $(DISTCLEANSUFFIXES) | ||||
$(RM) config.* .config libavutil/avconfig.h .version version.h | |||||
$(RM) config.* .config libavutil/avconfig.h .version avversion.h | |||||
config: | config: | ||||
$(SRC_PATH)/configure $(value LIBAV_CONFIGURATION) | $(SRC_PATH)/configure $(value LIBAV_CONFIGURATION) | ||||
@@ -45,8 +45,8 @@ | |||||
#include "libavutil/dict.h" | #include "libavutil/dict.h" | ||||
#include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||
#include "libavutil/cpu.h" | #include "libavutil/cpu.h" | ||||
#include "avversion.h" | |||||
#include "cmdutils.h" | #include "cmdutils.h" | ||||
#include "version.h" | |||||
#if CONFIG_NETWORK | #if CONFIG_NETWORK | ||||
#include "libavformat/network.h" | #include "libavformat/network.h" | ||||
#endif | #endif | ||||
@@ -19,6 +19,9 @@ API changes, most recent first: | |||||
2015-xx-xx - xxxxxxx - lavu 54.14.0 - cpu.h | 2015-xx-xx - xxxxxxx - lavu 54.14.0 - cpu.h | ||||
Add AV_CPU_FLAG_AVXSLOW. | 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 | 2015-xx-xx - xxxxxxx - lavc 56.23.0 | ||||
Add av_vda_default_init2. | Add av_vda_default_init2. | ||||
@@ -163,6 +163,13 @@ | |||||
*/ | */ | ||||
unsigned avutil_version(void); | 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. | * Return the libavutil build-time configuration. | ||||
*/ | */ | ||||
@@ -19,11 +19,18 @@ | |||||
#include "config.h" | #include "config.h" | ||||
#include "avutil.h" | #include "avutil.h" | ||||
#include "avversion.h" | |||||
/** | /** | ||||
* @file | * @file | ||||
* various utility functions | * various utility functions | ||||
*/ | */ | ||||
const char *av_version_info(void) | |||||
{ | |||||
return LIBAV_VERSION; | |||||
} | |||||
unsigned avutil_version(void) | unsigned avutil_version(void) | ||||
{ | { | ||||
return LIBAVUTIL_VERSION_INT; | return LIBAVUTIL_VERSION_INT; | ||||