Conversation
Drop adb reverse. Accessory bulk carries length-prefixed H.264 access units into MediaCodec, and every tablet's HTTP tunnel uses the daemon port.
LAN login terminates on 127.0.0.1 just like the AOA proxy. Annex-B over USB runs only when that port is the accessory proxy, so Wi-Fi keeps ExoPlayer.
stopAccessory closes accepted sockets while their reader may still be starting. getInputStream then threw outside the read try, and Android killed the process. The read loop now treats a closed socket as end of stream.
The stream watchdog treated one failed GET /health on the accessory proxy as a dead host and closed the session about two minutes in. USB video does not use that HTTP call, so an active AOA player now ignores those misses. Other transports wait for three failures. The idle reaper also leaves a display up while a video subscriber is still attached.
Show delay, frame age, bitrate, and I/P/D on web and Android. The toolbar frame-age field stays a fixed width. Debug builds skip the update prompt.
Label USB Annex-B, USB HTTP /au, UDP Annex-B, MPEG-TS, WebTransport, and HTTPS /au in the overlay and toolbar. A Wi-Fi session on the local TLS proxy is no longer titled USB.
Mint a short-lived AES-256-GCM key over the pinned host proxy and seal every ORB1 datagram. Cleartext shared-token hellos no longer join. Android Wi-Fi sends video to the LAN host on UDP 8789 while session and input stay on the TLS proxy.
A Cauchy block with 253 or more data shards divided by zero and panicked the debug UDP sender. Cap each code at 252 data shards and split a larger access unit into several blocks. Android and the web client reassemble those blocks.
The 10-minute deadline was measured from mint time, so a playing tablet lost pongs and disconnected. Each accepted packet now moves that deadline forward. An unused key still expires, and a key that is already expired stays rejected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
USB video no longer depends on
adb reverse. The host sends length-prefixed H.264 access units on the Android Open Accessory bulk pipe, and the tablet decodes them with MediaCodec. HTTP session and input still ride the accessory TCP proxy. MPEG-TS/ExoPlayer stays the Wi-Fi path through the LAN TLS proxy.The second commit keeps that proxy from being mistaken for USB. LAN login also uses
127.0.0.1, so Annex-B over USB runs only when the port is the accessory proxy.Test plan
R52M70X9DNM,R52N40APCBZ) stream over USB withkind=Aoa, toolbarvaapi · USB, and a live picture.adb reverse --listis empty. Health reportsusb_devices: 2.https://127.0.0.1:8790/client/opens a session, draws a 2560×1600 canvas, and showsVAAPI delay 3ms.192.168.39.191) pair and play with ExoPlayer, not the USB player.UsbLoopbackTestand AOA frame unit tests pass.