Compare commits
2 Commits
0159ba572b
...
62fe80b264
Author | SHA1 | Date | |
---|---|---|---|
62fe80b264 | |||
5d504f1267 |
36
android-all.sh
Executable file
36
android-all.sh
Executable file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
./android.sh --lts --enable-android-media-codec --enable-android-zlib --disable-x86-64
|
||||||
|
mv prebuilt/bundle-android-aar-lts/ffmpeg-kit/ffmpeg-kit.aar ffmpeg-kit-min.aar
|
||||||
|
|
||||||
|
./android.sh --lts --enable-android-media-codec --enable-android-zlib --disable-x86-64 \
|
||||||
|
--enable-{gpl,x264,x265,xvidcore,libvidstab}
|
||||||
|
mv prebuilt/bundle-android-aar-lts/ffmpeg-kit/ffmpeg-kit.aar ffmpeg-kit-min-gpl.aar
|
||||||
|
|
||||||
|
./android.sh --lts --enable-android-media-codec --enable-android-zlib --disable-x86-64 \
|
||||||
|
--enable-{gmp,gnutls}
|
||||||
|
mv prebuilt/bundle-android-aar-lts/ffmpeg-kit/ffmpeg-kit.aar ffmpeg-kit-https.aar
|
||||||
|
|
||||||
|
./android.sh --lts --enable-android-media-codec --enable-android-zlib --disable-x86-64 \
|
||||||
|
--enable-{gmp,gnutls} \
|
||||||
|
--enable-{gpl,x264,x265,xvidcore,libvidstab}
|
||||||
|
mv prebuilt/bundle-android-aar-lts/ffmpeg-kit/ffmpeg-kit.aar ffmpeg-kit-https-gpl.aar
|
||||||
|
|
||||||
|
./android.sh --lts --enable-android-media-codec --enable-android-zlib --disable-x86-64 \
|
||||||
|
--enable-{lame,libilbc,libvorbis,opencore-amr,opus,shine,soxr,speex,twolame,vo-amrwbenc}
|
||||||
|
mv prebuilt/bundle-android-aar-lts/ffmpeg-kit/ffmpeg-kit.aar ffmpeg-kit-audio.aar
|
||||||
|
|
||||||
|
./android.sh --lts --enable-android-media-codec --enable-android-zlib --disable-x86-64 \
|
||||||
|
--enable-{dav1d,fontconfig,freetype,fribidi,kvazaar,libass,libiconv,libtheora,libvpx,libwebp,snappy,zimg}
|
||||||
|
mv prebuilt/bundle-android-aar-lts/ffmpeg-kit/ffmpeg-kit.aar ffmpeg-kit-video.aar
|
||||||
|
|
||||||
|
./android.sh --lts --enable-android-media-codec --enable-android-zlib --disable-x86-64 \
|
||||||
|
--enable-{dav1d,fontconfig,freetype,fribidi,gmp,gnutls,kvazaar,lame,libass,libiconv,libilbc,libtheora,libvorbis,libvpx,libwebp,libxml2,opencore-amr,opus,shine,snappy,soxr,speex,twolame,vo-amrwbenc,zimg}
|
||||||
|
mv prebuilt/bundle-android-aar-lts/ffmpeg-kit/ffmpeg-kit.aar ffmpeg-kit-full.aar
|
||||||
|
|
||||||
|
./android.sh --lts --enable-android-media-codec --enable-android-zlib --disable-x86-64 \
|
||||||
|
--enable-{gpl,x264,x265,xvidcore,libvidstab} \
|
||||||
|
--enable-{dav1d,fontconfig,freetype,fribidi,gmp,gnutls,kvazaar,lame,libass,libiconv,libilbc,libtheora,libvorbis,libvpx,libwebp,libxml2,opencore-amr,opus,shine,snappy,soxr,speex,twolame,vo-amrwbenc,zimg}
|
||||||
|
mv prebuilt/bundle-android-aar-lts/ffmpeg-kit/ffmpeg-kit.aar ffmpeg-kit-full-gpl.aar
|
|
@ -478,6 +478,10 @@ if [[ $? -ne 0 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
patch "${BASEDIR}"/src/ffmpeg/libavcodec/mediacodecenc.c \
|
||||||
|
"${BASEDIR}"/tools/patch/cpp/ffmpeg/mediacodecenc.c.patch \
|
||||||
|
-N -r /dev/null || true 1>> build.log 2>&1
|
||||||
|
|
||||||
if [[ -z ${NO_OUTPUT_REDIRECTION} ]]; then
|
if [[ -z ${NO_OUTPUT_REDIRECTION} ]]; then
|
||||||
make -j$(get_cpu_count) 1>>"${BASEDIR}"/build.log 2>&1
|
make -j$(get_cpu_count) 1>>"${BASEDIR}"/build.log 2>&1
|
||||||
|
|
||||||
|
|
32
tools/patch/cpp/ffmpeg/mediacodecenc.c.patch
Normal file
32
tools/patch/cpp/ffmpeg/mediacodecenc.c.patch
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
|
||||||
|
index 984014f..f2e5ab1 100644
|
||||||
|
--- a/libavcodec/mediacodecenc.c
|
||||||
|
+++ b/libavcodec/mediacodecenc.c
|
||||||
|
@@ -198,19 +198,14 @@ static av_cold int mediacodec_init(AVCodecContext *avctx)
|
||||||
|
}
|
||||||
|
|
||||||
|
ff_AMediaFormat_setString(format, "mime", codec_mime);
|
||||||
|
- // Workaround the alignment requirement of mediacodec. We can't do it
|
||||||
|
- // silently for AV_PIX_FMT_MEDIACODEC.
|
||||||
|
- if (avctx->pix_fmt != AV_PIX_FMT_MEDIACODEC) {
|
||||||
|
- s->width = FFALIGN(avctx->width, 16);
|
||||||
|
- s->height = FFALIGN(avctx->height, 16);
|
||||||
|
- } else {
|
||||||
|
- s->width = avctx->width;
|
||||||
|
- s->height = avctx->height;
|
||||||
|
- if (s->width % 16 || s->height % 16)
|
||||||
|
- av_log(avctx, AV_LOG_WARNING,
|
||||||
|
- "Video size %dx%d isn't align to 16, it may have device compatibility issue\n",
|
||||||
|
- s->width, s->height);
|
||||||
|
- }
|
||||||
|
+
|
||||||
|
+ s->width = avctx->width;
|
||||||
|
+ s->height = avctx->height;
|
||||||
|
+ if (s->width % 16 || s->height % 16)
|
||||||
|
+ av_log(avctx, AV_LOG_WARNING,
|
||||||
|
+ "Video size %dx%d isn't align to 16, it may have device compatibility issue\n",
|
||||||
|
+ s->width, s->height);
|
||||||
|
+
|
||||||
|
ff_AMediaFormat_setInt32(format, "width", s->width);
|
||||||
|
ff_AMediaFormat_setInt32(format, "height", s->height);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user