Skip to content

Restore legacy Wi-Fi streaming stability - #31

Draft
YashasVM wants to merge 2 commits into
mainfrom
codex/restore-legacy-stability
Draft

Restore legacy Wi-Fi streaming stability#31
YashasVM wants to merge 2 commits into
mainfrom
codex/restore-legacy-stability

Conversation

@YashasVM

@YashasVM YashasVM commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Removes the USB runtime path from the maintained app/plugin surface and restores the legacy Wi-Fi app + OBS camera-source/dock flow.
  • Keeps the smaller optimized defaults: hardware AVC/H.264, 1080p30, 12 Mbps video, mono 128 kbps AAC.
  • Fixes app↔OBS lifecycle races, bounded backpressure, source-clock timestamping, and stale-frame handling around OBS Virtual Camera startup.

Root causes addressed

  • 1080p60 at 50 Mbps and an over-sized audio capture buffer increased phone heat and workload.
  • MediaCodec callbacks performed mux/send work inline, so transport backpressure stalled encoding and accumulated latency.
  • OBS timestamped decoded frames at arrival time, allowing queue backlog to turn into large A/V delay and drift when Virtual Camera started.
  • Control/discovery workers could overlap or retain stale lifecycle state during reconnects/stops.

Validation

  • Python contract suite: 28 passed.
  • Android unit tests, lint, debug APK, and native SRT CMake builds passed for arm64-v8a, armeabi-v7a, x86, and x86_64.
  • OBS plugin full MSVC/Ninja build passed; contract CTest: 1/1 passed.
  • Before/after performance measurements are documented in docs/testing.md.

Follow-up acceptance

A physical phone + OBS run is still required to confirm sustained thermals, end-to-end latency, A/V sync, reconnect behavior, and Virtual Camera startup under the target device/network.

Summary by CodeRabbit

  • New Features
    • Streaming now defaults to hardware AVC/H.264 at 30 FPS, with 1080p30 and 720p30 fallback profiles.
    • Bitrate settings support an 8–50 Mbps range, with a 12 Mbps default.
    • OBS preview now reports live video at 30 FPS.
  • Bug Fixes
    • Improved reconnect and shutdown handling for Android and OBS streaming.
    • Reduced stale-frame buildup and improved audio/video synchronization.
    • Hardware encoding issues are reported instead of silently falling back to software encoding.
  • Documentation
    • Updated setup, protocol, architecture, and testing guidance for local Wi‑Fi streaming and current defaults.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fe9d66e2-4981-44bf-b967-e7c84b1e9297

📥 Commits

Reviewing files that changed from the base of the PR and between 7b28cc4 and 65e3259.

📒 Files selected for processing (25)
  • README.md
  • android/app/src/main/cpp/openstream_srt.cpp
  • android/app/src/main/java/dev/openstream/app/MainActivity.kt
  • android/app/src/main/java/dev/openstream/app/camera/Camera2Controller.kt
  • android/app/src/main/java/dev/openstream/app/control/CameraControlServer.kt
  • android/app/src/main/java/dev/openstream/app/discovery/ObsDiscoveryClient.kt
  • android/app/src/main/java/dev/openstream/app/discovery/PhoneDiscoveryAdvertiser.kt
  • android/app/src/main/java/dev/openstream/app/encoder/MediaCodecAudioEncoder.kt
  • android/app/src/main/java/dev/openstream/app/encoder/MediaCodecVideoEncoder.kt
  • android/app/src/main/java/dev/openstream/app/stream/ConnectionTarget.kt
  • android/app/src/main/java/dev/openstream/app/stream/SrtStreamClient.kt
  • android/app/src/main/java/dev/openstream/app/stream/StreamConfig.kt
  • android/app/src/test/java/dev/openstream/app/stream/StreamConfigTest.kt
  • docs/architecture.md
  • docs/protocol.md
  • docs/testing.md
  • obs-plugin/CMakeLists.txt
  • obs-plugin/src/async-control-client.cpp
  • obs-plugin/src/async-control-client.hpp
  • obs-plugin/src/media-clock.hpp
  • obs-plugin/src/openstream-dock.cpp
  • obs-plugin/src/openstream-source.cpp
  • obs-plugin/tests/test_contracts.cpp
  • tests/test_repo_contract.py
  • website/src/main.jsx
 _________________
< Shell we dance? >
 -----------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/restore-legacy-stability

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant