[FFmpeg-devel] [VOTE] drop support for using libav* compiled with mingw/cygwin in msvc

mvplayer ffmpeg
Mon Feb 25 15:01:08 CET 2008


On Mon, Feb 25, 2008 at 9:52 PM, M?ns Rullg?rd <mans at mansr.com> wrote:

>
> mvplayer wrote:
> > On Mon, Feb 25, 2008 at 8:59 PM, Michael Niedermayer <michaelni at gmx.at>
> > wrote:
> >
> >> Hi
> >>
> >> r12154 has as it seems broken the in the past supported use of
> >> mingw/cygwin compiled libav* in msvc. Also the change has increased
> >> code complexity and size. I was already mildly against this change
> >> before it was commited though i left it to mans to decide. Now as it
> >> breaks use of libav* under msvc iam more strongly against it ...
> >>
> >> Anyway, my vote is to revert it. Theres no advantage in this commit and
> >> it breaks what was supported and also documented as such in the docs.
> >>
> > Agree!
> >
> > the r12154 is very ugly, it is more complicate and do nothing , it is
> even
> > worse than old one
>
> It's not ugly, it's not complicated, and it certainly does something.
> If you want this "fixed" (it's not a bug), please make some useful
> suggestions instead.
>
>
the old one supports msvc, but r12154 breaks msvc, do you try to drop msvc
to use libav* binary library from r12154? any reason to do so?

one guy on the list libav-user submited a patch to fix r12154, but the patch
is still odd, and not the same good/clean as old version

Please check!

Index: configure
===================================================================
--- configure (revision 12180)
+++ configure (working copy)
@@ -2002,12 +2002,19 @@
     echo "BUILD_DOC=yes" >> config.mak
 fi

-get_version(){
+get_version_digit(){
     name=$1
     file=$source_path/$2
-    grep "#define ${name}_VERSION_TRIPLET " "$file" | sed 's/[^0-9,]//g' |
tr , .
+    grep "#define ${name}_VERSION_"$3" " "$file" | sed 's/[^0-9,]//g' | tr
, .
 }

+get_version(){
+    maj=$(get_version_digit $1 $2 MAJOR)
+    med=$(get_version_digit $1 $2 MEDIUM)
+    min=$(get_version_digit $1 $2 MINOR)
+    echo $maj.$med.$min
+}
+
 sws_version=$(get_version  LIBSWSCALE  libswscale/swscale.h)
 pp_version=$(get_version   LIBPOSTPROC libpostproc/postprocess.h)
 lavc_version=$(get_version LIBAVCODEC  libavcodec/avcodec.h)
Index: libavcodec/avcodec.h
===================================================================
--- libavcodec/avcodec.h (revision 12180)
+++ libavcodec/avcodec.h (working copy)
@@ -30,10 +30,12 @@
 #include "avutil.h"
 #include <sys/types.h> /* size_t */

-#define LIBAVCODEC_VERSION_TRIPLET 51,50,1
+#define LIBAVCODEC_VERSION_MAJOR  51
+#define LIBAVCODEC_VERSION_MEDIUM 50
+#define LIBAVCODEC_VERSION_MINOR  1

-#define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_TRIPLET)
-#define LIBAVCODEC_VERSION      AV_VERSION(LIBAVCODEC_VERSION_TRIPLET)
+#define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR,
LIBAVCODEC_VERSION_MEDIUM, LIBAVCODEC_VERSION_MINOR)
+#define LIBAVCODEC_VERSION      AV_VERSION(LIBAVCODEC_VERSION_MAJOR,
LIBAVCODEC_VERSION_MEDIUM, LIBAVCODEC_VERSION_MINOR)
 #define LIBAVCODEC_BUILD        LIBAVCODEC_VERSION_INT

 #define LIBAVCODEC_IDENT        "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
Index: libavdevice/avdevice.h
===================================================================
--- libavdevice/avdevice.h (revision 12180)
+++ libavdevice/avdevice.h (working copy)
@@ -19,10 +19,12 @@
 #ifndef FFMPEG_AVDEVICE_H
 #define FFMPEG_AVDEVICE_H

-#define LIBAVDEVICE_VERSION_TRIPLET 52,0,0
+#define LIBAVDEVICE_VERSION_MAJOR   52
+#define LIBAVDEVICE_VERSION_MEDIUM  0
+#define LIBAVDEVICE_VERSION_MINOR   0

