Files
RetroArch/.github/workflows/Android.yml
Codex 12f968b9fc Capture no-core menu recording from final video and mixed audio
Use full-window Vulkan menu capture with monotonic presentation timestamps and a bounded post-mixer PCM tap. Attach and retire the tap only through nonblocking cold operations on the existing audio owner lock; retain all I/O and GPU owners until independent retirement. Keep core AV information unchanged and Android native recording behind its explicit acceptance flag.

Validate the recording and shipping hook contracts on Windows and Linux, GCC/Clang ASan/UBSan and TSan, both NDK workflow matrices, object inventories and a default C89 frontend. Physical Android A/V and recovery acceptance remains open.
2026-10-23 18:20:56 +02:00

441 lines
25 KiB
YAML

name: CI Android
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
repository_dispatch:
types: [run_build]
permissions:
contents: read
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
- name: Link with lld
run: sh .github/workflows/scripts/use-lld.sh
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: 'temurin'
cache: 'gradle'
- name: Compile RA
run: |
cd pkg/android/phoenix
# A repository that answers with a server error is retried with
# a backoff (2 s doubling, six tries) before Gradle gives up on
# it for the rest of the build. A build that still fails to fetch
# a dependency is run again, keeping what it already fetched and
# built; any other failure fails the step at once.
set -o pipefail
for i in 1 2 3; do
./gradlew assembleDebug \
-Dorg.gradle.internal.repository.max.tentatives=6 \
-Dorg.gradle.internal.repository.initial.backoff=2000 \
2>&1 | tee gradle.log && break
grep -qE 'Could not (resolve|GET|HEAD|download)' gradle.log \
&& [ $i != 3 ] || exit 1
echo "dependency fetch failed (attempt $i); retrying in 30s"
sleep 30
done
find . -iname "*.apk" -exec ls -l "{}" \;
- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- uses: actions/upload-artifact@v4
with:
name: retroarch-android-${{ steps.slug.outputs.sha8 }}
path: |
pkg/android/phoenix/build/outputs/apk/normal/debug/phoenix-normal-debug.apk
pkg/android/phoenix/build/outputs/apk/aarch64/debug/phoenix-aarch64-debug.apk
pkg/android/phoenix/build/outputs/apk/quest/debug/phoenix-quest-debug.apk
vp9-stack-abi:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
- name: Use the Android project NDK version
run: |
set -eu
version=$(sed -n 's/.*ndkVersion "\([^"]*\)".*/\1/p' pkg/android/phoenix/build.gradle)
test -n "$version"
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;$version"
echo "MEDIA_NDK=$ANDROID_HOME/ndk/$version" >> "$GITHUB_ENV"
- name: VP9 C89 stack ceiling on both Android ABIs and file-offset modes
run: |
set -eu
bin="$MEDIA_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin"
unity="$RUNNER_TEMP/android-record-unity.c"
: > "$unity"
for source in record/record_audio_tap.c record/drivers/record_mediacodec.c gfx/common/mediacodec_inventory.c record/record_mediacodec_encoder.c \
record/record_mux_mediacodec.c record/record_mediacodec_worker.c \
record/record_mediacodec_surface.c record/record_android_capture_images.c \
record/record_android_capture_submit.c record/record_android_capture_pipe.c \
record/record_android_capture_pool.c record/record_android_capture_device.c record/record_android_capture_request.c record/record_android_capture_config.c record/record_android_capture_ops.c \
record/record_android_capture_egl.c \
record/record_android_capture_gl.c \
record/record_android_capture_draw.c record/record_mediacodec_gpu_worker.c \
record/record_mediacodec_file.c record/record_session_mediacodec.c \
record/record_dispatch_mediacodec.c record/record_gpu_dispatch_mediacodec.c \
record/record_gpu_queue.c \
record/record_audio_queue.c libretro-common/queues/retro_spsc.c; do
printf '#include "%s/%s"\n' "$PWD" "$source" >> "$unity"
done
for target in armv7a-linux-androideabi aarch64-linux-android; do
for api in 21 29; do
for offset in default 64; do
extra=""
if [ "$offset" = 64 ]; then extra="-D_FILE_OFFSET_BITS=64"; fi
CC="$bin/$target$api-clang $extra" python3 libretro-common/samples/formats/vp9/check_stack.py
"$bin/$target$api-clang" $extra -O1 -std=c89 -pedantic -Wall -Wextra -Werror \
-Wno-long-long -Wno-c99-extensions -Wframe-larger-than=2048 \
-DANDROID -DHAVE_VULKAN -DHAVE_RECORD_MEDIACODEC -DHAVE_CONFIGFILE \
-DHAVE_THREADS -DHAVE_DYLIB -Ilibretro-common/include -Igfx/include \
-c "$unity" -o "$RUNNER_TEMP/record-$target-$api-$offset.o"
if "$bin/llvm-nm" -u "$RUNNER_TEMP/record-$target-$api-$offset.o" | \
grep -Eq ' U (AMedia|ANativeWindow|AHardwareBuffer|egl|gl[A-Z]|record_android_capture_|record_mediacodec_|record_session_mediacodec_|record_dispatch_mediacodec_|record_gpu_dispatch_mediacodec_|record_mux_mediacodec_|record_audio_tap_|record_audio_queue_|record_gpu_queue_|retro_spsc_|mediacodec_inventory_)'; then
echo "Unresolved Android recording dependency"
exit 1
fi
for source in android_image_queue android_image_ndk mediacodec_session android_frame \
mediacodec_color mediacodec_frame_export vulkan_android_device \
vulkan_android_image vulkan_android_pipeline vulkan_android_sync \
vulkan_android_submit vulkan_android_cache_entry vulkan_android_cache vulkan_android_queue; do
"$bin/$target$api-clang" $extra -O1 -std=c89 -pedantic -Wall -Wextra -Werror \
-Wno-long-long -Wno-c99-extensions -Wframe-larger-than=2048 \
-DHAVE_THREADS -DHAVE_DYLIB -Ilibretro-common/include -Igfx/include \
-c "gfx/common/$source.c" -o "$RUNNER_TEMP/$source-$target-$api-$offset.o"
done
done
done
done
codec-inventory:
runs-on: ubuntu-latest
strategy:
matrix:
cc: [gcc, clang]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Real JNI codec admission and exception contracts
run: make -C samples/gfx/mediacodec_inventory clean all check CC=${{ matrix.cc }} SANITIZER=undefined
image-ownership:
runs-on: ubuntu-latest
strategy:
matrix:
cc: [gcc, clang]
steps:
- uses: actions/checkout@v6
- name: Image ownership and runtime reader fault contracts
run: make -C samples/gfx/android_image_queue clean all check CC=${{ matrix.cc }} SANITIZER=address,undefined
codec-session:
runs-on: ubuntu-latest
strategy:
matrix:
cc: [gcc, clang]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Android encoder, AAC, mux and worker contracts
run: make -C samples/record/mediacodec_encode check CC=${{ matrix.cc }} SANITIZER=address,undefined
- name: Cold session, Surface timestamps and terminal output contracts
run: make -C samples/gfx/mediacodec_session session-check CC=${{ matrix.cc }} SANITIZER=address,undefined
- name: Opaque frame leases, HDR refinement and concurrent handoffs
run: make -C samples/gfx/mediacodec_session frame-check CC=${{ matrix.cc }} SANITIZER=address,undefined
- name: HEVC VP9 AV1 color intersection and renderer export contracts
run: make -C samples/gfx/mediacodec_session export-check CC=${{ matrix.cc }} SANITIZER=address,undefined
vulkan-import-resources:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
cc: [gcc, clang]
env:
APT_PKGS: libvulkan-dev mesa-vulkan-drivers glslc spirv-tools libegl1 libgles2 libgl1-mesa-dri
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: FD ownership, warm submission and cache retirement contracts
run: make -C samples/gfx/mediacodec_session warm-check CC=${{ matrix.cc }} SANITIZER=address,undefined
- name: Modeled image resources, device admission and pipeline contracts
run: make -C samples/gfx/mediacodec_session vulkan-check CC=${{ matrix.cc }} SANITIZER=address,undefined
- name: Apt cache key
id: apt
run: sh .github/workflows/scripts/apt-cache-key.sh "$APT_PKGS"
- name: Restore apt cache
uses: actions/cache/restore@v4
with:
path: ~/.apt-cache
key: ${{ steps.apt.outputs.key }}
restore-keys: ${{ steps.apt.outputs.prefix }}
- name: Install pixel oracle and shader validation dependencies
timeout-minutes: 20
run: sh .github/workflows/scripts/apt-install.sh $APT_PKGS
- name: Save apt cache
if: env.APT_CACHE_SAVE == '1'
uses: actions/cache/save@v4
with:
path: ~/.apt-cache
key: ${{ steps.apt.outputs.key }}
- name: Execute embedded and freshly compiled SDR PQ HLG cropped pixels
run: make -C samples/gfx/mediacodec_session vulkan-gpu-check CC=${{ matrix.cc }} SANITIZER=
- name: GLES recording SDR PQ and scRGB pixel oracle
run: EGL_PLATFORM=surfaceless LIBGL_ALWAYS_SOFTWARE=1 CC=${{ matrix.cc }} python3 samples/record/mediacodec_encode/draw_pixels.py
jni-contract:
runs-on: ubuntu-latest
strategy:
matrix:
cc: [gcc, clang]
env:
APT_PKGS: libvulkan-dev mesa-vulkan-drivers ffmpeg
steps:
- uses: actions/checkout@v6
- name: Apt cache key
id: apt
run: sh .github/workflows/scripts/apt-cache-key.sh "$APT_PKGS"
- name: Restore apt cache
uses: actions/cache/restore@v4
with:
path: ~/.apt-cache
key: ${{ steps.apt.outputs.key }}
restore-keys: ${{ steps.apt.outputs.prefix }}
- name: Install test dependencies
timeout-minutes: 20
run: sh .github/workflows/scripts/apt-install.sh $APT_PKGS
- name: Save apt cache
if: env.APT_CACHE_SAVE == '1'
uses: actions/cache/save@v4
with:
path: ~/.apt-cache
key: ${{ steps.apt.outputs.key }}
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Native decoder session failure and Surface timestamp contracts
run: make -C samples/gfx/mediacodec_session clean all check CC=${{ matrix.cc }} SANITIZER=address,undefined
- name: Hardware startup, first-frame refusal and software playback recovery
run: |
for threads in 0 1; do
make -C libretro-common/samples/formats/video_player clean all CC=${{ matrix.cc }} THREADS="$threads" SANITIZER=address,undefined
libretro-common/samples/formats/video_player/video_player_test
done
- name: HEVC drain and software output after hardware admission refusal
run: |
make -C samples/gfx/d3d11_video_decode rh265_hw_stream_test hevc_color_stream_test CC=${{ matrix.cc }} SANITIZER=address,undefined
(cd samples/gfx/d3d11_video_decode && ./rh265_hw_stream_test && ./hevc_color_stream_test)
- name: Execute RGB shader crop and SDR PQ HLG pixel oracle on Vulkan software device
run: make -C samples/gfx/mediacodec_session gpu-check CC=${{ matrix.cc }} SANITIZER=
- name: HEVC Annex-B configuration and packet preservation
run: make -C samples/gfx/mediacodec_hevc_packet clean all check parser-check CC=${{ matrix.cc }} SANITIZER=address,undefined
ndk-compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Use the Android project NDK version
run: |
set -eu
version=$(sed -n 's/.*ndkVersion "\([^"]*\)".*/\1/p' pkg/android/phoenix/build.gradle)
test -n "$version"
"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;$version"
echo "MEDIA_NDK=$ANDROID_HOME/ndk/$version" >> "$GITHUB_ENV"
- name: Strict C89, SDK function signatures and Android file-offset ABIs
run: |
set -euo pipefail
bin="$MEDIA_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin"
sources=(mediacodec_inventory android_image_queue android_image_ndk android_frame mediacodec_session mediacodec_color mediacodec_frame_export mediacodec_hevc_packet mediacodec_hevc_decoder mediacodec_hevc_backend mediacodec_vp9_decoder mediacodec_vp9_backend mediacodec_av1_decoder mediacodec_av1_backend vulkan_android_image vulkan_android_sync vulkan_android_pipeline vulkan_android_submit vulkan_android_queue vulkan_android_cache_entry vulkan_android_cache vulkan_android_device)
unity="$RUNNER_TEMP/android-media-unity.c"
printf '#include "%s/gfx/common/mediacodec_hevc_registry.h"\n' "$PWD" > "$unity"
printf '#include "%s/gfx/common/mediacodec_vp9_registry.h"\n' "$PWD" >> "$unity"
printf '#include "%s/gfx/common/mediacodec_av1_registry.h"\n' "$PWD" >> "$unity"
printf '#ifndef MEDIACODEC_HEVC_REGISTRY\n#error registry atomics unavailable\n#endif\n' >> "$unity"
for source in "${sources[@]}"; do
printf '#include "%s/gfx/common/%s.c"\n' "$PWD" "$source" >> "$unity"
done
printf '#include "%s/record/record_mediacodec_encoder.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_mux_mediacodec.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_mediacodec_worker.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_mediacodec_surface.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_audio_tap.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/drivers/record_mediacodec.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_android_capture_images.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_android_capture_submit.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_android_capture_pipe.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_android_capture_config.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_android_capture_request.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_android_capture_device.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_android_capture_pool.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_android_capture_ops.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_android_capture_egl.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_android_capture_gl.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_android_capture_draw.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_mediacodec_gpu_worker.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_mediacodec_file.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_session_mediacodec.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_dispatch_mediacodec.c"\n' "$PWD" >> "$unity"
printf '#include "%s/record/record_gpu_dispatch_mediacodec.c"\n' "$PWD" >> "$unity"
for target in aarch64-linux-android armv7a-linux-androideabi; do
for api in 21 29; do
for offset in default 64; do
extra=()
if [ "$offset" = 64 ]; then extra=(-D_FILE_OFFSET_BITS=64); fi
for source in "${sources[@]}"; do
object="$RUNNER_TEMP/$source-$target-$api-$offset.o"
"$bin/$target$api-clang" \
-std=c89 -pedantic -Wall -Wextra -Werror -Wno-long-long -Wno-c99-extensions \
-DHAVE_THREADS -DHAVE_DYLIB -Wframe-larger-than=2048 -Ilibretro-common/include -Igfx/include \
"${extra[@]}" -c "gfx/common/$source.c" -o "$object"
if "$bin/llvm-nm" -u "$object" | grep -Eq ' U (AMedia|AImage|AHardwareBuffer|ANativeWindow_setFrameRateWithChangeStrategy)'; then
echo "Unexpected direct media API dependency: $object"
exit 1
fi
done
for record_source in record_audio_tap record_mediacodec_encoder record_mux_mediacodec record_mediacodec_worker record_mediacodec_surface record_android_capture_images record_android_capture_submit record_android_capture_pipe record_android_capture_pool record_android_capture_device record_android_capture_request record_android_capture_config record_android_capture_gl record_android_capture_draw record_mediacodec_gpu_worker record_mediacodec_file record_session_mediacodec record_dispatch_mediacodec record_gpu_dispatch_mediacodec record_gpu_queue record_audio_queue; do
"$bin/$target$api-clang" \
-std=c89 -pedantic -Wall -Wextra -Werror -Wno-long-long -Wno-c99-extensions \
-DHAVE_THREADS -DHAVE_DYLIB -Wframe-larger-than=2048 -Ilibretro-common/include -Igfx/include \
"${extra[@]}" -c "record/$record_source.c" \
-o "$RUNNER_TEMP/$record_source-$target-$api-$offset.o"
done
"$bin/$target$api-clang" \
-std=c89 -pedantic -Wall -Wextra -Werror -Wno-long-long -Wno-c99-extensions \
-DANDROID -DHAVE_VULKAN -DHAVE_RECORD_MEDIACODEC -DHAVE_CONFIGFILE \
-DHAVE_THREADS -DHAVE_DYLIB -Wframe-larger-than=2048 -Ilibretro-common/include -Igfx/include \
"${extra[@]}" -c "$unity" -o "$RUNNER_TEMP/unity-$target-$api-$offset.o"
"$bin/$target$api-clang" \
-std=c89 -pedantic -Wall -Wextra -Werror -Wno-long-long -Wno-c99-extensions \
-DANDROID -DHAVE_VULKAN -DHAVE_RECORD_MEDIACODEC -DHAVE_CONFIGFILE \
-DHAVE_WEBMPLAYER -DHAVE_THREADS -DHAVE_DYLIB -Wframe-larger-than=2048 \
-Ilibretro-common/include -Igfx/include "${extra[@]}" \
-c record/drivers/record_mediacodec.c \
-o "$RUNNER_TEMP/record-history-$target-$api-$offset.o"
for root_source in gfx/common/vulkan_common.c gfx/drivers/vulkan.c gfx/gfx_surface_player.c libretro-common/jni/rjni.c; do
"$bin/$target$api-clang" \
-DANDROID -DHAVE_MENU -DHAVE_GFX_WIDGETS \
-DHAVE_VULKAN -DHAVE_RMP4 -DHAVE_RVP9 -DHAVE_RAV1 -DHAVE_DYLIB -DHAVE_THREADS \
-Dinline=__inline__ -O1 -std=c89 \
-Werror=declaration-after-statement -Werror=frame-larger-than -Wframe-larger-than=4096 \
-I. -Ilibretro-common/include -Igfx/include "${extra[@]}" \
-c "$root_source" -o "$RUNNER_TEMP/$(basename "$root_source")-$target-$api-$offset.o"
done
for variant in vp9-only av1-only no-codecs recording-only; do
codec_flags=()
case "$variant" in
vp9-only) codec_flags=(-DHAVE_RVP9 -DHAVE_THREADS) ;;
av1-only) codec_flags=(-DHAVE_RAV1 -DHAVE_THREADS) ;;
no-codecs) codec_flags=(-DHAVE_THREADS) ;;
recording-only) codec_flags=(-DHAVE_THREADS -DHAVE_CONFIGFILE -DHAVE_RECORD_MEDIACODEC) ;;
esac
for root_source in gfx/common/vulkan_common.c gfx/drivers/vulkan.c; do
"$bin/$target$api-clang" \
-DANDROID -DHAVE_MENU -DHAVE_GFX_WIDGETS \
-DHAVE_VULKAN -DHAVE_DYLIB "${codec_flags[@]}" \
-Dinline=__inline__ -O1 -std=c89 \
-Werror=declaration-after-statement -Werror=frame-larger-than -Wframe-larger-than=4096 \
-I. -Ilibretro-common/include -Igfx/include "${extra[@]}" \
-c "$root_source" -o "$RUNNER_TEMP/$variant-$(basename "$root_source")-$target-$api-$offset.o"
done
done
for player_source in libretro-common/formats/video_player.c libretro-common/formats/image_transfer.c libretro-common/formats/webm/rwebm_video.c libretro-common/formats/mp4/rmp4_video.c; do
"$bin/$target$api-clang" \
-DHAVE_RMP4 -DHAVE_RWEBM -DHAVE_RVP9 -DHAVE_RAV1 -DHAVE_THREADS \
-Dinline=__inline__ -O1 -std=c89 -Wno-long-long -Wno-c99-extensions \
-Werror=declaration-after-statement -Werror=frame-larger-than -Wframe-larger-than=2048 \
-I. -Ilibretro-common/include "${extra[@]}" \
-c "$player_source" -o "$RUNNER_TEMP/$(basename "$player_source")-$target-$api-$offset.o"
done
for parser_source in libretro-common/formats/h265/rh265.c libretro-common/formats/vp9/rvp9.c libretro-common/formats/av1/rav1_hw.c libretro-common/queues/retro_spsc.c; do
"$bin/$target$api-clang" \
-DHAVE_THREADS -O2 -std=c89 -pedantic -Wall -Wextra -Werror \
-Wno-unused-parameter -Wno-long-long -Wno-c99-extensions -Wframe-larger-than=2048 -fstack-usage \
-Ilibretro-common/include "${extra[@]}" -c "$parser_source" \
-o "$RUNNER_TEMP/$(basename "$parser_source")-$target-$api-$offset.o"
done
"$bin/$target$api-clang" \
-O2 -std=c89 -pedantic -Wall -Wextra -Werror \
-Wno-unused-parameter -Wno-long-long -Wno-c99-extensions -Wframe-larger-than=2048 -fstack-usage \
-Ilibretro-common/include "${extra[@]}" -c libretro-common/formats/vp9/rvp9.c \
-o "$RUNNER_TEMP/threadless-rvp9.c-$target-$api-$offset.o"
# Link AV1-only roots with exactly their selected native sources.
av1_objects=()
for source in mediacodec_inventory android_image_queue android_image_ndk android_frame mediacodec_session mediacodec_color mediacodec_frame_export mediacodec_av1_decoder mediacodec_av1_backend vulkan_android_image vulkan_android_sync vulkan_android_pipeline vulkan_android_submit vulkan_android_queue vulkan_android_cache_entry vulkan_android_cache vulkan_android_device; do
av1_objects+=("$RUNNER_TEMP/$source-$target-$api-$offset.o")
done
"$bin/ld.lld" -r "${av1_objects[@]}" \
"$RUNNER_TEMP/av1-only-vulkan_common.c-$target-$api-$offset.o" \
"$RUNNER_TEMP/av1-only-vulkan.c-$target-$api-$offset.o" \
"$RUNNER_TEMP/rjni.c-$target-$api-$offset.o" \
"$RUNNER_TEMP/rav1_hw.c-$target-$api-$offset.o" \
-o "$RUNNER_TEMP/av1-only-root-$target-$api-$offset.o"
if "$bin/llvm-nm" -u "$RUNNER_TEMP/av1-only-root-$target-$api-$offset.o" | \
grep -Eq ' U (rav1_|rvp9_|rh265_|rjni_env$|mediacodec_|android_frame_|android_image_|vulkan_android_)'; then
echo "Unresolved private helper in AV1-only Android root"
exit 1
fi
for variant in no-codecs; do
if "$bin/llvm-nm" -u "$RUNNER_TEMP/$variant-vulkan.c-$target-$api-$offset.o" | \
grep -Eq ' U (mediacodec_|rav1_(set|unset)_hw_backend)'; then
echo "Unexpected native decoder dependency: $variant"
exit 1
fi
done
"$bin/ld.lld" -r \
"$RUNNER_TEMP/unity-$target-$api-$offset.o" \
"$RUNNER_TEMP/vulkan_common.c-$target-$api-$offset.o" \
"$RUNNER_TEMP/vulkan.c-$target-$api-$offset.o" \
"$RUNNER_TEMP/gfx_surface_player.c-$target-$api-$offset.o" \
"$RUNNER_TEMP/rjni.c-$target-$api-$offset.o" \
"$RUNNER_TEMP/video_player.c-$target-$api-$offset.o" \
"$RUNNER_TEMP/image_transfer.c-$target-$api-$offset.o" \
"$RUNNER_TEMP/rwebm_video.c-$target-$api-$offset.o" \
"$RUNNER_TEMP/rmp4_video.c-$target-$api-$offset.o" \
"$RUNNER_TEMP/rh265.c-$target-$api-$offset.o" \
"$RUNNER_TEMP/rvp9.c-$target-$api-$offset.o" \
"$RUNNER_TEMP/rav1_hw.c-$target-$api-$offset.o" \
"$RUNNER_TEMP/record_audio_queue-$target-$api-$offset.o" \
"$RUNNER_TEMP/record_gpu_queue-$target-$api-$offset.o" \
"$RUNNER_TEMP/retro_spsc.c-$target-$api-$offset.o" \
-o "$RUNNER_TEMP/media-root-$target-$api-$offset.o"
if "$bin/llvm-nm" -u "$RUNNER_TEMP/media-root-$target-$api-$offset.o" | \
grep -Eq ' U (record_android_capture_|record_mediacodec_|record_session_mediacodec_|record_dispatch_mediacodec_|record_gpu_dispatch_mediacodec_|record_mux_mediacodec_|record_audio_tap_|record_audio_queue_|record_gpu_queue_|retro_spsc_|rav1_|rvp9_|rjni_env$|mediacodec_|android_frame_|android_image_|vulkan_android_|video_player_(request_software|set_hw_fallback)|image_transfer_anim_stream_stop_hw|rwebm_video_stream_stop_hw)'; then
echo "Unresolved private Android media helper in root link"
exit 1
fi
done
done
done