1
0
mirror of git://f0xx.org/android_cast synced 2026-07-29 07:39:15 +03:00
This commit is contained in:
Anton Afanasyeu
2026-06-08 12:38:57 +02:00
parent bfb41f06d9
commit c1591fa849
86 changed files with 5081 additions and 637 deletions

View File

@@ -9,27 +9,34 @@ The app loads `libandroidcast_codecs.so` for availability probes and future soft
| FEC 3/4 + RS | Yes | — | v2 **per-shard** on wire (`FecShardWire`); v1 monolithic decode still accepted |
| NACK + retransmit cache | Yes | — | UDP `MSG_NACK`, combined with FEC when enabled |
| libvpx VP8/VP9 | Native | Encode + decode | Screen cast via ImageReader; receiver libvpx (decoder uses `VPX_CODEC_USE_ERROR_CONCEALMENT` when supported) or MediaCodec fallback |
| Opus / Speex | Stub | Probe only | Submodules under `third-party/` |
| Opus / Speex | Probe + static link when `lib*.a` built | Encode/decode JNI sinks | `scripts/build-native-codecs.sh` → CMake autolink |
## Enable libvpx (developer)
## Enable native codecs (developer)
1. `git submodule update --init third-party/libvpx`
2. Build `libvpx.a` per ABI (NDK is auto-detected; see `scripts/android-ndk.sh`):
1. Initialize submodules as needed:
`./scripts/build-native-codecs.sh arm64-v8a`
```bash
git submodule update --init third-party/libvpx
git submodule update --init third-party/opus
git submodule update --init third-party/speex
```
(If the repo path has **spaces**, the script uses `/tmp/androidcast-libvpx-$USER` automatically.)
3. Build **each ABI** you ship (Gradle links `build/native/<abi>/libvpx.a` automatically):
2. Build static libs per ABI (NDK auto-detected via `scripts/android-ndk.sh`):
```bash
./scripts/build-native-codecs.sh arm64-v8a
./scripts/build-native-codecs.sh armeabi-v7a # if armeabi-v7a is in your APK
./gradlew assembleDebug
```
```bash
./scripts/build-native-codecs.sh arm64-v8a
./scripts/build-native-codecs.sh armeabi-v7a # if shipped in APK
```
If the repo path has **spaces**, the script stages under `/tmp/androidcast-libvpx-$USER`.
3. Gradle / CMake link `build/native/<abi>/lib*.a` when present and set `ANDROIDCAST_HAVE_LIBVPX`, `ANDROIDCAST_HAVE_OPUS`, `ANDROIDCAST_HAVE_SPEEX` accordingly.
4. `./gradlew assembleDebug`
Optional override: `ANDROIDCAST_LIBVPX_LIB` only applies when its path contains the current ABI name (e.g. `.../arm64-v8a/libvpx.a`).
ABIs without a matching `libvpx.a` still build; software VPx is disabled on those architectures.
ABIs without matching `.a` files still build; missing codecs are disabled on those architectures.
## Stream protection defaults