From eb0c8951196c637e44daf3c0617b131b997d5d2c Mon Sep 17 00:00:00 2001 From: Lena Date: Thu, 1 Jan 2026 00:00:00 +0000 Subject: scrcpy-android: mirror an Android device over wireless ADB Native Java app for Android 12+ that mirrors another Android device over wireless ADB, forwarding video, audio, touch input, and clipboard. Bundles a pinned scrcpy-server.jar and the vendored libadb-android stack. Supports h264/h265/av1 video and raw/opus audio with in-app codec selection. No NDK, no Kotlin. Includes JVM unit tests and a Docker-based emulator e2e rig. --- app/src/main/java/invalid/lena/scrcpy/AudioFrames.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 app/src/main/java/invalid/lena/scrcpy/AudioFrames.java (limited to 'app/src/main/java/invalid/lena/scrcpy/AudioFrames.java') diff --git a/app/src/main/java/invalid/lena/scrcpy/AudioFrames.java b/app/src/main/java/invalid/lena/scrcpy/AudioFrames.java new file mode 100644 index 0000000..da0bb0a --- /dev/null +++ b/app/src/main/java/invalid/lena/scrcpy/AudioFrames.java @@ -0,0 +1,18 @@ +package invalid.lena.scrcpy; + +// Sink for parsed audio frames. AudioSink is the only production +// implementation; tests use a recording stub. Kept android-free. +// +// start(fourcc) tells the sink which wire codec it should expect. +// For raw payloads are interleaved s16le PCM. For opus the first +// frame has isConfig=true and payload is the OpusHead (the server +// pre-strips the AOPUSHDR/AOPUSDLY/AOPUSPRL container); subsequent +// frames are opus packets. +public interface AudioFrames { + + void start(int fourcc); + + void feed(byte[] data, int off, int len, boolean isConfig); + + void release(); +} -- cgit v1.2.3