Skip to content

Commit 32c521d

Browse files
authored
Revert "Feat: Intial FFmpeg av1 codec support with dav1d (#76)" (#91)
This reverts commit 56bca7f.
1 parent 1d331f1 commit 32c521d

File tree

3 files changed

+1
-119
lines changed

3 files changed

+1
-119
lines changed

.github/workflows/build.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ jobs:
1616
- name: Checkout repository
1717
uses: actions/checkout@v4
1818

19-
- name: Install build tools
20-
run: |
21-
sudo apt-get update
22-
sudo apt-get install ninja-build meson nasm
23-
2419
- name: Validate Gradle Wrapper
2520
uses: gradle/wrapper-validation-action@v3
2621

ffmpeg/setup.sh

Lines changed: 1 addition & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Versions
44
VPX_VERSION=1.13.0
55
MBEDTLS_VERSION=3.4.1
6-
DAV1D_VERSION=1.4.1
76
FFMPEG_VERSION=6.0
87

98
# Directories
@@ -14,12 +13,11 @@ SOURCES_DIR=$BASE_DIR/sources
1413
FFMPEG_DIR=$SOURCES_DIR/ffmpeg-$FFMPEG_VERSION
1514
VPX_DIR=$SOURCES_DIR/libvpx-$VPX_VERSION
1615
MBEDTLS_DIR=$SOURCES_DIR/mbedtls-$MBEDTLS_VERSION
17-
DAV1D_DIR=$SOURCES_DIR/dav1d-$DAV1D_VERSION
1816

1917
# Configuration
2018
ANDROID_ABIS="x86 x86_64 armeabi-v7a arm64-v8a"
2119
ANDROID_PLATFORM=21
22-
ENABLED_DECODERS="vorbis opus flac alac pcm_mulaw pcm_alaw mp3 amrnb amrwb aac ac3 eac3 dca mlp truehd h264 hevc mpeg2video mpegvideo libvpx_vp8 libvpx_vp9 libdav1d"
20+
ENABLED_DECODERS="vorbis opus flac alac pcm_mulaw pcm_alaw mp3 amrnb amrwb aac ac3 eac3 dca mlp truehd h264 hevc mpeg2video mpegvideo libvpx_vp8 libvpx_vp9"
2321
JOBS=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || sysctl -n hw.pysicalcpu || echo 4)
2422

2523
# Set up host platform variables
@@ -38,18 +36,6 @@ esac
3836
# Build tools
3937
TOOLCHAIN_PREFIX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/${HOST_PLATFORM}"
4038
CMAKE_EXECUTABLE=${ANDROID_SDK_HOME}/cmake/3.22.1/bin/cmake
41-
# Using Build machine's Ninja. It is used for libdav1d building. Needs to be installed
42-
NINJA_EXECUTABLE=$(which ninja)
43-
# Meson is used for libdav1d building. Needs to be installed
44-
MESON_EXECUTABLE=$(which meson)
45-
# Nasm is used for libdav1d building. Needs to be installed
46-
NASM_EXECUTABLE=$(which nasm)
47-
48-
export FAM_CC=${TOOLCHAIN_PREFIX}/bin/${TARGET}-clang
49-
export FAM_CXX=${FAM_CC}++
50-
export FAM_LD=${FAM_CC}# Forcing FFmpeg and its dependencies to look for dependencies
51-
# in a specific directory when pkg-config is used
52-
export PKG_CONFIG_LIBDIR=$BUILD_DIR/external/lib/pkgconfig
5339

5440
mkdir -p $SOURCES_DIR
5541

@@ -75,17 +61,6 @@ function downloadMbedTLS() {
7561
popd
7662
}
7763

