[libav-commits] avutil: Move library version related macros to version.h

Diego Biurrun git at libav.org
Thu Dec 26 23:43:12 CET 2013


Module: libav
Branch: master
Commit: b83d1ee3b41cfe8357836e2582104db2f3364cb0

Author:    Diego Biurrun <diego at biurrun.de>
Committer: Diego Biurrun <diego at biurrun.de>
Date:      Wed Dec 25 17:16:05 2013 +0100

avutil: Move library version related macros to version.h

This is a more sensible place for these macros.

---

 libavcodec/version.h    |    2 ++
 libavdevice/version.h   |    2 +-
 libavfilter/version.h   |    2 +-
 libavformat/version.h   |    2 +-
 libavresample/version.h |    2 ++
 libavutil/avutil.h      |   17 -----------------
 libavutil/utils.c       |    2 +-
 libavutil/version.h     |   17 +++++++++++++++++
 libswscale/version.h    |    2 +-
 9 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/libavcodec/version.h b/libavcodec/version.h
index 9a43e82..73c786d 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -26,6 +26,8 @@
  * Libavcodec version macros.
  */
 
+#include "libavutil/version.h"
+
 #define LIBAVCODEC_VERSION_MAJOR 55
 #define LIBAVCODEC_VERSION_MINOR 31
 #define LIBAVCODEC_VERSION_MICRO  0
diff --git a/libavdevice/version.h b/libavdevice/version.h
index 9731606..487b4c0 100644
--- a/libavdevice/version.h
+++ b/libavdevice/version.h
@@ -25,7 +25,7 @@
  * Libavdevice version macros
  */
 
-#include "libavutil/avutil.h"
+#include "libavutil/version.h"
 
 #define LIBAVDEVICE_VERSION_MAJOR 54
 #define LIBAVDEVICE_VERSION_MINOR  0
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 9f00ffe..f41114b 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -27,7 +27,7 @@
  * Libavfilter version macros
  */
 
-#include "libavutil/avutil.h"
+#include "libavutil/version.h"
 
 #define LIBAVFILTER_VERSION_MAJOR  4
 #define LIBAVFILTER_VERSION_MINOR  0
diff --git a/libavformat/version.h b/libavformat/version.h
index 23a9d67..a170c06 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -27,7 +27,7 @@
  * Libavformat version macros
  */
 
-#include "libavutil/avutil.h"
+#include "libavutil/version.h"
 
 #define LIBAVFORMAT_VERSION_MAJOR 55
 #define LIBAVFORMAT_VERSION_MINOR 10
diff --git a/libavresample/version.h b/libavresample/version.h
index 3cc4441..fce5770 100644
--- a/libavresample/version.h
+++ b/libavresample/version.h
@@ -25,6 +25,8 @@
  * Libavresample version macros.
  */
 
+#include "libavutil/version.h"
+
 #define LIBAVRESAMPLE_VERSION_MAJOR  1
 #define LIBAVRESAMPLE_VERSION_MINOR  1
 #define LIBAVRESAMPLE_VERSION_MICRO  0
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index 782284d..928a014 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -168,23 +168,6 @@
  */
 
 /**
- * @defgroup version_utils Library Version Macros
- *
- * Useful to check and match library version in order to maintain
- * backward compatibility.
- *
- * @{
- */
-
-#define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c)
-#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
-#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
-
-/**
- * @}
- */
-
-/**
  * @addtogroup lavu_ver
  * @{
  */
diff --git a/libavutil/utils.c b/libavutil/utils.c
index 9b18c97..2bb27de 100644
--- a/libavutil/utils.c
+++ b/libavutil/utils.c
@@ -17,7 +17,7 @@
  */
 
 #include "config.h"
-#include "avutil.h"
+#include "version.h"
 
 /**
  * @file
diff --git a/libavutil/version.h b/libavutil/version.h
index 9e1f2d8..cf5cc2f 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -22,6 +22,23 @@
 #include "avutil.h"
 
 /**
+ * @defgroup version_utils Library Version Macros
+ *
+ * Useful to check and match library version in order to maintain
+ * backward compatibility.
+ *
+ * @{
+ */
+
+#define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c)
+#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
+#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
+
+/**
+ * @}
+ */
+
+/**
  * @file
  * @ingroup lavu
  * Libavutil version macros
diff --git a/libswscale/version.h b/libswscale/version.h
index 5483673..0f32c7a 100644
--- a/libswscale/version.h
+++ b/libswscale/version.h
@@ -24,7 +24,7 @@
  * swscale version macros
  */
 
-#include "libavutil/avutil.h"
+#include "libavutil/version.h"
 
 #define LIBSWSCALE_VERSION_MAJOR 2
 #define LIBSWSCALE_VERSION_MINOR 1



More information about the libav-commits mailing list