Add experimental MPV player backend (#161)

Experimental MPV player backend

Related to #14, #22, & #85

You can switch to MPV in advanced settings and toggle using hardware
decoding or not.

This uses code and buildscripts from
https://github.com/mpv-android/mpv-android, plus other third party
libraries to build MPV
This commit is contained in:
damontecres 2025-11-16 18:46:25 -05:00 committed by GitHub
parent d7b333e519
commit 6be2662d4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
84 changed files with 3987 additions and 289 deletions

View file

@ -11,8 +11,6 @@ defaults:
env:
APK_SHORT_NAME: Wholphin.apk
BUILD_TOOLS_VERSION: 36.0.0
NDK_VERSION: "29.0.14206865"
jobs:
publish:
@ -24,24 +22,12 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 0 # Need the tags to build
- name: Setup Python
uses: actions/setup-python@v5
- name: Setup
uses: ./.github/actions/setup
- name: Native build
uses: ./.github/actions/native-build
with:
python-version: '3.12'
- name: Setup JDK
uses: actions/setup-java@v5
with:
distribution: zulu
java-version: '21'
cache: 'gradle'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
packages: "tools platform-tools build-tools;${{ env.BUILD_TOOLS_VERSION }} ndk;${{ env.NDK_VERSION }}"
- name: Build ffmpeg decoder
id: ffmpeg-decoder
run: |
./build_ffmpeg_decoder.sh "${{ env.ANDROID_SDK_ROOT }}/ndk/${{ env.NDK_VERSION }}"
cache: false
- name: Build app
id: buildapp
env:
@ -51,21 +37,31 @@ jobs:
SIGNING_KEY: "${{ secrets.SIGNING_KEY }}"
run: |
./gradlew clean assembleRelease
echo "apk=$(ls app/build/outputs/apk/release/Wholphin-release*.apk)" >> "$GITHUB_OUTPUT"
- name: Verify signature
- name: Verify signatures
run: |
${{env.ANDROID_SDK_ROOT}}/build-tools/${{ env.BUILD_TOOLS_VERSION }}/apksigner verify --verbose --print-certs "${{ steps.buildapp.outputs.apk }}"
- name: Copy APK to ${{ env.APK_SHORT_NAME }}
echo "Verify APK signatures"
find app/build/outputs/apk -name '*.apk'
find app/build/outputs/apk -name '*.apk' -print0 | xargs -0 -n1 ${{env.ANDROID_SDK_ROOT}}/build-tools/${{ env.BUILD_TOOLS_VERSION }}/apksigner verify --verbose --print-certs
- name: Copy APK to shorter names
id: apks
run: |
cp "${{ steps.buildapp.outputs.apk }}" "${{ env.APK_SHORT_NAME }}"
find app/build/outputs/apk -name '*.apk' -print0 |
while IFS= read -r -d '' line; do
# Wholphin-release-0.2.9-62-g5c12e03-16-arm64-v8a.apk => Wholphin-arm64-v8a.apk
short_name="$(echo $line | sed -E 's/-release-[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[a-fA-F0-9]+-[0-9]+//')"
echo "$line => $short_name"
#cp "$line" "$short_name"
done
apks=$(find app/build/outputs/apk -name '*.apk' -print0 | tr '\0' ',' | sed 's/,$//')
echo "apks=$apks" >> "$GITHUB_OUTPUT"
- name: Checksums
run: |
echo "SHA256 checksums:"
sha256sum "${{ steps.buildapp.outputs.apk }}" "${{ env.APK_SHORT_NAME }}"
find app/build/outputs/apk -name '*.apk' -print0 | xargs -0 sha256sum
- name: Create GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: "${{ steps.buildapp.outputs.apk }},${{ env.APK_SHORT_NAME }}"
artifacts: "${{ steps.apks.outputs.apks }}"
makeLatest: true
prerelease: false
generateReleaseNotes: false