Files
Portal-Camera/smart-camera-streamer
2026-09-13 12:15:36 -07:00
..
2026-09-13 12:15:36 -07:00

SmartCameraStreamer

Small Kotlin/JVM-compatible core for the Portal streaming service. It owns independent video/audio subscriber counts, starts each encoded track on its first subscriber, stops it after the last disconnects, fans out one encoded packet stream to all subscribers, waits for an IDR for new video subscribers, and exposes /control/mode and /control/fixed endpoints.

The host Android service supplies EncodedTrack implementations backed by one shared MediaCodec per track and a SmartCameraController adapter around the Portal Smart Camera binder API.

Build the standalone library with:

"/Applications/Android Studio.app/Contents/plugins/Kotlin/kotlinc/bin/kotlinc" \
  src/main/kotlin/com/portaltv/streamer/SmartCameraStreamer.kt \
  -d build/smart-camera-streamer.jar