-#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_TRIPLET)
-#define LIBAVDEVICE_VERSION     AV_VERSION(LIBAVDEVICE_VERSION_TRIPLET)
+#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR,
LIBAVDEVICE_VERSION_MEDIUM, LIBAVDEVICE_VERSION_MINOR)
+#define LIBAVDEVICE_VERSION     AV_VERSION(LIBAVDEVICE_VERSION_MAJOR,
LIBAVDEVICE_VERSION_MEDIUM, LIBAVDEVICE_VERSION_MINOR)
 #define LIBAVDEVICE_BUILD       LIBAVDEVICE_VERSION_INT

 /**
Index: libavformat/avformat.h
===================================================================
--- libavformat/avformat.h (revision 12180)
+++ libavformat/avformat.h (working copy)
@@ -21,10 +21,12 @@
 #ifndef FFMPEG_AVFORMAT_H
 #define FFMPEG_AVFORMAT_H

-#define LIBAVFORMAT_VERSION_TRIPLET 52,7,0
+#define LIBAVFORMAT_VERSION_MAJOR  52
+#define LIBAVFORMAT_VERSION_MEDIUM 7
+#define LIBAVFORMAT_VERSION_MINOR  0

-#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_TRIPLET)
-#define LIBAVFORMAT_VERSION     AV_VERSION(LIBAVFORMAT_VERSION_TRIPLET)
+#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR,
LIBAVFORMAT_VERSION_MEDIUM, LIBAVFORMAT_VERSION_MINOR)
+#define LIBAVFORMAT_VERSION     AV_VERSION(LIBAVFORMAT_VERSION_MAJOR,
LIBAVFORMAT_VERSION_MEDIUM, LIBAVFORMAT_VERSION_MINOR)
 #define LIBAVFORMAT_BUILD       LIBAVFORMAT_VERSION_INT

 #define LIBAVFORMAT_IDENT       "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
Index: libavutil/avutil.h
===================================================================
--- libavutil/avutil.h (revision 12180)
+++ libavutil/avutil.h (working copy)
@@ -30,16 +30,15 @@
 #define AV_STRINGIFY(s)         AV_TOSTRING(s)
 #define AV_TOSTRING(s) #s

-#define AV_VERSION_INT_3(a, b, c) (a<<16 | b<<8 | c)
-#define AV_VERSION_INT(x) AV_VERSION_INT_3(x)
+#define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c)
+#define AV_VERSION(a, b, c) a.b.c

-#define AV_VERSION_3(a, b, c) a ##.## b ##.## c
-#define AV_VERSION(x) AV_VERSION_3(x)
+#define LIBAVUTIL_VERSION_MAJOR   49
+#define LIBAVUTIL_VERSION_MEDIUM  6
+#define LIBAVUTIL_VERSION_MINOR   0

-#define LIBAVUTIL_VERSION_TRIPLET 49,6,0
-
-#define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_TRIPLET)
-#define LIBAVUTIL_VERSION       AV_VERSION(LIBAVUTIL_VERSION_TRIPLET)
+#define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR,
LIBAVUTIL_VERSION_MEDIUM, LIBAVUTIL_VERSION_MINOR)
+#define LIBAVUTIL_VERSION       AV_VERSION(LIBAVUTIL_VERSION_MAJOR,
LIBAVUTIL_VERSION_MEDIUM, LIBAVUTIL_VERSION_MINOR)
 #define LIBAVUTIL_BUILD         LIBAVUTIL_VERSION_INT

 #define LIBAVUTIL_IDENT         "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION)
Index: libpostproc/postprocess.h
===================================================================
--- libpostproc/postprocess.h (revision 12180)
+++ libpostproc/postprocess.h (working copy)
@@ -29,10 +29,12 @@

 #include "avutil.h"

-#define LIBPOSTPROC_VERSION_TRIPLET 51,1,0
+#define LIBPOSTPROC_VERSION_MAJOR   51
+#define LIBPOSTPROC_VERSION_MEDIUM  1
+#define LIBPOSTPROC_VERSION_MINOR   0

-#define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_TRIPLET)
-#define LIBPOSTPROC_VERSION     AV_VERSION(LIBPOSTPROC_VERSION_TRIPLET)
+#define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR,
LIBPOSTPROC_VERSION_MEDIUM, LIBPOSTPROC_VERSION_MINOR)
+#define LIBPOSTPROC_VERSION     AV_VERSION(LIBPOSTPROC_VERSION_MAJOR,
LIBPOSTPROC_VERSION_MEDIUM, LIBPOSTPROC_VERSION_MINOR)
 #define LIBPOSTPROC_BUILD       LIBPOSTPROC_VERSION_INT

 #define LIBPOSTPROC_IDENT       "postproc"
AV_STRINGIFY(LIBPOSTPROC_VERSION)

>
>
>
> --
> ----------------------------------------
> Inspired by http://www.mvplayer.net
>




More information about the ffmpeg-devel mailing list