78-
function downloadDav1d() {
79-
pushd $SOURCES_DIR
80-
echo "Downloading Dav1d source code of version $DAV1D_VERSION..."
81-
DAV1D_FILE=dav1d-$DAV1D_VERSION.tar.gz
82-
curl -L "https://code.videolan.org/videolan/dav1d/-/archive/${DAV1D_VERSION}/dav1d-${DAV1D_VERSION}.tar.gz" -o $DAV1D_FILE
83-
[ -e $DAV1D_FILE ] || { echo "$DAV1D_FILE does not exist. Exiting..."; exit 1; }
84-
tar -zxf $DAV1D_FILE
85-
rm $DAV1D_FILE
86-
popd
87-
}
88-
8964
function downloadFfmpeg() {
9065
pushd $SOURCES_DIR
9166
echo "Downloading FFmpeg source code of version $FFMPEG_VERSION..."
@@ -184,82 +159,6 @@ function buildMbedTLS() {
184159
popd
185160
}
186161

187-
function buildDav1d() {
188-
pushd $DAV1D_DIR
189-
190-
for ABI in $ANDROID_ABIS; do
191-
CPU_FAMILY=
192-
case $ABI in
193-
armeabi-v7a)
194-
TARGET_TRIPLE_MACHINE_ARCH=arm
195-
TOOLCHAIN=armv7a-linux-androideabi21-
196-
;;
197-
arm64-v8a)
198-
TARGET_TRIPLE_MACHINE_ARCH=aarch64
199-
TOOLCHAIN=aarch64-linux-android21-
200-
;;
201-
x86)
202-
TARGET_TRIPLE_MACHINE_ARCH=i686
203-
TOOLCHAIN=i686-linux-android21-
204-
CPU_FAMILY=x86
205-
;;
206-
x86_64)
207-
TARGET_TRIPLE_MACHINE_ARCH=x86_64
208-
TOOLCHAIN=x86_64-linux-android21-
209-
;;
210-
esac
211-
212-
CROSS_PREFIX_WITH_PATH=${TOOLCHAIN_PREFIX}/bin/llvm-
213-
214-
[ -z "${CPU_FAMILY}" ] && CPU_FAMILY=${TARGET_TRIPLE_MACHINE_ARCH}
215-
216-
CROSS_FILE_NAME=crossfile-${ABI}.meson
217-
218-
echo "
219-
[binaries]
220-
c = '${TOOLCHAIN_PREFIX}/bin/${TOOLCHAIN}clang'
221-
ar = '${CROSS_PREFIX_WITH_PATH}ar'
222-
strip = '${CROSS_PREFIX_WITH_PATH}strip'
223-
nasm = '${NASM_EXECUTABLE}'
224-
pkg-config = '$(which pkg-config)'
225-
226-
[properties]
227-
needs_exe_wrapper = true
228-
sys_root = '${TOOLCHAIN_PREFIX}/sysroot'
229-
230-
[host_machine]
231-
system = 'linux'
232-
cpu_family = '${CPU_FAMILY}'
233-
cpu = '${TARGET_TRIPLE_MACHINE_ARCH}'
234-
endian = 'little'
235-
236-
[built-in options]
237-
prefix = '$BUILD_DIR/external/$ABI'" > "${CROSS_FILE_NAME}"
238-
239-
BUILD_DIRECTORY=build/${ABI}
240-
241-
rm -rf ${BUILD_DIRECTORY}
242-
243-
${MESON_EXECUTABLE} setup . ${BUILD_DIRECTORY} \
244-
--cross-file ${CROSS_FILE_NAME} \
245-
--default-library=static \
246-
-Denable_asm=true \
247-
-Denable_tools=false \
248-
-Denable_tests=false \
249-
-Denable_examples=false \
250-
-Dtestdata_tests=false
251-
252-
pushd ${BUILD_DIRECTORY}
253-
254-
${NINJA_EXECUTABLE} -j$JOBS
255-
${NINJA_EXECUTABLE} install
256-
257-
popd
258-
259-
done
260-
popd
261-
}
262-
263162
function buildFfmpeg() {
264163
pushd $FFMPEG_DIR
265164
EXTRA_BUILD_CONFIGURATION_FLAGS=""
@@ -302,10 +201,6 @@ function buildFfmpeg() {
302201
;;
303202
esac
304203

305-
# Forcing FFmpeg and its dependencies to look for dependencies
306-
# in a specific directory when pkg-config is used
307-
export PKG_CONFIG_LIBDIR=$BUILD_DIR/external/$ABI/lib/pkgconfig
308-
309204
# Referencing dependencies without pkgconfig
310205
DEP_CFLAGS="-I$BUILD_DIR/external/$ABI/include"
311206
DEP_LD_FLAGS="-L$BUILD_DIR/external/$ABI/lib"
@@ -341,7 +236,6 @@ function buildFfmpeg() {
341236
--enable-swresample \
342237
--enable-avformat \
343238
--enable-libvpx \
344-
--enable-libdav1d \
345239
--enable-protocol=file,http,https,mmsh,mmst,pipe,rtmp,rtmps,rtmpt,rtmpts,rtp,tls \
346240
--enable-version3 \
347241
--enable-mbedtls \
@@ -379,11 +273,6 @@ if [[ ! -d "$OUTPUT_DIR" && ! -d "$BUILD_DIR" ]]; then
379273
downloadLibVpx
380274
fi
381275

382-
# Download Dav1d source code if it doesn't exist
383-
if [[ ! -d "$DAV1D_DIR" ]]; then
384-
downloadDav1d
385-
fi
386-
387276
# Download Ffmpeg source code if it doesn't exist
388277
if [[ ! -d "$FFMPEG_DIR" ]]; then
389278
downloadFfmpeg
@@ -392,6 +281,5 @@ if [[ ! -d "$OUTPUT_DIR" && ! -d "$BUILD_DIR" ]]; then
392281
# Building library
393282
buildMbedTLS
394283
buildLibVpx
395-
buildDav1d
396284
buildFfmpeg
397285
fi

media3ext/src/main/java/io/github/anilbeesetti/nextlib/media3ext/ffdecoder/FfmpegLibrary.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ public static boolean supportsFormat(String mimeType) {
124124
case MimeTypes.VIDEO_MPEG2 -> "mpeg2video";
125125
case MimeTypes.VIDEO_VP8 -> "libvpx";
126126
case MimeTypes.VIDEO_VP9 -> "libvpx-vp9";
127-
case MimeTypes.VIDEO_AV1 -> "libdav1d";
128127
default -> null;
129128
};
130129
}

0 commit comments

Comments
 (0)