Browse Source

lavu: add an API function to return the FFmpeg version string

This returns something like "N-73264-gb54ac84". This is much more useful
than the individual library versions, of which there are too much and
which are very hard to map back to releases or git commits.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.8
wm4 Michael Niedermayer 10 years ago
parent
commit
f91126643a
3 changed files with 15 additions and 0 deletions
  1. +3
    -0
      doc/APIchanges
  2. +7
    -0
      libavutil/avutil.h
  3. +5
    -0
      libavutil/utils.c

+ 3
- 0
doc/APIchanges View File

@@ -15,6 +15,9 @@ libavutil: 2014-08-09

API changes, most recent first:

2015-xx-xx - xxxxxx - lavu 53.xx.100
Add avutil_version_info().

-------- 8< --------- FFmpeg 2.7 was cut here -------- 8< ---------

2015-06-04 - cc17b43 - lswr 1.2.100


+ 7
- 0
libavutil/avutil.h View File

@@ -170,6 +170,13 @@
*/
unsigned avutil_version(void);

/**
* Return an informative version string. This usually the actual release version
* number and a git hash. This string has no fixed format and can change any
* time. It should never be parsed by code.
*/
const char *avutil_version_info(void);

/**
* Return the libavutil build-time configuration.
*/


+ 5
- 0
libavutil/utils.c View File

@@ -30,6 +30,11 @@
#include "libavutil/ffversion.h"
const char av_util_ffversion[] = "FFmpeg version " FFMPEG_VERSION;

const char *avutil_version_info(void)
{
return FFMPEG_VERSION;
}

unsigned avutil_version(void)
{
static int checks_done;


Loading…
Cancel
Save