bd4e15b68d
- native: the 756-line session.rs becomes session/{mod,connect,input,planes}.rs
around a SessionHandle (connect lifecycle + trust, input plane shims, plane
start/stop + stats drain).
- Decode-stats sampling is HUD-gated (nativeSetVideoStatsEnabled): with the
overlay hidden the decode thread skips the per-AU clock read + lock; enabling
resets the measurement window.
- audio: the AAudio open path is a per-sharing-mode try_open closure — the
realtime callback state (ring, prime, free-list) is rebuilt per attempt, so a
failed exclusive-mode try can't leak state into the shared-mode retry.
- Kotlin: ConnectScreen/StreamScreen slimmed by extracting ConnectDialogs,
StatsOverlay and TouchInput.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
44 lines
2.4 KiB
TOML
44 lines
2.4 KiB
TOML
[package]
|
|
name = "punktfunk-client-android"
|
|
description = "punktfunk Android client — JNI bridge ('nativecore') over punktfunk-core (Rust-heavy client model)"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
authors.workspace = true
|
|
repository.workspace = true
|
|
|
|
[lib]
|
|
# `libpunktfunk_android.so` — loaded by Kotlin via `System.loadLibrary("punktfunk_android")`.
|
|
name = "punktfunk_android"
|
|
crate-type = ["cdylib"]
|
|
|
|
[dependencies]
|
|
# The whole protocol/transport/FEC/crypto + the embeddable NativeClient connector. `quic` pulls
|
|
# the punktfunk/1 control plane (now ring-only — no aws-lc, see punktfunk-core/Cargo.toml).
|
|
punktfunk-core = { path = "../../../crates/punktfunk-core", features = ["quic"] }
|
|
jni = "0.21"
|
|
log = "0.4"
|
|
# LAN host discovery: browse the host's `_punktfunk._udp` mDNS advert — the SAME crate + service the
|
|
# Linux/Windows clients use (`clients/linux/src/discovery.rs`), replacing Android's per-OEM
|
|
# `NsdManager` system daemon with one tested browse path. Pure Rust (socket2/if-addrs/mio), so it
|
|
# cross-compiles to the Android targets AND builds on the host (the JNI seam links into
|
|
# `cargo build --workspace`). Kotlin keeps only the Wi-Fi `MulticastLock` + permission UX.
|
|
mdns-sd = "0.20"
|
|
|
|
# Android-only deps. Gated so `cargo build --workspace` on the Linux/macOS dev boxes + CI still
|
|
# compiles this crate (as a host cdylib) — the Android-framework glue (logging, AMediaCodec + AAudio
|
|
# via `ndk`, the Opus codec) is only pulled in for the real `*-linux-android` targets.
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
android_logger = "0.14"
|
|
# NDK bindings. "media" = AMediaCodec/ANativeWindow (video); "audio" = AAudio (audio playback).
|
|
# Pure-Rust FFI to libmediandk/libnativewindow/libaaudio — no C++/libc++_shared to bundle. Decode +
|
|
# audio run entirely in Rust on native threads (the "no async on the hot path" invariant).
|
|
ndk = { version = "0.9", features = ["media", "audio", "nativewindow", "api-level-31"] }
|
|
# setpriority/gettid to raise the decode thread toward URGENT_DISPLAY (see decode::boost_thread_priority).
|
|
libc = "0.2"
|
|
# Opus decode for the host→client audio plane (0xC9: 48 kHz stereo, 5 ms frames). Same crate the
|
|
# host + Linux client use. audiopus_sys vendors libopus (pure C) and builds it static via cmake —
|
|
# the cargo-ndk build sets LIBOPUS_STATIC=1/LIBOPUS_NO_PKG=1 so it links the bundled lib, not the host's.
|
|
opus = "0.3"
|