Skip to content

Commit d34d100

Browse files
author
lzj
committed
添加amr编解码库
1 parent 8cf0940 commit d34d100

File tree

6,577 files changed

+1589417
-229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,577 files changed

+1589417
-229
lines changed

3.4.2/FFmpeg-iOS/include/libavutil/avconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
#ifndef AVUTIL_AVCONFIG_H
33
#define AVUTIL_AVCONFIG_H
44
#define AV_HAVE_BIGENDIAN 0
5-
#define AV_HAVE_FAST_UNALIGNED 1
5+
#define AV_HAVE_FAST_UNALIGNED 0
66
#endif /* AVUTIL_AVCONFIG_H */

3.4.2/build-ffmpeg-iOS.sh

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ rm -rf "$THIN"
2121
X264=`pwd`/x264-iOS #H.264编码器
2222
#FDK_AAC=`pwd`/fdk-aac-ios #AAC第三方解码库
2323
#FREETYPE=`pwd`/freetype-iOS #字体引擎库
24+
#FREETYPE=`pwd`/freetype-iOS #opencore-amr-0.1.5
25+
OPENCORE_AMR=`pwd`/opencore-amr-iOS
2426

2527
CONFIGURE_FLAGS="--enable-cross-compile --disable-debug --disable-programs --disable-ffplay --disable-doc --enable-pic --enable-static --disable-shared --disable-asm"
2628

27-
#剪裁参数
2829
CONFIGURE_FLAGS="$CONFIGURE_FLAGS --disable-encoders --disable-decoders \
29-
--disable-demuxers --disable-muxers --disable-parsers --disable-filters \
30-
--enable-encoder=h264,aac,libx264,pcm_*,*jpeg* \
31-
--enable-decoder=h264,aac,pcm_*,*jpeg* \
30+
--enable-demuxers --disable-muxers --disable-parsers --disable-filters \
31+
--enable-encoder=h264,aac,libx264,pcm_*,*jpeg*,libopencore_amrnb \
32+
--enable-decoder=h264,aac,pcm_*,*jpeg*,amrnb,amrwb \
3233
--enable-muxer=h264,aac,pcm_*,flv,mp4,avi \
33-
--enable-demuxer=h264,aac,pcm_*,flv,mp4,avi \
34-
--enable-parser=h264,aac,*jpeg* \
34+
--enable-parser=h264,aac,*jpeg*,mpeg* \
3535
--enable-avfilter --enable-filter=anull"
3636

3737
if [ "$X264" ]
@@ -49,7 +49,13 @@ then
4949
CONFIGURE_FLAGS="$CONFIGURE_FLAGS --enable-libfreetype"
5050
fi
5151

52-
ARCHS="armv7 armv7s arm64 x86_64 i386"
52+
if [ "$OPENCORE_AMR" ]
53+
then
54+
CONFIGURE_FLAGS="$CONFIGURE_FLAGS --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb"
55+
fi
56+
57+
ARCHS="armv7 armv7s arm64 x86_64"
58+
#ARCHS="arm64"
5359

5460
COMPILE="y"
5561
LIPO="y"
@@ -148,6 +154,11 @@ then
148154
CFLAGS="$CFLAGS -I$FREETYPE/include/freetype -I$CWD/libpng-iOS/include"
149155
LDFLAGS="$LDFLAGS -L$FREETYPE/lib -L$CWD/libpng-iOS/lib -lfreetype -lpng"
150156
fi
157+
if [ "$OPENCORE_AMR" ]
158+
then
159+
CFLAGS="$CFLAGS -I$OPENCORE_AMR/include"
160+
LDFLAGS="$LDFLAGS -L$OPENCORE_AMR/lib"
161+
fi
151162

152163
TMPDIR=${TMPDIR/%\/} $CWD/$SOURCE/configure \
153164
--target-os=darwin \
@@ -183,4 +194,6 @@ then
183194
cp -rf $THIN/$1/include $FAT
184195
fi
185196

197+
rm -rf $SCRATCH
198+
rm -rf $THIN
186199
echo "iOS FFmpeg bulid success!"

