Skip to content

Commit

Permalink
build: rename version.h to libavutil/ffversion.h
Browse files Browse the repository at this point in the history
Also the libavutil/ffversion.h will be installed.

Rationale:
* Applications might want to know FFmpeg's version besides the individual
  libraries'.
* Avoids file name clash between FFmpeg's ./version.h and lib*/version.h when
  a library source file includes both and is compiled on an out-of-tree build.

Fixes #1769.

Signed-off-by: Timothy Gu <[email protected]>
Reviewed-by: James Almer <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
TimothyGu authored and michaelni committed Nov 30, 2013
1 parent c580691 commit 82b2e9c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
/ffserver
/config.*
/coverage.info
/version.h
/doc/*.1
/doc/*.3
/doc/*.html
Expand All @@ -53,6 +52,7 @@
/libavcodec/*_tables.c
/libavcodec/*_tables.h
/libavutil/avconfig.h
/libavutil/ffversion.h
/tests/audiogen
/tests/base64
/tests/data/
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,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/ffversion.h .version:
$(M)$(VERSION_SH) $(SRC_PATH) libavutil/ffversion.h $(EXTRA_VERSION)
$(Q)touch .version

# force version.sh to run whenever version might have changed
Expand Down Expand Up @@ -163,7 +163,7 @@ clean::

distclean::
$(RM) $(DISTCLEANSUFFIXES)
$(RM) config.* .config libavutil/avconfig.h .version version.h libavcodec/codec_names.h
$(RM) config.* .config libavutil/avconfig.h .version libavutil/ffversion.h libavcodec/codec_names.h

config:
$(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION)
Expand Down
2 changes: 1 addition & 1 deletion cmdutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
#include "libavutil/dict.h"
#include "libavutil/opt.h"
#include "libavutil/cpu.h"
#include "libavutil/ffversion.h"
#include "cmdutils.h"
#include "version.h"
#if CONFIG_NETWORK
#include "libavformat/network.h"
#endif
Expand Down
4 changes: 4 additions & 0 deletions doc/APIchanges
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ libavutil: 2012-10-22

API changes, most recent first:

2013-11-xx - xxxxxxx - lavu 52.56.100 - ffversion.h
Moves version.h to libavutil/ffversion.h.
Install ffversion.h and make it public.

2013-11-xx - xxxxxxx- - lavu 52.19.0 - frame.h
Add AV_FRAME_DATA_A53_CC value to the AVFrameSideDataType enum, which
identifies ATSC A53 Part 4 Closed Captions data.
Expand Down
2 changes: 1 addition & 1 deletion ffprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/

#include "config.h"
#include "version.h"
#include "libavutil/ffversion.h"

#include <string.h>

Expand Down
3 changes: 2 additions & 1 deletion libavutil/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ ARCH_HEADERS = bswap.h \
intreadwrite.h \
timer.h \

BUILT_HEADERS = avconfig.h
BUILT_HEADERS = avconfig.h \
ffversion.h

OBJS = adler32.o \
aes.o \
Expand Down
2 changes: 1 addition & 1 deletion libavutil/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
*/

#define LIBAVUTIL_VERSION_MAJOR 52
#define LIBAVUTIL_VERSION_MINOR 55
#define LIBAVUTIL_VERSION_MINOR 56
#define LIBAVUTIL_VERSION_MICRO 100

#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
Expand Down

0 comments on commit 82b2e9c

Please sign in to comment.