想看看ffmpeg各个版本对应表,
#! /bin/bash
FF_PATH=$1
CURRENT=`pwd`
RESULT="$CURRENT/test_version.txt"
cd $FF_PATH
if [ -f $RESULT ]; then
rm $RESULT
fi
for i in `git branch -a | grep remotes/origin/release/ | grep -v HEAD | grep -v master`; do
git checkout $i
echo "Branch: $i" >> $RESULT
pushd $FF_PATH/libavcodec
grep -A 3 -E "#define[[:space:]]*LIBAVCODEC_VERSION_MAJOR[[:space:]]*[0-9]+" version.h >> $RESULT
popd
pushd $FF_PATH/libavformat
grep -A 3 -E "#define[[:space:]]*LIBAVFORMAT_VERSION_MAJOR[[:space:]]*[0-9]+" version.h >> $RESULT
popd
pushd $FF_PATH/libavutil
grep -E "#define[[:space:]]*LIBAVFILTER_VERSION_MAJOR[[:space:]]*[0-9]+" version_major.h >> $RESULT
grep -E "#define[[:space:]]*LIBAVFILTER_VERSION_MAJOR[[:space:]]*[0-9]+" version.h >> $RESULT
grep -A 3 -E "#define[[:space:]]*LIBAVUTIL_VERSION_MAJOR[[:space:]]*[0-9]+" version.h >> $RESULT
popd
pushd $FF_PATH/libswscale
grep -E "#define[[:space:]]*LIBSWSCALE_VERSION_MAJOR[[:space:]]*[0-9]+" version_major.h >> $RESULT
grep -E "#define[[:space:]]*LIBSWSCALE_VERSION_MAJOR[[:space:]]*[0-9]+" version.h >> $RESULT
grep -A 2 -E "#define[[:space:]]*LIBSWSCALE_VERSION_MINOR[[:space:]]*[0-9]+" version.h >> $RESULT
popd
pushd $FF_PATH/libavfilter
grep -E "#define[[:space:]]*LIBAVFILTER_VERSION_MAJOR[[:space:]]*[0-9]+" version_major.h >> $RESULT
grep -E "#define[[:space:]]*LIBAVFILTER_VERSION_MAJOR[[:space:]]*[0-9]+" version.h >> $RESULT
grep -A 2 -E "#define[[:space:]]*LIBAVFILTER_VERSION_MINOR[[:space:]]*[0-9]+" version.h >> $RESULT
popd
pushd $FF_PATH/libavdevice
grep -E "#define[[:space:]]*LIBAVDEVICE_VERSION_MAJOR[[:space:]]*[0-9]+" version_major.h >> $RESULT
grep -E "#define[[:space:]]*LIBAVDEVICE_VERSION_MAJOR[[:space:]]*[0-9]+" version.h >> $RESULT
grep -A 2 -E "#define[[:space:]]*LIBAVDEVICE_VERSION_MINOR[[:space:]]*[0-9]+" version.h >> $RESULT
popd
done
echo "Done"
版本对应:
Branch: remotes/origin/release/0.10
#define LIBAVCODEC_VERSION_MAJOR 53
#define LIBAVCODEC_VERSION_MINOR 61
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_MAJOR 53
#define LIBAVFORMAT_VERSION_MINOR 32
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MINOR 61
#define LIBAVFILTER_VERSION_MICRO 100
Branch: remotes/origin/release/0.11
#define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MINOR 23
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_MAJOR 54
#define LIBAVFORMAT_VERSION_MINOR 6
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MINOR 77
#define LIBAVFILTER_VERSION_MICRO 100
Branch: remotes/origin/release/0.5
Branch: remotes/origin/release/0.6
Branch: remotes/origin/release/0.7
#define LIBAV