3.4.2/build-opencore-amr-iOS.sh

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#!/bin/sh
2+
set -xe
3+
4+
VERSION="0.1.5"
5+
LIBSRCNAME="opencore-amr"
6+
7+
CURRENTPATH=`pwd`
8+
DEST="${CURRENTPATH}/${LIBSRCNAME}-iOS"
9+
mkdir -p $DEST
10+
11+
DEVELOPER=`xcode-select -print-path`
12+
ARCHS="i386 x86_64 armv7 armv7s arm64"
13+
LIBS="libopencore-amrnb.a libopencore-amrwb.a"
14+
15+
tar zxvf ${LIBSRCNAME}-${VERSION}.tar.gz -C "${CURRENTPATH}"
16+
cd "${CURRENTPATH}/${LIBSRCNAME}-${VERSION}"
17+
18+
./configure
19+
20+
for arch in $ARCHS; do
21+
make clean
22+
IOSMV=" -miphoneos-version-min=8.0"
23+
case $arch in
24+
arm*)
25+
if [ $arch == "arm64" ]
26+
then
27+
IOSMV=" -miphoneos-version-min=8.0"
28+
fi
29+
echo "Building opencore-amr for iPhoneOS $arch ****************"
30+
PATH=`xcodebuild -version -sdk iphoneos PlatformPath`"/Developer/usr/bin:$PATH" \
31+
SDK=`xcodebuild -version -sdk iphoneos Path` \
32+
CXX="xcrun --sdk iphoneos clang++ -arch $arch $IOSMV --sysroot=$SDK -isystem $SDK/usr/include -fembed-bitcode" \
33+
LDFLAGS="-Wl" \
34+
./configure \
35+
--host=arm-apple-darwin \
36+
--prefix=$DEST \
37+
--disable-shared
38+
;;
39+
*)
40+
echo "Building opencore-amr for iPhoneSimulator $arch *****************"
41+
PATH=`xcodebuild -version -sdk iphonesimulator PlatformPath`"/Developer/usr/bin:$PATH" \
42+
CXX="xcrun --sdk iphonesimulator clang++ -arch $arch $IOSMV -fembed-bitcode" \
43+
./configure \
44+
--host=$arch \
45+
--prefix=$DEST \
46+
--disable-shared
47+
;;
48+
esac
49+
make -j3
50+
make install
51+
for i in $LIBS; do
52+
mv $DEST/lib/$i $DEST/lib/$i.$arch
53+
done
54+
done
55+
56+
echo "Merge into universal binary."
57+
58+
for i in $LIBS; do
59+
input=""
60+
for arch in $ARCHS; do
61+
input="$input $DEST/lib/$i.$arch"
62+
done
63+
xcrun lipo -create -output $DEST/lib/$i $input
64+
done
65+
66+
rm $DEST/lib/libopencore-amrnb.a.*
67+
rm $DEST/lib/libopencore-amrnb.la
68+
rm $DEST/lib/libopencore-amrwb.a.*
69+
rm $DEST/lib/libopencore-amrwb.la
70+
rm -rf $DEST/lib/pkgconfig

3.4.2/fat-faac/include/faac.h

Lines changed: 0 additions & 99 deletions
This file was deleted.

3.4.2/fat-faac/include/faaccfg.h

Lines changed: 0 additions & 122 deletions
This file was deleted.

3.4.2/ffmpeg-3.4.2/.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.pnm -diff -text
2+
tests/ref/fate/sub-scc eol=crlf

3.4.2/ffmpeg-3.4.2/.travis.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
language: c
2+
sudo: false
3+
os:
4+
- linux
5+
- osx
6+
addons:
7+
apt:
8+
packages:
9+
- nasm
10+
- diffutils
11+
compiler:
12+
- clang
13+
- gcc
14+
cache:
15+
directories:
16+
- ffmpeg-samples
17+
before_install:
18+
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update --all; fi
19+
install:
20+
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install nasm; fi
21+
script:
22+
- mkdir -p ffmpeg-samples
23+
- ./configure --samples=ffmpeg-samples --cc=$CC
24+
- make -j 8
25+
- make fate-rsync
26+
- make check -j 8

3.4.2/ffmpeg-3.4.2/CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Note to Github users
2+
Patches should be submitted to the [ffmpeg-devel mailing list](https://ffmpeg.org/mailman/listinfo/ffmpeg-devel) using `git format-patch` or `git send-email`. Github pull requests should be avoided because they are not part of our review process and **will be ignored**.
3+
4+
See [https://ffmpeg.org/developer.html#Contributing](https://ffmpeg.org/developer.html#Contributing) for more information.

0 commit comments

Comments
 (0)