mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Improvements to ffmpeg decoders build script (#1110)
## Description A few improvements to the ffmpeg decoder & mpv build scripts. Mainly changes the dependency fetching so the scripts are more idempotent, though some rebuilds still always occur. ### Related issues Related to https://github.com/damontecres/Wholphin/pull/1106#issuecomment-4077678690 ### Testing Local builds ## Screenshots N/A ## AI or LLM usage None
This commit is contained in:
parent
3af9775592
commit
d184990b16
3 changed files with 25 additions and 4 deletions
|
|
@ -1,3 +1,14 @@
|
||||||
# FFmpeg ExoPlayer decoder extension module
|
# FFmpeg ExoPlayer decoder extension module
|
||||||
|
|
||||||
Builds the ffmpeg decoder extension module for `ExoPlayer` which supports extra codecs during playback.
|
Builds the ffmpeg decoder extension module for `ExoPlayer` which supports extra codecs during playback.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./build_ffmpeg_decoder.sh /path/to/android/ndk
|
||||||
|
```
|
||||||
|
|
||||||
|
Or clean build:
|
||||||
|
```sh
|
||||||
|
./build_ffmpeg_decoder.sh /path/to/android/ndk --clean
|
||||||
|
```
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,12 @@ AV1_MODULE_PATH="$MEDIA_PATH/libraries/decoder_av1/src/main"
|
||||||
HOST="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
HOST="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
||||||
HOST_PLATFORM="$HOST-x86_64"
|
HOST_PLATFORM="$HOST-x86_64"
|
||||||
|
|
||||||
|
if [[ "$2" == "--clean" ]]; then
|
||||||
|
rm -rf ffmpeg_decoder
|
||||||
|
rm -f "$TARGET_PATH/lib-decoder-ffmpeg-release.aar"
|
||||||
|
rm -f "$TARGET_PATH/lib-decoder-av1-release.aar"
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p "$TARGET_PATH"
|
mkdir -p "$TARGET_PATH"
|
||||||
mkdir -p ffmpeg_decoder
|
mkdir -p ffmpeg_decoder
|
||||||
|
|
||||||
|
|
@ -38,14 +44,16 @@ pushd ffmpeg_decoder || exit
|
||||||
|
|
||||||
if [[ -d media ]]; then
|
if [[ -d media ]]; then
|
||||||
pushd media || exit
|
pushd media || exit
|
||||||
git checkout --force "$media_version"
|
git fetch origin "$media_version" --depth 1
|
||||||
|
git checkout --force FETCH_HEAD
|
||||||
else
|
else
|
||||||
git clone https://github.com/androidx/media.git --depth 1 --single-branch -b "$media_version" media
|
git clone https://github.com/androidx/media.git --depth 1 --single-branch -b "$media_version" media
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d ffmpeg ]]; then
|
if [[ -d ffmpeg ]]; then
|
||||||
pushd ffmpeg || exit
|
pushd ffmpeg || exit
|
||||||
git checkout --force "$FFMPEG_BRANCH"
|
git fetch origin "$FFMPEG_BRANCH" --depth 1
|
||||||
|
git checkout --force FETCH_HEAD
|
||||||
else
|
else
|
||||||
git clone https://github.com/FFmpeg/FFmpeg --depth 1 --single-branch -b "$FFMPEG_BRANCH" ffmpeg
|
git clone https://github.com/FFmpeg/FFmpeg --depth 1 --single-branch -b "$FFMPEG_BRANCH" ffmpeg
|
||||||
fi
|
fi
|
||||||
|
|
@ -68,7 +76,8 @@ pushd "$AV1_MODULE_PATH/jni" || exit
|
||||||
|
|
||||||
if [[ -d dav1d ]]; then
|
if [[ -d dav1d ]]; then
|
||||||
pushd dav1d || exit
|
pushd dav1d || exit
|
||||||
git checkout --force "$DAV1D_BRANCH"
|
git fetch origin "$DAV1D_BRANCH" --depth 1
|
||||||
|
git checkout --force FETCH_HEAD
|
||||||
else
|
else
|
||||||
git clone https://code.videolan.org/videolan/dav1d --depth 1 --single-branch -b "$DAV1D_BRANCH" dav1d
|
git clone https://code.videolan.org/videolan/dav1d --depth 1 --single-branch -b "$DAV1D_BRANCH" dav1d
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,8 @@ function clone(){
|
||||||
|
|
||||||
if [[ -d "$dir" ]]; then
|
if [[ -d "$dir" ]]; then
|
||||||
pushd "$dir" || exit
|
pushd "$dir" || exit
|
||||||
git checkout --force "$branch"
|
git fetch origin "$branch" --depth 1
|
||||||
|
git checkout --force FETCH_HEAD
|
||||||
popd || exit
|
popd || exit
|
||||||
else
|
else
|
||||||
git clone "$repo" --depth 1 --single-branch -b "$branch" "$dir" "$@"
|
git clone "$repo" --depth 1 --single-branch -b "$branch" "$dir" "$@"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue