# Native codecs (libvpx, Opus, Speex) The app loads `libandroidcast_codecs.so` for availability probes and future software encode/decode paths. ## Current status | Component | Java | Native | Notes | |-----------|------|--------|-------| | FEC 3/4 + RS | Yes | — | `ProtectionEnvelope`, handshake-safe scopes | | NACK + retransmit cache | Yes | — | UDP `MSG_NACK`, combined with FEC when enabled | | libvpx VP8/VP9 | Stub | Probe only | HW passthrough until `ANDROIDCAST_LIBVPX_LIB` is linked | | Opus / Speex | Stub | Probe only | Submodules under `third-party/` | ## Enable libvpx (developer) 1. `git submodule update --init third-party/libvpx` 2. Build `libvpx.a` for your ABI (script stub: `scripts/build-native-codecs.sh`) 3. Rebuild the APK with the static library path: ```bash export ANDROIDCAST_LIBVPX_LIB=/path/to/libvpx.a ./gradlew assembleDebug ``` CMake defines `ANDROIDCAST_HAVE_LIBVPX=1` and links the archive when the variable is set. ## Stream protection defaults - Default: **None** (no FEC/NACK) - Enable in **Global settings → Stream protection (UDP)** - After handshake, sender and receiver negotiate the effective mode